diff --git a/base/comps/azurelinux-release/90-default.preset b/base/comps/azurelinux-release/90-default.preset index 8702fc3c91d..809603bdb7e 100644 --- a/base/comps/azurelinux-release/90-default.preset +++ b/base/comps/azurelinux-release/90-default.preset @@ -28,10 +28,6 @@ enable auditd.service enable audit-rules.service -# Backward-compat: override /proc/version so tools that grep for "Mariner" -# can identify Azure Linux -enable proc-version-override.service - # Locally-running service enable restorecond.service @@ -375,3 +371,4 @@ enable gpio-manager.service # Enable authselect-apply-changes.service enable authselect-apply-changes.service + diff --git a/base/comps/azurelinux-release/azurelinux-release.spec b/base/comps/azurelinux-release/azurelinux-release.spec index e12e976b583..b9513ead2fb 100644 --- a/base/comps/azurelinux-release/azurelinux-release.spec +++ b/base/comps/azurelinux-release/azurelinux-release.spec @@ -39,7 +39,7 @@ Summary: Azure Linux release files Name: azurelinux-release Version: 4.0 # TODO(azl): Review whether we can move back to autorelease (with conditional -p) -Release: 10%{?dist} +Release: 11%{?dist} License: MIT URL: https://aka.ms/azurelinux @@ -52,8 +52,7 @@ Source14: distro-template.swidtag Source15: distro-variant-template.swidtag Source16: 20-azurelinux-defaults.conf Source17: 20-azure.conf -Source18: proc-version-override.service -Source19: proc-version-override.sh + Source20: chrony-azure.conf Source21: 50-azure-cloud.conf Source22: 70-azurelinux-hardening.conf @@ -402,10 +401,6 @@ ln -s --relative %{buildroot}%{_swidtagdir} %{buildroot}%{_sysconfdir}/swid/swid # Install DNF 5 configuration defaults install -Dm0644 %{SOURCE16} -t %{buildroot}%{_prefix}/share/dnf5/libdnf.conf.d/ -# Install proc-version-override (backward-compat for tools that grep /proc/version for "Mariner") -install -Dm0644 %{SOURCE18} -t %{buildroot}%{_unitdir}/ -install -Dm0755 %{SOURCE19} %{buildroot}%{_libexecdir}/proc-version-override - # Install sysctl configuration install -Dm0644 %{SOURCE22} -t %{buildroot}%{_sysctldir}/ @@ -435,8 +430,6 @@ install -Dm0644 %{SOURCE22} -t %{buildroot}%{_sysctldir}/ %dir %{_sysconfdir}/swid %{_sysconfdir}/swid/swidtags.d %{_prefix}/share/dnf5/libdnf.conf.d/20-azurelinux-defaults.conf -%{_unitdir}/proc-version-override.service -%{_libexecdir}/proc-version-override %{_sysctldir}/70-azurelinux-hardening.conf @@ -476,6 +469,9 @@ install -Dm0644 %{SOURCE22} -t %{buildroot}%{_sysctldir}/ %changelog +* Thu Apr 23 2026 Dan Streetman - 4.0-11 +- Revert proc-version-override + * Tue Apr 21 2026 Dan Streetman - 4.0-10 - Fix distcore macro definition diff --git a/base/comps/azurelinux-release/proc-version-override.service b/base/comps/azurelinux-release/proc-version-override.service deleted file mode 100644 index 7bf9cee64ea..00000000000 --- a/base/comps/azurelinux-release/proc-version-override.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Override /proc/version for legacy OS detection (CBL-Mariner compat) -Before=waagent.service cloud-init.service cloud-init-local.service -After=local-fs.target -ConditionVirtualization=vm - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/usr/libexec/proc-version-override -ExecStop=-/bin/umount /proc/version -ExecStopPost=-/bin/rm -f /run/proc_version_override - -[Install] -WantedBy=multi-user.target diff --git a/base/comps/azurelinux-release/proc-version-override.sh b/base/comps/azurelinux-release/proc-version-override.sh deleted file mode 100644 index c9161eeb5cd..00000000000 --- a/base/comps/azurelinux-release/proc-version-override.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# Generate a /proc/version override that includes both "CBL-Mariner" and -# "azurelinux" identifiers, then bind-mount it over /proc/version. -# -# This preserves backward compatibility with tools that grep /proc/version -# for "Mariner" (e.g. Guest-Configuration-Extension) while also advertising -# the current distro name. - -set -euo pipefail - -OVERRIDE=/run/proc_version_override - -# `mount --bind` on a file target is not idempotent; repeated runs can stack -# mounts on /proc/version. Unwind any existing mount layers before reading -# the real /proc/version and rebinding. -while findmnt -n /proc/version >/dev/null 2>&1; do - umount /proc/version -done - -# Build a version string using the real kernel version, replacing only -# the (user@host) field with (root@CBL-Mariner-azurelinux). -# -# Real /proc/version format: -# Linux version (mockbuild@koji-builder-...) (gcc (GCC) ...) #1 SMP ... -# Override: -# Linux version (root@CBL-Mariner-azurelinux) (gcc (GCC) ...) #1 SMP ... -# -# We strip the first parenthesized group (user@host) and keep everything -# after it (compiler info, build config, timestamp) verbatim. -# Also replace "Red Hat" in the GCC version string so tools that pattern-match -# /proc/version (e.g. GCE's guest-configuration-shim) don't misidentify AZL as -# RHEL based on the compiler tag. -KVER=$(uname -r) -TAIL=$(sed 's/^[^)]*)[[:space:]]*//' /proc/version | sed 's/Red Hat/Azure Linux/g') - -install -m 0444 /dev/null "$OVERRIDE" -cat > "$OVERRIDE" <