View | Details | Raw Unified | Return to bug 231029 | Differences between
and this patch

Collapse All | Expand All

(-)sysutils/shim/Makefile (-9 / +10 lines)
Lines 2-30 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	shim
4
PORTNAME=	shim
5
PORTVERSION=	0.8
5
PORTVERSION=	0.9
6
PORTREVISION=	6
7
CATEGORIES=	sysutils
6
CATEGORIES=	sysutils
8
7
9
MAINTAINER=	ports@FreeBSD.org
8
MAINTAINER=	egypcio@googlemail.com
10
COMMENT=	UEFI Secure Boot shim loader
9
COMMENT=	UEFI Secure Boot shim loader
11
10
12
LICENSE=	BSD2CLAUSE
11
LICENSE=	BSD2CLAUSE
12
LICENSE_FILE=	${WRKSRC}/COPYRIGHT
13
13
14
ONLY_FOR_ARCHS=	amd64
15
14
BUILD_DEPENDS=	${LOCALBASE}/lib/libgnuefi.a:devel/gnu-efi \
16
BUILD_DEPENDS=	${LOCALBASE}/lib/libgnuefi.a:devel/gnu-efi \
15
		bash:shells/bash
17
		bash:shells/bash
16
18
17
USE_GITHUB=	yes
19
MAKE_ARGS=		CC="${CC} ${CFLAGS:M-std=*}" LD="${LD}" OBJCOPY="${OBJCOPY}"
18
GH_ACCOUNT=	mjg59
20
MAKE_JOBS_UNSAFE=	yes
19
21
20
USES=		gmake
22
USES=		compiler gmake
21
USE_CSTD=	gnu89
23
USE_CSTD=	gnu89
22
USE_GCC=	yes
24
USE_GCC=	yes
23
USE_GITHUB=	yes
25
USE_GITHUB=	yes
24
MAKE_ARGS=	CC="${CC} ${CFLAGS:M-std=*}" LD="${LD}" OBJCOPY="${OBJCOPY}"
25
MAKE_JOBS_UNSAFE=	yes
26
ONLY_FOR_ARCHS=	amd64
27
26
27
GH_ACCOUNT=	mjg59
28
28
PLIST_FILES=	lib/shim/shim.pem lib/shim/shim.key \
29
PLIST_FILES=	lib/shim/shim.pem lib/shim/shim.key \
29
		lib/shim/MokManager.efi lib/shim/fallback.efi lib/shim/shim.efi
30
		lib/shim/MokManager.efi lib/shim/fallback.efi lib/shim/shim.efi
30
31
(-)sysutils/shim/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (mjg59-shim-0.8_GH0.tar.gz) = 668629b51179d4832415d5c3ebf0cdb28feaae16e7158d8fc6e3740a1a29cdd8
1
TIMESTAMP = 1535569510
2
SIZE (mjg59-shim-0.8_GH0.tar.gz) = 1251831
2
SHA256 (mjg59-shim-0.9_GH0.tar.gz) = d277d7bea0b5d554dacf284d84252a5e995fb4ef54b6de5ec6296c6c2a9a21bd
3
SIZE (mjg59-shim-0.9_GH0.tar.gz) = 1302211
(-)sysutils/shim/files/patch-Cryptlib-Makefile (-2 / +2 lines)
Lines 1-5 Link Here
1
--- Cryptlib/Makefile.orig	2014-10-13 22:41:51.000000000 +0200
1
--- Cryptlib/Makefile.orig	2014-10-13 23:41:51 UTC
2
+++ Cryptlib/Makefile	2014-11-30 20:23:01.000000000 +0100
2
+++ Cryptlib/Makefile
3
@@ -1,3 +1,6 @@
3
@@ -1,3 +1,6 @@
4
+ifeq ($(ARCH),amd64)
4
+ifeq ($(ARCH),amd64)
5
+	override ARCH	= x86_64
5
+	override ARCH	= x86_64
(-)sysutils/shim/files/patch-Cryptlib-OpenSSL-Makefile (-2 / +2 lines)
Lines 1-5 Link Here
1
--- Cryptlib/OpenSSL/Makefile.orig	2014-11-30 20:31:14.000000000 +0100
1
--- Cryptlib/OpenSSL/Makefile.orig	2014-11-30 21:31:14 UTC
2
+++ Cryptlib/OpenSSL/Makefile	2014-11-30 20:31:23.000000000 +0100
2
+++ Cryptlib/OpenSSL/Makefile
3
@@ -1,3 +1,6 @@
3
@@ -1,3 +1,6 @@
4
+ifeq ($(ARCH),amd64)
4
+ifeq ($(ARCH),amd64)
5
+	override ARCH	= x86_64
5
+	override ARCH	= x86_64
(-)sysutils/shim/files/patch-Makefile (-15 / +25 lines)
Lines 1-29 Link Here
1
--- Makefile.orig	2014-10-13 22:41:51.000000000 +0200
1
--- Makefile.orig	2015-06-30 18:20:12 UTC
2
+++ Makefile	2014-12-21 16:18:40.000000000 +0100
2
+++ Makefile
3
@@ -4,13 +1,17 @@
3
@@ -1,5 +1,5 @@
4
 VERSION		= 0.9
