2007-01-10 17:39:58 +01:00
|
|
|
#
|
2011-02-18 11:34:04 +01:00
|
|
|
# spec file for package dhcp
|
2007-01-10 17:39:58 +01:00
|
|
|
#
|
2014-01-10 13:13:49 +01:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-10 17:39:58 +01:00
|
|
|
#
|
2008-08-23 00:17:43 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-10 17:39:58 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2014-02-10 19:14:12 +01:00
|
|
|
%define isc_version 4.2.6
|
2010-05-14 00:27:05 +02:00
|
|
|
%define susefw2dir %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
|
|
|
|
%define omc_prefix /usr/share/omc
|
|
|
|
%define omc_svcdir %{omc_prefix}/svcinfo.d
|
2011-05-12 10:43:05 +02:00
|
|
|
# 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
|
2014-02-10 19:14:12 +01:00
|
|
|
%if 0%{?suse_version} >= 1310
|
|
|
|
%bcond_without systemd
|
|
|
|
%else
|
|
|
|
%bcond_with systemd
|
|
|
|
%endif
|
2008-04-01 23:02:39 +02:00
|
|
|
|
2007-01-10 17:39:58 +01:00
|
|
|
Name: dhcp
|
2011-05-10 13:50:05 +02:00
|
|
|
%if %{with_ldap}
|
|
|
|
%if %{with_ldapcasa}
|
2007-02-25 23:22:54 +01:00
|
|
|
BuildRequires: CASA-devel
|
2010-12-07 15:52:41 +01:00
|
|
|
%endif
|
2010-05-14 00:27:05 +02:00
|
|
|
BuildRequires: openldap2-devel
|
2007-02-25 23:22:54 +01:00
|
|
|
%endif
|
2010-05-14 00:27:05 +02:00
|
|
|
BuildRequires: dos2unix
|
2011-10-06 12:12:38 +02:00
|
|
|
BuildRequires: libtool
|
2014-02-10 19:14:12 +01:00
|
|
|
Version: 4.2.6
|
2012-01-16 18:05:05 +01:00
|
|
|
Release: 0.<RELEASE0>
|
2007-01-10 17:39:58 +01:00
|
|
|
Summary: Common Files Used by ISC DHCP Software
|
2012-03-28 17:29:59 +02:00
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Productivity/Networking/Boot/Servers
|
2010-05-14 00:27:05 +02:00
|
|
|
Url: http://www.isc.org/software/dhcp
|
2013-01-11 12:58:29 +01:00
|
|
|
Source0: dhcp-%{isc_version}.tar.gz
|
|
|
|
Source1: dhcp-%{isc_version}.tar.gz.asc
|
|
|
|
Source2: %{name}.keyring
|
2010-05-14 00:27:05 +02:00
|
|
|
#
|
2014-02-10 19:14:12 +01:00
|
|
|
Source10: dhcpd.script
|
|
|
|
Source11: dhcrelay.script
|
|
|
|
%if %{with systemd}
|
|
|
|
Source12: dhcpd.service
|
|
|
|
Source13: dhcpd6.service
|
|
|
|
Source14: dhcrelay.service
|
|
|
|
Source15: dhcrelay6.service
|
|
|
|
%else
|
|
|
|
Source12: rc.dhcpd
|
|
|
|
Source13: rc.dhcpd6
|
|
|
|
Source14: rc.dhcrelay
|
|
|
|
Source15: rc.dhcrelay6
|
|
|
|
%endif
|
|
|
|
Source17: sysconfig.dhcpd
|
|
|
|
Source18: sysconfig.dhcrelay
|
2010-05-14 00:27:05 +02:00
|
|
|
Source19: if-up.d.dhcpd-restart-hook
|
|
|
|
#
|
|
|
|
Source20: dhclient.conf
|
|
|
|
Source21: dhclient6.conf
|
|
|
|
Source22: dhcpd.conf
|
|
|
|
Source23: dhcpd6.conf
|
2014-02-10 19:14:12 +01:00
|
|
|
Source26: sysconfig.syslog-dhcpd
|
|
|
|
Source27: dhclient-script
|
2010-05-14 00:27:05 +02:00
|
|
|
#
|
|
|
|
Source30: dhcpd.xml
|
|
|
|
Source31: dhcpd6.xml
|
|
|
|
Source32: SuSEfirewall2.dhcp-server
|
2013-03-12 16:26:14 +01:00
|
|
|
Source33: SuSEfirewall2.dhcp6-server
|
2010-05-14 00:27:05 +02:00
|
|
|
#
|
|
|
|
Source41: dhcp.README
|
|
|
|
Source43: DDNS-howto.txt
|
|
|
|
Source44: contrib.tar.gz
|
|
|
|
Source45: examples.tar.gz
|
2014-02-10 19:14:12 +01:00
|
|
|
Patch1: 0001-dhcp-4.1.1-default-paths.patch
|
2010-05-14 00:27:05 +02:00
|
|
|
# paranoia patch is included now, but not the
|
|
|
|
# additional patch by thomas@suse.de not ...
|
2014-02-10 19:14:12 +01:00
|
|
|
Patch2: 0002-dhcp-4.1.1-paranoia.patch
|
|
|
|
Patch3: 0003-dhcp-4.2.2-man-includes.patch
|
|
|
|
Patch4: 0004-dhcp-4.1.1-tmpfile.patch
|
|
|
|
Patch5: 0005-dhcp-4.1.1-dhclient-exec-filedes.patch
|
|
|
|
Patch6: 0006-dhcp-4.2.5-dhclient-send-hostname-rml.patch
|
|
|
|
# PATCH-FIX-UPSTREAM ldap-patch bnc#788787,bnc#784640
|
|
|
|
Patch7: 0007-dhcp-4.2.6-ldap-mt01.patch
|
|
|
|
# PATCH-FIX-UPSTREAM lpf-bind-msg-fix bnc#617795
|
|
|
|
Patch8: 0008-dhcp-4.1.1-P1-lpf-bind-msg-fix.patch
|
|
|
|
# PATCH-FIX-SLE xen-checksum bnc#668194
|
|
|
|
Patch9: 0009-dhcp-4.2.6-xen-checksum.patch
|
|
|
|
# PATCH-FIX-SLE dhclient-option-checks bnc#675052
|
|
|
|
Patch10: 0010-dhcp-4.2.2-dhclient-option-checks.patch
|
|
|
|
# PATCH-FIX-OPENSUSE close-on-exec bnc#732910
|
|
|
|
Patch11: 0011-dhcp-4.2.6-close-on-exec.patch
|
|
|
|
# PATCH-FIX-OPENSUSE quiet-dhclient bnc#711420
|
|
|
|
Patch12: 0012-dhcp-4.2.2-quiet-dhclient.patch
|
|
|
|
# PATCH-FIX-OPENSUSE dhclient-log-pid
|
|
|
|
Patch13: 0013-dhcp-4.2.3-P1-dhclient-log-pid.patch
|
|
|
|
# PATCH-FIX-UPSTREAM use-getifaddrs bnc#791289,ISC-Bugs#31992
|
|
|
|
Patch14: 0014-Fixed-linux-interface-discovery-using-getifaddrs.patch
|
|
|
|
# PATCH-FIX-UPSTREAM no-die-on-SIGPIPE bnc#794578,ISC-Bugs#32222
|
|
|
|
Patch15: 0015-Ignore-SIGPIPE-to-not-die-in-socket-code.patch
|
|
|
|
# PATCH-FEATURE-UPSTREAM log-dhcpv6-client-addresses ISC-Bugs#26377
|
|
|
|
Patch16: 0016-server-log-DHCPv6-addresses-assigned-to-clients.patch
|
2014-03-28 20:03:40 +01:00
|
|
|
# PATCH-FIX-SLE dhcp-4.2.6-lpf-ip-over-ib-support bnc#870535
|
|
|
|
Patch17: 0017-dhcp-4.2.6-lpf-ip-over-ib-support.patch
|
|
|
|
# PATCH-FIX-SLE dhcp-4.2.6-improved-xid bnc#870535
|
|
|
|
Patch18: 0018-dhcp-4.2.6-improved-xid.patch
|
2014-06-10 04:45:09 +02:00
|
|
|
# PATCH-FIX-SLE dhcp-4.2.x-ldap-debug-write bug#835818
|
|
|
|
Patch19: 0019-dhcp-4.2.x-ldap-debug-write.bnc835818.patch
|
|
|
|
# PATCH-FIX-OPENSUSE dhcp-4.2.x-chown-server-leases bnc#868253
|
|
|
|
Patch20: 0020-dhcp-4.2.x-chown-server-leases.bnc868253.patch
|
2008-09-13 00:24:42 +02:00
|
|
|
##
|
2008-11-28 14:55:40 +01:00
|
|
|
PreReq: /bin/touch /sbin/chkconfig sysconfig
|
2007-01-10 17:39:58 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2014-06-10 04:45:09 +02:00
|
|
|
%if 0%{?suse_version} > 1220
|
|
|
|
BuildRequires: gpg-offline
|
|
|
|
%endif
|
2014-02-10 19:14:12 +01:00
|
|
|
BuildRequires: automake
|
2007-11-22 18:09:01 +01:00
|
|
|
|
2007-01-10 17:39:58 +01:00
|
|
|
%package server
|
|
|
|
Summary: ISC DHCP Server
|
|
|
|
Group: Productivity/Networking/Boot/Servers
|
2012-03-28 17:29:59 +02:00
|
|
|
Requires: dhcp = %{version}
|
|
|
|
Requires: net-tools
|
2007-01-10 17:39:58 +01:00
|
|
|
PreReq: %insserv_prereq %fillup_prereq /bin/cat /bin/mkdir /bin/cp /usr/sbin/useradd
|
2007-11-22 18:09:01 +01:00
|
|
|
|
2007-01-10 17:39:58 +01:00
|
|
|
%package client
|
|
|
|
Summary: ISC DHCP Client
|
|
|
|
Group: Productivity/Networking/Boot/Clients
|
2012-03-28 17:29:59 +02:00
|
|
|
Requires: /sbin/arping
|
|
|
|
Requires: /usr/bin/host
|
|
|
|
Requires: dhcp = %{version}
|
2014-07-21 15:12:38 +02:00
|
|
|
Requires: iproute2
|
2012-03-28 17:29:59 +02:00
|
|
|
Requires: net-tools
|
2010-05-14 00:27:05 +02:00
|
|
|
PreReq: %insserv_prereq %fillup_prereq /bin/cat /bin/mkdir /bin/cp /bin/grep
|
2007-11-22 18:09:01 +01:00
|
|
|
|
2007-01-10 17:39:58 +01:00
|
|
|
%package relay
|
2010-05-14 00:27:05 +02:00
|
|
|
Summary: ISC DHCP Relay Agent
|
2007-01-10 17:39:58 +01:00
|
|
|
Group: Productivity/Networking/Boot/Servers
|
2012-03-28 17:29:59 +02:00
|
|
|
Requires: dhcp = %{version}
|
|
|
|
Requires: net-tools
|
2007-01-10 17:39:58 +01:00
|
|
|
PreReq: %insserv_prereq %fillup_prereq /bin/cat /bin/mkdir /bin/cp
|
2007-11-22 18:09:01 +01:00
|
|
|
|
2007-01-10 17:39:58 +01:00
|
|
|
%package devel
|
|
|
|
Summary: Header Files and Libraries for dhcpctl API
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: dhcp = %{version}
|
2013-04-02 11:23:05 +02:00
|
|
|
Conflicts: bind-devel
|
2007-01-10 17:39:58 +01:00
|
|
|
|
2011-05-10 13:50:05 +02:00
|
|
|
%if %{with_doc_package}
|
2011-05-16 11:17:24 +02:00
|
|
|
|
2010-05-14 00:27:05 +02:00
|
|
|
%package doc
|
|
|
|
Summary: Documentation
|
|
|
|
Group: Productivity/Networking/Boot/Servers
|
2011-05-10 13:50:05 +02:00
|
|
|
%endif
|
2007-01-10 17:39:58 +01:00
|
|
|
|
2010-05-14 00:27:05 +02:00
|
|
|
%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.
|
2007-01-10 17:39:58 +01:00
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
2010-05-14 00:27:05 +02:00
|
|
|
Internet Systems Consortium, Inc. <info@isc.org>
|
|
|
|
|
2010-05-07 16:12:44 +02:00
|
|
|
|
2007-01-10 17:39:58 +01:00
|
|
|
%description server
|
|
|
|
This package contains the ISC DHCP server.
|
|
|
|
|
|
|
|
Please read the documentation in /usr/share/doc/packages/dhcp-server
|
|
|
|
regarding configuration of the DHCP server.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
2010-05-14 00:27:05 +02:00
|
|
|
Internet Systems Consortium, Inc. <info@isc.org>
|
|
|
|
|
2010-05-07 16:12:44 +02:00
|
|
|
|
2007-01-10 17:39:58 +01:00
|
|
|
%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
|
|
|
|
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
|
|
|
|
you can define your own 'hooks' to be used by the /sbin/dhclient-script
|
|
|
|
(which is called by the daemon).
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
2010-05-14 00:27:05 +02:00
|
|
|
Internet Systems Consortium, Inc. <info@isc.org>
|
2007-01-10 17:39:58 +01:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
|
2010-05-14 00:27:05 +02:00
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Internet Systems Consortium, Inc. <info@isc.org>
|
|
|
|
|
2011-05-10 13:50:05 +02:00
|
|
|
%if %{with_doc_package}
|
2011-05-16 11:17:24 +02:00
|
|
|
|
2010-05-14 00:27:05 +02:00
|
|
|
%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>
|
|
|
|
|
2011-05-10 13:50:05 +02:00
|
|
|
%endif
|
2007-01-10 17:39:58 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains all of the libraries and headers for developing
|
|
|
|
with the Internet Software Consortium (ISC) dhcpctl API.
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
2010-05-14 00:27:05 +02:00
|
|
|
Internet Systems Consortium, Inc. <info@isc.org>
|
|
|
|
|
2010-05-07 16:12:44 +02:00
|
|
|
|
2007-01-10 17:39:58 +01:00
|
|
|
%prep
|
2014-06-10 04:45:09 +02:00
|
|
|
%if 0%{?gpg_verify:1}
|
|
|
|
%gpg_verify %{S:1}
|
|
|
|
%endif
|
2010-09-29 12:28:25 +02:00
|
|
|
%setup -q -n %{name}-%{isc_version} -a 44 -a 45
|
2008-09-13 00:24:42 +02:00
|
|
|
##
|
2014-02-10 19:14:12 +01:00
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
|
|
|
%patch6 -p1
|
|
|
|
%if %{with_ldap}
|
|
|
|
%patch7 -p1
|
|
|
|
%endif
|
|
|
|
%patch8 -p1
|
|
|
|
%patch9 -p1
|
2008-09-13 00:24:42 +02:00
|
|
|
%patch10 -p1
|
2010-05-14 00:27:05 +02:00
|
|
|
%patch11 -p1
|
|
|
|
%patch12 -p1
|
|
|
|
%patch13 -p1
|
2014-02-10 19:14:12 +01:00
|
|
|
%patch14 -p1
|
|
|
|
%patch15 -p1
|
|
|
|
%patch16 -p1
|
2014-03-28 20:03:40 +01:00
|
|
|
%patch17 -p1
|
|
|
|
%patch18 -p1
|
2014-06-10 04:45:09 +02:00
|
|
|
%patch19 -p1
|
|
|
|
%patch20 -p1
|
2008-09-13 00:24:42 +02:00
|
|
|
##
|
2007-01-10 17:39:58 +01:00
|
|
|
find . -type f -name \*.cat\* -exec rm -f {} \;
|
2008-09-13 00:24:42 +02:00
|
|
|
dos2unix contrib/ms2isc/*
|
- Updated to ISC dhcp-4.2.2 release, providing two security fixes
(CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that
allowed remote attackers to cause a denial of service (a daemon
exit) via crafted BOOTP packets. Further also DNS update fix to
detect overlapping pools or misconfigured fixed-address entries,
that caused a server crash during DNS update and other fixes.
For a complete list, please see the RELNOTES file provided in
the package and also available online at http://www.isc.org/.
- Merged/adopted dhclient option-checks, send-hostname-rml, ldap
patch, xen-checksum, close-on-exec patches and removed obsolete
in6_pktinfo-prototype and relay-no-ip-on-interface patches.
- Moved server pid files into chroot directory even chroot is
not used and create a link in /var/run, so it can write one
when started as user without chroot and avoid stop problems
when the chroot sysconfig setting changed (bnc#712438).
- Disabled log-info level messages in dhclient(6) quiet mode to
avoid excessive logging of non-critical messages (bnc#711420).
- Fixed dhclient-script to not remove alias IP when it didn't
changed to not wipe out iptables connmark when renewing the
lease (bnc#700771). Thanks to James Carter for the patch.
- Fixed DDNS-howto.txt reference in the config file; it has been
moved to the dhcp-doc package (bnc#697279).
- Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz
to ensure, they're not used to build non-GPL dhcp (bnc#714004).
- Changed to apply strict-aliasing/RELRO for >= 12.x only
OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
|
|
|
# Remove GPL licensed files to make sure,
|
|
|
|
# they're not used to build (bnc#714004).
|
|
|
|
pushd bind
|
|
|
|
gunzip -c bind.tar.gz | tar xf -
|
|
|
|
rm -rf bind-*/contrib/dbus
|
2014-02-10 19:14:12 +01:00
|
|
|
bind_dir=$(ls -1d bind-*)
|
|
|
|
for i in /usr/share/automake-*/config.{sub,guess} ; do
|
|
|
|
install -v -m755 $i $bind_dir/
|
|
|
|
done
|
- Updated to ISC dhcp-4.2.2 release, providing two security fixes
(CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that
allowed remote attackers to cause a denial of service (a daemon
exit) via crafted BOOTP packets. Further also DNS update fix to
detect overlapping pools or misconfigured fixed-address entries,
that caused a server crash during DNS update and other fixes.
For a complete list, please see the RELNOTES file provided in
the package and also available online at http://www.isc.org/.
- Merged/adopted dhclient option-checks, send-hostname-rml, ldap
patch, xen-checksum, close-on-exec patches and removed obsolete
in6_pktinfo-prototype and relay-no-ip-on-interface patches.
- Moved server pid files into chroot directory even chroot is
not used and create a link in /var/run, so it can write one
when started as user without chroot and avoid stop problems
when the chroot sysconfig setting changed (bnc#712438).
- Disabled log-info level messages in dhclient(6) quiet mode to
avoid excessive logging of non-critical messages (bnc#711420).
- Fixed dhclient-script to not remove alias IP when it didn't
changed to not wipe out iptables connmark when renewing the
lease (bnc#700771). Thanks to James Carter for the patch.
- Fixed DDNS-howto.txt reference in the config file; it has been
moved to the dhcp-doc package (bnc#697279).
- Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz
to ensure, they're not used to build non-GPL dhcp (bnc#714004).
- Changed to apply strict-aliasing/RELRO for >= 12.x only
OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
|
|
|
popd
|
2013-03-28 08:42:40 +01:00
|
|
|
##
|
2013-03-27 15:46:26 +01:00
|
|
|
|
|
|
|
%build
|
- Updated to ISC dhcp-4.2.2 release, providing two security fixes
(CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that
allowed remote attackers to cause a denial of service (a daemon
exit) via crafted BOOTP packets. Further also DNS update fix to
detect overlapping pools or misconfigured fixed-address entries,
that caused a server crash during DNS update and other fixes.
For a complete list, please see the RELNOTES file provided in
the package and also available online at http://www.isc.org/.
- Merged/adopted dhclient option-checks, send-hostname-rml, ldap
patch, xen-checksum, close-on-exec patches and removed obsolete
in6_pktinfo-prototype and relay-no-ip-on-interface patches.
- Moved server pid files into chroot directory even chroot is
not used and create a link in /var/run, so it can write one
when started as user without chroot and avoid stop problems
when the chroot sysconfig setting changed (bnc#712438).
- Disabled log-info level messages in dhclient(6) quiet mode to
avoid excessive logging of non-critical messages (bnc#711420).
- Fixed dhclient-script to not remove alias IP when it didn't
changed to not wipe out iptables connmark when renewing the
lease (bnc#700771). Thanks to James Carter for the patch.
- Fixed DDNS-howto.txt reference in the config file; it has been
moved to the dhcp-doc package (bnc#697279).
- Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz
to ensure, they're not used to build non-GPL dhcp (bnc#714004).
- Changed to apply strict-aliasing/RELRO for >= 12.x only
OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
|
|
|
%if %suse_version >= 1210
|
2011-08-29 17:13:53 +02:00
|
|
|
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -W -Wall -Wno-unused"
|
- Updated to ISC dhcp-4.2.2 release, providing two security fixes
(CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that
allowed remote attackers to cause a denial of service (a daemon
exit) via crafted BOOTP packets. Further also DNS update fix to
detect overlapping pools or misconfigured fixed-address entries,
that caused a server crash during DNS update and other fixes.
For a complete list, please see the RELNOTES file provided in
the package and also available online at http://www.isc.org/.
- Merged/adopted dhclient option-checks, send-hostname-rml, ldap
patch, xen-checksum, close-on-exec patches and removed obsolete
in6_pktinfo-prototype and relay-no-ip-on-interface patches.
- Moved server pid files into chroot directory even chroot is
not used and create a link in /var/run, so it can write one
when started as user without chroot and avoid stop problems
when the chroot sysconfig setting changed (bnc#712438).
- Disabled log-info level messages in dhclient(6) quiet mode to
avoid excessive logging of non-critical messages (bnc#711420).
- Fixed dhclient-script to not remove alias IP when it didn't
changed to not wipe out iptables connmark when renewing the
lease (bnc#700771). Thanks to James Carter for the patch.
- Fixed DDNS-howto.txt reference in the config file; it has been
moved to the dhcp-doc package (bnc#697279).
- Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz
to ensure, they're not used to build non-GPL dhcp (bnc#714004).
- Changed to apply strict-aliasing/RELRO for >= 12.x only
OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
|
|
|
%else
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -W -Wall -fno-strict-aliasing -Wno-unused"
|
|
|
|
%endif
|
2007-01-10 17:39:58 +01:00
|
|
|
%ifarch ppc ppc64 s390x
|
|
|
|
# bugs 134590, 171532
|
|
|
|
CFLAGS="$CFLAGS -fsigned-char"
|
|
|
|
%endif
|
2010-01-14 16:36:26 +01:00
|
|
|
%ifarch ia64 %sparc alpha s390x ppc64 x86_64
|
2007-01-10 17:39:58 +01:00
|
|
|
CFLAGS="$CFLAGS -fPIE"
|
|
|
|
%else
|
|
|
|
CFLAGS="$CFLAGS -fpie"
|
|
|
|
%endif
|
- Updated to ISC dhcp-4.2.2 release, providing two security fixes
(CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that
allowed remote attackers to cause a denial of service (a daemon
exit) via crafted BOOTP packets. Further also DNS update fix to
detect overlapping pools or misconfigured fixed-address entries,
that caused a server crash during DNS update and other fixes.
For a complete list, please see the RELNOTES file provided in
the package and also available online at http://www.isc.org/.
- Merged/adopted dhclient option-checks, send-hostname-rml, ldap
patch, xen-checksum, close-on-exec patches and removed obsolete
in6_pktinfo-prototype and relay-no-ip-on-interface patches.
- Moved server pid files into chroot directory even chroot is
not used and create a link in /var/run, so it can write one
when started as user without chroot and avoid stop problems
when the chroot sysconfig setting changed (bnc#712438).
- Disabled log-info level messages in dhclient(6) quiet mode to
avoid excessive logging of non-critical messages (bnc#711420).
- Fixed dhclient-script to not remove alias IP when it didn't
changed to not wipe out iptables connmark when renewing the
lease (bnc#700771). Thanks to James Carter for the patch.
- Fixed DDNS-howto.txt reference in the config file; it has been
moved to the dhcp-doc package (bnc#697279).
- Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz
to ensure, they're not used to build non-GPL dhcp (bnc#714004).
- Changed to apply strict-aliasing/RELRO for >= 12.x only
OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
|
|
|
%if %suse_version >= 1210
|
2011-08-29 17:13:53 +02:00
|
|
|
LDFLAGS="-Wl,-z,relro,-z,now -pie"
|
- Updated to ISC dhcp-4.2.2 release, providing two security fixes
(CVE-2011-2748,CVE-2011-2749,[ISC-Bugs #24960],bnc#712653), that
allowed remote attackers to cause a denial of service (a daemon
exit) via crafted BOOTP packets. Further also DNS update fix to
detect overlapping pools or misconfigured fixed-address entries,
that caused a server crash during DNS update and other fixes.
For a complete list, please see the RELNOTES file provided in
the package and also available online at http://www.isc.org/.
- Merged/adopted dhclient option-checks, send-hostname-rml, ldap
patch, xen-checksum, close-on-exec patches and removed obsolete
in6_pktinfo-prototype and relay-no-ip-on-interface patches.
- Moved server pid files into chroot directory even chroot is
not used and create a link in /var/run, so it can write one
when started as user without chroot and avoid stop problems
when the chroot sysconfig setting changed (bnc#712438).
- Disabled log-info level messages in dhclient(6) quiet mode to
avoid excessive logging of non-critical messages (bnc#711420).
- Fixed dhclient-script to not remove alias IP when it didn't
changed to not wipe out iptables connmark when renewing the
lease (bnc#700771). Thanks to James Carter for the patch.
- Fixed DDNS-howto.txt reference in the config file; it has been
moved to the dhcp-doc package (bnc#697279).
- Removed GPL licensed files (bind-*/contrib/dbus) from bind.tgz
to ensure, they're not used to build non-GPL dhcp (bnc#714004).
- Changed to apply strict-aliasing/RELRO for >= 12.x only
OBS-URL: https://build.opensuse.org/package/show/network:dhcp/dhcp?expand=0&rev=75
2011-08-29 17:37:53 +02:00
|
|
|
%else
|
|
|
|
LDFLAGS="-pie"
|
|
|
|
%endif
|
2010-05-14 00:27:05 +02:00
|
|
|
FFLAGS="$CFLAGS"
|
|
|
|
CXXFLAGS="$CFLAGS"
|
|
|
|
export RPM_OPT_FLAGS LDFLAGS
|
|
|
|
export CFLAGS FFLAGS CXXFLAGS
|
|
|
|
#
|
|
|
|
%{?suse_update_config:%{suse_update_config -f}}
|
|
|
|
libtoolize --force
|
2013-04-30 10:03:14 +02:00
|
|
|
autoreconf -i
|
2010-05-14 00:27:05 +02:00
|
|
|
#
|
|
|
|
%configure \
|
|
|
|
--enable-dhcpv6 \
|
|
|
|
--enable-failover \
|
|
|
|
--enable-paranoia \
|
|
|
|
--enable-early-chroot \
|
2011-05-10 13:50:05 +02:00
|
|
|
%if %{with_ldap}
|
2010-11-26 15:57:47 +01:00
|
|
|
--with-ldap \
|
|
|
|
--with-ldapcrypto \
|
2011-05-10 13:50:05 +02:00
|
|
|
%if %{with_ldapcasa}
|
2010-11-26 15:57:47 +01:00
|
|
|
--with-ldapcasa \
|
2010-12-07 15:52:41 +01:00
|
|
|
%endif
|
2007-01-10 17:39:58 +01:00
|
|
|
%endif
|
2010-05-14 00:27:05 +02:00
|
|
|
--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 \
|
|
|
|
--with-cli6-lease-file=%{_localstatedir}/lib/dhcp6/dhclient.leases \
|
|
|
|
--with-srv-pid-file=%{_localstatedir}/run/dhcpd.pid \
|
|
|
|
--with-srv-lease-file=%{_localstatedir}/lib/dhcp/db/dhcpd.leases \
|
|
|
|
--with-srv6-pid-file=%{_localstatedir}/run/dhcpd6.pid \
|
|
|
|
--with-srv6-lease-file=%{_localstatedir}/lib/dhcp6/db/dhcpd6.leases
|
|
|
|
#
|
2013-03-27 15:46:26 +01:00
|
|
|
: building bind sources
|
|
|
|
make -C bind all
|
|
|
|
cat bind/configure.log
|
|
|
|
cat bind/build.log
|
|
|
|
cat bind/install.log
|
|
|
|
: building dhcp sources
|
2010-05-14 00:27:05 +02:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%check
|
2014-02-10 19:14:12 +01:00
|
|
|
# check example config, see if it runs
|
|
|
|
./server/dhcpd -4 -t -cf $RPM_SOURCE_DIR/dhcpd.conf
|
|
|
|
./server/dhcpd -6 -t -cf $RPM_SOURCE_DIR/dhcpd6.conf
|
2010-05-14 00:27:05 +02:00
|
|
|
# check syntax in our scripts
|
|
|
|
bash -n $RPM_SOURCE_DIR/rc.dhcpd
|
|
|
|
bash -n $RPM_SOURCE_DIR/rc.dhcpd6
|
|
|
|
bash -n $RPM_SOURCE_DIR/rc.dhcrelay
|
|
|
|
bash -n $RPM_SOURCE_DIR/rc.dhcrelay6
|
2014-02-10 19:14:12 +01:00
|
|
|
bash -n $RPM_SOURCE_DIR/dhcpd.script
|
|
|
|
bash -n $RPM_SOURCE_DIR/dhcrelay.script
|
2010-05-14 00:27:05 +02:00
|
|
|
bash -n $RPM_SOURCE_DIR/dhclient-script
|
2007-01-10 17:39:58 +01:00
|
|
|
|
|
|
|
%install
|
2010-05-14 00:27:05 +02:00
|
|
|
export RPM_BUILD_ROOT
|
|
|
|
make install DESTDIR="$RPM_BUILD_ROOT"
|
|
|
|
#
|
|
|
|
# directories
|
|
|
|
install -d -m0755 $RPM_BUILD_ROOT/sbin
|
2011-08-31 11:13:05 +02:00
|
|
|
install -d -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/dhcpd{,6}.d
|
2010-05-14 00:27:05 +02:00
|
|
|
install -d -m0755 $RPM_BUILD_ROOT/%{susefw2dir}
|
|
|
|
install -d -m0755 $RPM_BUILD_ROOT/%{omc_svcdir}
|
2011-05-10 13:50:05 +02:00
|
|
|
%if %{with_ldap}
|
2010-05-14 00:27:05 +02:00
|
|
|
install -d -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema
|
2010-11-26 15:57:47 +01:00
|
|
|
%endif
|
2010-05-14 00:27:05 +02:00
|
|
|
install -d -m0755 $RPM_BUILD_ROOT%{_localstatedir}/run
|
|
|
|
install -d -m0755 $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates
|
|
|
|
# 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
|
|
|
|
# move the dhclient binary to /sbin
|
|
|
|
mv -f $RPM_BUILD_ROOT/usr/sbin/dhclient $RPM_BUILD_ROOT/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
|
|
|
|
# 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 -m0750 $RPM_SOURCE_DIR/dhclient-script $RPM_BUILD_ROOT/sbin/
|
2014-02-10 19:14:12 +01:00
|
|
|
# helper / wrapper scripts
|
|
|
|
install -d -m0755 $RPM_BUILD_ROOT/usr/lib/dhcp
|
|
|
|
install -m0755 $RPM_SOURCE_DIR/dhcpd.script \
|
|
|
|
$RPM_BUILD_ROOT/usr/lib/dhcp/dhcpd
|
2014-06-10 04:45:09 +02:00
|
|
|
sed -e 's/@LIBDIR@/%{_lib}/g' -i $RPM_BUILD_ROOT/usr/lib/dhcp/dhcpd
|
2014-02-10 19:14:12 +01:00
|
|
|
install -m0755 $RPM_SOURCE_DIR/dhcrelay.script \
|
|
|
|
$RPM_BUILD_ROOT/usr/lib/dhcp/dhcrelay
|
|
|
|
%if %{with systemd}
|
|
|
|
# service units
|
|
|
|
install -d -m0755 $RPM_BUILD_ROOT%{_unitdir}
|
|
|
|
install -m0644 $RPM_SOURCE_DIR/dhcpd.service \
|
|
|
|
$RPM_BUILD_ROOT%{_unitdir}/dhcpd.service
|
|
|
|
install -m0644 $RPM_SOURCE_DIR/dhcpd6.service \
|
|
|
|
$RPM_BUILD_ROOT%{_unitdir}/dhcpd6.service
|
|
|
|
install -m0644 $RPM_SOURCE_DIR/dhcrelay.service \
|
|
|
|
$RPM_BUILD_ROOT%{_unitdir}/dhcrelay.service
|
|
|
|
install -m0644 $RPM_SOURCE_DIR/dhcrelay6.service \
|
|
|
|
$RPM_BUILD_ROOT%{_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
|
|
|
|
%else
|
|
|
|
# service scripts
|
|
|
|
install -d -m0755 $RPM_BUILD_ROOT%{_sysconfdir}/init.d
|
2010-05-14 00:27:05 +02:00
|
|
|
install -m0755 $RPM_SOURCE_DIR/rc.dhcpd \
|
|
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/init.d/dhcpd
|
|
|
|
install -m0755 $RPM_SOURCE_DIR/rc.dhcpd6 \
|
|
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/init.d/dhcpd6
|
|
|
|
install -m0755 $RPM_SOURCE_DIR/rc.dhcrelay \
|
|
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/init.d/dhcrelay
|
|
|
|
install -m0755 $RPM_SOURCE_DIR/rc.dhcrelay6 \
|
|
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/init.d/dhcrelay6
|
2014-02-10 19:14:12 +01:00
|
|
|
# rcservice links
|
|
|
|
ln -sf %{_sysconfdir}/init.d/dhcpd $RPM_BUILD_ROOT%{_sbindir}/rcdhcpd
|
|
|
|
ln -sf %{_sysconfdir}/init.d/dhcpd6 $RPM_BUILD_ROOT%{_sbindir}/rcdhcpd6
|
|
|
|
ln -sf %{_sysconfdir}/init.d/dhcrelay $RPM_BUILD_ROOT%{_sbindir}/rcdhcrelay
|
|
|
|
ln -sf %{_sysconfdir}/init.d/dhcrelay6 $RPM_BUILD_ROOT%{_sbindir}/rcdhcrelay6
|
|
|
|
%endif
|
2014-03-17 17:40:09 +01:00
|
|
|
# rcservice actions
|
|
|
|
legacy_actionsdir=$RPM_BUILD_ROOT/usr/lib/initscripts/legacy-actions
|
|
|
|
cat >dhcpd.action <<'EOF'
|
|
|
|
#!/bin/bash
|
|
|
|
exec /usr/lib/dhcp/dhcpd -4 ${0##*/}
|
|
|
|
EOF
|
|
|
|
install -d -m0755 ${legacy_actionsdir}/dhcpd
|
|
|
|
install -m0755 dhcpd.action ${legacy_actionsdir}/dhcpd/syntax-check
|
|
|
|
ln -sf syntax-check ${legacy_actionsdir}/dhcpd/check-syntax
|
|
|
|
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##*/}
|
|
|
|
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
|
2010-05-14 00:27:05 +02:00
|
|
|
# sysconfig files
|
|
|
|
install -m0644 $RPM_SOURCE_DIR/sysconfig.dhcpd \
|
|
|
|
$RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/
|
|
|
|
install -m0644 $RPM_SOURCE_DIR/sysconfig.syslog-dhcpd \
|
|
|
|
$RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/
|
|
|
|
install -m0644 $RPM_SOURCE_DIR/sysconfig.dhcrelay \
|
|
|
|
$RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/
|
|
|
|
# another config files and scripts
|
2011-05-10 13:50:05 +02:00
|
|
|
%if %{with_ldap}
|
2010-11-26 15:57:47 +01:00
|
|
|
install -m0644 contrib/ldap/dhcp.schema \
|
2010-05-14 00:27:05 +02:00
|
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/openldap/schema
|
2010-11-26 15:57:47 +01:00
|
|
|
%endif
|
2010-05-14 00:27:05 +02:00
|
|
|
install -m0644 $RPM_SOURCE_DIR/dhcpd.xml \
|
|
|
|
$RPM_SOURCE_DIR/dhcpd6.xml \
|
|
|
|
$RPM_BUILD_ROOT/%{omc_svcdir}/
|
|
|
|
install -m0644 $RPM_SOURCE_DIR/SuSEfirewall2.dhcp-server \
|
|
|
|
$RPM_BUILD_ROOT/%{susefw2dir}/dhcp-server
|
2013-03-12 16:26:14 +01:00
|
|
|
install -m0644 $RPM_SOURCE_DIR/SuSEfirewall2.dhcp6-server \
|
|
|
|
$RPM_BUILD_ROOT/%{susefw2dir}/dhcp6-server
|
2010-05-14 00:27:05 +02:00
|
|
|
install -d -m0755 $RPM_BUILD_ROOT/etc/sysconfig/network/if-up.d
|
|
|
|
install -d -m0755 $RPM_BUILD_ROOT/etc/sysconfig/network/scripts
|
|
|
|
install -m0755 $RPM_SOURCE_DIR/if-up.d.dhcpd-restart-hook \
|
2009-08-13 18:04:28 +02:00
|
|
|
$RPM_BUILD_ROOT/etc/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
|
2010-05-14 00:27:05 +02:00
|
|
|
# fix manual page permissions
|
|
|
|
find $RPM_BUILD_ROOT/%{_mandir} -type f | xargs chmod 644
|
|
|
|
# copy some documentation and examples from src dir
|
2014-02-10 19:14:12 +01:00
|
|
|
install -m0644 $RPM_SOURCE_DIR/dhcp.README README.SUSE
|
2010-05-14 00:27:05 +02:00
|
|
|
install -m0644 $RPM_SOURCE_DIR/DDNS-howto.txt .
|
2010-09-29 12:28:25 +02:00
|
|
|
cp doc/examples/* ./examples/
|
2010-05-14 00:27:05 +02:00
|
|
|
rm -f doc/{References.xml,Makefile*}
|
|
|
|
rm -f contrib/dhcp.spec
|
2013-01-11 12:58:29 +01:00
|
|
|
rm -f $RPM_BUILD_ROOT/etc/{dhcpd,dhclient}.conf.example
|
2014-02-10 19:14:12 +01:00
|
|
|
find contrib doc/examples -type f | xargs chmod -x
|
2013-04-02 11:23:05 +02:00
|
|
|
# install bind libs+includes needed for dhcp-devel
|
|
|
|
pushd bind
|
|
|
|
install -d -m0755 $RPM_BUILD_ROOT%_includedir/
|
|
|
|
for i in include/* ; do
|
|
|
|
cp -r $i $RPM_BUILD_ROOT%_includedir/
|
|
|
|
done
|
|
|
|
install -d -m0755 $RPM_BUILD_ROOT%_libdir/
|
|
|
|
for l in lib/lib*.a ; do
|
|
|
|
install -m0644 $l $RPM_BUILD_ROOT%_libdir/
|
2013-04-02 11:29:49 +02:00
|
|
|
done
|
2013-04-02 11:23:05 +02:00
|
|
|
popd
|
2007-01-10 17:39:58 +01:00
|
|
|
|
|
|
|
%pre server
|
|
|
|
/usr/sbin/useradd -r -g nogroup -s /bin/false -c "DHCP server daemon" -d /var/lib/dhcp dhcpd 2> /dev/null ||:
|
2014-05-28 10:49:05 +02:00
|
|
|
%if %{with systemd}
|
|
|
|
%service_add_pre dhcpd.service
|
|
|
|
%service_add_pre dhcpd6.service
|
|
|
|
%endif
|
2007-01-10 17:39:58 +01:00
|
|
|
|
|
|
|
%post server
|
2014-02-10 19:14:12 +01:00
|
|
|
%if %{with systemd}
|
2014-06-10 04:45:09 +02:00
|
|
|
%{fillup_only -n dhcpd dhcpd}
|
2014-02-10 19:14:12 +01:00
|
|
|
%{fillup_only -ans syslog dhcpd}
|
|
|
|
%service_add_post dhcpd.service
|
|
|
|
%service_add_post dhcpd6.service
|
|
|
|
%else
|
2010-05-14 00:27:05 +02:00
|
|
|
%{fillup_and_insserv -n dhcpd dhcpd dhcpd6}
|
|
|
|
%{fillup_only -ans syslog dhcpd}
|
2014-02-10 19:14:12 +01:00
|
|
|
%endif
|
|
|
|
# FIXME: update?
|
2010-05-14 00:27:05 +02:00
|
|
|
if [ ${FIRST_ARG:-0} -gt 1 ]; then
|
|
|
|
if grep -q '^DHCPD_RUN_AS=.*nobody' etc/sysconfig/dhcpd; then
|
2007-01-10 17:39:58 +01:00
|
|
|
tmpfile=$(mktemp -q etc/sysconfig/dhcpd.XXXXXX)
|
2010-05-14 00:27:05 +02:00
|
|
|
sed 's|^DHCPD_RUN_AS=.*|DHCPD_RUN_AS="dhcpd"|' etc/sysconfig/dhcpd \
|
2007-01-10 17:39:58 +01:00
|
|
|
> $tmpfile && mv $tmpfile etc/sysconfig/dhcpd
|
|
|
|
rm -f $tmpfile
|
2010-05-14 00:27:05 +02:00
|
|
|
fi
|
|
|
|
if grep -q '^DHCPD_BINARY=.*dhcpd\..*' etc/sysconfig/dhcpd; then
|
|
|
|
tmpfile=$(mktemp -q etc/sysconfig/dhcpd.XXXXXX)
|
|
|
|
sed 's|^DHCPD_BINARY=.*|DHCPD_BINARY=""|' etc/sysconfig/dhcpd \
|
|
|
|
> $tmpfile && mv $tmpfile etc/sysconfig/dhcpd
|
|
|
|
rm -f $tmpfile
|
|
|
|
fi
|
2007-01-10 17:39:58 +01:00
|
|
|
fi
|
|
|
|
|
2010-05-14 00:27:05 +02:00
|
|
|
%preun server
|
2014-02-10 19:14:12 +01:00
|
|
|
%if %{with systemd}
|
|
|
|
%service_del_preun dhcpd.service
|
|
|
|
%service_del_preun dhcpd6.service
|
|
|
|
%else
|
|
|
|
if test -x /etc/init.d/dhcpd ; then
|
|
|
|
%stop_on_removal dhcpd
|
|
|
|
fi
|
|
|
|
if test -x /etc/init.d/dhcpd6 ; then
|
|
|
|
%stop_on_removal dhcpd6
|
|
|
|
fi
|
|
|
|
%endif
|
2010-05-14 00:27:05 +02:00
|
|
|
|
2007-01-10 17:39:58 +01:00
|
|
|
%postun server
|
2014-02-10 19:14:12 +01:00
|
|
|
%if %{with systemd}
|
|
|
|
%service_del_postun dhcpd.service
|
|
|
|
%service_del_postun dhcpd6.service
|
|
|
|
%else
|
|
|
|
if test -x /etc/init.d/dhcpd ; then
|
|
|
|
%restart_on_update dhcpd
|
|
|
|
fi
|
|
|
|
if test -x /etc/init.d/dhcpd6 ; then
|
|
|
|
%restart_on_update dhcpd6
|
|
|
|
fi
|
2007-01-10 17:39:58 +01:00
|
|
|
%insserv_cleanup
|
2014-02-10 19:14:12 +01:00
|
|
|
%endif
|
2007-01-10 17:39:58 +01:00
|
|
|
|
2010-05-14 00:26:56 +02:00
|
|
|
%post relay
|
2014-02-10 19:14:12 +01:00
|
|
|
#
|
2010-11-30 22:53:03 +01:00
|
|
|
%{rename_sysconfig_variable -f etc/sysconfig/dhcrelay
|
|
|
|
DHCRELAY6_LOWER_INTERFACES_ARGS DHCRELAY6_LOWER_INTERFACES}
|
|
|
|
%{rename_sysconfig_variable -f etc/sysconfig/dhcrelay
|
|
|
|
DHCRELAY6_UPPER_INTERFACES_ARGS DHCRELAY6_UPPER_INTERFACES}
|
2014-02-10 19:14:12 +01:00
|
|
|
#
|
|
|
|
%if %{with systemd}
|
|
|
|
%{fillup_only -n dhcrelay dhcrelay}
|
|
|
|
%service_add_post dhcrelay.service
|
|
|
|
%service_add_post dhcrelay6.service
|
|
|
|
%else
|
2010-05-14 00:27:05 +02:00
|
|
|
%{fillup_and_insserv -n dhcrelay dhcrelay dhcrelay6}
|
2014-02-10 19:14:12 +01:00
|
|
|
%endif
|
2010-05-14 00:27:05 +02:00
|
|
|
|
|
|
|
%preun relay
|
2014-02-10 19:14:12 +01:00
|
|
|
%if %{with systemd}
|
|
|
|
%service_del_preun dhcrelay.service
|
|
|
|
%service_del_preun dhcrelay6.service
|
|
|
|
%else
|
|
|
|
if test -x /etc/init.d/dhcrelay ; then
|
|
|
|
%stop_on_removal dhcrelay
|
|
|
|
fi
|
|
|
|
if test -x /etc/init.d/dhcrelay6 ; then
|
|
|
|
%stop_on_removal dhcrelay6
|
|
|
|
fi
|
|
|
|
%endif
|
2007-01-10 17:39:58 +01:00
|
|
|
|
|
|
|
%postun relay
|
2014-02-10 19:14:12 +01:00
|
|
|
%if %{with systemd}
|
|
|
|
%service_del_postun dhcrelay.service
|
|
|
|
%service_del_postun dhcrelay6.service
|
|
|
|
%else
|
|
|
|
if test -x /etc/init.d/dhcrelay ; then
|
|
|
|
%restart_on_update dhcrelay
|
|
|
|
fi
|
|
|
|
if test -x /etc/init.d/dhcrelay6 ; then
|
|
|
|
%restart_on_update dhcrelay6
|
|
|
|
fi
|
2007-01-10 17:39:58 +01:00
|
|
|
%insserv_cleanup
|
2014-02-10 19:14:12 +01:00
|
|
|
%endif
|
2007-01-10 17:39:58 +01:00
|
|
|
|
2010-04-30 01:02:03 +02:00
|
|
|
%post client
|
2010-05-14 00:27:05 +02:00
|
|
|
test -e %{_localstatedir}/lib/dhcp/dhclient.leases || \
|
|
|
|
touch %{_localstatedir}/lib/dhcp/dhclient.leases
|
|
|
|
test -e %{_localstatedir}/lib/dhcp6/dhclient6.leases || \
|
|
|
|
touch %{_localstatedir}/lib/dhcp6/dhclient6.leases
|
2010-04-30 01:02:03 +02:00
|
|
|
|
2007-01-10 17:39:58 +01:00
|
|
|
%clean
|
|
|
|
if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2010-05-14 00:27:05 +02:00
|
|
|
%config %{susefw2dir}/dhcp-server
|
2013-03-12 16:26:14 +01:00
|
|
|
%config %{susefw2dir}/dhcp6-server
|
2010-05-14 00:27:05 +02:00
|
|
|
%{_bindir}/omshell
|
2007-01-10 17:39:58 +01:00
|
|
|
%doc %{_mandir}/man1/omshell.1.gz
|
|
|
|
%doc %{_mandir}/man5/dhcp-eval.5.gz
|
2010-05-14 00:27:05 +02:00
|
|
|
%doc %{_mandir}/man5/dhcp-options.5.gz
|
|
|
|
|
2007-01-10 17:39:58 +01:00
|
|
|
%files server
|
|
|
|
%defattr(-,root,root)
|
2010-05-14 00:27:05 +02:00
|
|
|
%{_sbindir}/dhcpd
|
|
|
|
%{_sbindir}/dhcpd6
|
|
|
|
%{_sbindir}/rcdhcpd
|
|
|
|
%{_sbindir}/rcdhcpd6
|
2014-02-10 19:14:12 +01:00
|
|
|
%if %{with systemd}
|
|
|
|
%{_unitdir}/dhcpd.service
|
|
|
|
%{_unitdir}/dhcpd6.service
|
2014-03-17 17:40:09 +01:00
|
|
|
%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/*
|
2014-02-10 19:14:12 +01:00
|
|
|
%else
|
2010-05-14 00:27:05 +02:00
|
|
|
%config %{_sysconfdir}/init.d/dhcpd
|
|
|
|
%config %{_sysconfdir}/init.d/dhcpd6
|
2014-02-10 19:14:12 +01:00
|
|
|
%endif
|
2010-05-14 00:27:05 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/dhcpd.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/dhcpd6.conf
|
2011-08-31 11:13:05 +02:00
|
|
|
%attr(755,root,root) %dir %config(noreplace) %ghost %{_sysconfdir}/dhcpd.d/
|
|
|
|
%attr(755,root,root) %dir %config(noreplace) %ghost %{_sysconfdir}/dhcpd6.d/
|
2014-02-10 19:14:12 +01:00
|
|
|
%dir /usr/lib/dhcp
|
|
|
|
/usr/lib/dhcp/dhcpd
|
2010-05-14 00:27:05 +02:00
|
|
|
%dir %{_localstatedir}/lib/dhcp
|
|
|
|
%dir %{_localstatedir}/lib/dhcp/etc
|
|
|
|
%dir %{_localstatedir}/lib/dhcp/dev
|
|
|
|
%dir %{_localstatedir}/lib/dhcp/%_lib
|
|
|
|
%dir %{_localstatedir}/lib/dhcp/var
|
|
|
|
%dir %{_localstatedir}/lib/dhcp/var/run
|
|
|
|
%attr(755,dhcpd,root) %dir %{_localstatedir}/lib/dhcp/db
|
|
|
|
%dir %{_localstatedir}/lib/dhcp6
|
|
|
|
%dir %{_localstatedir}/lib/dhcp6/etc
|
|
|
|
%dir %{_localstatedir}/lib/dhcp6/dev
|
|
|
|
%dir %{_localstatedir}/lib/dhcp6/%_lib
|
|
|
|
%dir %{_localstatedir}/lib/dhcp6/var
|
|
|
|
%dir %{_localstatedir}/lib/dhcp6/var/run
|
|
|
|
%attr(755,dhcpd,root) %dir %{_localstatedir}/lib/dhcp6/db
|
|
|
|
%doc %{_mandir}/man8/dhcpd.8.gz
|
2007-01-10 17:39:58 +01:00
|
|
|
%doc %{_mandir}/man5/dhcpd.conf.5.gz
|
|
|
|
%doc %{_mandir}/man5/dhcpd.leases.5.gz
|
2011-05-10 13:50:05 +02:00
|
|
|
%if %{with_ldap}
|
2010-05-14 00:27:05 +02:00
|
|
|
%dir %{_sysconfdir}/openldap
|
|
|
|
%dir %{_sysconfdir}/openldap/schema
|
|
|
|
%attr(0644, root, root) %config %{_sysconfdir}/openldap/schema/dhcp.schema
|
2007-01-10 17:39:58 +01:00
|
|
|
%endif
|
|
|
|
%{omc_svcdir}/dhcpd.xml
|
2010-05-14 00:27:05 +02:00
|
|
|
%{omc_svcdir}/dhcpd6.xml
|
|
|
|
%{_sysconfdir}/sysconfig/network/scripts/dhcpd-restart-hook
|
|
|
|
%{_sysconfdir}/sysconfig/network/if-up.d/60-dhcpd-restart-hook
|
|
|
|
%{_localstatedir}/adm/fillup-templates/sysconfig.dhcpd
|
|
|
|
%{_localstatedir}/adm/fillup-templates/sysconfig.syslog-dhcpd
|
2011-05-10 13:50:05 +02:00
|
|
|
%if %{with_doc_package}
|
2011-05-16 11:17:24 +02:00
|
|
|
|
2011-05-10 13:50:05 +02:00
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%endif
|
|
|
|
%doc LICENSE README RELNOTES
|
2014-02-10 19:14:12 +01:00
|
|
|
%doc README.* DDNS-howto.txt doc/*
|
2011-05-10 13:50:05 +02:00
|
|
|
%doc contrib examples
|
2007-01-10 17:39:58 +01:00
|
|
|
|
|
|
|
%files client
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/sbin/dhclient
|
2010-05-14 00:27:05 +02:00
|
|
|
/sbin/dhclient6
|
2007-01-10 17:39:58 +01:00
|
|
|
/sbin/dhclient-script
|
2010-05-14 00:27:05 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/dhclient.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/dhclient6.conf
|
2007-01-10 17:39:58 +01:00
|
|
|
%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
|
2010-05-14 00:27:05 +02:00
|
|
|
%dir %{_localstatedir}/lib/dhcp
|
|
|
|
%dir %{_localstatedir}/lib/dhcp6
|
2007-01-10 17:39:58 +01:00
|
|
|
|
|
|
|
%files relay
|
|
|
|
%defattr(-,root,root)
|
2010-05-14 00:27:05 +02:00
|
|
|
%{_sbindir}/dhcrelay
|
|
|
|
%{_sbindir}/dhcrelay6
|
|
|
|
%{_sbindir}/rcdhcrelay
|
|
|
|
%{_sbindir}/rcdhcrelay6
|
2014-02-10 19:14:12 +01:00
|
|
|
%dir /usr/lib/dhcp
|
|
|
|
/usr/lib/dhcp/dhcrelay
|
|
|
|
%if %{with systemd}
|
|
|
|
%{_unitdir}/dhcrelay.service
|
|
|
|
%{_unitdir}/dhcrelay6.service
|
|
|
|
%else
|
2010-05-14 00:27:05 +02:00
|
|
|
%config %{_sysconfdir}/init.d/dhcrelay
|
|
|
|
%config %{_sysconfdir}/init.d/dhcrelay6
|
2014-02-10 19:14:12 +01:00
|
|
|
%endif
|
2007-01-10 17:39:58 +01:00
|
|
|
%doc %{_mandir}/man8/dhcrelay.8.gz
|
2010-05-14 00:27:05 +02:00
|
|
|
%{_localstatedir}/adm/fillup-templates/sysconfig.dhcrelay
|
2007-01-10 17:39:58 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_libdir/lib*
|
|
|
|
%{_prefix}/include/*
|
|
|
|
%doc %{_mandir}/man3/omapi.3.gz
|
|
|
|
%doc %{_mandir}/man3/dhcpctl.3.gz
|
|
|
|
|
2007-02-25 23:22:54 +01:00
|
|
|
%changelog
|