Switch to new package format
This commit is contained in:
+3
-1
@@ -1,9 +1,11 @@
|
||||
name: sbsigntools
|
||||
description: Tools to add signatures to EFI binaries and Drivers
|
||||
version: 0.9.5
|
||||
revision: 1
|
||||
revision: 2
|
||||
url: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git/
|
||||
license: GPL3-or-later
|
||||
maintainers:
|
||||
- [email protected]
|
||||
architecture: any
|
||||
type: source
|
||||
depends:
|
||||
@@ -1,4 +1,4 @@
|
||||
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
||||
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
||||
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||
|
||||
@@ -6,8 +6,14 @@
|
||||
# This function is used for putting downloaded files to the correct location or applying patches
|
||||
prepare() {
|
||||
cd "$BPM_SOURCE"
|
||||
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
||||
# Patches from Fedora
|
||||
patch -Np1 -i "$BPM_WORKDIR"/sbsigntools-gnu-efi.patch
|
||||
patch -Np1 -i "$BPM_WORKDIR"/sbsigntools-binutils.patch
|
||||
|
||||
./autogen.sh
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -up sbsigntools-0.9.5/tests/Makefile.am.orig sbsigntools-0.9.5/tests/Makefile.am
|
||||
--- sbsigntools-0.9.5/tests/Makefile.am.orig 2025-10-03 10:20:11.676718647 +0200
|
||||
+++ sbsigntools-0.9.5/tests/Makefile.am 2025-10-03 10:20:40.506763759 +0200
|
||||
@@ -18,7 +18,7 @@ if TEST_BINARY_FORMAT
|
||||
EFILDFLAGS = --defsym=EFI_SUBSYSTEM=0x0a
|
||||
FORMAT = -O binary
|
||||
else
|
||||
-FORMAT = --target=efi-app-$(EFI_ARCH:x64=x86_64)
|
||||
+FORMAT = --output-target=efi-app-$(EFI_ARCH:x64=x86_64)
|
||||
endif
|
||||
check_DATA = $(test_key) $(test_cert)
|
||||
check_SCRIPTS = test-wrapper.sh
|
||||
@@ -0,0 +1,65 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -68,18 +68,29 @@ PKG_CHECK_MODULES(uuid, uuid,
|
||||
|
||||
dnl gnu-efi headers require extra include dirs
|
||||
EFI_ARCH=$(uname -m | sed 's/i.86/ia32/;s/arm.*/arm/')
|
||||
-AM_CONDITIONAL(TEST_BINARY_FORMAT, [ test "$EFI_ARCH" = "arm" -o "$EFI_ARCH" = "aarch64" -o "$EFI_ARCH" = riscv64 ])
|
||||
+AM_CONDITIONAL(TEST_BINARY_FORMAT, [ test "$EFI_ARCH" = "arm" -o "$EFI_ARCH" = riscv64 ])
|
||||
|
||||
##
|
||||
# no consistent view of where gnu-efi should dump the efi stuff, so find it
|
||||
##
|
||||
-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=$path
|
||||
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 \
|
||||
@@ -91,6 +102,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])
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -18,7 +18,7 @@ if TEST_BINARY_FORMAT
|
||||
EFILDFLAGS = --defsym=EFI_SUBSYSTEM=0x0a
|
||||
FORMAT = -O binary
|
||||
else
|
||||
-FORMAT = --target=efi-app-$(EFI_ARCH)
|
||||
+FORMAT = --target=efi-app-$(EFI_ARCH:x64=x86_64)
|
||||
endif
|
||||
check_DATA = $(test_key) $(test_cert)
|
||||
check_SCRIPTS = test-wrapper.sh
|
||||
@@ -31,7 +31,7 @@ check_SCRIPTS = test-wrapper.sh
|
||||
$(FORMAT) $^ $@
|
||||
|
||||
.$(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)/$(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)
|
||||
|
||||
Reference in New Issue
Block a user