#1 Update to master to add patch for RHBZ#1506609
Closed 5 years ago by pjones. Opened 5 years ago by chenxiaolong.
https://github.com/chenxiaolong/fedora-package-fwupdate rhbz1506609  into  master

Update to master to add patch for RHBZ#1506609
Andrew Gunnerson • 5 years ago  
0001-Fix-fwupx64.efi-not-actually-staging-capsules-proper.patch
file added
+46
@@ -0,0 +1,46 @@

+ From 2008462a8d3caa6259c517c8db38db2943f84b69 Mon Sep 17 00:00:00 2001

+ From: mario limonciello <mario.limonciello@dell.com>

+ Date: Fri, 5 Jan 2018 18:23:55 -0500

+ Subject: [PATCH] Fix fwupx64.efi not actually staging capsules properly. (#80)

+ 

+ Bisecting master shows that the problem was introduced in 6f63cdd9.

+ 

+ When the guid_cmp comparison was put in place it flipped the logic

+ of one of the checks.

+ 

+ git bisect start 'efi/'

+  bad: [5c2a8d03a9f4d11f3624dc201ff1d2207d19e995] efi: better debugging on our capsule tests.

+ git bisect bad 5c2a8d03a9f4d11f3624dc201ff1d2207d19e995

+  good: [04daa639f2a8a125dea0dbe8bc150d9cd1d87550] Make SUBDIRS overrideable

+ git bisect good 04daa639f2a8a125dea0dbe8bc150d9cd1d87550

+  good: [cd9ea4cbdc93da922ce9abc45c7de63fe252ecc8] efi: delete the boot path from the BootOrder list

+ git bisect good cd9ea4cbdc93da922ce9abc45c7de63fe252ecc8

+  good: [515b0c0800beb48e928e367d254bd14f25da034a] Fix capsule sizes for our ux image capsules

+ git bisect good 515b0c0800beb48e928e367d254bd14f25da034a

+  bad: [6f63cdd9eabf533fce909f40bf197c699b20d363] efi: Add guid_cmp() and remove manual comparisons.

+ git bisect bad 6f63cdd9eabf533fce909f40bf197c699b20d363

+  good: [55ed685dec24c57129de6cf66e24388d05b5ed2a] Reorganize Make.version a bit so "bumpver" works better.

+ git bisect good 55ed685dec24c57129de6cf66e24388d05b5ed2a

+  good: [75391bc4c3dcfc384ae9527d3fd82933280a2276] Adding capsule headers should add flags if it's /not/ a ux cap.

+ git bisect good 75391bc4c3dcfc384ae9527d3fd82933280a2276

+  first bad commit: [6f63cdd9eabf533fce909f40bf197c699b20d363] efi: Add guid_cmp() and remove manual comparisons.

+ ---

+  efi/fwupdate.c | 2 +-

+  1 file changed, 1 insertion(+), 1 deletion(-)

+ 

+ diff --git a/efi/fwupdate.c b/efi/fwupdate.c

+ index 7d0d600..c447965 100644

+ --- a/efi/fwupdate.c

+ +++ b/efi/fwupdate.c

+ @@ -1037,7 +1037,7 @@ add_capsule(update_table *update, EFI_CAPSULE_HEADER **capsule_out,

+  		Print(L"updates guid: %g\n", &update->info->guid);

+  		Print(L"File guid: %g\n", fbuf);

+  	}

+ -	if ((guid_cmp(&update->info->guid, (efi_guid_t *)fbuf) ||

+ +	if ((guid_cmp(&update->info->guid, (efi_guid_t *)fbuf) == 0 ||

+  	     is_fmp_capsule((efi_guid_t *)fbuf)) &&

+  	    /*

+  	     * We're ignoring things that are 40 bytes here, because that's

+ -- 

+ 2.14.3

+ 

fwupdate.spec
file modified
+11 -3
@@ -1,3 +1,6 @@

+ %global commit 91351b8e93da608da31a812b876aa25b394ae665

+ %global shortcommit %(c=%{commit}; echo ${c:0:7})

+ 

  %global efivar_version 32-1

  %global efibootmgr_version 13-1

  %global gnu_efi_version 3.0.5-11
@@ -5,7 +8,7 @@

  

  Name:           fwupdate

  Version:        10

- Release:        0.2%{?dist}

+ Release:        0.3.git%{shortcommit}%{?dist}

  Summary:        Tools to manage UEFI firmware updates

  License:        GPLv2+

  URL:            https://github.com/rhinstaller/fwupdate
@@ -21,8 +24,9 @@

  BuildRequires: libsmbios-devel

  %endif

  ExclusiveArch:  x86_64 aarch64

- Source0:        https://github.com/rhinstaller/fwupdate/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2

+ Source0:        https://github.com/rhboot/fwupdate/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz

  Source1:        find-debuginfo-efi.sh

+ Patch0:         0001-Fix-fwupx64.efi-not-actually-staging-capsules-proper.patch

  

  %global __os_install_post %{expand:\

    %{?__debug_package:%{__debug_install_post}} \
@@ -80,7 +84,7 @@

  debuginfo for UEFI binaries used by libfwup.

  

  %prep

- %setup -q -n %{name}-%{version}

+ %setup -q -n %{name}-%{commit}

  git init

  git config user.email "%{name}-owner@fedoraproject.org"

  git config user.name "Fedora Ninjas"
@@ -198,6 +202,10 @@

  %defattr(-,root,root)

  

  %changelog

+ * Sun Jan 07 2018 Andrew Gunnerson <andrewgunnerson@gmail.com> - 10-0.3.git91351b8

+ - Build from master

+ - Add patch for: https://github.com/rhboot/fwupdate/pull/91

+ 

  * Tue Sep 12 2017 Peter Jones <pjones@redhat.com> - 10-0.2

  - Update for version 10

  - test release for ux capsule support; to enable UX capsules define

no initial comment

This PR updates the package to include a fix for https://bugzilla.redhat.com/show_bug.cgi?id=1506609. The base package was updated to build from a snapshot of master because some other needed fixes are not in a released version yet.

Upstream PR: https://github.com/rhboot/fwupdate/pull/91

This patch is in the official 10 release from upstream that I built yesterday.

Pull-Request has been closed by pjones

5 years ago