From abd05514c8afb7e894aff08b7e18275098927ba1 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Fri, 17 Mar 2023 15:02:43 -0700 Subject: [PATCH] backport sb-certs --- SOURCES/rocky-root-ca.der | Bin 0 -> 1177 bytes SOURCES/rocky-signing.der | Bin 0 -> 1183 bytes SOURCES/rockydup1.x509 | Bin 0 -> 1296 bytes SOURCES/rockykpatch1.x509 | Bin 0 -> 1289 bytes SPECS/rocky-release.spec | 104 +++++++++++++++++++++++++++++++++----- 5 files changed, 91 insertions(+), 13 deletions(-) create mode 100644 SOURCES/rocky-root-ca.der create mode 100644 SOURCES/rocky-signing.der create mode 100644 SOURCES/rockydup1.x509 create mode 100644 SOURCES/rockykpatch1.x509 diff --git a/SOURCES/rocky-root-ca.der b/SOURCES/rocky-root-ca.der new file mode 100644 index 0000000000000000000000000000000000000000..9d3a8079a91f3b1cd33d3fab888088905ba2f812 GIT binary patch literal 1177 zcmXqLVwq~t#9X_8nTe5!NkkwgT;|<+O_c+yTA!}k(&{v83Wqu`cbnwOGTl9``psAwP$QqIjI5tN#f zng~>tnwOrLmzr9XnU}6mlA4%ns9~T6Qo_t54>8dvGq1ElAviU;6lj!FetwBU5QuPg zG*mNCfxDlRQB1rTq$abZ(xC|ClpK&gz5Jqd137VCBSQl-BLhQI15*RTC~;n6AlJ|W z${nuWZemnIj$lSs2IeM4eg=akMlPl%Mn;CmN3!{&IsV=b{PV!m^5u%)*>WGk*WJ=# zHIC2MT~aphcCtfT`7#A>)1#%Q?!K;;=tVzJE!k6n>sJWNcHNHDRUW3;?8GS&I>Ck zx}qd);^rc9NJPBju-KYcvwpUIWcYoPZ^47}7j1P^E=5jRvXqILk%4h>tUgO90rU4Mh5>)#S_*Fv;US)V@>TASWUYT`LS>*&E9M#W6!)CmaG|s*Xve!x-t7_#IM+=UOnjTv+jDwe zB$4+{cUN^Detwulb{M_oG_L)DU~8rz^en3}?*JlH}X| c_V7=yQ^`A=4^OV%tr8$5>Jf5ymKM7)07Xo*0ssI2 literal 0 HcmV?d00001 diff --git a/SOURCES/rocky-signing.der b/SOURCES/rocky-signing.der new file mode 100644 index 0000000000000000000000000000000000000000..9dc5eb5c5737a5a323cbe602c974655e4edc109e GIT binary patch literal 1183 zcmXqLVwr8w#N51qnTe5!iIK~ImyJ`a&72u@8d1sdg)pI@R71R|Ur4b==(;O^&S6caB7smUy}{}rgEQ0fK*8gj zT2w-`r<)j+kfWE8m4Ug5k)Oe!iIIz`iII`vB-25=M+?oiPOOVQ@ZGr4ZQX_EUztRz zvdW*%+?DBh!%5;>)wHe!f+?@Im5V*jSG51(y>qMgvk*}u?cEW-nKo&6&UwA>_DYS% z4PknmRb&dh8e3lisJ5n~ZKVX?V& z&A;>cLY;qAcXl)}W!-+#0Z!(!$}AEFVhtibI@#B+`MnTrJhkIxTbg|8BeDD=$Z-SA zdce40WH_{K!I8V0pS*F>doFcM!q4Nnq1&%Wjzxys&o8?_rGNIEo{!}R^K@tPnHMI?$t^2LVPq(L^G}(l zO;ve_)&x*~tc&8xivQ$H)k{9utSthu-N*OBcPA3uE}nSRTh%hb-k VV8zlEe0OcHhLpEeyub9z5&$h@uxbDR literal 0 HcmV?d00001 diff --git a/SOURCES/rockydup1.x509 b/SOURCES/rockydup1.x509 new file mode 100644 index 0000000000000000000000000000000000000000..2e079abe363a8e7e0790d0d1be165625b7d9f12c GIT binary patch literal 1296 zcmXqLV&yStV*av#nTe5!iIK;EmyJ`a&72u@8d1sdg)pI@R71R|Ur4b==(;O^&S6caB7smUy|$zSY-HGf!pn84Cxe32kBEys z1@reJed;E(_V8yKQQX;Zs4wm)h>9Qfn`km9eE9Tjml!H&LWS{&$S5 zLisC)#Zla+oB7U&S!@rCS6~qDTyG)X`0-=TG@~4Ar$0doz4O1FnRemm<>~g1t)rB` z%x1f=*zBAhtC~{Sq~Y{TPnNG{$>7l@iP&( zYghCa?wnyfU3k&yH^R%CmL8sVs@|V#bGMkZMv=pb=(GB3H1{8xTT)xNl!Jfz?A2#Y zd_Vr4`{wC%u7bh6RfpeCuFeBrC7A6A*13qAK zkmU#QSeTjE8w_MYd_ER27Lm;-{m<-rtnRu|_Ux=#mTGJMyjOJq=POxd76}8f1`!{f z?CaP3UWhiH+VQe2O+NLJSpE^@Gyu%&z%;hdS2Zk*Kmzc}&bs$`}5O2(y+*|XF>?H4%fUl68sBj@pBqdgftz1`oxOb|$F7c7}w zn%1kB?$x>1*e|>@=hd;&DyyTqi`#;|YJB!C+`IFjyxP2u@8d1sdg)pI@R71R|Ur4b==(;O^&S6caB7smUyljw!TMY1ZFltkuOy65<8Gq~)=t@((9@Cg! z^6c}p)3Xy*t2wsJpEJ`h^px(2`mR2=(vWvccN=NEU7!AeBTM1etfR11HsNv>^P8(TWVm_)u4dmCUj1$AJEc;?BRf1~{>s1EDzvYu-_c>& z6is%4zb=*@J7kYDF*7nSE>19r17|5&VMfOPEKCLr27JKeFUt?&u`n~SHyFr*_3(>|?J6^V>$)`RN z%Rhpg27s9ymQJ1(+tA9DOTf-YQr0w|eQ-ZI&yx?M}E+GEI1;q0D6(#ANF3jrL>Ui>-+rgjk8M-B&ME*sb?q(y literal 0 HcmV?d00001 diff --git a/SPECS/rocky-release.spec b/SPECS/rocky-release.spec index 6c9241c..661fa53 100644 --- a/SPECS/rocky-release.spec +++ b/SPECS/rocky-release.spec @@ -20,8 +20,8 @@ %define distro_code Green Obsidian %define major 8 %define minor 8 -%define rocky_rel 1%{?rllh:.%{rllh}}%{!?rllh:.3} -%define upstream_rel %{major}.%{minor}-0.1 +%define rocky_rel 1%{?rllh:.%{rllh}}%{!?rllh:.4} +%define upstream_rel %{major}.%{minor}-0.2 %define rpm_license BSD-3-Clause %define dist .el%{major} %define home_url https://rockylinux.org/ @@ -152,6 +152,12 @@ Source1223: Rocky-Devel.repo Source1226: Rocky-Plus.repo Source1300: rocky.1.gz +# rocky secureboot certs placeholder (1400-1499) +Source1400: rockydup1.x509 +Source1401: rockykpatch1.x509 +Source1402: rocky-root-ca.der +Source1403: rocky-signing.der + %description %{distro_name} release files. @@ -174,6 +180,14 @@ Conflicts: %{name} < 8.0 %description -n rocky-gpg-keys%{?rltype} This package provides the RPM signature keys for Rocky. +%package -n rocky-sb-certs%{?rltype} +Summary: %{distro_name} public secureboot certificates +Group: System Environment/Base +Provides: system-sb-certs = %{version}-%{release} + +%description -n rocky-sb-certs%{?rltype} +This package contains the %{distro_name} secureboot public certificates. + %prep %if %{with rllookahead} && %{with rlbeta} echo "!! WARNING !!" @@ -270,21 +284,61 @@ install -d -m 0755 %{buildroot}%{_prefix}/lib/systemd/system-preset/ install -m 0644 %{SOURCE300} %{buildroot}/%{_prefix}/lib/systemd/system-preset/ install -m 0644 %{SOURCE301} %{buildroot}/%{_prefix}/lib/systemd/system-preset/ install -m 0644 %{SOURCE302} %{buildroot}/%{_prefix}/lib/systemd/system-preset/ +# systemd section +################################################################################ -# dnf stuff -install -d -m 0755 %{buildroot}%{_sysconfdir}/dnf/vars -echo "%{contentdir}" > %{buildroot}%{_sysconfdir}/dnf/vars/contentdir -echo "%{sigcontent}" > %{buildroot}%{_sysconfdir}/dnf/vars/sigcontentdir -echo "%{?rltype}" > %{buildroot}%{_sysconfdir}/dnf/vars/rltype -echo "%{major}-stream" > %{buildroot}%{_sysconfdir}/dnf/vars/stream +################################################################################ +# start secureboot section +install -d -m 0755 %{buildroot}%{_sysconfdir}/pki/sb-certs/ +install -d -m 0755 %{buildroot}%{_datadir}/pki/sb-certs/ -# Copy out GPG keys -install -d -m 0755 %{buildroot}%{_sysconfdir}/pki/rpm-gpg -install -p -m 0644 %{SOURCE101} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/ -install -p -m 0644 %{SOURCE102} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/ +# Backported certs for now +install -m 0644 %{SOURCE1400} %{buildroot}%{_datadir}/pki/sb-certs/ +install -m 0644 %{SOURCE1401} %{buildroot}%{_datadir}/pki/sb-certs/ +install -m 0644 %{SOURCE1402} %{buildroot}%{_datadir}/pki/sb-certs/ +install -m 0644 %{SOURCE1403} %{buildroot}%{_datadir}/pki/sb-certs/ +# Placeholders +# x86_64 +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-root-ca.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-x86_64.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-kernel-x86_64.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-grub2-x86_64.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-fwupd-x86_64.cer -# Copy our yum repos +# aarch64 +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-root-ca.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-aarch64.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-kernel-aarch64.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-grub2-aarch64.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-fwupd-aarch64.cer + +# ppc64le +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-root-ca.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-ppc64le.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-kernel-ppc64le.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-grub2-ppc64le.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-fwupd-ppc64le.cer + +# armhfp +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-root-ca.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-armhfp.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-kernel-armhfp.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-grub2-armhfp.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-fwupd-armhfp.cer + +# s390x +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-root-ca.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-ca-s390x.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-kernel-s390x.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-grub2-s390x.cer +ln -sr %{buildroot}%{_datadir}/pki/sb-certs/rocky-signing.der %{buildroot}%{_datadir}/pki/sb-certs/secureboot-fwupd-s390x.cer + +# symlinks for everybody +for x in $(ls %{buildroot}%{_datadir}/pki/sb-certs); do + ln -sr %{buildroot}%{_datadir}/pki/sb-certs/${x} %{buildroot}%{_sysconfdir}/pki/sb-certs/${x} +done + +# end secureboot section +################################################################################ + +################################################################################ +# dnf repo section install -d -m 0755 %{buildroot}%{_sysconfdir}/yum.repos.d install -p -m 0644 %{SOURCE1200} %{buildroot}%{_sysconfdir}/yum.repos.d/ install -p -m 0644 %{SOURCE1201} %{buildroot}%{_sysconfdir}/yum.repos.d/ @@ -300,6 +354,20 @@ install -p -m 0644 %{SOURCE1222} %{buildroot}%{_sysconfdir}/yum.repos.d/ install -p -m 0644 %{SOURCE1223} %{buildroot}%{_sysconfdir}/yum.repos.d/ install -p -m 0644 %{SOURCE1226} %{buildroot}%{_sysconfdir}/yum.repos.d/ +# dnf stuff +install -d -m 0755 %{buildroot}%{_sysconfdir}/dnf/vars +echo "%{contentdir}" > %{buildroot}%{_sysconfdir}/dnf/vars/contentdir +echo "%{sigcontent}" > %{buildroot}%{_sysconfdir}/dnf/vars/sigcontentdir +echo "%{?rltype}" > %{buildroot}%{_sysconfdir}/dnf/vars/rltype +echo "%{major}-stream" > %{buildroot}%{_sysconfdir}/dnf/vars/stream + +# Copy out GPG keys +install -d -m 0755 %{buildroot}%{_sysconfdir}/pki/rpm-gpg +install -p -m 0644 %{SOURCE101} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/ +install -p -m 0644 %{SOURCE102} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/ +# end dnf repo section +################################################################################ + %files %license LICENSE %doc Contributors COMMUNITY-CHARTER @@ -330,7 +398,17 @@ install -p -m 0644 %{SOURCE1226} %{buildroot}%{_sysconfdir}/yum.repos.d/ %files -n rocky-gpg-keys%{?rltype} %{_sysconfdir}/pki/rpm-gpg/ +%files -n rocky-sb-certs%{?rltype} +# care: resetting symlinks is intended +%dir %{_sysconfdir}/pki/sb-certs +%dir %{_datadir}/pki/sb-certs +%{_sysconfdir}/pki/sb-certs/* +%{_datadir}/pki/sb-certs/* + %changelog +* Fri Mar 17 2023 Louis Abel - 8.8-1.4 +- Backport rocky-sb-certs to Rocky Linux 8 + * Wed Jan 01 2023 Louis Abel - 8.8-1.3 - Move macros to a proper location