Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update distribution tag for Azure Linux 3.0 #6275

Merged
merged 7 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions SPECS/mariner-release/mariner-release.spec
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
Summary: CBL-Mariner release files
Summary: Azure Linux release files
Name: mariner-release
Version: 2.0
Release: 53%{?dist}
Version: 3.0
Release: 1%{?dist}
License: MIT
Vendor: Microsoft Corporation
Distribution: Mariner
Distribution: Microsoft Azure Linux
Group: System Environment/Base
URL: https://aka.ms/cbl-mariner
URL: https://aka.ms/azurelinux
# Allows package management tools to find and set the default value
# for the "releasever" variable from the RPM database.
Provides: system-release(releasever)
BuildArch: noarch

%description
Azure CBL-Mariner release files such as yum configs and other %{_sysconfdir}/ release related files
Azure Linux release files such as yum configs and other %{_sysconfdir}/ release related files

%install
install -d %{buildroot}%{_sysconfdir}
install -d %{buildroot}/%{_libdir}

echo "CBL-Mariner %{mariner_release_version}" > %{buildroot}%{_sysconfdir}/mariner-release
echo "Azure Linux %{mariner_release_version}" > %{buildroot}%{_sysconfdir}/mariner-release
echo "MARINER_BUILD_NUMBER=%{mariner_build_number}" >> %{buildroot}%{_sysconfdir}/mariner-release

cat > %{buildroot}%{_sysconfdir}/lsb-release <<- "EOF"
DISTRIB_ID="Mariner"
DISTRIB_ID="azurelinux"
DISTRIB_RELEASE="%{mariner_release_version}"
DISTRIB_CODENAME=Mariner
DISTRIB_DESCRIPTION="CBL-Mariner %{mariner_release_version}"
DISTRIB_CODENAME=AzureLinux
DISTRIB_DESCRIPTION="Microsoft Azure Linux %{mariner_release_version}"
EOF

version_id=`echo %{mariner_release_version} | grep -o -E '[0-9]+.[0-9]+' | head -1`
cat > %{buildroot}/%{_libdir}/os-release << EOF
NAME="Common Base Linux Mariner"
NAME="Microsoft Azure Linux"
VERSION="%{mariner_release_version}"
ID=mariner
ID=azurelinux
VERSION_ID="$version_id"
PRETTY_NAME="CBL-Mariner/Linux"
PRETTY_NAME="Microsoft Azure Linux $version_id"
ANSI_COLOR="1;34"
HOME_URL="%{url}"
BUG_REPORT_URL="%{url}"
Expand All @@ -45,11 +45,11 @@ EOF
ln -sv ../usr/lib/os-release %{buildroot}%{_sysconfdir}/os-release

cat > %{buildroot}%{_sysconfdir}/issue <<- EOF
Welcome to CBL-Mariner %{mariner_release_version} (%{_arch}) - Kernel \r (\l)
Welcome to Azure Linux %{mariner_release_version} (%{_arch}) - Kernel \r (\l)
EOF

cat > %{buildroot}%{_sysconfdir}/issue.net <<- EOF
Welcome to CBL-Mariner %{mariner_release_version} (%{_arch})
Welcome to Azure Linux %{mariner_release_version} (%{_arch})
EOF

%files
Expand All @@ -62,6 +62,9 @@ EOF
%config(noreplace) %{_sysconfdir}/issue.net

%changelog
* Wed Nov 29 2023 Jon Slobodzian <[email protected]> - 3.0-1
- First version of Azure Linux 3.0. Includes minimal rebranding changes.

* Fri Oct 20 2023 CBL-Mariner Servicing Account <[email protected]> - 2.0-53
- Bump release for October 2023 Release 2

Expand Down
2 changes: 1 addition & 1 deletion SPECS/tdnf/tdnf-default-mariner-release.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Fixes: Bug 24144834: TDNF does not support $basearch and $releasever in .repo fi

By default, determine $ basearch and $ releasever from this package:
mariner_user@mariner-aks [ /etc/tdnf ]$ sudo tdnf --refresh list installed | grep mariner
mariner-release.noarch 1.0-1.cm1 @System
mariner-release.noarch 1.0-1.azl3 @System

Workaround: add the following to /etc/tdnf/tdnf.conf
distroverpkg=mariner-release
Expand Down
Loading
Loading