5
-RELEASE		:=
6
+RELEASE		:= ""
7
 ifneq ($(RELEASE),"")
8
 	RELEASE="-$(RELEASE)"
9
 endif
10
@@ -9,15 +9,20 @@
11
 OBJCOPY		= $(CROSS_COMPILE)objcopy
4
 
12
 
5
 ARCH		= $(shell $(CC) -dumpmachine | cut -f1 -d- | sed s,i[3456789]86,ia32,)
13
 ARCH		= $(shell $(CC) -dumpmachine | cut -f1 -d- | sed s,i[3456789]86,ia32,)
6
 
14
+
7
+ifeq ($(ARCH),amd64)
15
+ifeq ($(ARCH),amd64)
8
+  override ARCH := x86_64
16
+	override ARCH := x86_64
9
+endif
17
+endif
10
+
18
+
19
 OBJCOPY_GTE224  = $(shell expr `$(OBJCOPY) --version |grep ^"GNU objcopy" | sed 's/^.* //g' | cut -f1-2 -d.` \>= 2.24)
20
 
11
 SUBDIRS		= Cryptlib lib
21
 SUBDIRS		= Cryptlib lib
12
 
22
 
13
-LIB_PATH	= /usr/lib64
23
-LIB_PATH	= /usr/lib64
14
+LIB_PATH	= $(LOCALBASE)/lib
24
+LIB_PATH	= /usr/lib -L$(LOCALBASE)/lib
15
 
25
 
16
-EFI_INCLUDE	:= /usr/include/efi
26
-EFI_INCLUDE	:= /usr/include/efi
27
-EFI_INCLUDES	= -nostdinc -ICryptlib -ICryptlib/Include -I$(EFI_INCLUDE) -I$(EFI_INCLUDE)/$(ARCH) -I$(EFI_INCLUDE)/protocol -I$(shell pwd)/include
28
-EFI_PATH	:= /usr/lib64/gnuefi
17
+EFI_INCLUDE	:= $(LOCALBASE)/include/efi
29
+EFI_INCLUDE	:= $(LOCALBASE)/include/efi
18
 EFI_INCLUDES	= -nostdinc -ICryptlib -ICryptlib/Include -I$(EFI_INCLUDE) -I$(EFI_INCLUDE)/$(ARCH) -I$(EFI_INCLUDE)/protocol -Iinclude
30
+EFI_INCLUDES	= -nostdinc -ICryptlib -ICryptlib/Include -I$(EFI_INCLUDE) -I$(EFI_INCLUDE)/$(ARCH) -I$(EFI_INCLUDE)/protocol -I$(shell pwd)/include -I/usr/include
19
-EFI_PATH	:= /usr/lib64/gnuefi
20
+EFI_PATH	:= $(LOCALBASE)/lib
31
+EFI_PATH	:= $(LOCALBASE)/lib
21
 
32
 
22
 LIB_GCC		= $(shell $(CC) -print-libgcc-file-name)
33
 LIB_GCC		= $(shell $(CC) -print-libgcc-file-name)
23
 EFI_LIBS	= -lefi -lgnuefi --start-group Cryptlib/libcryptlib.a Cryptlib/OpenSSL/libopenssl.a --end-group $(LIB_GCC) 
34
 EFI_LIBS	= -lefi -lgnuefi --start-group Cryptlib/libcryptlib.a Cryptlib/OpenSSL/libopenssl.a --end-group $(LIB_GCC) 
