Hello community, here is the log from the commit of package shim for openSUSE:Factory checked in at 2019-05-25 13:13:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/shim (Old) and /work/SRC/openSUSE:Factory/.shim.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "shim" Sat May 25 13:13:55 2019 rev:76 rq:702795 version:15+git47 Changes: -------- --- /work/SRC/openSUSE:Factory/shim/shim.changes 2019-04-17 11:23:12.490408484 +0200 +++ /work/SRC/openSUSE:Factory/.shim.new.5148/shim.changes 2019-05-25 13:14:00.984475294 +0200 @@ -1,0 +2,5 @@ +Fri Apr 19 10:32:11 UTC 2019 - Martin Liška <[email protected]> + +- Add gcc9-fix-warnings.patch (bsc#1121268). + +------------------------------------------------------------------- New: ---- gcc9-fix-warnings.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ shim.spec ++++++ --- /var/tmp/diff_new_pack.Br4SSE/_old 2019-05-25 13:14:02.652474673 +0200 +++ /var/tmp/diff_new_pack.Br4SSE/_new 2019-05-25 13:14:02.656474672 +0200 @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # # needssslcertforbuild @@ -71,6 +71,8 @@ # PATCH-FIX-UPSTREAM shim-always-mirror-mok-variables.patch [email protected] -- Mirror MOK variables correctly Patch4: shim-always-mirror-mok-variables.patch Patch5: shim-correct-license-in-headers.patch +# PATCH-FIX-UPSTREAM gcc9-fix-warnings.patch [email protected] -- MokManager: Use CompareMem on MokListNode.Type instead of CompareGuid +Patch6: gcc9-fix-warnings.patch # PATCH-FIX-OPENSUSE shim-opensuse-cert-prompt.patch [email protected] -- Show the prompt to ask whether the user trusts openSUSE certificate or not Patch100: shim-opensuse-cert-prompt.patch BuildRequires: gnu-efi >= 3.0.3 @@ -117,6 +119,7 @@ %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %if 0%{?is_opensuse} == 1 %patch100 -p1 %endif ++++++ gcc9-fix-warnings.patch ++++++ >From f30cd0b6330be8ea72a93bf25e43829c222ba611 Mon Sep 17 00:00:00 2001 From: Gary Lin <[email protected]> Date: Tue, 26 Feb 2019 11:33:53 +0800 Subject: [PATCH] MokManager: Use CompareMem on MokListNode.Type instead of CompareGuid Fix the errors from gcc9 '-Werror=address-of-packed-member' https://github.com/rhboot/shim/issues/161 Signed-off-by: Gary Lin <[email protected]> --- MokManager.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/MokManager.c b/MokManager.c index d69b4dbe..05dc1622 100644 --- a/MokManager.c +++ b/MokManager.c @@ -1053,7 +1053,8 @@ static EFI_STATUS write_back_mok_list(MokListNode * list, INTN key_num, 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; } @@ -1075,7 +1076,8 @@ static EFI_STATUS write_back_mok_list(MokListNode * list, INTN key_num, 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 = @@ -1116,7 +1118,8 @@ static void delete_cert(void *key, UINT32 key_size, 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 && @@ -1167,7 +1170,7 @@ static void delete_hash_in_list(EFI_GUID Type, UINT8 * hash, UINT32 hash_size, 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; @@ -1331,7 +1334,8 @@ static EFI_STATUS delete_keys(void *MokDel, UINTN MokDelSize, BOOLEAN MokX) /* 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)) {
