Hello community,

here is the log from the commit of package shim for openSUSE:Factory checked in 
at 2016-10-02 00:06:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/shim (Old)
 and      /work/SRC/openSUSE:Factory/.shim.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "shim"

Changes:
--------
--- /work/SRC/openSUSE:Factory/shim/shim.changes        2016-09-09 
10:15:23.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.shim.new/shim.changes   2016-10-02 
00:07:10.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Sep 21 09:55:40 UTC 2016 - mch...@suse.com
+
+- shim-install :
+  * add option --no-nvram (bsc#999818)
+  * improve removable media and fallback mode handling
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ shim.spec ++++++
--- /var/tmp/diff_new_pack.tkIsuc/_old  2016-10-02 00:07:12.000000000 +0200
+++ /var/tmp/diff_new_pack.tkIsuc/_new  2016-10-02 00:07:12.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package shim
 #
-# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 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

++++++ shim-install ++++++
--- /var/tmp/diff_new_pack.tkIsuc/_old  2016-10-02 00:07:12.000000000 +0200
+++ /var/tmp/diff_new_pack.tkIsuc/_new  2016-10-02 00:07:12.000000000 +0200
@@ -6,6 +6,7 @@
 install_device=
 efibootdir=
 ca_string=
+no_nvram=no
 removable=no
 clean=no
 sysconfdir="/etc"
@@ -52,6 +53,7 @@
     echo "--directory=DIR use images from DIR."
     echo "--grub-probe=FILE use FILE as grub-probe."
     echo "--removable the installation device is removable."
+    echo "--no-nvram don't update the NVRAM variable."
     echo "--bootloader-id=ID the ID of bootloader."
     echo "--efi-directory=DIR use DIR as the EFI System Partition root."
     echo "--config-file=FILE use FILE as config file, default is $grub_cfg."
@@ -113,8 +115,12 @@
        grub_cfg="`echo "$option" | sed 's/--config-file=//'`" ;;
 
     --removable)
+       no_nvram=yes
        removable=yes ;;
 
+    --no-nvram)
+       no_nvram=yes ;;
+
     --clean)
        clean=yes ;;
 
@@ -189,14 +195,18 @@
     efi_file=shim.efi
     efibootdir="$efidir/EFI/boot"
     mkdir -p "$efibootdir" || exit 1
-    efidir="$efidir/EFI/$efi_distributor"
-    mkdir -p "$efidir" || exit 1
+    if test "$removable" = "yes" ; then
+      efidir="$efibootdir"
+    else
+      efidir="$efidir/EFI/$efi_distributor"
+      mkdir -p "$efidir" || exit 1
+    fi
 else
     echo "No valid EFI partition" 1>&2
     exit 1;
 fi
 
-if test -f "$efibootdir/bootx64.efi"; then
+if test "$removable" = "no" -a -f "$efibootdir/bootx64.efi"; then
     if test -n "$ca_string" && (grep -q "$ca_string" 
"$efibootdir/bootx64.efi"); then
         update_boot=yes
     fi
@@ -214,7 +224,7 @@
         rm -f "${efibootdir}/bootx64.efi"
         rm -f "${efibootdir}/fallback.efi"
     fi
-    if test "$removable" = no && test -n "$bootloader_id"; then
+    if test "$no_nvram" = no && test -n "$bootloader_id"; then
         # Delete old entries from the same distributor.
         for bootnum in `efibootmgr | grep '^Boot[0-9]' | \
             fgrep -i " $bootloader_id" | cut -b5-8`; do
@@ -224,13 +234,21 @@
        exit 0
 fi
 
-cp "${source_dir}/shim.efi" "${efidir}"
 cp "${source_dir}/MokManager.efi" "${efidir}"
 cp "${source_dir}/grub.efi" "${efidir}"
-echo "shim.efi,${bootloader_id}" | iconv -f ascii -t ucs2 > 
"${efidir}/boot.csv"
+
+if test "$efidir" != "$efibootdir" ; then 
+    cp "${source_dir}/shim.efi" "${efidir}"
+    if test -n "$bootloader_id"; then
+        echo "shim.efi,${bootloader_id}" | iconv -f ascii -t ucs2 > 
"${efidir}/boot.csv"
+    fi
+fi
+
 if test "$update_boot" = "yes"; then
     cp "${source_dir}/shim.efi" "${efibootdir}/bootx64.efi"
-    cp "${source_dir}/fallback.efi" "${efibootdir}"
+    if test "$removable" = "no"; then
+        cp "${source_dir}/fallback.efi" "${efibootdir}"
+    fi
 fi
 
 
@@ -268,7 +286,7 @@
 # invoke grub_install to initialize /boot/grub2 directory with files needed by 
grub.cfg
 ${grub_install} --no-nvram
 
-if test "$removable" = no && test -n "$bootloader_id"; then
+if test "$no_nvram" = no && test -n "$bootloader_id"; then
 
     modprobe -q efivars 2>/dev/null || true
 


Reply via email to