24
@@ -57,7 +63,7 @@ LDFLAGS		= -nostdlib -znocombreloc -T $(
35
@@ -65,7 +70,7 @@
25
 
36
 
26
 VERSION		= 0.8
37
 LDFLAGS		= --hash-style=sysv -nostdlib -znocombreloc -T $(EFI_LDS) -shared -Bsymbolic -L$(EFI_PATH) -L$(LIB_PATH) -LCryptlib -LCryptlib/OpenSSL $(EFI_CRT_OBJS) --build-id=sha1
27
 
38
 
28
-TARGET	= shim.efi MokManager.efi.signed fallback.efi.signed
39
-TARGET	= shim.efi MokManager.efi.signed fallback.efi.signed
29
+TARGET	= shim.efi MokManager.efi fallback.efi
40
+TARGET	= shim.efi MokManager.efi fallback.efi
Lines 30-43 Link Here
30
 OBJS	= shim.o netboot.o cert.o replacements.o version.o
41
 OBJS	= shim.o netboot.o cert.o replacements.o version.o
31
 KEYS	= shim_cert.h ocsp.* ca.* shim.crt shim.csr shim.p12 shim.pem shim.key shim.cer
42
 KEYS	= shim_cert.h ocsp.* ca.* shim.crt shim.csr shim.p12 shim.pem shim.key shim.cer
32
 SOURCES	= shim.c shim.h netboot.c include/PeImage.h include/wincert.h include/console.h replacements.c replacements.h version.c version.h
43
 SOURCES	= shim.c shim.h netboot.c include/PeImage.h include/wincert.h include/console.h replacements.c replacements.h version.c version.h
33
@@ -144,8 +150,8 @@ FORMAT		?= --target efi-app-$(ARCH)
44
@@ -156,9 +161,6 @@
34
 		-j .debug_line -j .debug_str -j .debug_ranges \
45
 		-j .note.gnu.build-id \
35
 		$(FORMAT) $^ $@.debug
46
 		$(FORMAT) $^ $@.debug
36
 
47
 
37
-%.efi.signed: %.efi certdb/secmod.db
48
-%.efi.signed: %.efi certdb/secmod.db
38
-	pesign -n certdb -i $< -c "shim" -s -o $@ -f
49
-	pesign -n certdb -i $< -c "shim" -s -o $@ -f
39
+#%.efi.signed: %.efi certdb/secmod.db
50
-
40
+#	pesign -n certdb -i $< -c "shim" -s -o $@ -f
41
 
42
 clean:
51
 clean:
43
 	$(MAKE) -C Cryptlib clean
52
 	$(MAKE) -C Cryptlib clean
53
 	$(MAKE) -C Cryptlib/OpenSSL clean
(-)sysutils/shim/files/patch-elf_x86_64_efi.lds (-2 / +2 lines)
Lines 1-5 Link Here
1
--- elf_x86_64_efi.lds.orig	2014-12-21 16:01:08.000000000 +0100
1
--- elf_x86_64_efi.lds.orig	2014-12-21 17:01:08 UTC
2
+++ elf_x86_64_efi.lds	2014-12-21 16:01:16.000000000 +0100
2
+++ elf_x86_64_efi.lds
3
@@ -1,5 +1,5 @@
3
@@ -1,5 +1,5 @@
4
-/* Same as elf_x86_64_fbsd_efi.lds, except for OUTPUT_FORMAT below - KEEP IN SYNC */
4
-/* Same as elf_x86_64_fbsd_efi.lds, except for OUTPUT_FORMAT below - KEEP IN SYNC */
5
-OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
5
-OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
(-)sysutils/shim/files/patch-lib-Makefile (-2 / +2 lines)
Lines 1-5 Link Here
1
--- lib/Makefile.orig	2014-11-30 20:34:06.000000000 +0100
1
--- lib/Makefile.orig	2014-11-30 21:34:06 UTC
2
+++ lib/Makefile	2014-11-30 20:34:20.000000000 +0100
2
+++ lib/Makefile
3
@@ -1,3 +1,7 @@
3
@@ -1,3 +1,7 @@
4
+ifeq ($(ARCH),amd64)
4
+ifeq ($(ARCH),amd64)
5
+	override ARCH	= x86_64
5
+	override ARCH	= x86_64

Return to bug 231029