spec updates

This commit is contained in:
nazunalika 2021-10-20 16:21:00 -07:00
parent 20a0f7a0b3
commit 0ca27dc28d
Signed by: label
GPG Key ID: 6735C0E1BD65D048

View File

@ -11,13 +11,14 @@
%define major 9 %define major 9
%define minor 0 %define minor 0
%define rocky_rel 1 %define rocky_rel 1
%define upstream_rel %{major}.%{minor}
%define rpm_license BSD-3-Clause %define rpm_license BSD-3-Clause
%define base_release_version %{major} %define base_release_version %{major}
%define full_release_version %{major} %define full_release_version %{major}.%{minor}
%define dist_release_version %{major} %define dist_release_version %{major}
%define contentdir pub/rocky
%ifarch ppc64le %ifarch ppc64le
%define tuned_profile :server %define tuned_profile :server
%endif %endif
@ -35,12 +36,12 @@ BuildArch: noarch
# What do we provide? # What do we provide?
Provides: rocky-release = %{version}-%{release} Provides: rocky-release = %{version}-%{release}
Provides: rocky-release(upstream) = %{upstream_rel} Provides: rocky-release(upstream) = %{full_release_version}
Provides: redhat-release = %{version}-%{release} Provides: redhat-release = %{version}-%{release}
Provides: system-release = %{version}-%{release} Provides: system-release = %{version}-%{release}
Provides: system-release(releasever) = %{major} Provides: system-release(releasever) = %{major}
Provides: centos-release = %{version}-%{release} Provides: centos-release = %{version}-%{release}
Provides: centos-release(upstream) = %{upstream_rel} Provides: centos-release(upstream) = %{full_release_version}
## Required by libdnf ## Required by libdnf
Provides: base-module(platform:el%{major}) Provides: base-module(platform:el%{major})
@ -97,8 +98,8 @@ Source1300: rocky.1.gz
%package -n rocky-repos %package -n rocky-repos
Summary: %{distro_name} Package Repositories Summary: %{distro_name} Package Repositories
License: %{rpm_license} License: %{rpm_license}
Provides: rocky-repos(%{major}) = %{upstream_rel} Provides: rocky-repos(%{major}) = %{full_release_version}
Requires: system-release = %{upstream_rel} Requires: system-release = %{full_release_version}
Requires: rocky-gpg-keys Requires: rocky-gpg-keys
Conflicts: %{name} < 8.0 Conflicts: %{name} < 8.0
@ -146,14 +147,14 @@ install -p -m 0644 %{SOURCE1300} %{buildroot}%{_mandir}/man1/
install -d -m 0755 %{buildroot}%{_prefix}/lib install -d -m 0755 %{buildroot}%{_prefix}/lib
cat > %{buildroot}%{_prefix}/lib/os-release << EOF cat > %{buildroot}%{_prefix}/lib/os-release << EOF
NAME="%{distro_name}" NAME="%{distro_name}"
VERSION="%{major}.%{minor} (%{distro_code})" VERSION="%{full_release_version} (%{distro_code})"
ID="rocky" ID="rocky"
ID_LIKE="rhel centos fedora" ID_LIKE="rhel centos fedora"
VERSION_ID="%{major}.%{minor}" VERSION_ID="%{full_release_version}"
PLATFORM_ID="platform:el%{major}" 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" 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/" HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/" BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="%{distro_name}" ROCKY_SUPPORT_PRODUCT="%{distro_name}"
@ -164,7 +165,7 @@ EOF
ln -s ../usr/lib/os-release %{buildroot}%{_sysconfdir}/os-release ln -s ../usr/lib/os-release %{buildroot}%{_sysconfdir}/os-release
# write cpe to /etc/system/release-cpe # 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 # create /etc/issue and /etc/issue.net
echo '\S' > %{buildroot}%{_sysconfdir}/issue echo '\S' > %{buildroot}%{_sysconfdir}/issue
@ -259,7 +260,7 @@ install -p -m 0644 %{SOURCE1226} %{buildroot}%{_sysconfdir}/yum.repos.d/
# dnf stuff # dnf stuff
install -d -m 0755 %{buildroot}%{_sysconfdir}/dnf/vars 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 # Copy out GPG keys
install -d -m 0755 %{buildroot}%{_sysconfdir}/pki/rpm-gpg install -d -m 0755 %{buildroot}%{_sysconfdir}/pki/rpm-gpg