Hello community,

here is the log from the commit of package fwupd for openSUSE:Factory checked 
in at 2020-09-08 22:43:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fwupd (Old)
 and      /work/SRC/openSUSE:Factory/.fwupd.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fwupd"

Tue Sep  8 22:43:22 2020 rev:29 rq:831919 version:1.4.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/fwupd/fwupd.changes      2020-08-12 
10:56:34.376745614 +0200
+++ /work/SRC/openSUSE:Factory/.fwupd.new.3399/fwupd.changes    2020-09-08 
22:43:23.799401515 +0200
@@ -1,0 +2,9 @@
+Wed Sep  2 10:18:55 UTC 2020 - QK ZHU <[email protected]>
+
+- Add fwupd-jscSLE-11766-close-efidir-leap-gap.patch: Set SLE and
+  openSUSE esp os dir at runtime (jsc#SLE-11766)
+- Drop _multibuild and build option -Defi_os_dir="%{efidir}": with
+  the above patch fwupd can detect esp os dir dynamically
+- Update the efidir related %post and %postun scripts in spec file
+
+-------------------------------------------------------------------

Old:
----
  _multibuild

New:
----
  fwupd-jscSLE-11766-close-efidir-leap-gap.patch

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

Other differences:
------------------
++++++ fwupd.spec ++++++
--- /var/tmp/diff_new_pack.KKLu0a/_old  2020-09-08 22:43:24.643401926 +0200
+++ /var/tmp/diff_new_pack.KKLu0a/_new  2020-09-08 22:43:24.647401928 +0200
@@ -17,34 +17,11 @@
 # needssslcertforbuild
 
 
-%define flavor @BUILD_FLAVOR@%{nil}
-
-%if "%{flavor}" == ""
-ExclusiveArch:  %{nil}
-%else
-%define branding_name %{flavor}
-%if "%{flavor}" == "SLE"
-%define build_SLE 1
-%else
-%define build_openSUSE 1
-%endif
-%endif
-
-%if (0%{?build_SLE} && 0%{?is_opensuse}) || (0%{?build_openSUSE} && ! 
0%{?is_opensuse})
-# Don't build SLE branding on openSUSE and vice-versa
-ExclusiveArch:  %{nil}
-%endif
-
 %ifarch %{ix86} x86_64 aarch64
 %bcond_without efi_fw_update
 %else
 %bcond_with efi_fw_update
 %endif
-%if 0%{?build_openSUSE}
-%global efidir opensuse
-%else
-%global efidir sles
-%endif
 
 Name:           fwupd
 Version:        1.4.5
@@ -59,6 +36,8 @@
 
 # PATCH-FIX-OPENSUSE fwupd-bsc1130056-shim-path.patch bsc#1130056
 Patch1:         fwupd-bsc1130056-change-shim-path.patch
+# PATCH-FIX-OPENSUSE fwupd-jscSLE-11766-close-efidir-leap-gap.patch 
jsc#SLE-11766 [email protected] -- Set SLE and openSUSE esp os dir at runtime
+Patch2:         fwupd-jscSLE-11766-close-efidir-leap-gap.patch
 
 BuildRequires:  dejavu-fonts
 BuildRequires:  fish
@@ -205,8 +184,6 @@
   -Dplugin_nvme=false \
   -Dplugin_redfish=false \
   -Dplugin_uefi=false \
-%else
-  -Defi_os_dir="%{efidir}" \
 %endif
 %ifnarch %{ix86} x86_64
   -Dplugin_dell=false \
@@ -254,23 +231,19 @@
 %post
 %udev_rules_update
 %service_add_post %{name}.service fwupd-offline-update.service
-%if %{with efi_fw_update}
-if [ -d "/boot/efi/EFI/%{efidir}" ]; then
-       # Create the directory for firwmare update capsules
-       mkdir -p /boot/efi/EFI/%{efidir}/fw
-       # Install the UEFI firmware update program
-       cp %{_libexecdir}/fwupd/efi/fwupd*.efi /boot/efi/EFI/%{efidir}
-fi
-%endif
 
 %postun
 %service_del_postun %{name}.service fwupd-offline-update.service
 %if %{with efi_fw_update}
-if [ "$1" = 0 ] && [ -d "/boot/efi/EFI/%{efidir}" ] ; then
+if [ -e /etc/os-release ]; then
+  . /etc/os-release
+  efi_distributor="$(echo "${NAME} ${VERSION}" | tr 'A-Z' 'a-z' | cut -d' ' 
-f1)"
+fi
+if [ "$1" = 0 ] && [ -d "/boot/efi/EFI/$efi_distributor" ]; then
        # Remove all capsule files
-       rm -rf /boot/efi/EFI/%{efidir}/fw
+  rm -rf /boot/efi/EFI/"$efi_distributor"/fw
        # Remove the UEFI firmware update program
-       rm -f /boot/efi/EFI/%{efidir}/fwupd*.efi
+  rm -f /boot/efi/EFI/"$efi_distributor"/fwupd*.efi
 fi
 %endif
 

++++++ fwupd-jscSLE-11766-close-efidir-leap-gap.patch ++++++
diff --git a/plugins/uefi/fu-uefi-common.c b/plugins/uefi/fu-uefi-common.c
index 6cd55672..6a710cdb 100644
--- a/plugins/uefi/fu-uefi-common.c
+++ b/plugins/uefi/fu-uefi-common.c
@@ -227,9 +227,13 @@ fu_uefi_get_esp_path_for_os (const gchar *base)
        g_autofree gchar *esp_path = NULL;
        g_autoptr(GError) error_local = NULL;
        g_autoptr(GHashTable) os_release = fwupd_get_os_release (&error_local);
+       g_auto(GStrv) split = NULL;
        /* try to lookup /etc/os-release ID key */
        if (os_release != NULL) {
                os_release_id = g_hash_table_lookup (os_release, "ID");
+               /* Overide os_release_id for SLE and openSUSE */
+               split = g_strsplit (g_hash_table_lookup (os_release, "NAME"), " 
", 2);
+               os_release_id = g_ascii_strdown (split[0], -1);
        } else {
                g_debug ("failed to get ID: %s", error_local->message);
        }

Reply via email to