Merge pull request 'a10-beta-test' (#6) from a10-beta-test into a10-beta

Reviewed-on: #6
This commit is contained in:
eabdullin 2024-07-04 12:21:19 +00:00
commit b675a19ea4

View File

@ -1,4 +1,4 @@
# Should be deleted or changed to "%bcond_with beta" before the release
# Should be deleted or changed to "%%bcond_with beta" before the release
# Also baseurl for regular repos should be changed to repo.almalinux.org
# and mirrorlist should be set as default
%bcond_without beta
@ -60,14 +60,6 @@ Source303: 99-default-disable.preset
Source304: 50-redhat.conf
Source400: alsecureboot001.cer
# kernel signing certificate
Source401: alsecureboot001.cer
# grub2 signing certificate
Source402: alsecureboot001.cer
# Fwupd signing certificate
Source403: alsecureboot001.cer
# UKI signing certificate
Source404: alsecureboot001.cer
Source500: almalinux-appstream.repo
Source501: almalinux-baseos.repo
@ -242,29 +234,29 @@ install -d -m 0755 %{buildroot}%{_datadir}/pki/sb-certs/
# Install aarch64 certs
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-aarch64.cer
install -m 644 %{SOURCE401} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-kernel-aarch64.cer
install -m 644 %{SOURCE402} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-grub2-aarch64.cer
install -m 644 %{SOURCE403} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-fwupd-aarch64.cer
install -m 644 %{SOURCE404} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-uki-virt-aarch64.cer
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-kernel-aarch64.cer
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-grub2-aarch64.cer
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-fwupd-aarch64.cer
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-uki-virt-aarch64.cer
# Install x86_64 certs
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-x86_64.cer
install -m 644 %{SOURCE401} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-kernel-x86_64.cer
install -m 644 %{SOURCE402} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-grub2-x86_64.cer
install -m 644 %{SOURCE403} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-fwupd-x86_64.cer
install -m 644 %{SOURCE404} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-uki-virt-x86_64.cer
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-kernel-x86_64.cer
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-grub2-x86_64.cer
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-fwupd-x86_64.cer
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-uki-virt-x86_64.cer
# Install ppc64le certs
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-ppc64le.cer
install -m 644 %{SOURCE401} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-kernel-ppc64le.cer
install -m 644 %{SOURCE402} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-grub2-ppc64le.cer
install -m 644 %{SOURCE404} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-uki-virt-ppc64le.cer
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-kernel-ppc64le.cer
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-grub2-ppc64le.cer
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-uki-virt-ppc64le.cer
# Install s390x certs
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-s390x.cer
install -m 644 %{SOURCE401} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-kernel-s390x.cer
install -m 644 %{SOURCE404} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-uki-virt-s390x.cer
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-kernel-s390x.cer
install -m 644 %{SOURCE400} %{buildroot}%{_datadir}/pki/sb-certs/secureboot-uki-virt-s390x.cer
# Link x86_64 certs
ln -sr %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-x86_64.cer %{buildroot}%{_sysconfdir}/pki/sb-certs/secureboot-ca-x86_64.cer
@ -322,12 +314,16 @@ install -p -m 0644 %{SOURCE600} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/
# These variables should be set in the build environment to change rpm names
%if 0%{?x86_64_v2} == 1
mkdir -p %{buildroot}%{_sysconfdir}/rpm
echo '%%_build_name_fmt %%{ARCH}_v2/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}_v2.rpm' > %{buildroot}%{_sysconfdir}/rpm/macros.arch_v2
echo '%x86_64_v2 1' >> %{buildroot}%{_sysconfdir}/rpm/macros.arch_v2
echo '%%x86_64_v2 1' >> %{buildroot}%{_sysconfdir}/rpm/macros.arch_v2
echo '%%__cflags_arch_x86_64_level -v2' >> %{buildroot}%{_sysconfdir}/rpm/macros.arch_v2
%endif
%if 0%{?x86_64_fp} == 1
mkdir -p %{buildroot}%{_sysconfdir}/rpm
echo '%%_build_name_fmt %%{ARCH}_fp/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}_fp.rpm' > %{buildroot}%{_sysconfdir}/rpm/macros.arch_fp
echo '%x86_64_fp 1' >> %{buildroot}%{_sysconfdir}/rpm/macros.arch_fp
echo '%%x86_64_fp 1' >> %{buildroot}%{_sysconfdir}/rpm/macros.arch_fp
echo '%%optflags %%{optflags} -fno-omit-frame-pointer' >> %{buildroot}%{_sysconfdir}/rpm/macros.arch_fp
%endif