Hello community,

here is the log from the commit of package fwupd for openSUSE:Factory checked 
in at 2019-04-10 23:08:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fwupd (Old)
 and      /work/SRC/openSUSE:Factory/.fwupd.new.27019 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fwupd"

Wed Apr 10 23:08:58 2019 rev:16 rq:692369 version:1.2.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/fwupd/fwupd.changes      2019-03-05 
12:15:49.285016247 +0100
+++ /work/SRC/openSUSE:Factory/.fwupd.new.27019/fwupd.changes   2019-04-10 
23:08:59.843824078 +0200
@@ -1,0 +2,10 @@
+Thu Mar 28 07:31:49 UTC 2019 - Gary Ching-Pang Lin <[email protected]>
+
+- Add fwupd-bsc1130056-change-esp-os-name.patch to change the
+  OS directory in ESP (bsc#1130056)
+- Add fwupd-bsc1130056-change-shim-path.patch to set the default
+  shim binary for openSUSE/SLE (bsc#1130056)
+- Link fwupd*.efi.signed to fwupd*.efi as requested by fwupd
+  (bsc#1129466)
+
+-------------------------------------------------------------------

New:
----
  fwupd-bsc1130056-change-esp-os-name.patch
  fwupd-bsc1130056-change-shim-path.patch

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

Other differences:
------------------
++++++ fwupd.spec ++++++
--- /var/tmp/diff_new_pack.n8OYzu/_old  2019-04-10 23:09:00.479824800 +0200
+++ /var/tmp/diff_new_pack.n8OYzu/_new  2019-04-10 23:09:00.483824804 +0200
@@ -35,6 +35,10 @@
 Group:          System/Management
 URL:            https://fwupd.org/
 Source:         %{name}-%{version}.tar.xz
+# PATCH-FIX-UPSTREAM fwupd-bsc1130056-change-esp-os-name.patch bsc#1130056
+Patch1:         fwupd-bsc1130056-change-esp-os-name.patch
+# PATCH-FIX-OPENSUSE fwupd-bsc1130056-shim-path.patch bsc#1130056
+Patch2:         fwupd-bsc1130056-change-shim-path.patch
 BuildRequires:  dejavu-fonts
 BuildRequires:  docbook-utils-minimal
 BuildRequires:  gcab
@@ -139,6 +143,8 @@
 
 %prep
 %setup -q
+%patch1 -p1
+%patch2 -p1
 for file in $(grep -l %{_bindir}/env . -r); do
   sed -i "s|%{_bindir}/env python3|%{_bindir}/python3|" $file
 done
@@ -151,6 +157,8 @@
   -Dplugin_nvme=false \
   -Dplugin_redfish=false \
   -Dplugin_uefi=false \
+%else
+  -Defi_os_dir="%{efidir}" \
 %endif
 %ifnarch %{ix86} x86_64
   -Dplugin_dell=false \
@@ -173,6 +181,12 @@
 # do not package tests
 rm -fr %{buildroot}%{_datadir}/installed-tests
 
+%if %{with efi_fw_update}
+# link fwupd*.efi.signed to fwupd*.efi (bsc#1129466)
+FWUPD_EFI=`basename %{buildroot}/%{_libexecdir}/fwupd/efi/fwupd*.efi`
+ln -s %{_libexecdir}/fwupd/efi/$FWUPD_EFI 
%{buildroot}/%{_libexecdir}/fwupd/efi/$FWUPD_EFI.signed
+%endif
+
 %post   -n libfwupd2 -p /sbin/ldconfig
 %postun -n libfwupd2 -p /sbin/ldconfig
 %preun

++++++ fwupd-bsc1130056-change-esp-os-name.patch ++++++
>From 89552eec34eccda2d119465370d07be9fa53092e Mon Sep 17 00:00:00 2001
From: Gary Lin <[email protected]>
Date: Thu, 28 Mar 2019 16:20:22 +0800
Subject: [PATCH] uefi: add a new option to specify the os name

fu_uefi_get_esp_path_for_os() generates the path to the OS directory
based on "ID" in /etc/os-release, and it may not work for some distros.

Take openSUSE as an example, the "ID" for openSUSE Leap is
"opensuse-leap" and that for openSUSE Tumbleweed is "opensuse-tumbleweed".
However, both of them use the same OS directory in the ESP, i.e.
"/EFI/opensuse".

This commit adds a new build option, efi_os_dir, to allow the packager to
specify the name of OS directory at build time instead of the runtime
detection.

Signed-off-by: Gary Lin <[email protected]>
---
 meson_options.txt             | 1 +
 plugins/uefi/fu-uefi-common.c | 4 ++++
 plugins/uefi/meson.build      | 5 +++++
 3 files changed, 10 insertions(+)

diff --git a/meson_options.txt b/meson_options.txt
index 889a888e..5d4163e8 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -28,3 +28,4 @@ option('efi-ld', type : 'string', value : 'ld', description : 
'the linker to use
 option('efi-libdir', type : 'string', description : 'path to the EFI lib 
directory')
 option('efi-ldsdir', type : 'string', description : 'path to the EFI lds 
directory')
 option('efi-includedir', type : 'string', value : '/usr/include/efi', 
description : 'path to the EFI header directory')
+option('efi_os_dir', type: 'string', description : 'the name of OS directory 
in ESP')
diff --git a/plugins/uefi/fu-uefi-common.c b/plugins/uefi/fu-uefi-common.c
index aa1d1105..fadb469f 100644
--- a/plugins/uefi/fu-uefi-common.c
+++ b/plugins/uefi/fu-uefi-common.c
@@ -246,6 +246,7 @@ gchar *
 fu_uefi_get_esp_path_for_os (const gchar *esp_path)
 {
        const gchar *os_release_id = NULL;
+#ifndef EFI_OS_DIR
        g_autoptr(GError) error_local = NULL;
        g_autoptr(GHashTable) os_release = fwupd_get_os_release (&error_local);
        if (os_release != NULL) {
@@ -255,6 +256,9 @@ fu_uefi_get_esp_path_for_os (const gchar *esp_path)
        }
        if (os_release_id == NULL)
                os_release_id = "unknown";
+#else
+       os_release_id = EFI_OS_DIR;
+#endif
        return g_build_filename (esp_path, "EFI", os_release_id, NULL);
 }
 
diff --git a/plugins/uefi/meson.build b/plugins/uefi/meson.build
index fd1b3976..8b742864 100644
--- a/plugins/uefi/meson.build
+++ b/plugins/uefi/meson.build
@@ -3,6 +3,11 @@ subdir('efi')
 cargs = ['-DG_LOG_DOMAIN="FuPluginUefi"']
 cargs += '-DEFI_APP_LOCATION_BUILD="' + app.full_path() + '"'
 
+efi_os_dir = get_option('efi_os_dir')
+if efi_os_dir != ''
+  cargs += '-DEFI_OS_DIR="' + efi_os_dir + '"'
+endif
+
 install_data(['uefi.quirk'],
   install_dir: join_paths(datadir, 'fwupd', 'quirks.d')
 )
-- 
2.21.0

++++++ fwupd-bsc1130056-change-shim-path.patch ++++++
>From f8bbcefe3eed253cda0c86a4c2443292beca82ee Mon Sep 17 00:00:00 2001
From: Gary Lin <[email protected]>
Date: Thu, 28 Mar 2019 15:26:28 +0800
Subject: [PATCH] Change the path to shim.efi

For openSUSE/SLE, we use shim.efi instead of shimx64.efi.

Signed-off-by: Gary Lin <[email protected]>
---
 plugins/uefi/fu-uefi-bootmgr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plugins/uefi/fu-uefi-bootmgr.c b/plugins/uefi/fu-uefi-bootmgr.c
index 7bec311..22357d4 100644
--- a/plugins/uefi/fu-uefi-bootmgr.c
+++ b/plugins/uefi/fu-uefi-bootmgr.c
@@ -319,7 +319,8 @@ fu_uefi_bootmgr_bootnext (const gchar *esp_path, 
FuUefiBootmgrFlags flags, GErro
                return FALSE;
 
        /* test to make sure shim is there if we need it */
-       shim_app = fu_uefi_get_esp_app_path (esp_path, "shim", error);
+       shim_app = g_strdup_printf ("%s/shim.efi",
+                                   fu_uefi_get_esp_path_for_os (esp_path));
        if (shim_app == NULL)
                return FALSE;
        if (!g_file_test (shim_app, G_FILE_TEST_EXISTS)) {
-- 
2.21.0


Reply via email to