From 89f9516402d739a44d2b00c56068bf222e07ada0 Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Mon, 3 Feb 2020 10:14:56 +0100 Subject: [PATCH 1/2] update to 0.9.3 - update bundled CCAN components list --- .gitignore | 1 + sbsigntools-mktarball.sh | 4 ++-- sbsigntools.spec | 18 +++++++++++++++++- sources | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ea67612..e548efa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /sbsigntools-0.9.1.tar.xz /sbsigntools-0.9.2.tar.xz +/sbsigntools-0.9.3.tar.xz diff --git a/sbsigntools-mktarball.sh b/sbsigntools-mktarball.sh index c99bebd..c34d870 100755 --- a/sbsigntools-mktarball.sh +++ b/sbsigntools-mktarball.sh @@ -12,8 +12,8 @@ tmp=$(mktemp -d) unset CDPATH pwd=$(pwd) -version=0.9.1 -commit=a631793f2d02ef219b5348eab0ac2ae604ed1269 +version=0.9.3 +commit=fe88da5f66241d959b7aeca7502d401ad88df410 pushd "$tmp" git clone git://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git diff --git a/sbsigntools.spec b/sbsigntools.spec index 458fde3..e4806ab 100644 --- a/sbsigntools.spec +++ b/sbsigntools.spec @@ -1,7 +1,7 @@ %bcond_without check Name: sbsigntools -Version: 0.9.2 +Version: 0.9.3 Release: 1%{?dist} Summary: Signing utility for UEFI secure boot License: GPLv3+ @@ -28,9 +28,21 @@ BuildRequires: openssl BuildRequires: openssl-devel Provides: bundled(ccan-array_size) Provides: bundled(ccan-build_assert) +Provides: bundled(ccan-check_type) +Provides: bundled(ccan-compiler) +Provides: bundled(ccan-container_of) Provides: bundled(ccan-endian) +Provides: bundled(ccan-failtest) +Provides: bundled(ccan-hash) +Provides: bundled(ccan-htable) +Provides: bundled(ccan-list) Provides: bundled(ccan-read_write_all) +Provides: bundled(ccan-str) Provides: bundled(ccan-talloc) +Provides: bundled(ccan-tcon) +Provides: bundled(ccan-time) +Provides: bundled(ccan-tlist) +Provides: bundled(ccan-typesafe_cb) %description Tools to add signatures to EFI binaries and Drivers. @@ -67,6 +79,10 @@ make check %{_mandir}/man1/sbverify.1.* %changelog +* Mon Feb 03 2020 Dominik Mierzejewski - 0.9.3-1 +- update to 0.9.3 +- update bundled CCAN components list + * Thu Feb 28 2019 Dominik Mierzejewski - 0.9.2-1 - update to 0.9.2 diff --git a/sources b/sources index 5d06c6f..c0019fc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sbsigntools-0.9.2.tar.xz) = 30c90e181e7a4446a3fec60876ad0dea68237565ba8722a0f9b84733c9df0ceaf81d0be176e5b9abe2c794879d2e7c174b6a37fb1bdc5cb77708ea1a294024a1 +SHA512 (sbsigntools-0.9.3.tar.xz) = b57d2c708171701e0c7c155c7637a99a72347ad1ff787d456c01098566c2f7c44719d212a3b57f700fc3bfc41b20c0a62a18ed0e8e2c83d5724122db16b7cfa0 From 9d1ecfd53709d8305744ab0e9ec86b6f144681be Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Tue, 4 Feb 2020 09:55:02 +0100 Subject: [PATCH 2/2] support building with gnu-efi 3.0.11 include epoch in gnu-efi version requirement --- sbsigntools-gnuefi.patch | 50 +++++++++++++++++++++++++++++++++------- sbsigntools.spec | 3 ++- 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/sbsigntools-gnuefi.patch b/sbsigntools-gnuefi.patch index 8c6f0fe..2e28883 100644 --- a/sbsigntools-gnuefi.patch +++ b/sbsigntools-gnuefi.patch @@ -1,7 +1,7 @@ -diff -up sbsigntools-0.9.2/configure.ac.orig sbsigntools-0.9.2/configure.ac ---- sbsigntools-0.9.2/configure.ac.orig 2019-02-28 01:20:11.000000000 +0100 -+++ sbsigntools-0.9.2/configure.ac 2019-02-28 10:55:56.214136475 +0100 -@@ -64,8 +64,8 @@ PKG_CHECK_MODULES(uuid, uuid, +diff -up sbsigntools-0.9.3/configure.ac.gnu-efi sbsigntools-0.9.3/configure.ac +--- sbsigntools-0.9.3/configure.ac.gnu-efi 2020-02-03 09:38:56.000000000 +0100 ++++ sbsigntools-0.9.3/configure.ac 2020-02-04 09:48:53.011259075 +0100 +@@ -64,19 +64,30 @@ PKG_CHECK_MODULES(uuid, uuid, AC_MSG_ERROR([libuuid (from the uuid package) is required])) dnl gnu-efi headers require extra include dirs @@ -12,9 +12,43 @@ diff -up sbsigntools-0.9.2/configure.ac.orig sbsigntools-0.9.2/configure.ac ## # no consistent view of where gnu-efi should dump the efi stuff, so find it -diff -up sbsigntools-0.9.2/tests/Makefile.am.orig sbsigntools-0.9.2/tests/Makefile.am ---- sbsigntools-0.9.2/tests/Makefile.am.orig 2019-02-28 01:20:11.000000000 +0100 -+++ sbsigntools-0.9.2/tests/Makefile.am 2019-02-28 10:55:14.399450851 +0100 + ## +-for path in /lib /lib64 /usr/lib /usr/lib64 /usr/lib32 /lib/efi /lib64/efi /usr/lib/efi /usr/lib64/efi /usr/lib/gnuefi /usr/lib64/gnuefi ; do +- if test -e $path/crt0-efi-$EFI_ARCH.o; then ++AC_MSG_CHECKING([gnu-efi crt path]) ++for path in /lib /lib64 /usr/lib /usr/lib64 /usr/lib32 /lib/efi /lib64/efi /usr/lib/efi /usr/lib64/efi /usr/lib/gnuefi /usr/lib64/gnuefi /usr/lib/gnuefi/$EFI_ARCH ; do ++ if test -e $path/crt0.o; then + CRTPATH=$path ++ CRT=crt0.o ++ LDS=efi.lds ++ EFI_PATH=$path ++ elif test -e $path/crt0-efi-$EFI_ARCH.o; then ++ CRTPATH=$path ++ CRT=crt0-efi-${EFI_ARCH}.o ++ LDS=elf_${EFI_ARCH}_efi.lds ++ EFI_PATH=$libdir + fi + done + if test -z "$CRTPATH"; then + AC_MSG_ERROR([cannot find the gnu-efi crt path]) ++else ++ AC_MSG_RESULT($CRTPATH) + fi + + EFI_CPPFLAGS="-I/usr/include/efi -I/usr/include/efi/$EFI_ARCH \ +@@ -88,6 +99,9 @@ CPPFLAGS="$CPPFLAGS_save" + AC_SUBST(EFI_CPPFLAGS, $EFI_CPPFLAGS) + AC_SUBST(EFI_ARCH, $EFI_ARCH) + AC_SUBST(CRTPATH, $CRTPATH) ++AC_SUBST(CRT, $CRT) ++AC_SUBST(LDS, $LDS) ++AC_SUBST(EFI_PATH, $EFI_PATH) + + AC_CONFIG_FILES([Makefile src/Makefile lib/ccan/Makefile] + [docs/Makefile tests/Makefile]) +diff -up sbsigntools-0.9.3/tests/Makefile.am.gnu-efi sbsigntools-0.9.3/tests/Makefile.am +--- sbsigntools-0.9.3/tests/Makefile.am.gnu-efi 2020-02-03 09:38:56.000000000 +0100 ++++ sbsigntools-0.9.3/tests/Makefile.am 2020-02-04 09:47:44.786665340 +0100 @@ -14,7 +14,7 @@ if TEST_BINARY_FORMAT EFILDFLAGS = --defsym=EFI_SUBSYSTEM=0x0a FORMAT = -O binary @@ -29,7 +63,7 @@ diff -up sbsigntools-0.9.2/tests/Makefile.am.orig sbsigntools-0.9.2/tests/Makefi .$(OBJEXT).elf: - $(LD) $(EFILDFLAGS) -nostdlib -L /usr/lib -L /usr/lib64 -L $(CRTPATH) -shared -Bsymbolic $(CRTPATH)/crt0-efi-$(EFI_ARCH).o -T elf_$(EFI_ARCH)_efi.lds $< -o $@ -lefi -lgnuefi -+ $(LD) $(EFILDFLAGS) -nostdlib -L /usr/lib -L /usr/lib64 -L $(CRTPATH) -shared -Bsymbolic $(CRTPATH)/crt0-efi-$(EFI_ARCH).o -T elf_$(EFI_ARCH)_efi.lds $< -o $@ @libdir@/libefi.a @libdir@/libgnuefi.a ++ $(LD) $(EFILDFLAGS) -nostdlib -L /usr/lib -L /usr/lib64 -L $(CRTPATH) -shared -Bsymbolic $(CRTPATH)/$(CRT) -T $(LDS) $< -o $@ $(EFI_PATH)/libefi.a $(EFI_PATH)/libgnuefi.a AM_CFLAGS=-fpic -I/usr/include/efi -I/usr/include/efi/$(EFI_ARCH) diff --git a/sbsigntools.spec b/sbsigntools.spec index e4806ab..19f3467 100644 --- a/sbsigntools.spec +++ b/sbsigntools.spec @@ -19,7 +19,7 @@ ExclusiveArch: x86_64 aarch64 %{arm} %{ix86} BuildRequires: automake BuildRequires: binutils-devel BuildRequires: gcc -BuildRequires: gnu-efi-devel >= 3.0.8-3 +BuildRequires: gnu-efi-devel >= 1:3.0.8-3 BuildRequires: help2man BuildRequires: libuuid-devel %if %{with check} @@ -82,6 +82,7 @@ make check * Mon Feb 03 2020 Dominik Mierzejewski - 0.9.3-1 - update to 0.9.3 - update bundled CCAN components list +- support building with gnu-efi 3.0.11 * Thu Feb 28 2019 Dominik Mierzejewski - 0.9.2-1 - update to 0.9.2