]> git.proxmox.com Git - efi-boot-shim.git/commitdiff
Switch to using gcc-9 for builds. Closes: #925826
authorSteve McIntyre <93sam@debian.org>
Tue, 24 Mar 2020 16:58:08 +0000 (16:58 +0000)
committerSteve McIntyre <93sam@debian.org>
Tue, 24 Mar 2020 17:38:57 +0000 (17:38 +0000)
Pull upstream commit aaa09b35e73c4a35fc119d225e5241199d7cf5aa to fix
an FTBFS.

debian/changelog
debian/control
debian/patches/series
debian/patches/use_compare_mem_gcc9.patch [new file with mode: 0644]
debian/rules

index 93512b93e90c46f1347b00cfad2bb285fa8e7fdc..49b0bf6f807c2f804389cf71efdbad78b6aa2a20 100644 (file)
@@ -5,8 +5,10 @@ shim (15+1533136590.3beb971-8) UNRELEASED; urgency=medium
     list, as recommended by Peter Jones. No actual changes needed in
     our list of hashes at this point - they work out the same either
     way.
+  * Switch to using gcc-9 for builds, tweaking a patch from upstream
+    to fix a FTBFS. Closes: #925816
 
- -- Steve McIntyre <93sam@debian.org>  Wed, 08 May 2019 02:05:01 +0100
+ -- Steve McIntyre <93sam@debian.org>  Tue, 24 Mar 2020 16:51:10 +0000
 
 shim (15+1533136590.3beb971-7) unstable; urgency=medium
 
index 5f82c5c4b63490cd67e38fb3f2a9dd08ea0f3761..c9719ed6a4f8d142aa18a00d93dee35d2aaca0bf 100644 (file)
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Debian EFI team <debian-efi@lists.debian.org>
 Uploaders: Steve Langasek <vorlon@debian.org>, Steve McIntyre <93sam@debian.org>
 Standards-Version: 4.3.0
-Build-Depends: debhelper (>= 9), gnu-efi (>= 3.0u), sbsigntool, openssl, libelf-dev, gcc-7, pesign (>= 0.112-5)
+Build-Depends: debhelper (>= 9), gnu-efi (>= 3.0u), sbsigntool, openssl, libelf-dev, gcc-9, pesign (>= 0.112-5)
 Vcs-Browser: https://salsa.debian.org/efi-team/shim
 Vcs-Git: https://salsa.debian.org/efi-team/shim.git
 
index 22d2577e84c666328c82e54306c0859df58086b9..34291629329e760161349a09a2bc21a49cd22e80 100644 (file)
@@ -2,3 +2,4 @@ fixup_git.patch
 uname.patch
 avoid_null_vsprint.patch
 check_null_sn_ln.patch
+use_compare_mem_gcc9.patch
diff --git a/debian/patches/use_compare_mem_gcc9.patch b/debian/patches/use_compare_mem_gcc9.patch
new file mode 100644 (file)
index 0000000..b9121b6
--- /dev/null
@@ -0,0 +1,51 @@
+Taken changes from commit aaa09b35e73c4a35fc119d225e5241199d7cf5aa,
+tweaked to fit into our older codebase
+diff --git a/MokManager.c b/MokManager.c
+index 01697bd..aaf6cb1 100644
+--- a/MokManager.c     2020-03-24 17:13:03.250000678 +0000
++++ b/MokManager.c     2020-03-24 17:15:08.586705154 +0000
+@@ -1077,7 +1077,7 @@
+                       continue;
+               DataSize += sizeof(EFI_SIGNATURE_LIST);
+-              if (CompareGuid(&(list[i].Type), &X509_GUID) == 0)
++              if (CompareMem(&(list[i].Type), &X509_GUID, sizeof(EFI_GUID)) == 0)
+                       DataSize += sizeof(EFI_GUID);
+               DataSize += list[i].MokSize;
+       }
+@@ -1099,7 +1099,7 @@
+               CertList->SignatureType = list[i].Type;
+               CertList->SignatureHeaderSize = 0;
+-              if (CompareGuid(&(list[i].Type), &X509_GUID) == 0) {
++              if (CompareMem(&(list[i].Type), &X509_GUID, sizeof(EFI_GUID)) == 0) {
+                       CertList->SignatureListSize = list[i].MokSize +
+                           sizeof(EFI_SIGNATURE_LIST) + sizeof(EFI_GUID);
+                       CertList->SignatureSize =
+@@ -1140,7 +1140,7 @@
+       int i;
+       for (i = 0; i < mok_num; i++) {
+-              if (CompareGuid(&(mok[i].Type), &X509_GUID) != 0)
++              if (CompareMem(&(mok[i].Type), &X509_GUID, sizeof(EFI_GUID)) != 0)
+                       continue;
+               if (mok[i].MokSize == key_size &&
+@@ -1191,7 +1191,7 @@
+       sig_size = hash_size + sizeof(EFI_GUID);
+       for (i = 0; i < mok_num; i++) {
+-              if ((CompareGuid(&(mok[i].Type), &Type) != 0) ||
++              if ((CompareMem(&(mok[i].Type), &Type, sizeof(EFI_GUID)) != 0) ||
+                   (mok[i].MokSize < sig_size))
+                       continue;
+@@ -1355,7 +1355,7 @@
+       /* Search and destroy */
+       for (i = 0; i < del_num; i++) {
+-              if (CompareGuid(&(del_key[i].Type), &X509_GUID) == 0) {
++              if (CompareMem(&(del_key[i].Type), &X509_GUID, sizeof(EFI_GUID)) == 0) {
+                       delete_cert(del_key[i].Mok, del_key[i].MokSize,
+                                   mok, mok_num);
+               } else if (is_sha2_hash(del_key[i].Type)) {
index d7ce8b1c7691efaa52360340c33c3cdac5a0efd0..e51930efbe56efcc891eeeb718413189bd9a4429 100755 (executable)
@@ -40,7 +40,7 @@ COMMON_OPTIONS += \
        VENDOR_DBX_FILE=$(DBX_LIST) \
        EFIDIR=$(distributor) \
        CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- \
-       CC=$(DEB_HOST_GNU_TYPE)-gcc-7 \
+       CC=$(DEB_HOST_GNU_TYPE)-gcc-9 \
        $(NULL)
 
 $(DBX_LIST): $(DBX_HASHES)