SHA256
1
0
forked from pool/dhcp

Accepting request 794048 from home:kukuk:container

- Use sysusers.d instead of shadow

OBS-URL: https://build.opensuse.org/request/show/794048
OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=208
This commit is contained in:
Reinhard Max 2020-04-28 12:18:44 +00:00 committed by Git OBS Bridge
parent 2699eb18c7
commit 9298e1cb90
3 changed files with 29 additions and 1 deletions

2
dhcp-user.conf Normal file
View File

@ -0,0 +1,2 @@
# Type Name ID GECOS [HOME]
u dhcpd - "DHCP server daemon" /var/lib/dhcp

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Apr 15 06:32:20 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
- Use sysusers.d instead of shadow
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Mar 2 17:26:39 UTC 2020 - Reinhard Max <max@suse.com> Mon Mar 2 17:26:39 UTC 2020 - Reinhard Max <max@suse.com>

View File

@ -54,6 +54,7 @@ Source43: DDNS-howto.txt
Source44: contrib.tar.gz Source44: contrib.tar.gz
Source45: examples.tar.gz Source45: examples.tar.gz
Source46: slp.reg.d.dhcp.reg Source46: slp.reg.d.dhcp.reg
Source47: dhcp-user.conf
Patch1: 0001-dhcp-4.1.1-default-paths.patch Patch1: 0001-dhcp-4.1.1-default-paths.patch
# paranoia patch is included now, but not the # paranoia patch is included now, but not the
# additional patch by thomas@suse.de not ... # additional patch by thomas@suse.de not ...
@ -92,6 +93,10 @@ BuildRequires: automake
BuildRequires: dos2unix BuildRequires: dos2unix
BuildRequires: libtool BuildRequires: libtool
BuildRequires: openldap2-devel BuildRequires: openldap2-devel
%if 0%{?suse_version} >= 1330
BuildRequires: sysuser-shadow
BuildRequires: sysuser-tools
%endif
%package server %package server
Summary: ISC DHCP Server Summary: ISC DHCP Server
@ -106,10 +111,12 @@ Requires: dhcp = %{version}
Requires: net-tools Requires: net-tools
%endif %endif
Requires(post): %fillup_prereq Requires(post): %fillup_prereq
Requires(pre): shadow
%systemd_ordering %systemd_ordering
%if 0%{?suse_version} >= 1330 %if 0%{?suse_version} >= 1330
Requires(pre): group(nogroup) Requires(pre): group(nogroup)
%sysusers_requires
%else
Requires(pre): shadow
%endif %endif
%package client %package client
@ -262,6 +269,9 @@ cat bind/build.log
cat bind/install.log cat bind/install.log
: building dhcp sources : building dhcp sources
make %{?_smp_mflags} make %{?_smp_mflags}
%if 0%{?suse_version} >= 1330
%sysusers_generate_pre %{SOURCE47} dhcp-server
%endif
%check %check
# check example config, see if it runs # check example config, see if it runs
@ -387,9 +397,17 @@ mv %{buildroot}%{_includedir}/{dhcpctl,isc-dhcp,omapip} \
%{buildroot}%{_includedir}/dhcp/ %{buildroot}%{_includedir}/dhcp/
mv %{buildroot}%{_libdir}/lib*.* \ mv %{buildroot}%{_libdir}/lib*.* \
%{buildroot}%{_libdir}/dhcp/ %{buildroot}%{_libdir}/dhcp/
%if 0%{?suse_version} >= 1330
mkdir -p %{buildroot}%{_sysusersdir}
install -m 644 %{SOURCE47} %{buildroot}%{_sysusersdir}/
%endif
%if 0%{?suse_version} >= 1330
%pre server -f dhcp-server.pre
%else
%pre server %pre server
getent passwd dhcpd >/dev/null || useradd -r -g nogroup -s /bin/false -c "DHCP server daemon" -d %{_localstatedir}/lib/dhcp dhcpd getent passwd dhcpd >/dev/null || useradd -r -g nogroup -s /bin/false -c "DHCP server daemon" -d %{_localstatedir}/lib/dhcp dhcpd
%endif
%service_add_pre dhcpd.service %service_add_pre dhcpd.service
%service_add_pre dhcpd6.service %service_add_pre dhcpd6.service
@ -465,6 +483,9 @@ test -e %{_localstatedir}/lib/dhcp6/dhclient6.leases || \
%{_sbindir}/rcdhcpd6 %{_sbindir}/rcdhcpd6
%{_unitdir}/dhcpd.service %{_unitdir}/dhcpd.service
%{_unitdir}/dhcpd6.service %{_unitdir}/dhcpd6.service
%if 0%{?suse_version} >= 1330
%{_sysusersdir}/dhcp-user.conf
%endif
%dir %{_libexecdir}/initscripts/legacy-actions/dhcpd %dir %{_libexecdir}/initscripts/legacy-actions/dhcpd
%{_libexecdir}/initscripts/legacy-actions/dhcpd/* %{_libexecdir}/initscripts/legacy-actions/dhcpd/*
%dir %{_libexecdir}/initscripts/legacy-actions/dhcpd6 %dir %{_libexecdir}/initscripts/legacy-actions/dhcpd6