SHA256
1
0
forked from jengelh/kea

- Stop on errors from useradd/groupadd

remove duplicate tmpfiles invocation

OBS-URL: https://build.opensuse.org/package/show/network:dhcp/kea?expand=0&rev=4
This commit is contained in:
Jan Engelhardt 2017-06-30 19:56:06 +00:00 committed by Git OBS Bridge
parent 2e9e3c815b
commit 7ec5700fd3
2 changed files with 10 additions and 7 deletions

View File

@ -1,9 +1,13 @@
-------------------------------------------------------------------
Fri Jun 30 19:55:50 UTC 2017 - jengelh@inai.de
- Stop on errors from useradd/groupadd
-------------------------------------------------------------------
Thu Jun 30 10:02:50 UTC 2017 - obs@botter.cc
- compile in support for MySQL and PostgresQL
- add symlink to rckea
- create tmpfiles in %post
- add environment variable for PID_FILE_DIR to service file
-------------------------------------------------------------------

View File

@ -45,7 +45,7 @@ BuildRequires: pkgconfig(libcrypto)
BuildRequires: systemd-rpm-macros
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd
Requires(pre): shadow
%description
Kea is a new DHCPv4/DHCPv6 server being developed by ISC in C++, a
@ -291,20 +291,19 @@ EOF
perl -i -pe 's{/var/run}{/run};s{/var/log/kea-}{/var/log/kea/}' \
"$b/%_sysconfdir/kea"/*.conf
mkdir -p "$b/var/log/kea"
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
ln -s "%_sbindir/service" "%buildroot/%_sbindir/rc%name"
%fdupes %buildroot/%_prefix
%pre
getent group keadhcp >/dev/null || groupadd -r keadhcp || :
getent group keadhcp >/dev/null || groupadd -r keadhcp
getent passwd keadhcp >/dev/null || useradd -r -N -M -g keadhcp \
-s /sbin/nologin -d /var/lib/kea -c "Kea DHCP server" \
keadhcp || :
keadhcp
systemd-tmpfiles --create kea.conf || :
%service_add_pre kea.service
%post
%service_add_post kea.service
%tmpfiles_create %{_tmpfilesdir}/kea.conf
%preun
%service_del_preun kea.service
@ -365,7 +364,7 @@ systemd-tmpfiles --create kea.conf || :
%_unitdir/*.service
%_prefix/lib/tmpfiles.d/
%attr(0775,keadhcp,keadhcp) %_localstatedir/log/kea/
%ghost %dir %{_rundir}/%{name}
%ghost %dir %_rundir/%name
%files -n libkea-asiodns0
%defattr(-,root,root)