From 77ddce85cc3e9f64f9f9c60d3378dc4a7bff1d1f Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 18 Jul 2018 11:23:40 +0200 Subject: [PATCH 1/2] add BuildRequires: gcc Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot --- shim-unsigned-aarch64.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/shim-unsigned-aarch64.spec b/shim-unsigned-aarch64.spec index c72c6e4..31a30a1 100644 --- a/shim-unsigned-aarch64.spec +++ b/shim-unsigned-aarch64.spec @@ -35,6 +35,7 @@ Source2: dbx.esl Source100: shim-find-debuginfo.sh +BuildRequires: gcc BuildRequires: elfutils-libelf-devel BuildRequires: git openssl-devel openssl BuildRequires: pesign >= %{pesign_vre} From e9819de6858b56f4bc00d1f464311a68e89d8a9b Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 21 Jan 2020 14:51:20 -0500 Subject: [PATCH 2/2] Fix a minor rebuild issue; note that this means it won't match the result that's in shim-15-8. Signed-off-by: Peter Jones --- ...d-Wno-error-address-of-packed-member.patch | 25 ++++++++++++++++++ 0002-Fix-a-typo.patch | 26 +++++++++++++++++++ shim-unsigned-aarch64.spec | 11 ++++++-- 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 0001-CFLAGS-add-Wno-error-address-of-packed-member.patch create mode 100644 0002-Fix-a-typo.patch diff --git a/0001-CFLAGS-add-Wno-error-address-of-packed-member.patch b/0001-CFLAGS-add-Wno-error-address-of-packed-member.patch new file mode 100644 index 0000000..25a9c91 --- /dev/null +++ b/0001-CFLAGS-add-Wno-error-address-of-packed-member.patch @@ -0,0 +1,25 @@ +From 79f8e33de536909810578371dbc8a3043517b216 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Tue, 21 Jan 2020 14:37:59 -0500 +Subject: [PATCH] CFLAGS: add -Wno-error=address-of-packed-member + +Signed-off-by: Peter Jones +--- + Make.defaults | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Make.defaults b/Make.defaults +index e11ab5a7f2c..065b17445b5 100644 +--- a/Make.defaults ++++ b/Make.defaults +@@ -41,6 +41,7 @@ EFI_LDS = $(TOPDIR)/elf_$(ARCH)_efi.lds + + CFLAGS = -ggdb -O0 -fno-stack-protector -fno-strict-aliasing -fpic \ + -fshort-wchar -Wall -Wsign-compare -Werror -fno-builtin \ ++ -Wno-error=address-of-packed-member -Wno-error=pointer-sign \ + -Werror=sign-compare -ffreestanding -std=gnu89 \ + -I$(shell $(CC) -print-file-name=include) \ + "-DDEFAULT_LOADER=L\"$(DEFAULT_LOADER)\"" \ +-- +2.24.1 + diff --git a/0002-Fix-a-typo.patch b/0002-Fix-a-typo.patch new file mode 100644 index 0000000..d2a90d1 --- /dev/null +++ b/0002-Fix-a-typo.patch @@ -0,0 +1,26 @@ +From 67756daa55f48f1166b3526dca1309e32c99ad89 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Tue, 12 Nov 2019 14:34:51 -0500 +Subject: [PATCH] Fix a typo + +Signed-off-by: Peter Jones +--- + lib/console.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/console.c b/lib/console.c +index 3fee403e2a8..39f29faadc4 100644 +--- a/lib/console.c ++++ b/lib/console.c +@@ -360,7 +360,7 @@ static struct { + { EFI_SECURITY_VIOLATION, L"Security Violation"}, + + // warnings +- { EFI_WARN_UNKOWN_GLYPH, L"Warning Unknown Glyph"}, ++ { EFI_WARN_UNKNOWN_GLYPH, L"Warning Unknown Glyph"}, + { EFI_WARN_DELETE_FAILURE, L"Warning Delete Failure"}, + { EFI_WARN_WRITE_FAILURE, L"Warning Write Failure"}, + { EFI_WARN_BUFFER_TOO_SMALL, L"Warning Buffer Too Small"}, +-- +2.23.0 + diff --git a/shim-unsigned-aarch64.spec b/shim-unsigned-aarch64.spec index 31a30a1..258b8f8 100644 --- a/shim-unsigned-aarch64.spec +++ b/shim-unsigned-aarch64.spec @@ -16,7 +16,7 @@ Name: shim-unsigned-aarch64 Version: 15 -Release: 1%{?dist} +Release: 2%{?dist} Summary: First-stage UEFI bootloader ExclusiveArch: aarch64 License: BSD @@ -35,6 +35,9 @@ Source2: dbx.esl Source100: shim-find-debuginfo.sh +Patch0001: 0001-CFLAGS-add-Wno-error-address-of-packed-member.patch +Patch0002: 0002-Fix-a-typo.patch + BuildRequires: gcc BuildRequires: elfutils-libelf-devel BuildRequires: git openssl-devel openssl @@ -77,7 +80,7 @@ BuildArch: noarch %debug_desc %prep -%autosetup -S git -n shim-%{version} +%autosetup -S git_am -n shim-%{version} git config --unset user.email git config --unset user.name mkdir build-%{efiarch} @@ -131,6 +134,10 @@ cd .. %files debugsource -f build-%{efiarch}/debugsource.list %changelog +* Tue Jan 21 2020 Peter Jones - 15-2 +- Fix a minor rebuild issue; note that this means it won't match the + result that's in shim-15-8. + * Thu Apr 05 2018 Peter Jones - 15-1 - Update to shim 15 - better checking for bad linker output