- Add bootstrap var to not build almalinux-sb-certs package
- Add macros.arch_fp and macros.arch_v2 files to %files
This commit is contained in:
parent
670b58636f
commit
518575240f
@ -2,6 +2,7 @@
|
||||
# Also baseurl for regular repos should be changed to repo.almalinux.org
|
||||
# and mirrorlist should be set as default
|
||||
%bcond_without beta
|
||||
%bcond_with bootstrap
|
||||
|
||||
# Needs only for first build, because we should have right arch names
|
||||
%if 0%{?x86_64_v2} == 1
|
||||
@ -92,6 +93,7 @@ Source512: almalinux-beta.repo
|
||||
Source600: RPM-GPG-KEY-AlmaLinux-10
|
||||
|
||||
|
||||
%if %{without bootstrap}
|
||||
%package -n almalinux-sb-certs
|
||||
Summary: %{distro} public secureboot certificates
|
||||
Group: System Environment/Base
|
||||
@ -106,11 +108,12 @@ Requires: almalinux-gpg-keys = %{version}-%{release}
|
||||
|
||||
%package -n almalinux-gpg-keys
|
||||
Summary: %{distro} RPM keys
|
||||
|
||||
%endif
|
||||
|
||||
%description
|
||||
%{distro} release files.
|
||||
|
||||
%if %{without bootstrap}
|
||||
%description -n almalinux-sb-certs
|
||||
%{distro} secureboot certificates
|
||||
|
||||
@ -119,7 +122,7 @@ This package provides the package repository files for %{distro}.
|
||||
|
||||
%description -n almalinux-gpg-keys
|
||||
This package provides the RPM signature keys for %{distro}.
|
||||
|
||||
%endif
|
||||
|
||||
%install
|
||||
# copy license and contributors doc here for %%license and %%doc macros
|
||||
@ -239,6 +242,7 @@ install -m 0644 %{SOURCE304} %{buildroot}/%{_prefix}/lib/sysctl.d/
|
||||
mkdir %{buildroot}%{_sysconfdir}/yum.repos.d
|
||||
touch %{buildroot}%{_sysconfdir}/yum.repos.d/redhat.repo
|
||||
|
||||
%if %{without bootstrap}
|
||||
# Copy secureboot certificates
|
||||
install -d -m 0755 %{buildroot}%{_sysconfdir}/pki/sb-certs/
|
||||
install -d -m 0755 %{buildroot}%{_datadir}/pki/sb-certs/
|
||||
@ -319,6 +323,11 @@ install -p -m 0644 %{SOURCE512} %{buildroot}%{_sysconfdir}/yum.repos.d/
|
||||
install -d -m 0755 %{buildroot}%{_sysconfdir}/dnf/vars
|
||||
echo "%{major}-stream" > %{buildroot}%{_sysconfdir}/dnf/vars/stream
|
||||
|
||||
# copy GPG keys
|
||||
install -d -m 0755 %{buildroot}%{_sysconfdir}/pki/rpm-gpg
|
||||
install -p -m 0644 %{SOURCE600} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/
|
||||
%endif
|
||||
|
||||
# These variables should be set in the build environment to change rpm names
|
||||
%if 0%{?x86_64_v2} == 1
|
||||
echo '%%_build_name_fmt %%{ARCH}_v2/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}_v2.rpm' > %{buildroot}%{_sysconfdir}/rpm/macros.arch_v2
|
||||
@ -329,11 +338,6 @@ echo '%%_build_name_fmt %%{ARCH}_fp/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}_fp
|
||||
echo '%x86_64_fp 1' >> %{buildroot}%{_sysconfdir}/rpm/macros.arch_fp
|
||||
%endif
|
||||
|
||||
# copy GPG keys
|
||||
install -d -m 0755 %{buildroot}%{_sysconfdir}/pki/rpm-gpg
|
||||
install -p -m 0644 %{SOURCE600} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/
|
||||
|
||||
|
||||
|
||||
%files
|
||||
%license docs/LICENSE
|
||||
@ -354,7 +358,14 @@ install -p -m 0644 %{SOURCE600} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/
|
||||
%{_prefix}/lib/systemd/system-preset/*
|
||||
%{_prefix}/lib/systemd/user-preset/*
|
||||
%{_prefix}/lib/sysctl.d/50-redhat.conf
|
||||
%if 0%{?x86_64_fp} == 1
|
||||
%config(noreplace) %{_sysconfdir}/rpm/macros.arch_fp
|
||||
%endif
|
||||
%if 0%{?x86_64_v2} == 1
|
||||
%config(noreplace) %{_sysconfdir}/rpm/macros.arch_v2
|
||||
%endif
|
||||
|
||||
%if %{without bootstrap}
|
||||
%files -n almalinux-sb-certs
|
||||
# Note to future packagers:
|
||||
# resetting the symlinks in /etc/pki/sb-certs on upgrade is the intended behavior here
|
||||
@ -385,7 +396,7 @@ install -p -m 0644 %{SOURCE600} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/
|
||||
|
||||
%files -n almalinux-gpg-keys
|
||||
%{_sysconfdir}/pki/rpm-gpg
|
||||
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jul 02 2024 Eduard Abdullin <eabdullin@almalinux.org> - 10.0-0.14
|
||||
|
Loading…
Reference in New Issue
Block a user