From 84c2b7db297dddc2066f691d4820bdbfab1e853d Mon Sep 17 00:00:00 2001 From: Steve McIntyre Date: Thu, 23 Jun 2022 00:23:21 +0100 Subject: [PATCH] Start packaging updates for the new 15.6 upstream release Remove all our patches, all upstream now --- debian/changelog | 9 +++ debian/patches/fix-32b-format-strings.patch | 73 --------------------- debian/patches/fix-test-includes.patch | 61 ----------------- debian/patches/series | 2 - 4 files changed, 9 insertions(+), 136 deletions(-) delete mode 100644 debian/patches/fix-32b-format-strings.patch delete mode 100644 debian/patches/fix-test-includes.patch delete mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index 85f9f15..42a5f75 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +shim (15.6-1) UNRELEASED; urgency=medium + + * New upstream release fixing more bugs + + Remove all our old patches, all now upstream: + - fix-32b-format-strings.patch + - fix-test-includes.patch + + -- Steve McIntyre <93sam@debian.org> Thu, 23 Jun 2022 00:21:16 +0100 + shim (15.5-1) UNRELEASED; urgency=medium * New upstream release fixing more bugs diff --git a/debian/patches/fix-32b-format-strings.patch b/debian/patches/fix-32b-format-strings.patch deleted file mode 100644 index c7d9f1e..0000000 --- a/debian/patches/fix-32b-format-strings.patch +++ /dev/null @@ -1,73 +0,0 @@ -PR submitted at https://github.com/rhboot/shim/pull/464 - -commit 475d5293608dd64955bc76dd6eb0f379b0c37b3e -Author: Steve McIntyre -Date: Thu Apr 28 11:37:12 2022 +0100 - - post-process-pe: Fix format string warnings on 32-bit platforms - - With -Werror these were causing build failures with stricter gcc: - - .../post-process-pe.c: In function 'load_pe': - .../post-process-pe.c:177:55: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] - .../post-process-pe.c:192:56: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'UINT64' {aka 'long long unsigned int'} [-Werror=format=] - .../post-process-pe.c:236:31: error: format '%zu' expects argument of type 'size_t', but argument 2 has type 'UINT64' {aka 'long long unsigned int'} [-Werror=format=] - .../post-process-pe.c:39:32: note: in definition of macro 'debug' - .../post-process-pe.c:236:60: note: format string is defined here - .../post-process-pe.c:240:31: error: format '%zu' expects argument of type 'size_t', but argument 2 has type 'UINT64' {aka 'long long unsigned int'} [-Werror=format=] - .../post-process-pe.c:39:32: note: in definition of macro 'debug' - .../post-process-pe.c:240:60: note: format string is defined here - .../post-process-pe.c:274:30: error: format '%zu' expects argument of type 'size_t', but argument 2 has type 'UINTN' {aka 'long unsigned int'} [-Werror=format=] - .../post-process-pe.c:39:32: note: in definition of macro 'debug' - .../post-process-pe.c:274:34: note: format string is defined here - - Signed-off-by: Steve McIntyre - -diff --git a/post-process-pe.c b/post-process-pe.c -index 44077bc5..daacf5ef 100644 ---- a/post-process-pe.c -+++ b/post-process-pe.c -@@ -174,7 +174,7 @@ load_pe(const char *const file, void *const data, const size_t datasize, - } - - if (FileAlignment % 2 != 0) -- errx(1, "%s: Invalid file alignment %ld", file, FileAlignment); -+ errx(1, "%s: Invalid file alignment %zu", file, FileAlignment); - - if (FileAlignment == 0) - FileAlignment = 0x200; -@@ -190,7 +190,7 @@ load_pe(const char *const file, void *const data, const size_t datasize, - ctx->NumberOfRvaAndSizes, EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES); - if (EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES < ctx->NumberOfRvaAndSizes) - errx(1, "%s: invalid number of RVAs (%lu entries, max is %d)", -- file, ctx->NumberOfRvaAndSizes, -+ file, (unsigned long)ctx->NumberOfRvaAndSizes, - EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES); - - if (mul(sizeof(EFI_IMAGE_DATA_DIRECTORY), -@@ -233,12 +233,12 @@ load_pe(const char *const file, void *const data, const size_t datasize, - if (mul(ctx->NumberOfRvaAndSizes, - sizeof(EFI_IMAGE_DATA_DIRECTORY), &sz1)) - debug(ERROR, -- "ctx->NumberOfRvaAndSizes (%zu) * sizeof(EFI_IMAGE_DATA_DIRECTORY) overflows\n", -- ctx->NumberOfRvaAndSizes); -+ "ctx->NumberOfRvaAndSizes (%ld) * sizeof(EFI_IMAGE_DATA_DIRECTORY) overflows\n", -+ (unsigned long)ctx->NumberOfRvaAndSizes); - else - debug(ERROR, -- "ctx->NumberOfRvaAndSizes (%zu) * sizeof(EFI_IMAGE_DATA_DIRECTORY) = %zu\n", -- ctx->NumberOfRvaAndSizes, sz1); -+ "ctx->NumberOfRvaAndSizes (%ld) * sizeof(EFI_IMAGE_DATA_DIRECTORY) = %zu\n", -+ (unsigned long)ctx->NumberOfRvaAndSizes, sz1); - debug(ERROR, - "space after image header:%zu data directory size:%zu\n", - sz0, sz1); -@@ -271,7 +271,7 @@ load_pe(const char *const file, void *const data, const size_t datasize, - if (sub(ctx->SizeOfHeaders, SectionHeaderOffset, &sz0) || - div(sz0, EFI_IMAGE_SIZEOF_SECTION_HEADER, &sz0) || - (sz0 < ctx->NumberOfSections)) { -- debug(ERROR, "(%zu - %zu) / %d >= %d\n", ctx->SizeOfHeaders, -+ debug(ERROR, "(%zu - %zu) / %d >= %d\n", (size_t)ctx->SizeOfHeaders, - SectionHeaderOffset, EFI_IMAGE_SIZEOF_SECTION_HEADER, - ctx->NumberOfSections); - errx(1, "%s: image sections overflow section headers", file); diff --git a/debian/patches/fix-test-includes.patch b/debian/patches/fix-test-includes.patch deleted file mode 100644 index 5cca825..0000000 --- a/debian/patches/fix-test-includes.patch +++ /dev/null @@ -1,61 +0,0 @@ -PR submitted at https://github.com/rhboot/shim/pull/466 - -commit 5ebbaf70ab4332d11a4f03f5b178e8055ba8cbce -Author: Steve McIntyre -Date: Thu Apr 28 12:32:18 2022 +0100 - - tests: also look for system headers in multi-arch directories - - On Debian(-derived) systems low-level system headers are under - /usr/include/, so look there too. - - Otherwise we see stuff like: - - gcc -O2 -fno-diagnostics-color -ggdb -std=gnu11 -isystem /shim.git/include/system -I/shim.git/gnu-efi/inc -I/shim.git/gnu-efi/inc/ia32 -I/shim.git/gnu-efi/inc/protocol -Iinclude -iquote . -isystem /usr/include -isystem /usr/lib/gcc/i686-linux-gnu/11/include -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32 -DMDE_CPU_IA32 -DPAGE_SIZE=4096 -fshort-wchar -fno-builtin -rdynamic -fno-inline -fno-eliminate-unused-debug-types -fno-eliminate-unused-debug-symbols -gpubnames -grecord-gcc-switches -Wall -Wextra -Wno-missing-field-initializers -Wsign-compare -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-unused-variable -Wno-pointer-sign -Werror -Werror=nonnull -Werror=nonnull-compare -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI -DPAGE_SIZE=4096 -DSHIM_UNIT_TEST -DDEFAULT_DEBUG_PRINT_STATE=0 -isystem include-fixed -o test-csv csv.c test-csv.c test.c libefi-test.a -lefivar - In file included from /usr/include/bits/errno.h:26, - from /usr/include/errno.h:28, - from /usr/include/efivar/efivar.h:24, - from include/test.h:51, - from shim.h:68, - from csv.c:6: - /usr/include/linux/errno.h:1:10: fatal error: asm/errno.h: No such file or directory - 1 | #include - | ^~~~~~~~~~~~~ - compilation terminated. - In file included from /usr/include/bits/errno.h:26, - from /usr/include/errno.h:28, - from /usr/include/efivar/efivar.h:24, - from include/test.h:51, - from shim.h:68, - from test-csv.c:9: - /usr/include/linux/errno.h:1:10: fatal error: asm/errno.h: No such file or directory - 1 | #include - | ^~~~~~~~~~~~~ - compilation terminated. - In file included from /usr/include/bits/errno.h:26, - from /usr/include/errno.h:28, - from /usr/include/efivar/efivar.h:24, - from include/test.h:51, - from shim.h:68, - from test.c:7: - /usr/include/linux/errno.h:1:10: fatal error: asm/errno.h: No such file or directory - 1 | #include - | ^~~~~~~~~~~~~ - compilation terminated. - - Signed-off-by: Steve McIntyre - -diff --git a/include/test.mk b/include/test.mk -index 1a4fc220..e965c600 100644 ---- a/include/test.mk -+++ b/include/test.mk -@@ -50,6 +50,9 @@ CFLAGS = $(OPTIMIZATIONS) -std=gnu11 \ - # of the "include" directory - CFLAGS += -isystem $(shell $(CC) $(ARCH_CFLAGS) -print-file-name=include-fixed) - -+# And on Debian also check the multi-arch include path -+CFLAGS += -isystem /usr/include/$(shell $(CC) $(ARCH_CFLAGS) -print-multiarch) -+ - export CFLAGS_LTO CFLAGS_GCOV - - libefi-test.a : diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index c1c3f85..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,2 +0,0 @@ -fix-test-includes.patch -fix-32b-format-strings.patch -- 2.39.5