Accepting request 204436 from home:posophe:branches:Base:System
Update and some improvements OBS-URL: https://build.opensuse.org/request/show/204436 OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign?expand=0&rev=22
This commit is contained in:
41
pesign.spec
41
pesign.spec
@@ -17,13 +17,13 @@
|
||||
|
||||
|
||||
Name: pesign
|
||||
Version: 0.106
|
||||
Version: 0.109
|
||||
Release: 0
|
||||
Summary: Signing tool for PE-COFF binaries
|
||||
License: GPL-2.0
|
||||
Group: Productivity/Security
|
||||
Url: https://github.com/vathpela/pesign
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Source: https://github.com/vathpela/pesign/archive/%{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-SUSE pesign-suse-build.patch glin@suse.com -- Adjust Makefile for the build service
|
||||
Patch1: pesign-suse-build.patch
|
||||
# PATCH-FIX-UPSTREAM pesign-fix-build-errors.patch glin@suse.com -- Fix gcc warnings
|
||||
@@ -32,18 +32,14 @@ Patch2: pesign-fix-build-errors.patch
|
||||
Patch3: pesign-privkey_unneeded.diff
|
||||
# PATCH-FIX-UPSTREAM pesign-clear-padding-bits.patch glin@suse.com -- Clear the allocated space before inserting the certificate list
|
||||
Patch4: pesign-clear-padding-bits.patch
|
||||
# PATCH-FIX-UPSTREAM pesign-allow-no-issuer-cert.patch glin@suse.com -- Don't crash if the issuer's certificate is not available
|
||||
Patch5: pesign-allow-no-issuer-cert.patch
|
||||
# PATCH-FIX-SUSE use-standard-pid-location.patch p.drouand@gmail.com --Use standard /run instead of /var/run for pidfile
|
||||
Patch6: use-standard-pid-location.patch
|
||||
BuildRequires: mozilla-nss-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: popt-devel
|
||||
%if 0%{?suse_version} > 1140
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
%{?systemd_requires}
|
||||
%define has_systemd 1
|
||||
%endif
|
||||
PreReq: pwdutils
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
ExclusiveArch: ia64 %ix86 x86_64
|
||||
|
||||
%description
|
||||
@@ -62,7 +58,7 @@ Authors:
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
|
||||
%build
|
||||
make OPTFLAGS="$RPM_OPT_FLAGS"
|
||||
@@ -72,48 +68,26 @@ make INSTALLROOT=%{buildroot} PREFIX=/usr DOCDIR=/share/doc/packages install
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/pesign
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
||||
%if 0%{?has_systemd}
|
||||
make INSTALLROOT=%{buildroot} UNITDIR=%{_unitdir} install_systemd
|
||||
ln -sf /sbin/service $RPM_BUILD_ROOT/%{_sbindir}/rcpesign
|
||||
%else
|
||||
make INSTALLROOT=%{buildroot} install_sysvinit
|
||||
ln -sf %{_sysconfdir}/init.d/pesign $RPM_BUILD_ROOT/%{_sbindir}/rcpesign
|
||||
%endif
|
||||
|
||||
# there's some stuff that's not really meant to be shipped yet
|
||||
rm -rf %{buildroot}/boot %{buildroot}/usr/include
|
||||
rm -rf %{buildroot}%{_libdir}/libdpe*
|
||||
|
||||
%clean
|
||||
%{?buildroot:%__rm -rf "%{buildroot}"}
|
||||
|
||||
%pre
|
||||
getent group pesign >/dev/null || groupadd -r pesign
|
||||
getent passwd pesign >/dev/null || useradd -r -g pesign -d /var/lib/pesign -s /bin/false -c "PE-COFF signing daemon" pesign
|
||||
%if 0%{?has_systemd}
|
||||
%service_add_pre pesign.service
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%if 0%{?has_systemd}
|
||||
%service_del_preun pesign.service
|
||||
%else
|
||||
%stop_on_removal pesign
|
||||
%endif
|
||||
|
||||
%post
|
||||
%if 0%{?has_systemd}
|
||||
%service_add_post pesign.service
|
||||
systemd-tmpfiles --create /usr/lib/tmpfiles.d/pesign.conf
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if 0%{?has_systemd}
|
||||
%service_del_preun pesign.service
|
||||
%else
|
||||
%restart_on_update pesign
|
||||
%insserv_cleanup
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
@@ -127,13 +101,8 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/pesign.conf
|
||||
%config %{_sysconfdir}/rpm/macros.pesign
|
||||
%{_mandir}/man?/*
|
||||
/var/lib/pesign
|
||||
%if 0%{?has_systemd}
|
||||
%{_unitdir}/pesign.service
|
||||
/usr/lib/tmpfiles.d/pesign.conf
|
||||
%else
|
||||
%{_sysconfdir}/init.d/pesign
|
||||
%endif
|
||||
%{_sbindir}/rcpesign
|
||||
%dir %attr(0775,pesign,pesign) %{_sysconfdir}/pki/pesign
|
||||
%dir %attr(0770,pesign,pesign) %{_localstatedir}/run/%{name}
|
||||
%dir %attr(0770,pesign,pesign) %{_localstatedir}/lib/%{name}
|
||||
|
Reference in New Issue
Block a user