Accepting request 930475 from home:gmbr3:Active

- Change to systemd-sysusers

OBS-URL: https://build.opensuse.org/request/show/930475
OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign?expand=0&rev=64
This commit is contained in:
Dirk Mueller 2021-11-21 10:53:14 +00:00 committed by Git OBS Bridge
parent 7325262251
commit dfb58385dd
3 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 9 15:01:59 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
- Change to systemd-sysusers
-------------------------------------------------------------------
Tue Oct 19 05:58:37 UTC 2021 - Johannes Segitz <jsegitz@suse.com>

View File

@ -24,6 +24,7 @@ License: GPL-3.0-or-later
Group: Productivity/Security
URL: https://github.com/rhinstaller/pesign
Source: https://github.com/rhinstaller/pesign/releases/download/%{version}/%{name}-%{version}.tar.bz2
Source1: pesign.sysusers
# 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-privkey_unneeded.diff glin@suse.com -- Don't check the private key when importing the raw signature
@ -47,7 +48,8 @@ BuildRequires: mozilla-nss-devel
BuildRequires: pkg-config
BuildRequires: popt-devel
BuildRequires: pkgconfig(systemd)
Requires(pre): shadow
BuildRequires: sysuser-tools
%sysusers_requires
%{?systemd_requires}
ExclusiveArch: ia64 %ix86 x86_64 aarch64 %arm
@ -68,6 +70,7 @@ with the PE and Authenticode specifications.
%patch9 -p1
%build
%sysusers_generate_pre %{SOURCE1} %{name} %{name}.conf
make %{?_smp_mflags} CFLAGS="%{optflags}" LDFLAGS="${LDFLAGS} -pie"
%install
@ -86,9 +89,9 @@ ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
rm -rf %{buildroot}/boot %{buildroot}%{_prefix}/include
rm -rf %{buildroot}%{_libdir}/libdpe*
%pre
getent group pesign >/dev/null || groupadd -r pesign
getent passwd pesign >/dev/null || useradd -r -g pesign -d %{_localstatedir}/lib/pesign -s /bin/false -c "PE-COFF signing daemon" pesign
install -Dm0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf
%pre -f %{name}.pre
%service_add_pre pesign.service
%preun
@ -120,6 +123,7 @@ systemd-tmpfiles --create %{_tmpfilesdir}/pesign.conf || :
%{_mandir}/man?/*
%{_localstatedir}/lib/pesign
%{_unitdir}/pesign.service
%{_sysusersdir}/pesign.conf
%{_tmpfilesdir}/pesign.conf
%dir %{_libexecdir}/pesign
%{_libexecdir}/pesign/pesign-authorize

2
pesign.sysusers Normal file
View File

@ -0,0 +1,2 @@
#Type Name ID GECOS Home directory Shell
u pesign - "PE-COFF signing daemon" /var/lib/pesign -