Accepting request 614191 from home:scarabeus_iv:branches:network:dhcp
- Drop doc subpackage as we do not build on < SLE12 anyway so it evaluated always as true - Do not condition flags settings for codestreams that we are no longer building for - Use %license macro for license as mandated by new TW requirements - Format with spec-cleaner (automatic, remove FIXMEs) - Use getent to detect created user prior doing it again - Drop ldapcasa as it evaluates as false on all current products - Drop ldap conditional as it is always true - Kill omc configs wrt fate#301838 OBS-URL: https://build.opensuse.org/request/show/614191 OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=188
This commit is contained in:
parent
e9398b14d9
commit
e6da93e899
22
dhcp.changes
22
dhcp.changes
@ -1,3 +1,25 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 5 08:57:34 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
- Drop doc subpackage as we do not build on < SLE12 anyway so it
|
||||
evaluated always as true
|
||||
- Do not condition flags settings for codestreams that we are no
|
||||
longer building for
|
||||
- Use %license macro for license as mandated by new TW requirements
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 4 19:53:43 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
- Format with spec-cleaner (automatic, remove FIXMEs)
|
||||
- Use getent to detect created user prior doing it again
|
||||
- Drop ldapcasa as it evaluates as false on all current products
|
||||
- Drop ldap conditional as it is always true
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 4 19:46:20 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
- Kill omc configs wrt fate#301838
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 8 13:15:16 UTC 2018 - max@suse.com
|
||||
|
||||
|
343
dhcp.spec
343
dhcp.spec
@ -16,37 +16,19 @@
|
||||
#
|
||||
|
||||
|
||||
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
||||
%if ! %{defined _fillupdir}
|
||||
%define _fillupdir /var/adm/fillup-templates
|
||||
%endif
|
||||
|
||||
%define isc_version 4.3.6-P1
|
||||
%define susefw2dir %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
|
||||
%define omc_prefix /usr/share/omc
|
||||
%define omc_svcdir %{omc_prefix}/svcinfo.d
|
||||
# always on
|
||||
%define with_ldap 1
|
||||
# on sles, but sles_version is gone
|
||||
%define with_ldapcasa 0%{?sles_version} >= 10 || (%suse_version >= 1110 && %suse_version < 1140)
|
||||
# doc package is new on 11.3
|
||||
%define with_doc_package %suse_version >= 1130
|
||||
|
||||
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
||||
%if ! %{defined _fillupdir}
|
||||
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
||||
%endif
|
||||
Name: dhcp
|
||||
%if %{with_ldap}
|
||||
%if %{with_ldapcasa}
|
||||
BuildRequires: CASA-devel
|
||||
%endif
|
||||
BuildRequires: openldap2-devel
|
||||
%endif
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: libtool
|
||||
Version: 4.3.5
|
||||
Release: 0
|
||||
Summary: Common Files Used by ISC DHCP Software
|
||||
License: BSD-3-Clause
|
||||
Group: Productivity/Networking/Boot/Servers
|
||||
Url: http://www.isc.org/software/dhcp
|
||||
URL: http://www.isc.org/software/dhcp
|
||||
Source0: dhcp-%{isc_version}.tar.gz
|
||||
Source1: dhcp-%{isc_version}.tar.gz.asc
|
||||
Source2: %{name}.keyring
|
||||
@ -68,8 +50,6 @@ Source23: dhcpd6.conf
|
||||
Source26: sysconfig.syslog-dhcpd
|
||||
Source27: dhclient-script
|
||||
#
|
||||
Source30: dhcpd.xml
|
||||
Source31: dhcpd6.xml
|
||||
Source32: SuSEfirewall2.dhcp-server
|
||||
Source33: SuSEfirewall2.dhcp6-server
|
||||
#
|
||||
@ -110,72 +90,65 @@ Patch17: 0017-server-no-success-report-before-send.919959.patch
|
||||
Patch18: 0018-client-fail-on-script-pre-init-error-bsc-912098.patch
|
||||
# PATCH-FIX-SLE dhcp-4.2.4-P1-interval bsc#947780
|
||||
Patch20: 0020-dhcp-4.x.x-fixed-improper-lease-duration-checking.patch
|
||||
##
|
||||
PreReq: /bin/touch /sbin/chkconfig sysconfig
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: automake
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: libtool
|
||||
BuildRequires: openldap2-devel
|
||||
|
||||
%package server
|
||||
Summary: ISC DHCP Server
|
||||
Group: Productivity/Networking/Boot/Servers
|
||||
Requires: dhcp = %{version}
|
||||
Requires: net-tools
|
||||
PreReq: %fillup_prereq /bin/cat /bin/mkdir /bin/cp /usr/sbin/useradd
|
||||
Requires(post): %fillup_prereq
|
||||
Requires(pre): shadow
|
||||
%systemd_requires
|
||||
%if 0%{?suse_version} >= 1330
|
||||
Requires(pre): group(nogroup)
|
||||
%endif
|
||||
|
||||
%package client
|
||||
Summary: ISC DHCP Client
|
||||
Group: Productivity/Networking/Boot/Clients
|
||||
Requires: /usr/bin/host
|
||||
Requires: /usr/bin/touch
|
||||
Requires: %{_bindir}/host
|
||||
Requires: %{_bindir}/touch
|
||||
Requires: dhcp = %{version}
|
||||
Requires: iproute2
|
||||
Requires: iputils
|
||||
%if 0%{?suse_version} >= 1330
|
||||
Requires: hostname
|
||||
%else
|
||||
Requires: net-tools
|
||||
%endif
|
||||
Requires: iproute2
|
||||
Requires: iputils
|
||||
|
||||
%package relay
|
||||
Summary: ISC DHCP Relay Agent
|
||||
Group: Productivity/Networking/Boot/Servers
|
||||
Requires: dhcp = %{version}
|
||||
Requires: net-tools
|
||||
PreReq: %fillup_prereq /bin/cat /bin/mkdir /bin/cp
|
||||
Requires(post): %fillup_prereq
|
||||
%systemd_requires
|
||||
|
||||
%package devel
|
||||
Summary: Header Files and Libraries for dhcpctl API
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: dhcp = %{version}
|
||||
|
||||
%if %{with_doc_package}
|
||||
|
||||
%package doc
|
||||
Summary: Documentation
|
||||
Group: Productivity/Networking/Boot/Servers
|
||||
%endif
|
||||
|
||||
%description
|
||||
This package contains common programs used by both the ISC DHCP
|
||||
server ("dhcp-server" package) and client ("dhcp-client") as the
|
||||
omshell and common manual pages.
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Internet Systems Consortium, Inc. <info@isc.org>
|
||||
|
||||
|
||||
%description server
|
||||
This package contains the ISC DHCP server.
|
||||
|
||||
Please read the documentation in /usr/share/doc/packages/dhcp-server
|
||||
Please read the documentation in %{_docdir}/dhcp-server
|
||||
regarding configuration of the DHCP server.
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Internet Systems Consortium, Inc. <info@isc.org>
|
||||
|
||||
|
||||
%description client
|
||||
This is an alternative DHCP client, the ISC DHCP client for Linux. Like
|
||||
"dhcpcd" (the client that is installed by default), it can be used to
|
||||
@ -183,46 +156,24 @@ configure the network setup. IP address, hostname, routing,
|
||||
nameserver, netmask, and broadcast can be dynamically assigned while
|
||||
booting the machine.
|
||||
|
||||
It is configurable via the configuration file /etc/dhclient.conf and
|
||||
It is configurable via the configuration file %{_sysconfdir}/dhclient.conf and
|
||||
you can define your own 'hooks' to be used by the /sbin/dhclient-script
|
||||
(which is called by the daemon).
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Internet Systems Consortium, Inc. <info@isc.org>
|
||||
|
||||
%description relay
|
||||
This is the ISC DHCP relay agent. It can be used as a 'gateway' for
|
||||
DHCP messages across physical network segments. This is necessary
|
||||
because requests can be broadcast, and they will normally not be
|
||||
routed.
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Internet Systems Consortium, Inc. <info@isc.org>
|
||||
|
||||
%if %{with_doc_package}
|
||||
|
||||
%description doc
|
||||
This package contains additional documentation files provided with
|
||||
the software. The manual pages are in the corresponding packages.
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Internet Systems Consortium, Inc. <info@isc.org>
|
||||
|
||||
%endif
|
||||
|
||||
%description devel
|
||||
This package contains all of the libraries and headers for developing
|
||||
with the Internet Software Consortium (ISC) dhcpctl API.
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Internet Systems Consortium, Inc. <info@isc.org>
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{isc_version} -a 44 -a 45
|
||||
##
|
||||
@ -253,7 +204,7 @@ pushd bind
|
||||
gunzip -c bind.tar.gz | tar xf -
|
||||
rm -rf bind-*/contrib/dbus
|
||||
bind_dir=$(ls -1d bind-*)
|
||||
for i in /usr/share/automake-*/config.{sub,guess} ; do
|
||||
for i in %{_datadir}/automake-*/config.{sub,guess} ; do
|
||||
install -v -m755 $i $bind_dir/
|
||||
done
|
||||
# use the year from source gzip header instead of current one to make reproducible rpms
|
||||
@ -263,31 +214,21 @@ popd
|
||||
##
|
||||
|
||||
%build
|
||||
%if %suse_version >= 1210
|
||||
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -W -Wall -Wno-unused"
|
||||
%else
|
||||
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -W -Wall -fno-strict-aliasing -Wno-unused"
|
||||
%endif
|
||||
CFLAGS="%{optflags} -D_GNU_SOURCE -W -Wall -Wno-unused"
|
||||
%ifarch ppc ppc64 s390x
|
||||
# bugs 134590, 171532
|
||||
CFLAGS="$CFLAGS -fsigned-char"
|
||||
%endif
|
||||
%ifarch ia64 %sparc alpha s390x ppc64 x86_64
|
||||
CFLAGS="$CFLAGS -fPIE"
|
||||
%ifarch ia64 %{sparc} alpha s390x ppc64 x86_64
|
||||
CFLAGS="$CFLAGS -fPIE"
|
||||
%else
|
||||
CFLAGS="$CFLAGS -fpie"
|
||||
CFLAGS="$CFLAGS -fpie"
|
||||
%endif
|
||||
%if %suse_version >= 1210
|
||||
LDFLAGS="-Wl,-z,relro,-z,now -pie"
|
||||
%else
|
||||
LDFLAGS="-pie"
|
||||
%endif
|
||||
FFLAGS="$CFLAGS"
|
||||
CXXFLAGS="$CFLAGS"
|
||||
export RPM_OPT_FLAGS LDFLAGS
|
||||
export CFLAGS FFLAGS CXXFLAGS
|
||||
export CFLAGS LDFLAGS FFLAGS CXXFLAGS
|
||||
#
|
||||
%{?suse_update_config:%{suse_update_config -f}}
|
||||
#libtoolize --force
|
||||
#autoreconf -f -i
|
||||
#
|
||||
@ -296,13 +237,8 @@ export CFLAGS FFLAGS CXXFLAGS
|
||||
--enable-failover \
|
||||
--enable-paranoia \
|
||||
--enable-early-chroot \
|
||||
%if %{with_ldap}
|
||||
--with-ldap \
|
||||
--with-ldapcrypto \
|
||||
%if %{with_ldapcasa}
|
||||
--with-ldapcasa \
|
||||
%endif
|
||||
%endif
|
||||
--with-cli-pid-file=%{_localstatedir}/run/dhclient.pid \
|
||||
--with-cli-lease-file=%{_localstatedir}/lib/dhcp/dhclient.leases \
|
||||
--with-cli6-pid-file=%{_localstatedir}/run/dhclient6.pid \
|
||||
@ -313,7 +249,7 @@ export CFLAGS FFLAGS CXXFLAGS
|
||||
--with-srv6-lease-file=%{_localstatedir}/lib/dhcp6/db/dhcpd6.leases
|
||||
#
|
||||
: building bind sources
|
||||
make -C bind all
|
||||
make -j1 -C bind all
|
||||
cat bind/configure.log
|
||||
cat bind/build.log
|
||||
cat bind/install.log
|
||||
@ -330,65 +266,60 @@ bash -n $RPM_SOURCE_DIR/dhcrelay.script
|
||||
bash -n $RPM_SOURCE_DIR/dhclient-script
|
||||
|
||||
%install
|
||||
export RPM_BUILD_ROOT
|
||||
make install DESTDIR="$RPM_BUILD_ROOT"
|
||||
%make_install
|
||||
#
|
||||
# directories
|
||||
install -d -m0755 $RPM_BUILD_ROOT/sbin
|
||||
install -d -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/dhcpd{,6}.d
|
||||
install -d -m0755 $RPM_BUILD_ROOT/%{susefw2dir}
|
||||
install -d -m0755 $RPM_BUILD_ROOT/%{omc_svcdir}
|
||||
%if %{with_ldap}
|
||||
install -d -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema
|
||||
%endif
|
||||
install -d -m0755 $RPM_BUILD_ROOT%{_localstatedir}/run
|
||||
install -d -m0755 $RPM_BUILD_ROOT%{_fillupdir}
|
||||
install -d -m0755 %{buildroot}/sbin
|
||||
install -d -m0755 %{buildroot}%{_sysconfdir}/dhcpd{,6}.d
|
||||
install -d -m0755 %{buildroot}/%{susefw2dir}
|
||||
install -d -m0755 %{buildroot}%{_sysconfdir}/openldap/schema
|
||||
install -d -m0755 %{buildroot}%{_localstatedir}/run
|
||||
install -d -m0755 %{buildroot}%{_fillupdir}
|
||||
# chroot jail
|
||||
install -d -m0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/{dhcp,dhcp6}/etc
|
||||
install -d -m0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/{dhcp,dhcp6}/dev
|
||||
install -d -m0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/{dhcp,dhcp6}/%_lib
|
||||
install -d -m0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/{dhcp,dhcp6}/var/run
|
||||
install -d -m0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/{dhcp,dhcp6}/db
|
||||
install -d -m0755 %{buildroot}%{_localstatedir}/lib/{dhcp,dhcp6}%{_sysconfdir}
|
||||
install -d -m0755 %{buildroot}%{_localstatedir}/lib/{dhcp,dhcp6}/dev
|
||||
install -d -m0755 %{buildroot}%{_localstatedir}/lib/{dhcp,dhcp6}/%{_lib}
|
||||
install -d -m0755 %{buildroot}%{_localstatedir}/lib/{dhcp,dhcp6}%{_localstatedir}/run
|
||||
install -d -m0755 %{buildroot}%{_localstatedir}/lib/{dhcp,dhcp6}/db
|
||||
# move the dhclient binary to /sbin
|
||||
mv -f $RPM_BUILD_ROOT/usr/sbin/dhclient $RPM_BUILD_ROOT/sbin/
|
||||
mv -f %{buildroot}%{_sbindir}/dhclient %{buildroot}/sbin/
|
||||
# provide a ...6 link, so we know it supports DHCPv6
|
||||
ln -sf dhcpd $RPM_BUILD_ROOT%{_sbindir}/dhcpd6
|
||||
ln -sf dhcrelay $RPM_BUILD_ROOT%{_sbindir}/dhcrelay6
|
||||
ln -sf dhclient $RPM_BUILD_ROOT/sbin/dhclient6
|
||||
ln -sf dhcpd %{buildroot}%{_sbindir}/dhcpd6
|
||||
ln -sf dhcrelay %{buildroot}%{_sbindir}/dhcrelay6
|
||||
ln -sf dhclient %{buildroot}/sbin/dhclient6
|
||||
# install our adopted config examples and dhclient-script:
|
||||
install -m0644 $RPM_SOURCE_DIR/dhcpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/
|
||||
install -m0644 $RPM_SOURCE_DIR/dhcpd6.conf $RPM_BUILD_ROOT%{_sysconfdir}/
|
||||
install -m0644 $RPM_SOURCE_DIR/dhclient.conf $RPM_BUILD_ROOT%{_sysconfdir}/
|
||||
install -m0644 $RPM_SOURCE_DIR/dhclient6.conf $RPM_BUILD_ROOT%{_sysconfdir}/
|
||||
install -m0754 $RPM_SOURCE_DIR/dhclient-script $RPM_BUILD_ROOT/sbin/
|
||||
install -m0644 $RPM_SOURCE_DIR/dhcpd.conf %{buildroot}%{_sysconfdir}/
|
||||
install -m0644 $RPM_SOURCE_DIR/dhcpd6.conf %{buildroot}%{_sysconfdir}/
|
||||
install -m0644 $RPM_SOURCE_DIR/dhclient.conf %{buildroot}%{_sysconfdir}/
|
||||
install -m0644 $RPM_SOURCE_DIR/dhclient6.conf %{buildroot}%{_sysconfdir}/
|
||||
install -m0754 $RPM_SOURCE_DIR/dhclient-script %{buildroot}/sbin/
|
||||
# helper / wrapper scripts
|
||||
install -d -m0755 $RPM_BUILD_ROOT/usr/lib/dhcp
|
||||
install -d -m0755 %{buildroot}%{_libexecdir}/dhcp
|
||||
install -m0755 $RPM_SOURCE_DIR/dhcpd.script \
|
||||
$RPM_BUILD_ROOT/usr/lib/dhcp/dhcpd
|
||||
sed -e 's/@LIBDIR@/%{_lib}/g' -i $RPM_BUILD_ROOT/usr/lib/dhcp/dhcpd
|
||||
%{buildroot}%{_libexecdir}/dhcp/dhcpd
|
||||
sed -e 's/@LIBDIR@/%{_lib}/g' -i %{buildroot}%{_libexecdir}/dhcp/dhcpd
|
||||
install -m0755 $RPM_SOURCE_DIR/dhcrelay.script \
|
||||
$RPM_BUILD_ROOT/usr/lib/dhcp/dhcrelay
|
||||
%{buildroot}%{_libexecdir}/dhcp/dhcrelay
|
||||
# service units
|
||||
install -d -m0755 $RPM_BUILD_ROOT%{_unitdir}
|
||||
install -d -m0755 %{buildroot}%{_unitdir}
|
||||
install -m0644 $RPM_SOURCE_DIR/dhcpd.service \
|
||||
$RPM_BUILD_ROOT%{_unitdir}/dhcpd.service
|
||||
%{buildroot}%{_unitdir}/dhcpd.service
|
||||
install -m0644 $RPM_SOURCE_DIR/dhcpd6.service \
|
||||
$RPM_BUILD_ROOT%{_unitdir}/dhcpd6.service
|
||||
%{buildroot}%{_unitdir}/dhcpd6.service
|
||||
install -m0644 $RPM_SOURCE_DIR/dhcrelay.service \
|
||||
$RPM_BUILD_ROOT%{_unitdir}/dhcrelay.service
|
||||
%{buildroot}%{_unitdir}/dhcrelay.service
|
||||
install -m0644 $RPM_SOURCE_DIR/dhcrelay6.service \
|
||||
$RPM_BUILD_ROOT%{_unitdir}/dhcrelay6.service
|
||||
%{buildroot}%{_unitdir}/dhcrelay6.service
|
||||
# rcservice links
|
||||
ln -sf %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcdhcpd
|
||||
ln -sf %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcdhcpd6
|
||||
ln -sf %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcdhcrelay
|
||||
ln -sf %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcdhcrelay6
|
||||
%if %suse_version > 1310
|
||||
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcdhcpd
|
||||
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcdhcpd6
|
||||
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcdhcrelay
|
||||
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcdhcrelay6
|
||||
# rcservice actions
|
||||
legacy_actionsdir=$RPM_BUILD_ROOT/usr/lib/initscripts/legacy-actions
|
||||
legacy_actionsdir=%{buildroot}%{_libexecdir}/initscripts/legacy-actions
|
||||
cat >dhcpd.action <<'EOF'
|
||||
#!/bin/bash
|
||||
exec /usr/lib/dhcp/dhcpd -4 ${0##*/}
|
||||
exec %{_libexecdir}/dhcp/dhcpd -4 ${0##*/}
|
||||
EOF
|
||||
install -d -m0755 ${legacy_actionsdir}/dhcpd
|
||||
install -m0755 dhcpd.action ${legacy_actionsdir}/dhcpd/syntax-check
|
||||
@ -397,72 +328,66 @@ ln -sf syntax-check ${legacy_actionsdir}/dhcpd/check-lease
|
||||
rm -f dhcpd.action
|
||||
cat >dhcpd.action <<'EOF'
|
||||
#!/bin/bash
|
||||
exec /usr/lib/dhcp/dhcpd -6 ${0##*/}
|
||||
exec %{_libexecdir}/dhcp/dhcpd -6 ${0##*/}
|
||||
EOF
|
||||
install -d -m0755 ${legacy_actionsdir}/dhcpd6
|
||||
install -m0755 dhcpd.action ${legacy_actionsdir}/dhcpd6/syntax-check
|
||||
ln -sf syntax-check ${legacy_actionsdir}/dhcpd6/check-syntax
|
||||
ln -sf syntax-check ${legacy_actionsdir}/dhcpd6/check-lease
|
||||
rm -f dhcpd.action
|
||||
%endif
|
||||
# sysconfig files
|
||||
install -m0644 $RPM_SOURCE_DIR/sysconfig.dhcpd \
|
||||
$RPM_BUILD_ROOT%{_fillupdir}/
|
||||
%{buildroot}%{_fillupdir}/
|
||||
install -m0644 $RPM_SOURCE_DIR/sysconfig.syslog-dhcpd \
|
||||
$RPM_BUILD_ROOT%{_fillupdir}/
|
||||
%{buildroot}%{_fillupdir}/
|
||||
install -m0644 $RPM_SOURCE_DIR/sysconfig.dhcrelay \
|
||||
$RPM_BUILD_ROOT%{_fillupdir}/
|
||||
%{buildroot}%{_fillupdir}/
|
||||
# another config files and scripts
|
||||
%if %{with_ldap}
|
||||
install -m0644 contrib/ldap/dhcp.schema \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema
|
||||
%endif
|
||||
install -m0644 $RPM_SOURCE_DIR/dhcpd.xml \
|
||||
$RPM_SOURCE_DIR/dhcpd6.xml \
|
||||
$RPM_BUILD_ROOT/%{omc_svcdir}/
|
||||
%{buildroot}%{_sysconfdir}/openldap/schema
|
||||
install -m0644 $RPM_SOURCE_DIR/SuSEfirewall2.dhcp-server \
|
||||
$RPM_BUILD_ROOT/%{susefw2dir}/dhcp-server
|
||||
%{buildroot}/%{susefw2dir}/dhcp-server
|
||||
install -m0644 $RPM_SOURCE_DIR/SuSEfirewall2.dhcp6-server \
|
||||
$RPM_BUILD_ROOT/%{susefw2dir}/dhcp6-server
|
||||
install -d -m0755 $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d
|
||||
install -d -m0755 $RPM_BUILD_ROOT/etc/sysconfig/network/scripts
|
||||
%{buildroot}/%{susefw2dir}/dhcp6-server
|
||||
install -d -m0755 %{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d
|
||||
install -d -m0755 %{buildroot}%{_sysconfdir}/sysconfig/network/scripts
|
||||
install -m0755 $RPM_SOURCE_DIR/if-up.d.dhcpd-restart-hook \
|
||||
$RPM_BUILD_ROOT/etc/sysconfig/network/scripts/dhcpd-restart-hook
|
||||
%{buildroot}%{_sysconfdir}/sysconfig/network/scripts/dhcpd-restart-hook
|
||||
ln -sf ../scripts/dhcpd-restart-hook \
|
||||
$RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d/60-dhcpd-restart-hook
|
||||
%{buildroot}%{_sysconfdir}/sysconfig/network/if-up.d/60-dhcpd-restart-hook
|
||||
# slp support
|
||||
install -d -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/slp.reg.d
|
||||
install -d -m0755 %{buildroot}%{_sysconfdir}/slp.reg.d
|
||||
install -m0644 $RPM_SOURCE_DIR/slp.reg.d.dhcp.reg \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/slp.reg.d/dhcp.reg
|
||||
%{buildroot}%{_sysconfdir}/slp.reg.d/dhcp.reg
|
||||
# fix manual page permissions
|
||||
find $RPM_BUILD_ROOT/%{_mandir} -type f | xargs chmod 644
|
||||
find %{buildroot}/%{_mandir} -type f | xargs chmod 644
|
||||
# copy some documentation and examples from src dir
|
||||
install -m0644 $RPM_SOURCE_DIR/dhcp.README README.SUSE
|
||||
install -m0644 $RPM_SOURCE_DIR/DDNS-howto.txt .
|
||||
cp doc/examples/* ./examples/
|
||||
rm -f doc/{References.xml,Makefile*}
|
||||
rm -f contrib/dhcp.spec
|
||||
rm -f $RPM_BUILD_ROOT/etc/{dhcpd,dhclient}.conf.example
|
||||
rm -f %{buildroot}%{_sysconfdir}/{dhcpd,dhclient}.conf.example
|
||||
find contrib doc/examples -type f | xargs chmod -x
|
||||
# install bind libs+includes needed for dhcp-devel
|
||||
pushd bind
|
||||
install -d -m0755 $RPM_BUILD_ROOT%_includedir/dhcp/
|
||||
install -d -m0755 %{buildroot}%{_includedir}/dhcp/
|
||||
for i in include/* ; do
|
||||
cp -r $i $RPM_BUILD_ROOT%_includedir/dhcp/
|
||||
cp -r $i %{buildroot}%{_includedir}/dhcp/
|
||||
done
|
||||
install -d -m0755 $RPM_BUILD_ROOT%_libdir/dhcp/
|
||||
install -d -m0755 %{buildroot}%{_libdir}/dhcp/
|
||||
for l in lib/lib*.a ; do
|
||||
install -m0644 $l $RPM_BUILD_ROOT%_libdir/dhcp/
|
||||
install -m0644 $l %{buildroot}%{_libdir}/dhcp/
|
||||
done
|
||||
popd
|
||||
# move also all dhcp-devel files to dhcp subdirectories
|
||||
mv $RPM_BUILD_ROOT%_includedir/{dhcpctl,isc-dhcp,omapip} \
|
||||
$RPM_BUILD_ROOT%_includedir/dhcp/
|
||||
mv $RPM_BUILD_ROOT%_libdir/lib*.* \
|
||||
$RPM_BUILD_ROOT%_libdir/dhcp/
|
||||
mv %{buildroot}%{_includedir}/{dhcpctl,isc-dhcp,omapip} \
|
||||
%{buildroot}%{_includedir}/dhcp/
|
||||
mv %{buildroot}%{_libdir}/lib*.* \
|
||||
%{buildroot}%{_libdir}/dhcp/
|
||||
|
||||
%pre server
|
||||
/usr/sbin/useradd -r -g nogroup -s /bin/false -c "DHCP server daemon" -d /var/lib/dhcp dhcpd 2> /dev/null ||:
|
||||
getent passwd dhcpd >/dev/null || useradd -r -g nogroup -s /bin/false -c "DHCP server daemon" -d %{_localstatedir}/lib/dhcp dhcpd
|
||||
%service_add_pre dhcpd.service
|
||||
%service_add_pre dhcpd6.service
|
||||
|
||||
@ -524,111 +449,95 @@ test -e %{_localstatedir}/lib/dhcp/dhclient.leases || \
|
||||
test -e %{_localstatedir}/lib/dhcp6/dhclient6.leases || \
|
||||
touch %{_localstatedir}/lib/dhcp6/dhclient6.leases
|
||||
|
||||
%clean
|
||||
if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%license LICENSE
|
||||
%config %{susefw2dir}/dhcp-server
|
||||
%config %{susefw2dir}/dhcp6-server
|
||||
%{_bindir}/omshell
|
||||
%doc %{_mandir}/man1/omshell.1.gz
|
||||
%doc %{_mandir}/man5/dhcp-eval.5.gz
|
||||
%doc %{_mandir}/man5/dhcp-options.5.gz
|
||||
%{_mandir}/man1/omshell.1%{?ext_man}
|
||||
%{_mandir}/man5/dhcp-eval.5%{?ext_man}
|
||||
%{_mandir}/man5/dhcp-options.5%{?ext_man}
|
||||
|
||||
%files server
|
||||
%defattr(-,root,root)
|
||||
%{_sbindir}/dhcpd
|
||||
%{_sbindir}/dhcpd6
|
||||
%{_sbindir}/rcdhcpd
|
||||
%{_sbindir}/rcdhcpd6
|
||||
%{_unitdir}/dhcpd.service
|
||||
%{_unitdir}/dhcpd6.service
|
||||
%if %suse_version > 1310
|
||||
%dir /usr/lib/initscripts/legacy-actions/dhcpd
|
||||
/usr/lib/initscripts/legacy-actions/dhcpd/*
|
||||
%dir /usr/lib/initscripts/legacy-actions/dhcpd6
|
||||
/usr/lib/initscripts/legacy-actions/dhcpd6/*
|
||||
%endif
|
||||
%dir %{_libexecdir}/initscripts/legacy-actions/dhcpd
|
||||
%{_libexecdir}/initscripts/legacy-actions/dhcpd/*
|
||||
%dir %{_libexecdir}/initscripts/legacy-actions/dhcpd6
|
||||
%{_libexecdir}/initscripts/legacy-actions/dhcpd6/*
|
||||
%config(noreplace) %{_sysconfdir}/dhcpd.conf
|
||||
%config(noreplace) %{_sysconfdir}/dhcpd6.conf
|
||||
%attr(755,root,root) %dir %config(noreplace) %ghost %{_sysconfdir}/dhcpd.d/
|
||||
%attr(755,root,root) %dir %config(noreplace) %ghost %{_sysconfdir}/dhcpd6.d/
|
||||
%dir /usr/lib/dhcp
|
||||
/usr/lib/dhcp/dhcpd
|
||||
%dir %{_libexecdir}/dhcp
|
||||
%{_libexecdir}/dhcp/dhcpd
|
||||
%dir %{_localstatedir}/lib/dhcp
|
||||
%dir %{_localstatedir}/lib/dhcp/etc
|
||||
%dir %{_localstatedir}/lib/dhcp%{_sysconfdir}
|
||||
%dir %{_localstatedir}/lib/dhcp/dev
|
||||
%dir %{_localstatedir}/lib/dhcp/%_lib
|
||||
%dir %{_localstatedir}/lib/dhcp/var
|
||||
%dir %{_localstatedir}/lib/dhcp/var/run
|
||||
%dir %{_localstatedir}/lib/dhcp/%{_lib}
|
||||
%dir %{_localstatedir}/lib/dhcp%{_localstatedir}
|
||||
%dir %{_localstatedir}/lib/dhcp%{_localstatedir}/run
|
||||
%attr(755,dhcpd,root) %dir %{_localstatedir}/lib/dhcp/db
|
||||
%dir %{_localstatedir}/lib/dhcp6
|
||||
%dir %{_localstatedir}/lib/dhcp6/etc
|
||||
%dir %{_localstatedir}/lib/dhcp6%{_sysconfdir}
|
||||
%dir %{_localstatedir}/lib/dhcp6/dev
|
||||
%dir %{_localstatedir}/lib/dhcp6/%_lib
|
||||
%dir %{_localstatedir}/lib/dhcp6/var
|
||||
%dir %{_localstatedir}/lib/dhcp6/var/run
|
||||
%dir %{_localstatedir}/lib/dhcp6/%{_lib}
|
||||
%dir %{_localstatedir}/lib/dhcp6%{_localstatedir}
|
||||
%dir %{_localstatedir}/lib/dhcp6%{_localstatedir}/run
|
||||
%attr(755,dhcpd,root) %dir %{_localstatedir}/lib/dhcp6/db
|
||||
%doc %{_mandir}/man8/dhcpd.8.gz
|
||||
%doc %{_mandir}/man5/dhcpd.conf.5.gz
|
||||
%doc %{_mandir}/man5/dhcpd.leases.5.gz
|
||||
%if %{with_ldap}
|
||||
%{_mandir}/man8/dhcpd.8%{?ext_man}
|
||||
%{_mandir}/man5/dhcpd.conf.5%{?ext_man}
|
||||
%{_mandir}/man5/dhcpd.leases.5%{?ext_man}
|
||||
%dir %{_sysconfdir}/openldap
|
||||
%dir %{_sysconfdir}/openldap/schema
|
||||
%attr(0644, root, root) %config %{_sysconfdir}/openldap/schema/dhcp.schema
|
||||
%endif
|
||||
%dir %{_sysconfdir}/slp.reg.d
|
||||
%config(noreplace) %{_sysconfdir}/slp.reg.d/dhcp.reg
|
||||
%{omc_svcdir}/dhcpd.xml
|
||||
%{omc_svcdir}/dhcpd6.xml
|
||||
%{_sysconfdir}/sysconfig/network/scripts/dhcpd-restart-hook
|
||||
%{_sysconfdir}/sysconfig/network/if-up.d/60-dhcpd-restart-hook
|
||||
%{_fillupdir}/sysconfig.dhcpd
|
||||
%{_fillupdir}/sysconfig.syslog-dhcpd
|
||||
%if %{with_doc_package}
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root)
|
||||
%endif
|
||||
%doc LICENSE README RELNOTES
|
||||
%doc README RELNOTES
|
||||
%doc README.* DDNS-howto.txt doc/*
|
||||
%doc contrib examples
|
||||
|
||||
%files client
|
||||
%defattr(-,root,root)
|
||||
%files client
|
||||
/sbin/dhclient
|
||||
/sbin/dhclient6
|
||||
/sbin/dhclient-script
|
||||
%config(noreplace) %{_sysconfdir}/dhclient.conf
|
||||
%config(noreplace) %{_sysconfdir}/dhclient6.conf
|
||||
%doc %{_mandir}/man5/dhclient.conf.5.gz
|
||||
%doc %{_mandir}/man5/dhclient.leases.5.gz
|
||||
%doc %{_mandir}/man8/dhclient.8.gz
|
||||
%doc %{_mandir}/man8/dhclient-script.8.gz
|
||||
%{_mandir}/man5/dhclient.conf.5%{?ext_man}
|
||||
%{_mandir}/man5/dhclient.leases.5%{?ext_man}
|
||||
%{_mandir}/man8/dhclient.8%{?ext_man}
|
||||
%{_mandir}/man8/dhclient-script.8%{?ext_man}
|
||||
%dir %{_localstatedir}/lib/dhcp
|
||||
%dir %{_localstatedir}/lib/dhcp6
|
||||
|
||||
%files relay
|
||||
%defattr(-,root,root)
|
||||
%files relay
|
||||
%{_sbindir}/dhcrelay
|
||||
%{_sbindir}/dhcrelay6
|
||||
%{_sbindir}/rcdhcrelay
|
||||
%{_sbindir}/rcdhcrelay6
|
||||
%dir /usr/lib/dhcp
|
||||
/usr/lib/dhcp/dhcrelay
|
||||
%dir %{_libexecdir}/dhcp
|
||||
%{_libexecdir}/dhcp/dhcrelay
|
||||
%{_unitdir}/dhcrelay.service
|
||||
%{_unitdir}/dhcrelay6.service
|
||||
%doc %{_mandir}/man8/dhcrelay.8.gz
|
||||
%{_mandir}/man8/dhcrelay.8%{?ext_man}
|
||||
%{_fillupdir}/sysconfig.dhcrelay
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%dir %_libdir/dhcp
|
||||
%_libdir/dhcp/lib*
|
||||
%dir %{_prefix}/include/dhcp
|
||||
%{_prefix}/include/dhcp/*
|
||||
%doc %{_mandir}/man3/omapi.3.gz
|
||||
%doc %{_mandir}/man3/dhcpctl.3.gz
|
||||
%dir %{_libdir}/dhcp
|
||||
%{_libdir}/dhcp/lib*
|
||||
%dir %{_includedir}/dhcp
|
||||
%{_includedir}/dhcp/*
|
||||
%{_mandir}/man3/omapi.3%{?ext_man}
|
||||
%{_mandir}/man3/dhcpctl.3%{?ext_man}
|
||||
|
||||
%changelog
|
||||
|
88
dhcpd.xml
88
dhcpd.xml
@ -1,88 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Copyright (c) 2006 Novell, Inc. All rights reserved.
|
||||
|
||||
|
||||
Service Description XML Document for dhcpd.
|
||||
|
||||
This file should be placed in /etc/omc/svcinfo.d
|
||||
|
||||
Note: The name of the service is the name of this file without the .xml
|
||||
file extension.
|
||||
-->
|
||||
|
||||
<serviceDescription version="1.0">
|
||||
|
||||
<!-- Caption for display purposes -->
|
||||
<caption>ISC DHCP Server</caption>
|
||||
|
||||
<!-- Description of this service -->
|
||||
<description>
|
||||
ISC Dynamic Host Configuration Protocol Server
|
||||
</description>
|
||||
|
||||
|
||||
<!--
|
||||
The startCommand tag specifies the command line that will be
|
||||
invoked to start the service. The return code from this command
|
||||
must be as follows:
|
||||
0 - success
|
||||
1 - generic or unspecified error
|
||||
2 - invalid or excess argument(s)
|
||||
3 - unimplemented feature (e.g. "reload")
|
||||
4 - user had insufficient privileges
|
||||
5 - program is not installed
|
||||
6 - program is not configured
|
||||
7 - program is not running
|
||||
-->
|
||||
<startCommand>/usr/sbin/rcdhcpd start</startCommand>
|
||||
|
||||
<!--
|
||||
The reStartCommand tag specifies the command line that will be
|
||||
invoked to restart the service. The return code from this command
|
||||
must be as specified in the startCommand tag.
|
||||
-->
|
||||
<reStartCommand>/usr/sbin/rcdhcpd restart</reStartCommand>
|
||||
|
||||
<!--
|
||||
The stopCommand tag specifies the command line that will be
|
||||
invoked to stop the service. The return code from this command
|
||||
must be as specified in the startCommand tag.
|
||||
-->
|
||||
<stopCommand>/usr/sbin/rcdhcpd stop</stopCommand>
|
||||
|
||||
<!--
|
||||
The statusCommand specifies the command line that can be run
|
||||
that will report on the status of the service. The return code
|
||||
from this command line should be as follows:
|
||||
0 - service up and running
|
||||
1 - service dead, but /var/run/ pid file exists
|
||||
2 - service dead, but /var/lock/ lock file exists
|
||||
3 - service not running (unused)
|
||||
4 - service status unknown :-(
|
||||
-->
|
||||
<statusCommand>/usr/sbin/rcdhcpd status</statusCommand>
|
||||
<!--
|
||||
The processInformation tag allows the XML Service provider to
|
||||
identify the processes that belong to the service. This allows
|
||||
the ServiceProcess associations to be instrumented.
|
||||
If the process_information tag is not specifed, the will be no
|
||||
ServiceProcess association for the service.
|
||||
-->
|
||||
|
||||
<processInformation>
|
||||
<name>dhcpd</name>
|
||||
<modulePath>/usr/sbin/dhcpd</modulePath>
|
||||
</processInformation>
|
||||
|
||||
<!--
|
||||
Define the services that this service has a dependency on.
|
||||
There must be a corresponding Service Description XML file
|
||||
for the antecedent service in the /etc/omc/svcinfo.d directory.
|
||||
-->
|
||||
<dependsOn>
|
||||
<serviceName>network</serviceName>
|
||||
</dependsOn>
|
||||
|
||||
|
||||
</serviceDescription>
|
88
dhcpd6.xml
88
dhcpd6.xml
@ -1,88 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Copyright (c) 2006 Novell, Inc. All rights reserved.
|
||||
|
||||
|
||||
Service Description XML Document for dhcpd6.
|
||||
|
||||
This file should be placed in /etc/omc/svcinfo.d
|
||||
|
||||
Note: The name of the service is the name of this file without the .xml
|
||||
file extension.
|
||||
-->
|
||||
|
||||
<serviceDescription version="1.0">
|
||||
|
||||
<!-- Caption for display purposes -->
|
||||
<caption>ISC DHCPv6 4.x Server</caption>
|
||||
|
||||
<!-- Description of this service -->
|
||||
<description>
|
||||
ISC Dynamic Host Configuration Protocol for IPv6 Server
|
||||
</description>
|
||||
|
||||
|
||||
<!--
|
||||
The startCommand tag specifies the command line that will be
|
||||
invoked to start the service. The return code from this command
|
||||
must be as follows:
|
||||
0 - success
|
||||
1 - generic or unspecified error
|
||||
2 - invalid or excess argument(s)
|
||||
3 - unimplemented feature (e.g. "reload")
|
||||
4 - user had insufficient privileges
|
||||
5 - program is not installed
|
||||
6 - program is not configured
|
||||
7 - program is not running
|
||||
-->
|
||||
<startCommand>/etc/init.d/dhcpd6 start</startCommand>
|
||||
|
||||
<!--
|
||||
The reStartCommand tag specifies the command line that will be
|
||||
invoked to restart the service. The return code from this command
|
||||
must be as specified in the startCommand tag.
|
||||
-->
|
||||
<reStartCommand>/etc/init.d/dhcpd6 restart</reStartCommand>
|
||||
|
||||
<!--
|
||||
The stopCommand tag specifies the command line that will be
|
||||
invoked to stop the service. The return code from this command
|
||||
must be as specified in the startCommand tag.
|
||||
-->
|
||||
<stopCommand>/etc/init.d/dhcpd6 stop</stopCommand>
|
||||
|
||||
<!--
|
||||
The statusCommand specifies the command line that can be run
|
||||
that will report on the status of the service. The return code
|
||||
from this command line should be as follows:
|
||||
0 - service up and running
|
||||
1 - service dead, but /var/run/ pid file exists
|
||||
2 - service dead, but /var/lock/ lock file exists
|
||||
3 - service not running (unused)
|
||||
4 - service status unknown :-(
|
||||
-->
|
||||
<statusCommand>/etc/init.d/dhcpd6 status</statusCommand>
|
||||
<!--
|
||||
The processInformation tag allows the XML Service provider to
|
||||
identify the processes that belong to the service. This allows
|
||||
the ServiceProcess associations to be instrumented.
|
||||
If the process_information tag is not specifed, the will be no
|
||||
ServiceProcess association for the service.
|
||||
-->
|
||||
|
||||
<processInformation>
|
||||
<name>dhcpd6</name>
|
||||
<modulePath>/usr/sbin/dhcpd6</modulePath>
|
||||
</processInformation>
|
||||
|
||||
<!--
|
||||
Define the services that this service has a dependency on.
|
||||
There must be a corresponding Service Description XML file
|
||||
for the antecedent service in the /etc/omc/svcinfo.d directory.
|
||||
-->
|
||||
<dependsOn>
|
||||
<serviceName>network</serviceName>
|
||||
</dependsOn>
|
||||
|
||||
|
||||
</serviceDescription>
|
Loading…
Reference in New Issue
Block a user