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:
parent
2e9e3c815b
commit
7ec5700fd3
@ -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
|
Thu Jun 30 10:02:50 UTC 2017 - obs@botter.cc
|
||||||
|
|
||||||
- compile in support for MySQL and PostgresQL
|
- compile in support for MySQL and PostgresQL
|
||||||
- add symlink to rckea
|
- add symlink to rckea
|
||||||
- create tmpfiles in %post
|
|
||||||
- add environment variable for PID_FILE_DIR to service file
|
- add environment variable for PID_FILE_DIR to service file
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
11
kea.spec
11
kea.spec
@ -45,7 +45,7 @@ BuildRequires: pkgconfig(libcrypto)
|
|||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
%endif
|
%endif
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd
|
Requires(pre): shadow
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Kea is a new DHCPv4/DHCPv6 server being developed by ISC in C++, a
|
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/}' \
|
perl -i -pe 's{/var/run}{/run};s{/var/log/kea-}{/var/log/kea/}' \
|
||||||
"$b/%_sysconfdir/kea"/*.conf
|
"$b/%_sysconfdir/kea"/*.conf
|
||||||
mkdir -p "$b/var/log/kea"
|
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
|
%fdupes %buildroot/%_prefix
|
||||||
|
|
||||||
%pre
|
%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 \
|
getent passwd keadhcp >/dev/null || useradd -r -N -M -g keadhcp \
|
||||||
-s /sbin/nologin -d /var/lib/kea -c "Kea DHCP server" \
|
-s /sbin/nologin -d /var/lib/kea -c "Kea DHCP server" \
|
||||||
keadhcp || :
|
keadhcp
|
||||||
systemd-tmpfiles --create kea.conf || :
|
systemd-tmpfiles --create kea.conf || :
|
||||||
%service_add_pre kea.service
|
%service_add_pre kea.service
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%service_add_post kea.service
|
%service_add_post kea.service
|
||||||
%tmpfiles_create %{_tmpfilesdir}/kea.conf
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%service_del_preun kea.service
|
%service_del_preun kea.service
|
||||||
@ -365,7 +364,7 @@ systemd-tmpfiles --create kea.conf || :
|
|||||||
%_unitdir/*.service
|
%_unitdir/*.service
|
||||||
%_prefix/lib/tmpfiles.d/
|
%_prefix/lib/tmpfiles.d/
|
||||||
%attr(0775,keadhcp,keadhcp) %_localstatedir/log/kea/
|
%attr(0775,keadhcp,keadhcp) %_localstatedir/log/kea/
|
||||||
%ghost %dir %{_rundir}/%{name}
|
%ghost %dir %_rundir/%name
|
||||||
|
|
||||||
%files -n libkea-asiodns0
|
%files -n libkea-asiodns0
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
Loading…
Reference in New Issue
Block a user