diff --git a/.gitignore b/.gitignore index 64f578d..c3cfd02 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ pesign-test-app-* clog +.build*.log diff --git a/0001-Fix-gnu-efi-include-path.patch b/0001-Fix-gnu-efi-include-path.patch new file mode 100644 index 0000000..70d13e7 --- /dev/null +++ b/0001-Fix-gnu-efi-include-path.patch @@ -0,0 +1,51 @@ +From ec7b1c7fa87d6e576cd6c5526748adf683f676ce Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Tue, 12 Nov 2019 14:50:34 -0500 +Subject: [PATCH] Fix gnu-efi include path. + +Signed-off-by: Peter Jones +--- + Makefile | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 93b1ffd7ac6..f5023de7a9f 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,20 +1,21 @@ + VERSION = 5 + ARCH = $(shell uname -m | sed s,i[3456789]86,ia32,) ++ARCH_SUFFIX = $(shell uname -m | sed -e s,i[3456789]86,ia32, -e s,x86_64,x64, -e s,aarch64,aa64,) + DATADIR := /usr/share + LIBDIR := /usr/lib64 +-GNUEFIDIR ?= $(LIBDIR)/gnuefi/ ++GNUEFIDIR ?= $(LIBDIR)/gnuefi/$(ARCH_SUFFIX) + CC = gcc + CFLAGS ?= -O0 -g3 + BUILDFLAGS := $(CFLAGS) -fpic -Werror -Wall -Wextra -fshort-wchar \ + -fno-merge-constants -ffreestanding \ + -fno-stack-protector -fno-stack-check --std=gnu11 -DCONFIG_$(ARCH) \ +- -I/usr/include/efi/ -I/usr/include/efi/$(ARCH)/ \ ++ -I/usr/include/efi/ -I/usr/include/efi/$(ARCH_SUFFIX)/ \ + -I/usr/include/efi/protocol + CCLDFLAGS ?= -nostdlib -Wl,--warn-common \ + -Wl,--no-undefined -Wl,--fatal-warnings \ + -Wl,-shared -Wl,-Bsymbolic -L$(LIBDIR) -L$(GNUEFIDIR) \ + -Wl,--build-id=sha1 -Wl,--hash-style=sysv \ +- $(GNUEFIDIR)/crt0-efi-$(ARCH).o ++ $(GNUEFIDIR)/crt0-efi-$(ARCH_SUFFIX).o + LD = ld + OBJCOPY = objcopy + OBJCOPY_GTE224 = $(shell expr `$(OBJCOPY) --version |grep ^"GNU objcopy" | sed 's/^.* //g' | cut -f1-2 -d.` \>= 2.24) +@@ -57,7 +58,7 @@ endif + %.so : %.o + $(CC) $(CCLDFLAGS) -o $@ $^ -lefi -lgnuefi \ + $(shell $(CC) -print-libgcc-file-name) \ +- -T $(GNUEFIDIR)/elf_$(ARCH)_efi.lds ++ -T $(GNUEFIDIR)/elf_$(ARCH_SUFFIX)_efi.lds + + %.o : %.c + $(CC) $(BUILDFLAGS) -c -o $@ $^ +-- +2.23.0 + diff --git a/pesign-test-app.spec b/pesign-test-app.spec index 19db7d3..bd730e9 100644 --- a/pesign-test-app.spec +++ b/pesign-test-app.spec @@ -1,9 +1,7 @@ -%trace - Summary: Simple pesign test target Name: pesign-test-app Version: 5 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv2 URL: https://github.com/vathpela/pesign-test-app BuildRequires: gcc @@ -21,6 +19,8 @@ ExclusiveArch: i686 x86_64 ia64 aarch64 # git checkout %%{version} Source0: pesign-test-app-%{version}.tar.bz2 +Patch0001: 0001-Fix-gnu-efi-include-path.patch + %description This package contains a very simple UEFI application that effectively does nothing. The entire purpose of this is to provide a safe app to be signed, @@ -28,7 +28,7 @@ so that we don't have to build large applications in order to test that deployments of new pesign versions into build infrastructure have succeeded. %prep -%setup -q +%autosetup -S git %build make LIBDIR=%{_libdir} DATADIR=%{_datadir} @@ -63,6 +63,10 @@ pesign -l -i %{buildroot}/%{_datadir}/%{name}-%{version}/%{name}-signed.efi | gr %{_datadir}/%{name}-%{version}/%{name}-signed.efi %changelog +* Tue Nov 12 2019 Peter Jones - 5-12 +- Fix gnu-efi include paths. + Resolves: rhbz#1736420 + * Fri Jul 26 2019 Fedora Release Engineering - 5-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild