From 99dff4c0ac4d7e4bfafb06bcde7326ccec297f1dfd49e88b4ffca75f5ae24374 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 6 Dec 2018 13:55:14 +0000 Subject: [PATCH 1/2] Accepting request 655502 from home:gary_lin:branches:Base:System - Amend %post and %postun to install/uninstall fwupd*.efi to the EFI system partition + Also add shim to Requires for fwupdx64.efi - Mark fwupdate as obsolete + fwupdate has been merged into fwupd since fwupd 1.1.0. OBS-URL: https://build.opensuse.org/request/show/655502 OBS-URL: https://build.opensuse.org/package/show/Base:System/fwupd?expand=0&rev=38 --- fwupd.changes | 9 +++++++++ fwupd.spec | 27 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/fwupd.changes b/fwupd.changes index 158d951..7c7d4a0 100644 --- a/fwupd.changes +++ b/fwupd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Dec 6 07:22:17 UTC 2018 - Gary Ching-Pang Lin + +- Amend %post and %postun to install/uninstall fwupd*.efi to the + EFI system partition + + Also add shim to Requires for fwupdx64.efi +- Mark fwupdate as obsolete + + fwupdate has been merged into fwupd since fwupd 1.1.0. + ------------------------------------------------------------------- Mon Nov 12 10:31:09 CET 2018 - ndas@suse.de diff --git a/fwupd.spec b/fwupd.spec index ab976bf..1825e52 100644 --- a/fwupd.spec +++ b/fwupd.spec @@ -21,6 +21,11 @@ %else %bcond_with efi_fw_update %endif +%if 0%{?is_opensuse} +%global efidir opensuse +%else +%global efidir sles +%endif Name: fwupd Version: 1.1.2 Release: 0 @@ -81,6 +86,12 @@ BuildRequires: pkgconfig(fwup) >= 10 %ifarch %{ix86} x86_64 BuildRequires: pkgconfig(libsmbios_c) >= 2.3.0 %endif +%if %{with efi_fw_update} +%ifarch x86_64 +Requires: shim >= 11 +%endif +Obsoletes: fwupdate +%endif %description fwupd is a daemon to allows session software to update device firmware on @@ -168,9 +179,25 @@ rm -fr %{buildroot}%{_datadir}/installed-tests %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 + # Remove all capsule files + rm -rf /boot/efi/EFI/%{efidir}/fw + # Remove the UEFI firmware update program + rm -f /boot/efi/EFI/%{efidir}/fwupd*.efi +fi +%endif %files %license COPYING From fa9dd33b31ce277c35510f77d0fdf7bde5bc291b0bb6bd7413a42b0b444b0c19 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 11 Dec 2018 07:46:37 +0000 Subject: [PATCH 2/2] Accepting request 656781 from home:Andreas_Schwab:Factory - Use gnu-efi only if %{with efi_fw_update}, always use pkgconfig(efivar) - Fix file list OBS-URL: https://build.opensuse.org/request/show/656781 OBS-URL: https://build.opensuse.org/package/show/Base:System/fwupd?expand=0&rev=39 --- fwupd.changes | 6 ++++++ fwupd.spec | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/fwupd.changes b/fwupd.changes index 7c7d4a0..03bfa22 100644 --- a/fwupd.changes +++ b/fwupd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Dec 10 10:17:50 UTC 2018 - schwab@suse.de + +- Use gnu-efi only if %{with efi_fw_update}, always use pkgconfig(efivar) +- Fix file list + ------------------------------------------------------------------- Thu Dec 6 07:22:17 UTC 2018 - Gary Ching-Pang Lin diff --git a/fwupd.spec b/fwupd.spec index 1825e52..a7f77d3 100644 --- a/fwupd.spec +++ b/fwupd.spec @@ -37,7 +37,6 @@ Source: %{name}-%{version}.tar.xz BuildRequires: dejavu-fonts BuildRequires: docbook-utils-minimal BuildRequires: gcab -BuildRequires: gnu-efi # for certtool BuildRequires: gnutls BuildRequires: gobject-introspection @@ -58,6 +57,7 @@ BuildRequires: pkgconfig(appstream-glib) >= 0.5.10 BuildRequires: pkgconfig(bash-completion) BuildRequires: pkgconfig(cairo) BuildRequires: pkgconfig(colorhug) >= 1.2.12 +BuildRequires: pkgconfig(efivar) BuildRequires: pkgconfig(gio-2.0) >= 2.25.9 BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(glib-2.0) >= 2.45.8 @@ -79,8 +79,8 @@ BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(udev) BuildRequires: pkgconfig(valgrind) %if %{with efi_fw_update} +BuildRequires: gnu-efi BuildRequires: pkgconfig(efiboot) -BuildRequires: pkgconfig(efivar) BuildRequires: pkgconfig(fwup) >= 10 %endif %ifarch %{ix86} x86_64 @@ -247,7 +247,9 @@ fi %{_libdir}/girepository-1.0/Fwupd-2.0.typelib %files lang -f %{name}.lang +%if %{with efi_fw_update} %{_datadir}/locale/*/LC_IMAGES/ +%endif %files devel %doc %{_datadir}/gtk-doc/html/libfwupd/