summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog4
-rw-r--r--debian/control2
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/use_compare_mem_gcc9.patch51
-rwxr-xr-xdebian/rules2
5 files changed, 57 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 93512b93..49b0bf6f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
diff --git a/debian/control b/debian/control
index 5f82c5c4..c9719ed6 100644
--- a/debian/control
+++ b/debian/control
@@ -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
diff --git a/debian/patches/series b/debian/patches/series
index 22d2577e..34291629 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -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
index 00000000..b9121b67
--- /dev/null
+++ b/debian/patches/use_compare_mem_gcc9.patch
@@ -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)) {
diff --git a/debian/rules b/debian/rules
index d7ce8b1c..e51930ef 100755
--- a/debian/rules
+++ b/debian/rules
@@ -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)