2013-01-14 11:49:40 +01:00
|
|
|
---
|
|
|
|
Make.defaults | 5 +++--
|
|
|
|
Make.rules | 4 ++--
|
2013-07-16 08:43:52 +02:00
|
|
|
Makefile | 4 ++--
|
|
|
|
src/Makefile | 9 +++++----
|
2013-01-14 11:49:40 +01:00
|
|
|
src/pesign.sysvinit | 12 ++++++++----
|
|
|
|
util/Makefile | 6 +++---
|
2013-07-16 08:43:52 +02:00
|
|
|
6 files changed, 23 insertions(+), 17 deletions(-)
|
2013-01-14 11:49:40 +01:00
|
|
|
|
2013-07-16 08:43:52 +02:00
|
|
|
--- a/Make.defaults
|
|
|
|
+++ b/Make.defaults
|
2013-01-14 11:49:40 +01:00
|
|
|
@@ -5,7 +5,8 @@ HOSTARCH = $(shell uname -m | sed s,i[
|
|
|
|
ARCH := $(shell uname -m | sed s,i[3456789]86,ia32,)
|
|
|
|
INCDIR = -I$(TOPDIR)/include
|
|
|
|
CPPFLAGS = -DCONFIG_$(ARCH)
|
|
|
|
-CFLAGS = $(ARCH3264) -g -O0 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants --std=gnu99 -D_GNU_SOURCE
|
|
|
|
+OPTFLAGS = -O0 -g
|
|
|
|
+CFLAGS = $(ARCH3264) $(OPTFLAGS) -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants --std=gnu99 -D_GNU_SOURCE
|
|
|
|
ASFLAGS = $(ARCH3264)
|
|
|
|
LDFLAGS = -nostdlib
|
|
|
|
CCLDFLAGS = -shared
|
|
|
|
@@ -22,7 +23,7 @@ OBJCOPY = $(bindir)objcopy
|
|
|
|
|
|
|
|
ifeq ($(ARCH),ia64)
|
|
|
|
CFLAGS += -mfixed-range=f32-f127
|
|
|
|
- LIBDIR = $(PREFIX)/lib64
|
|
|
|
+ LIBDIR = $(PREFIX)/lib
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(ARCH), ia32)
|
2013-07-16 08:43:52 +02:00
|
|
|
--- a/Make.rules
|
|
|
|
+++ b/Make.rules
|
2013-01-14 11:49:40 +01:00
|
|
|
@@ -2,10 +2,10 @@
|
|
|
|
$(AR) -cvqs $@ $^
|
|
|
|
|
|
|
|
% : %.o
|
2013-07-16 08:43:52 +02:00
|
|
|
- $(CC) $(CCLDFLAGS) -o $@ $^ $(foreach lib,$(LIBS),-l$(lib)) $(foreach pklib,$(PKLIBS), $(shell pkg-config --libs-only-l --libs-only-other $(pklib))) -lpthread
|
|
|
|
+ $(CC) -o $@ $^ $(foreach lib,$(LIBS),-l$(lib)) $(CCLDFLAGS) $(foreach pklib,$(PKLIBS), $(shell pkg-config --libs-only-l --libs-only-other $(pklib))) -lpthread
|
2013-01-14 11:49:40 +01:00
|
|
|
|
|
|
|
%.so :
|
|
|
|
- $(CC) $(INCDIR) $(CFLAGS) -Wl,-soname,$(SONAME) $(CCLDFLAGS) $^ -o $@
|
|
|
|
+ $(CC) $(INCDIR) $(CFLAGS) -Wl,-soname,$(SONAME) $^ $(CCLDFLAGS) -o $@
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
2013-07-16 08:43:52 +02:00
|
|
|
--- a/util/Makefile
|
|
|
|
+++ b/util/Makefile
|
2013-01-14 11:49:40 +01:00
|
|
|
@@ -4,7 +4,7 @@ TOPDIR = $(SRCDIR)/..
|
|
|
|
include $(TOPDIR)/Make.defaults
|
|
|
|
|
|
|
|
FORMAT=efi-app-$(HOSTARCH)
|
|
|
|
-LDFLAGS = -nostdlib -T $(LIBDIR)/gnuefi/elf_$(HOSTARCH)_efi.lds -shared -Bsymbolic $(LIBDIR)/gnuefi/crt0-efi-$(HOSTARCH).o -L$(LIBDIR)
|
|
|
|
+LDFLAGS = -nostdlib -T $(LIBDIR)/elf_$(HOSTARCH)_efi.lds -shared -Bsymbolic $(LIBDIR)/crt0-efi-$(HOSTARCH).o -L$(LIBDIR)
|
|
|
|
LIBS=-lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name)
|
|
|
|
CCLDFLAGS =
|
|
|
|
CFLAGS = -I/usr/include/efi/ -I/usr/include/efi/$(HOSTARCH)/ -I/usr/include/efi/protocol -fpic -fshort-wchar -fno-reorder-functions -fno-strict-aliasing -fno-merge-constants -mno-red-zone -Wimplicit-function-declaration
|
|
|
|
@@ -17,8 +17,8 @@ clean :
|
|
|
|
@rm -rfv *.o *.a *.so $(TARGETS)
|
|
|
|
|
|
|
|
install :
|
|
|
|
- $(INSTALL) -d -m 755 $(INSTALLROOT)/boot/efi/EFI/redhat/
|
|
|
|
- $(INSTALL) -m 755 *.efi $(INSTALLROOT)/boot/efi/EFI/redhat/
|
|
|
|
+ $(INSTALL) -d -m 755 $(INSTALLROOT)/boot/efi/EFI/SuSE/
|
|
|
|
+ $(INSTALL) -m 755 *.efi $(INSTALLROOT)/boot/efi/EFI/SuSE/
|
|
|
|
|
|
|
|
.PHONY: all clean install
|
|
|
|
|
2013-07-16 08:43:52 +02:00
|
|
|
--- a/src/pesign.sysvinit
|
|
|
|
+++ b/src/pesign.sysvinit
|
2013-01-14 11:49:40 +01:00
|
|
|
@@ -6,21 +6,25 @@
|
|
|
|
# processname: /usr/bin/pesign
|
|
|
|
# pidfile: /var/run/pesign.pid
|
|
|
|
### BEGIN INIT INFO
|
|
|
|
-# Provides: pesign
|
|
|
|
-# Default-Start:
|
|
|
|
+# Provides: pesign
|
|
|
|
+# Should-Start: $remote_fs
|
|
|
|
+# Should-Stop: $remote_fs
|
|
|
|
+# Required-Start:
|
|
|
|
+# Required-Stop:
|
|
|
|
+# Default-Start: 2 3 5
|
|
|
|
# Default-Stop:
|
|
|
|
# Short-Description: The pesign PE signing daemon
|
|
|
|
# Description: The pesign PE signing daemon
|
|
|
|
### END INIT INFO
|
|
|
|
|
|
|
|
-. /etc/init.d/functions
|
|
|
|
[ -f /usr/bin/pesign ] || exit 1
|
|
|
|
|
|
|
|
+PESIGN_PIDFILE=/var/run/pesign.pid
|
|
|
|
RETVAL=0
|
|
|
|
|
|
|
|
start(){
|
|
|
|
echo -n "Starting pesign: "
|
|
|
|
- daemon /usr/bin/pesign --daemonize
|
|
|
|
+ startproc -f -p "$PESIGN_PIDFILE" /usr/bin/pesign --daemonize
|
|
|
|
RETVAL=$?
|
|
|
|
echo
|
|
|
|
touch /var/lock/subsys/pesign
|