From 0ca27dc28dc0d4cd1b4a5bcbed67cd7cc42144f3 Mon Sep 17 00:00:00 2001 From: nazunalika Date: Wed, 20 Oct 2021 16:21:00 -0700 Subject: [PATCH] spec updates --- SPECS/rocky-release.spec | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/SPECS/rocky-release.spec b/SPECS/rocky-release.spec index 9822f98..2607c4f 100644 --- a/SPECS/rocky-release.spec +++ b/SPECS/rocky-release.spec @@ -11,13 +11,14 @@ %define major 9 %define minor 0 %define rocky_rel 1 -%define upstream_rel %{major}.%{minor} %define rpm_license BSD-3-Clause %define base_release_version %{major} -%define full_release_version %{major} +%define full_release_version %{major}.%{minor} %define dist_release_version %{major} +%define contentdir pub/rocky + %ifarch ppc64le %define tuned_profile :server %endif @@ -35,12 +36,12 @@ BuildArch: noarch # What do we provide? Provides: rocky-release = %{version}-%{release} -Provides: rocky-release(upstream) = %{upstream_rel} +Provides: rocky-release(upstream) = %{full_release_version} Provides: redhat-release = %{version}-%{release} Provides: system-release = %{version}-%{release} Provides: system-release(releasever) = %{major} Provides: centos-release = %{version}-%{release} -Provides: centos-release(upstream) = %{upstream_rel} +Provides: centos-release(upstream) = %{full_release_version} ## Required by libdnf Provides: base-module(platform:el%{major}) @@ -97,8 +98,8 @@ Source1300: rocky.1.gz %package -n rocky-repos Summary: %{distro_name} Package Repositories License: %{rpm_license} -Provides: rocky-repos(%{major}) = %{upstream_rel} -Requires: system-release = %{upstream_rel} +Provides: rocky-repos(%{major}) = %{full_release_version} +Requires: system-release = %{full_release_version} Requires: rocky-gpg-keys Conflicts: %{name} < 8.0 @@ -146,14 +147,14 @@ install -p -m 0644 %{SOURCE1300} %{buildroot}%{_mandir}/man1/ install -d -m 0755 %{buildroot}%{_prefix}/lib cat > %{buildroot}%{_prefix}/lib/os-release << EOF NAME="%{distro_name}" -VERSION="%{major}.%{minor} (%{distro_code})" +VERSION="%{full_release_version} (%{distro_code})" ID="rocky" ID_LIKE="rhel centos fedora" -VERSION_ID="%{major}.%{minor}" +VERSION_ID="%{full_release_version}" PLATFORM_ID="platform:el%{major}" -PRETTY_NAME="%{distro_name} %{major}.%{minor} (%{distro_code})" +PRETTY_NAME="%{distro_name} %{full_release_version} (%{distro_code})" ANSI_COLOR="0;32" -CPE_NAME="cpe:/o:rocky:rocky:%{major}.%{minor}:GA" +CPE_NAME="cpe:/o:rocky:rocky:%{full_release_version}:GA" HOME_URL="https://rockylinux.org/" BUG_REPORT_URL="https://bugs.rockylinux.org/" ROCKY_SUPPORT_PRODUCT="%{distro_name}" @@ -164,7 +165,7 @@ EOF ln -s ../usr/lib/os-release %{buildroot}%{_sysconfdir}/os-release # write cpe to /etc/system/release-cpe -echo "cpe:/o:rocky:rocky:%{major}.%{minor}:GA" > %{buildroot}%{_sysconfdir}/system-release-cpe +echo "cpe:/o:rocky:rocky:%{full_release_version}:GA" > %{buildroot}%{_sysconfdir}/system-release-cpe # create /etc/issue and /etc/issue.net echo '\S' > %{buildroot}%{_sysconfdir}/issue @@ -259,7 +260,7 @@ install -p -m 0644 %{SOURCE1226} %{buildroot}%{_sysconfdir}/yum.repos.d/ # dnf stuff install -d -m 0755 %{buildroot}%{_sysconfdir}/dnf/vars -echo "pub/rocky" > %{buildroot}%{_sysconfdir}/dnf/vars/contentdir +echo "%{contentdir}" > %{buildroot}%{_sysconfdir}/dnf/vars/contentdir # Copy out GPG keys install -d -m 0755 %{buildroot}%{_sysconfdir}/pki/rpm-gpg