Accepting request 1147311 from devel:openSUSE:Factory

OBS-URL: https://build.opensuse.org/request/show/1147311
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/shim?expand=0&rev=118
This commit is contained in:
Ana Guerrero 2024-02-18 19:22:58 +00:00 committed by Git OBS Bridge
commit ddfae9a5c9
2 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Sat Feb 17 07:51:01 UTC 2024 - Joey Lee <jlee@suse.com>
- Modified shim.spec file to add suffix string of project to filename
of included certificates. e.g.
rpm -pql shim-15.8-lp155.6.1.x86_64.rpm
/etc/uefi
/etc/uefi/certs
/etc/uefi/certs/2B697CB1-shim-devel.crt
/etc/uefi/certs/4659838C-shim-opensuse.crt
/etc/uefi/certs/BCA4E38E-shim-sles.crt
The original name of crt files are:
/etc/uefi/certs/2B697CB1-shim.crt
/etc/uefi/certs/4659838C-shim.crt
/etc/uefi/certs/BCA4E38E-shim.crt
It can indicate the souce project of certificates.
-------------------------------------------------------------------
Thu Feb 15 09:46:09 UTC 2024 - Joey Lee <jlee@suse.com>

View File

@ -283,8 +283,9 @@ install -m 755 %{SOURCE3} %{buildroot}/%{_sbindir}/
# install SUSE certificate
install -d %{buildroot}/%{_sysconfdir}/uefi/certs/
for file in shim-*.der; do
filename=$(echo "$file" | cut -f 1 -d '.')
fpr=$(openssl x509 -sha1 -fingerprint -inform DER -noout -in $file | cut -c 18- | cut -d ":" -f 1,2,3,4 | sed 's/://g')
install -m 644 $file %{buildroot}/%{_sysconfdir}/uefi/certs/${fpr}-shim.crt
install -m 644 $file %{buildroot}/%{_sysconfdir}/uefi/certs/${fpr}-${filename}.crt
done
%if %{defined shim_lib64_share_compat}
[ "%{sysefidir}" != "/usr/lib64/efi" ] || exit 1