[packages/pesign] - updated to 113 - updated pld,build patches
qboosh
qboosh at pld-linux.org
Thu Sep 12 20:50:15 CEST 2019
commit f113538e48bad88c978250fa57fb6e9b52b61a61
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Sep 12 20:53:10 2019 +0200
- updated to 113
- updated pld,build patches
pesign-build.patch | 34 ++++++++++-----------------------
pesign-pld.patch | 56 ++++++++++++++++++++++++++++--------------------------
pesign.spec | 38 ++++++++++++++++++------------------
3 files changed, 58 insertions(+), 70 deletions(-)
---
diff --git a/pesign.spec b/pesign.spec
index d535786..de94ca3 100644
--- a/pesign.spec
+++ b/pesign.spec
@@ -1,17 +1,18 @@
Summary: Signing tool for PE-COFF binaries
Summary(pl.UTF-8): Narzędzie do podpisywania binariów PE-COFF
Name: pesign
-Version: 0.112
-Release: 3
-License: GPL v2
+Version: 113
+Release: 1
+License: GPL v3+
Group: Applications/System
#Source0Download: https://github.com/rhboot/pesign/releases
Source0: https://github.com/rhboot/pesign/releases/download/%{version}/%{name}-%{version}.tar.bz2
-# Source0-md5: eae1d66e160be744ff310ad7592ae31e
+# Source0-md5: 4710e207b69c17537d3b3f18ce19948e
Patch0: %{name}-pld.patch
Patch1: %{name}-build.patch
URL: https://github.com/rhboot/pesign
BuildRequires: efivar-devel
+BuildRequires: libuuid-devel
BuildRequires: nspr-devel
BuildRequires: nss-devel
BuildRequires: pkgconfig
@@ -78,28 +79,29 @@ Statyczna biblioteka libdpe.
%patch0 -p1
%patch1 -p1
-%{__sed} -i -e 's/-g -O0/%{rpmcflags} -Wno-unused-result/' Make.defaults
-
%{__sed} -i -e 's,\$(libdatadir)systemd/system,%{systemdunitdir},' src/Makefile
%build
+# due to checks (to distinguish gcc/clang) in Make.defaults gcc cannot be prefixed with target-
+# -g is required because of -fvar-tracking
+CC="gcc" \
+CFLAGS="%{rpmcflags} -g" \
%{__make} \
- CC="%{__cc}" \
LIBDIR=%{_libdir} \
- libexecdir=%{_libdir}
+ libdir=%{_libdir} \
+ libexecdir=%{_libexecdir}
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install install_systemd install_sysvinit \
DESTDIR=$RPM_BUILD_ROOT \
- LIBDIR=%{_libdir} \
- libexecdir=%{_libdir}
+ libdir=%{_libdir} \
+ libexecdir=%{_libexecdir}
-# omitted from install (as of 0.112)
-install libdpe/libdpe.so $RPM_BUILD_ROOT%{_libdir}/libdpe.so.%{version}
-ln -sf libdpe.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libdpe.so.0
-ln -sf libdpe.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libdpe.so
+# omitted from install (as of 113)
+install libdpe/libdpe.so $RPM_BUILD_ROOT%{_libdir}/libdpe.so.0.%{version}
+ln -sf libdpe.so.0.%{version} $RPM_BUILD_ROOT%{_libdir}/libdpe.so
cp -p libdpe/libdpe.a $RPM_BUILD_ROOT%{_libdir}
install -d $RPM_BUILD_ROOT%{_includedir}/libdpe
cp -p include/libdpe/*.h $RPM_BUILD_ROOT%{_includedir}/libdpe
@@ -142,9 +144,8 @@ fi
%attr(755,root,root) %{_bindir}/pesigcheck
%attr(755,root,root) %{_bindir}/pesign
%attr(755,root,root) %{_bindir}/pesign-client
-%dir %{_libdir}/pesign
-%attr(755,root,root) %{_libdir}/pesign/pesign-authorize-groups
-%attr(755,root,root) %{_libdir}/pesign/pesign-authorize-users
+%dir %{_libexecdir}/pesign
+%attr(755,root,root) %{_libexecdir}/pesign/pesign-authorize
%dir %{_sysconfdir}/pesign
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pesign/groups
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pesign/users
@@ -166,8 +167,7 @@ fi
%files libs
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libdpe.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libdpe.so.0
+%attr(755,root,root) %{_libdir}/libdpe.so.0.%{version}
%files devel
%defattr(644,root,root,755)
diff --git a/pesign-build.patch b/pesign-build.patch
index fa8e870..344f2f9 100644
--- a/pesign-build.patch
+++ b/pesign-build.patch
@@ -1,25 +1,11 @@
---- pesign-0.112/libdpe/pe_allocspace.c.orig 2016-04-20 18:11:32.000000000 +0200
-+++ pesign-0.112/libdpe/pe_allocspace.c 2016-06-23 21:35:48.693876721 +0200
-@@ -61,7 +61,7 @@
- struct pe32plus_opt_hdr *opthdr = pe->state.pe32plus_exe.opthdr;
+--- pesign-113/src/efikeygen.c.orig 2019-05-10 20:53:51.000000000 +0200
++++ pesign-113/src/efikeygen.c 2019-09-12 20:14:59.158295466 +0200
+@@ -208,7 +208,7 @@
+ add_cert_type(cms_context *cms, void *extHandle, int is_ca)
+ {
+ SECItem bitStringValue;
+- unsigned char type = NS_CERT_TYPE_APP;
++ unsigned char type = NS_CERT_TYPE_APP & 0xFF;
- Pe_Scn *scn = NULL;
-- struct section_header shdr = { 0, }, tmp_shdr;
-+ struct section_header shdr = { { 0, }, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, tmp_shdr;
- if (pehdr->sections < 1)
- return -1;
-
---- pesign-0.112/src/cms_common.c.orig 2016-04-20 18:11:32.000000000 +0200
-+++ pesign-0.112/src/cms_common.c 2016-06-23 21:44:34.271029426 +0200
-@@ -663,7 +663,11 @@
- .type = siUnsignedInteger,
- };
-
-+#if defined(_LP64)
- if (integer < 0x100000000) {
-+#else
-+ if (1) {
-+#endif
- u32 = integer & 0xffffffffUL;
- input.data = (void *)&u32;
- input.len = sizeof(u32);
+ if (is_ca)
+ type |= NS_CERT_TYPE_SSL_CA |
diff --git a/pesign-pld.patch b/pesign-pld.patch
index 628c05b..112c4ad 100644
--- a/pesign-pld.patch
+++ b/pesign-pld.patch
@@ -1,6 +1,6 @@
---- pesign-0.112/src/pesign.sysvinit.in.orig 2016-04-20 18:11:32.000000000 +0200
-+++ pesign-0.112/src/pesign.sysvinit.in 2016-06-24 17:29:09.145983773 +0200
-@@ -13,41 +13,44 @@
+--- pesign-113/src/pesign.sysvinit.in.orig 2019-05-10 20:53:51.000000000 +0200
++++ pesign-113/src/pesign.sysvinit.in 2019-09-12 19:03:31.078192655 +0200
+@@ -13,45 +13,47 @@
# Description: The pesign PE signing daemon
### END INIT INFO
@@ -13,30 +13,32 @@
-start(){
- echo -n "Starting pesign: "
+start() {
-+ if [ -f /var/lock/subsys/pesign ]; then
-+ msg_already_running "pesign"
-+ return
-+ fi
++ if [ -f /var/lock/subsys/pesign ]; then
++ msg_already_running "pesign"
++ return
++ fi
+
+ msg_starting pesign
+ mkdir /var/run/pesign 2>/dev/null &&
+ chown pesign:pesign /var/run/pesign &&
+ chmod 0770 /var/run/pesign
daemon /usr/bin/pesign --daemonize
RETVAL=$?
- echo
- touch /var/lock/subsys/pesign
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pesign
- @@LIBEXECDIR@@/pesign/pesign-authorize-users
- @@LIBEXECDIR@@/pesign/pesign-authorize-groups
+ @@LIBEXECDIR@@/pesign/pesign-authorize
}
-stop(){
- echo -n "Stopping pesign: "
+stop() {
-+ if [ ! -f /var/lock/subsys/pesign ]; then
-+ msg_not_running pesign
-+ return
-+ fi
++ if [ ! -f /var/lock/subsys/pesign ]; then
++ msg_not_running pesign
++ return
++ fi
+
-+ msg_stopping pesign
++ msg_stopping pesign
killproc -p /var/run/pesign.pid pesignd
- RETVAL=$?
- echo
@@ -49,24 +51,24 @@
-}
-
-reload(){
-- stop
-- start
--}
+condrestart() {
-+ if [ ! -f /var/lock/subsys/pesign ]; then
-+ msg_not_running pesign
-+ RETVAL=$1
-+ return
-+ fi
++ if [ ! -f /var/lock/subsys/pesign ]; then
++ msg_not_running pesign
++ RETVAL=$1
++ return
++ fi
+ stop
+ start
+ }
-condrestart(){
- [ -e /var/lock/subsys/pesign ] && restart
-+ stop
-+ start
- }
-
+-}
+-
# See how we were called.
-@@ -59,26 +62,22 @@
+ case "$1" in
+ start)
+@@ -61,26 +63,22 @@
stop
;;
status)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/pesign.git/commitdiff/f113538e48bad88c978250fa57fb6e9b52b61a61
More information about the pld-cvs-commit
mailing list