Hello community,

here is the log from the commit of package shim for openSUSE:Factory checked in 
at 2019-02-02 21:44:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/shim (Old)
 and      /work/SRC/openSUSE:Factory/.shim.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "shim"

Sat Feb  2 21:44:39 2019 rev:72 rq:668950 version:15+git47

Changes:
--------
--- /work/SRC/openSUSE:Factory/shim/shim.changes        2018-12-27 
00:22:17.864010614 +0100
+++ /work/SRC/openSUSE:Factory/.shim.new.28833/shim.changes     2019-02-02 
21:44:40.532218525 +0100
@@ -1,0 +2,17 @@
+Mon Jan 28 03:18:53 UTC 2019 - Gary Ching-Pang Lin <[email protected]>
+
+- Amend shim.spec to remove $RPM_BUILD_ROOT
+
+-------------------------------------------------------------------
+Thu Jan 17 17:12:14 UTC 2019 - [email protected]
+
+- Move 'efi'-executables to '/usr/share/efi'  (FATE#326960)
+  (preparing the move to 'noarch' for this package)
+
+-------------------------------------------------------------------
+Mon Jan 14 09:48:59 UTC 2019 - Gary Ching-Pang Lin <[email protected]>
+
+- Update shim-install to handle the partitioned MD devices
+  (bsc#1119762, bsc#1119763) 
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ shim.spec ++++++
--- /var/tmp/diff_new_pack.0POHKk/_old  2019-02-02 21:44:41.320217842 +0100
+++ /var/tmp/diff_new_pack.0POHKk/_new  2019-02-02 21:44:41.328217836 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package shim
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,6 +19,17 @@
 
 %undefine _debuginfo_subpackages
 %undefine _build_create_debug
+%ifarch aarch64
+%define grubplatform arm64-efi
+%else
+%define grubplatform %{_target_cpu}-efi
+%endif
+%if 0%{?suse_version} > 1500
+%define sysefibasedir  %{_datadir}/efi
+%define sysefidir      %{sysefibasedir}/%{_target_cpu}
+%else
+%define sysefidir      /usr/lib64/efi
+%endif
 
 Name:           shim
 Version:        15+git47
@@ -71,7 +82,7 @@
 %endif
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 # For shim-install script
-Requires:       grub2-efi
+Requires:       grub2-%{grubplatform}
 ExclusiveArch:  x86_64 aarch64
 
 %description
@@ -103,6 +114,7 @@
 %if 0%{?is_opensuse} == 1
 %patch100 -p1
 %endif
+
 %build
 # first, build MokManager and fallback as they don't depend on a
 # specific certificate
@@ -211,12 +223,12 @@
 mv ../source .
 
 %install
-export BRP_PESIGN_FILES='%{_libdir}/efi/shim*.efi 
%{_libdir}/efi/MokManager.efi %{_libdir}/efi/fallback.efi'
-install -d %{buildroot}/%{_libdir}/efi
-cp -a shim*.efi %{buildroot}/%{_libdir}/efi
-install -m 444 shim-*.der %{buildroot}/%{_libdir}/efi
-install -m 644 MokManager.efi %{buildroot}/%{_libdir}/efi/MokManager.efi
-install -m 644 fallback.efi %{buildroot}/%{_libdir}/efi/fallback.efi
+export BRP_PESIGN_FILES='%{sysefidir}/shim*.efi %{sysefidir}/MokManager.efi 
%{sysefidir}/fallback.efi'
+install -d %{buildroot}/%{sysefidir}
+cp -a shim*.efi %{buildroot}/%{sysefidir}
+install -m 444 shim-*.der %{buildroot}/%{sysefidir}
+install -m 644 MokManager.efi %{buildroot}/%{sysefidir}/MokManager.efi
+install -m 644 fallback.efi %{buildroot}/%{sysefidir}/fallback.efi
 install -d %{buildroot}/%{_sbindir}
 install -m 755 %{SOURCE3} %{buildroot}/%{_sbindir}/
 # install SUSE certificate
@@ -225,12 +237,21 @@
     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
 done
+%if 0%{?suse_version} > 1500 && 0%{?suse_version} < 1600
+%ifarch x86_64
+if [ "%{sysefidir}" != "/usr/lib64/efi" ]; then
+  # provide compatibility sym-link for previous kiwi, etc.
+  install -d %{buildroot}/usr/lib64/efi
+  ln -srf %{buildroot}/%{sysefidir}/*.efi %{buildroot}/usr/lib64/efi/
+fi
+%endif
+%endif
 
 # install the debug symbols
-install -d %{buildroot}/usr/lib/debug/%{_libdir}/efi
-install -m 644 shim.debug %{buildroot}/usr/lib/debug/%{_libdir}/efi
-install -m 644 MokManager.efi.debug 
%{buildroot}/usr/lib/debug/%{_libdir}/efi/MokManager.debug
-install -m 644 fallback.efi.debug 
%{buildroot}/usr/lib/debug/%{_libdir}/efi/fallback.debug
+install -d %{buildroot}/usr/lib/debug/%{sysefidir}
+install -m 644 shim.debug %{buildroot}/usr/lib/debug/%{sysefidir}
+install -m 644 MokManager.efi.debug 
%{buildroot}/usr/lib/debug/%{sysefidir}/MokManager.debug
+install -m 644 fallback.efi.debug 
%{buildroot}/usr/lib/debug/%{sysefidir}/fallback.debug
 
 # install the debug source
 install -d %{buildroot}/usr/src/debug/%{name}-%{version}
@@ -252,22 +273,30 @@
 %files
 %defattr(-,root,root)
 %doc COPYRIGHT
-%dir %{_libdir}/efi
-%{_libdir}/efi/shim.efi
-%{_libdir}/efi/shim-*.efi
-%{_libdir}/efi/shim-*.der
-%{_libdir}/efi/MokManager.efi
-%{_libdir}/efi/fallback.efi
+%dir %{?sysefibasedir}
+%dir %{sysefidir}
+%{sysefidir}/shim.efi
+%{sysefidir}/shim-*.efi
+%{sysefidir}/shim-*.der
+%{sysefidir}/MokManager.efi
+%{sysefidir}/fallback.efi
 %{_sbindir}/shim-install
 %dir %{_sysconfdir}/uefi/
 %dir %{_sysconfdir}/uefi/certs/
 %{_sysconfdir}/uefi/certs/*.crt
+%if 0%{?suse_version} > 1500 && 0%{?suse_version} < 1600
+%ifarch x86_64
+# provide compatibility sym-link for previous kiwi, etc.
+%dir /usr/lib64/efi
+/usr/lib64/efi/*.efi
+%endif
+%endif
 
 %files -n shim-debuginfo
 %defattr(-,root,root,-)
-/usr/lib/debug/%{_libdir}/efi/shim.debug
-/usr/lib/debug/%{_libdir}/efi/MokManager.debug
-/usr/lib/debug/%{_libdir}/efi/fallback.debug
+/usr/lib/debug%{sysefidir}/shim.debug
+/usr/lib/debug%{sysefidir}/MokManager.debug
+/usr/lib/debug%{sysefidir}/fallback.debug
 
 %files -n shim-debugsource
 %defattr(-,root,root,-)



++++++ shim-install ++++++
--- /var/tmp/diff_new_pack.0POHKk/_old  2019-02-02 21:44:41.432217745 +0100
+++ /var/tmp/diff_new_pack.0POHKk/_new  2019-02-02 21:44:41.432217745 +0100
@@ -1,5 +1,6 @@
 #! /bin/bash -e
 
+arch=`uname -m`
 rootdir=
 bootdir=
 efidir=
@@ -10,8 +11,9 @@
 removable=no
 clean=no
 sysconfdir="/etc"
-libdir="/usr/lib64"
-source_dir="$libdir/efi"
+libdir="/usr/lib64"    # Beware, this is arch dependent!
+datadir="/usr/share"
+source_dir="${data_dir}/efi/${arch}"
 grub_probe="/usr/sbin/grub2-probe"
 grub_mkrelpath="/usr/bin/grub2-mkrelpath"
 grub_install="/usr/sbin/grub2-install"
@@ -22,7 +24,6 @@
 def_grub_efi="${source_dir}/grub.efi"
 def_boot_efi=
 
-arch=`uname -m`
 if [ x${arch} = xx86_64 ] ; then
        grub_install_target="x86_64-efi"
        def_boot_efi="bootx64.efi"
@@ -34,6 +35,12 @@
        exit 1
 fi
 
+if [ ! -d "${source_dir}" -o ! -e "${def_grub_efi}" ] ; then
+    # for outdated packages fall back to previous behavior
+    source_dir="$libdir/efi"
+    def_grub_efi="${source_dir}/grub.efi"
+fi
+ 
 # Get GRUB_DISTRIBUTOR.
 if test -f "${sysconfdir}/default/grub" ; then
     . "${sysconfdir}/default/grub"
@@ -332,7 +339,10 @@
     efidir_disk="$("$grub_probe" --target=disk --device-map= "$efidir")"
     if test -z "$efidir_drive" || test -z "$efidir_disk"; then
         echo "Can't find GRUB drive for $efidir; unable to create EFI Boot 
Manager entry." >&2
-    elif [[ "$efidir_drive" == \(mduuid/* ]]; then
+    # bsc#1119762 If the MD device is partitioned, we just need to create one
+    # boot entry since the partitions are nested partitions and the mirrored
+    # partitions share the same UUID.
+    elif [[ "$efidir_drive" == \(mduuid/* && "$efidir_drive" != \(mduuid/*,* 
]]; then
         eval $(mdadm --detail --export "$efidir_disk" |
           perl -ne 'print if m{^MD_LEVEL=}; push( @D, $1) if 
(m{^MD_DEVICE_\S+_DEV=(\S+)$});
                     sub END() {print "MD_DEVS=\"", join( " ", @D), "\"\n";};')


Reply via email to