Fix gnu-efi include paths.

Resolves: rhbz#1736420

Signed-off-by: Peter Jones <pjones@redhat.com>
rawhide
Peter Jones 5 years ago
parent edb30b6425
commit 0357024a24

1
.gitignore vendored

@ -1,2 +1,3 @@
pesign-test-app-* pesign-test-app-*
clog clog
.build*.log

@ -0,0 +1,51 @@
From ec7b1c7fa87d6e576cd6c5526748adf683f676ce Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 12 Nov 2019 14:50:34 -0500
Subject: [PATCH] Fix gnu-efi include path.
Signed-off-by: Peter Jones <rpm-build>
---
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

@ -1,9 +1,7 @@
%trace
Summary: Simple pesign test target Summary: Simple pesign test target
Name: pesign-test-app Name: pesign-test-app
Version: 5 Version: 5
Release: 11%{?dist} Release: 12%{?dist}
License: GPLv2 License: GPLv2
URL: https://github.com/vathpela/pesign-test-app URL: https://github.com/vathpela/pesign-test-app
BuildRequires: gcc BuildRequires: gcc
@ -21,6 +19,8 @@ ExclusiveArch: i686 x86_64 ia64 aarch64
# git checkout %%{version} # git checkout %%{version}
Source0: pesign-test-app-%{version}.tar.bz2 Source0: pesign-test-app-%{version}.tar.bz2
Patch0001: 0001-Fix-gnu-efi-include-path.patch
%description %description
This package contains a very simple UEFI application that effectively does 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, 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. deployments of new pesign versions into build infrastructure have succeeded.
%prep %prep
%setup -q %autosetup -S git
%build %build
make LIBDIR=%{_libdir} DATADIR=%{_datadir} 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 %{_datadir}/%{name}-%{version}/%{name}-signed.efi
%changelog %changelog
* Tue Nov 12 2019 Peter Jones <pjones@redhat.com> - 5-12
- Fix gnu-efi include paths.
Resolves: rhbz#1736420
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5-11 * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

Loading…
Cancel
Save