Summary(pl): Serwer DHCP
Summary(pt_BR): Servidor DHCP (Protocolo de configuração dinâmica de hosts)
Name: dhcp
-Version: 3.0.2
-Release: 2.1
+Version: 3.0.4
+Release: 3
Epoch: 3
-Vendor: ISC
License: distributable
Group: Networking/Daemons
Source0: ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz
-# Source0-md5: 04800a111521e7442749b2ce883f962b
+# Source0-md5: 004ef935fd54b8046b16bdde31a9e151
Source1: %{name}.init
Source2: %{name}-relay.init
Source3: %{name}-relay.sysconfig
Patch0: %{name}-if_buffer_size.patch
Patch1: %{name}-ldap.patch
Patch2: %{name}-ldap1.patch
-Patch3: %{name}-gcc343-fix.patch
+Patch3: %{name}-client-script-redhat.patch
+Patch4: %{name}-dhcpd_lease_time.patch
+Patch5: %{name}-3.0.3-x-option.patch
URL: http://www.isc.org/sw/dhcp/
BuildRequires: groff
%{?with_ldap:BuildRequires: openldap-devel}
-PreReq: rc-scripts >= 0.2.0
-Requires(post,preun): /sbin/chkconfig
+BuildRequires: rpmbuild(macros) >= 1.268
Requires(post): fileutils
+Requires(post,preun): /sbin/chkconfig
+Requires: rc-scripts >= 0.2.0
Provides: dhcpd
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Summary(pl): Klient DHCP
Group: Networking/Daemons
Requires(post): fileutils
-Obsoletes: pump
Obsoletes: dhclient
+Obsoletes: pump
%description client
Dynamic Host Configuration Protocol Client.
Summary: DHCP Relay Agent
Summary(pl): Agent przekazywania informacji DHCP
Group: Networking/Daemons
-PreReq: rc-scripts >= 0.2.0
-Requires(post,preun): /sbin/chkconfig
Requires(post): fileutils
+Requires(post,preun): /sbin/chkconfig
+Requires: rc-scripts >= 0.2.0
%description relay
Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
%{?with_ldap:%patch1 -p1}
%{?with_ldap:%patch2 -p1}
%patch3 -p1
+%patch4 -p1
+%patch5 -p1
cd doc
echo "dhcpd complies with the following RFCs:" > rfc-compliance
./configure
%{__make} \
- COPTS="%{rpmcflags} \
+ CC="%{__cc}" \
+ CC_OPTIONS="%{rpmcflags} \
-D_PATH_DHCPD_DB=\\\"/var/lib/%{name}/dhcpd.leases\\\" \
- -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\" \
- -DUSE_SOCKET_FALLBACK" \
- DEBUG="" VARDB="/var/lib/%{name}"
+ -DEXTENDED_NEW_OPTION_INFO \
+ -D_PATH_DHCLIENT_DB=\\\"/var/lib/%{name}/dhclient.leases\\\" " \
+ LFLAGS="%{rpmldflags}" \
+ DEBUG="" \
+ VARDB="/var/lib/%{name}"
%install
rm -rf $RPM_BUILD_ROOT
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcpd
install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp-relay
install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/dhcpd.conf
+install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/dhcpd.conf
install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
mv $RPM_BUILD_ROOT%{_mandir}/man3/omshell.3 \
%post
/sbin/chkconfig --add dhcpd
touch /var/lib/%{name}/dhcpd.leases
-
if [ ! -d /var/lib/dhcp ]; then
install -d /var/lib/dhcp
fi
-
-if [ -f /var/lock/subsys/dhcpd ]; then
- /etc/rc.d/init.d/dhcpd restart >&2
-else
- echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
-fi
+%service dhcpd restart "dhcpd daemon"
%preun
if [ "$1" = "0" ];then
- if [ -f /var/lock/subsys/dhcpd ]; then
- /etc/rc.d/init.d/dhcpd stop >&2
- fi
+ %service dhcpd stop
/sbin/chkconfig --del dhcpd
fi
%post client
-if [ -d /var/lib/dhcp ]; then
+if [ ! -d /var/lib/dhcp ]; then
install -d /var/lib/dhcp
fi
%post relay
/sbin/chkconfig --add dhcp-relay
if [ -f /var/lock/subsys/dhcrelay ]; then
- mv -f /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
-fi
-if [ -f /var/lock/subsys/dhcp-relay ]; then
- /etc/rc.d/init.d/dhcp-relay restart >&2
-else
- echo "Run \"/etc/rc.d/init.d/dhcp-relay start\" to start dhcrelay daemon."
+ mv -f /var/lock/subsys/{dhcrelay,dhcp-relay}
fi
+%service dhcp-relay restart "dhcrelay daemon"
%preun relay
if [ "$1" = "0" ];then
- if [ -f /var/lock/subsys/dhcp-relay ]; then
- /etc/rc.d/init.d/dhcp-relay stop >&2
- fi
+ %service dhcp-relay stop
/sbin/chkconfig --del dhcp-relay
fi
%triggerpostun -- dhcp < 3.0
-if [ `grep ddns-update-style /etc/dhcpd.conf` = "" ]; then
+if [ "`grep ddns-update-style /etc/dhcpd.conf`" = "" ]; then
umask 027
echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
echo "" >> /etc/dhcpd.conf.tmp
%{_mandir}/man1/*
%{_mandir}/man5/dhcp*
%{_mandir}/man8/dhcp*
-%config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcpd
-%config(noreplace) %verify(not size mtime md5) /etc/dhcpd.conf
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcpd
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd.conf
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_sbindir}/dhcpd
%attr(754,root,root) /etc/rc.d/init.d/dhcpd
%files relay
%defattr(644,root,root,755)
%{_mandir}/man8/dhcrelay*
-%config(noreplace) %verify(not size mtime md5) /etc/sysconfig/dhcp-relay
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcp-relay
%attr(755,root,root) %{_sbindir}/dhcrelay
%attr(754,root,root) /etc/rc.d/init.d/dhcp-relay