From 99dff4c0ac4d7e4bfafb06bcde7326ccec297f1dfd49e88b4ffca75f5ae24374 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 6 Dec 2018 13:55:14 +0000 Subject: [PATCH] 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