164 lines
6.0 KiB
Diff
164 lines
6.0 KiB
Diff
|
---
|
||
|
Make.defaults | 5 +++--
|
||
|
Make.rules | 4 ++--
|
||
|
Makefile | 6 +++---
|
||
|
src/Makefile | 10 +++++-----
|
||
|
src/pesign.sysvinit | 12 ++++++++----
|
||
|
util/Makefile | 6 +++---
|
||
|
6 files changed, 24 insertions(+), 19 deletions(-)
|
||
|
|
||
|
Index: pesign-0.99/Make.defaults
|
||
|
===================================================================
|
||
|
--- pesign-0.99.orig/Make.defaults
|
||
|
+++ pesign-0.99/Make.defaults
|
||
|
@@ -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)
|
||
|
Index: pesign-0.99/Make.rules
|
||
|
===================================================================
|
||
|
--- pesign-0.99.orig/Make.rules
|
||
|
+++ pesign-0.99/Make.rules
|
||
|
@@ -2,10 +2,10 @@
|
||
|
$(AR) -cvqs $@ $^
|
||
|
|
||
|
% : %.o
|
||
|
- $(CC) $(CCLDFLAGS) -o $@ $^ $(foreach lib,$(LIBS),-l$(lib))
|
||
|
+ $(CC) -o $@ $^ $(foreach lib,$(LIBS),-l$(lib)) $(CCLDFLAGS)
|
||
|
|
||
|
%.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 $@
|
||
|
Index: pesign-0.99/Makefile
|
||
|
===================================================================
|
||
|
--- pesign-0.99.orig/Makefile
|
||
|
+++ pesign-0.99/Makefile
|
||
|
@@ -2,7 +2,7 @@ TOPDIR = $(shell echo $$PWD)
|
||
|
|
||
|
include $(TOPDIR)/Make.defaults
|
||
|
|
||
|
-SUBDIRS := include libdpe src util
|
||
|
+SUBDIRS := include libdpe src
|
||
|
DOCDIR := /share/doc/
|
||
|
VERSION = 0.99
|
||
|
|
||
|
@@ -16,8 +16,8 @@ clean :
|
||
|
|
||
|
install :
|
||
|
@for x in $(SUBDIRS) ; do $(MAKE) -C $${x} TOPDIR=$(TOPDIR) SRCDIR=$(TOPDIR)/$@/ ARCH=$(ARCH) $@ ; done
|
||
|
- $(INSTALL) -d -m 755 $(INSTALLROOT)$(PREFIX)$(DOCDIR)/pesign-$(VERSION)/
|
||
|
- $(INSTALL) -m 644 COPYING $(INSTALLROOT)$(PREFIX)$(DOCDIR)/pesign-$(VERSION)/
|
||
|
+ $(INSTALL) -d -m 755 $(INSTALLROOT)$(PREFIX)$(DOCDIR)/pesign/
|
||
|
+ $(INSTALL) -m 644 COPYING $(INSTALLROOT)$(PREFIX)$(DOCDIR)/pesign/
|
||
|
|
||
|
install_systemd:
|
||
|
@for x in $(SUBDIRS) ; do $(MAKE) -C $${x} TOPDIR=$(TOPDIR) SRCDIR=$(TOPDIR)/$@/ ARCH=$(ARCH) $@ ; done
|
||
|
Index: pesign-0.99/src/Makefile
|
||
|
===================================================================
|
||
|
--- pesign-0.99.orig/src/Makefile
|
||
|
+++ pesign-0.99/src/Makefile
|
||
|
@@ -7,8 +7,9 @@ LIBS = popt
|
||
|
STATIC_LIBS = $(TOPDIR)/libdpe/libdpe.a
|
||
|
PKLIBS = nss
|
||
|
LDFLAGS =
|
||
|
-CCLDFLAGS = -L../libdpe $(foreach pklib,$(PKLIBS), $(shell pkg-config --cflags --libs $(pklib)))
|
||
|
+CCLDFLAGS = -L../libdpe $(foreach pklib,$(PKLIBS), $(shell pkg-config --cflags --libs $(pklib))) -lpthread
|
||
|
CFLAGS += -I../include/ $(foreach pklib,$(PKLIBS), $(shell pkg-config --cflags $(pklib))) -Werror
|
||
|
+UNITDIR = /lib/systemd/system
|
||
|
|
||
|
TARGETS = pesign authvar client
|
||
|
|
||
|
@@ -60,12 +61,12 @@ clean : depclean
|
||
|
install_systemd:
|
||
|
$(INSTALL) -d -m 755 $(INSTALLROOT)/usr/lib/tmpfiles.d/
|
||
|
$(INSTALL) -m 644 tmpfiles.conf $(INSTALLROOT)/usr/lib/tmpfiles.d/pesign.conf
|
||
|
- $(INSTALL) -d -m 755 $(INSTALLROOT)/usr/lib/systemd/system/
|
||
|
- $(INSTALL) -m 644 pesign.service $(INSTALLROOT)/usr/lib/systemd/system/
|
||
|
+ $(INSTALL) -d -m 755 $(INSTALLROOT)/$(UNITDIR)
|
||
|
+ $(INSTALL) -m 644 pesign.service $(INSTALLROOT)/$(UNITDIR)
|
||
|
|
||
|
install_sysvinit:
|
||
|
- $(INSTALL) -d -m 755 $(INSTALLROOT)/etc/rc.d/init.d/
|
||
|
- $(INSTALL) -m 755 pesign.sysvinit $(INSTALLROOT)/etc/rc.d/init.d/pesign
|
||
|
+ $(INSTALL) -d -m 755 $(INSTALLROOT)/etc/init.d/
|
||
|
+ $(INSTALL) -m 755 pesign.sysvinit $(INSTALLROOT)/etc/init.d/pesign
|
||
|
|
||
|
install :
|
||
|
$(INSTALL) -d -m 700 $(INSTALLROOT)/etc/pki/pesign/
|
||
|
Index: pesign-0.99/util/Makefile
|
||
|
===================================================================
|
||
|
--- pesign-0.99.orig/util/Makefile
|
||
|
+++ pesign-0.99/util/Makefile
|
||
|
@@ -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
|
||
|
|
||
|
Index: pesign-0.99/src/pesign.sysvinit
|
||
|
===================================================================
|
||
|
--- pesign-0.99.orig/src/pesign.sysvinit
|
||
|
+++ pesign-0.99/src/pesign.sysvinit
|
||
|
@@ -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
|