X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=dhcp.spec;h=6bea925359a17e09be3fc816fb353b49c3268e3d;hb=a5aaaa8f2a216f3ecee313322ebfcba4e604dd1c;hp=0f02a6d434870c021d7c175fd5e47b687f71e892;hpb=c6618b277986e86620a3752092c4b087c0cfb032;p=packages%2Fdhcp.git diff --git a/dhcp.spec b/dhcp.spec index 0f02a6d..6bea925 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -12,13 +12,13 @@ Summary(pl.UTF-8): Serwer DHCP Summary(pt_BR.UTF-8): Servidor DHCP (Protocolo de configuração dinâmica de hosts) Name: dhcp # 4.1.0a1 is on DEVEL -Version: 4.0.0 -Release: 6 +Version: 4.0.2 +Release: 3 Epoch: 4 License: MIT Group: Networking/Daemons Source0: ftp://ftp.isc.org/isc/dhcp/%{name}-%{version}.tar.gz -# Source0-md5: 31d79b27ce4a94089a0b9ce7f72307fa +# Source0-md5: f8d35ade3727429b1ab74c26058bd6b1 Source1: %{name}.init Source2: %{name}6.init Source3: %{name}-relay.init @@ -34,11 +34,10 @@ Source12: draft-ietf-dhc-ldap-schema-01.txt Source13: dhcpd-conf-to-ldap Source14: dhcp-dhclient-script Patch0: %{name}-release-by-ifup.patch -# from fedora 9-dev +# http://github.com/dcantrell/ldap-for-dhcp/raw/9cfd4c277d7615777f372ea08f44cc7de9ed7959/dhcp-4.0.1-ldap.patch Patch1: %{name}-ldap.patch Patch2: %{name}-3.0.3-x-option.patch Patch3: %{name}-paths.patch -Patch4: %{name}-arg-concat.patch Patch5: %{name}-timeouts.patch Patch6: %{name}-options.patch Patch7: %{name}-libdhcp4client.patch @@ -55,7 +54,6 @@ Patch17: %{name}-xen-checksum.patch Patch18: %{name}-dhclient-anycast.patch Patch19: %{name}-manpages.patch Patch20: %{name}-NetworkManager-crash.patch -Patch21: %{name}-no-ipv6.patch URL: http://www.isc.org/sw/dhcp/ BuildRequires: autoconf BuildRequires: automake @@ -123,6 +121,7 @@ Group: Networking/Daemons Requires: coreutils Requires: iproute2 Requires: net-tools +Suggests: avahi-autoipd Obsoletes: dhclient %description client @@ -216,7 +215,7 @@ Statyczna biblioteka kliencka DHCP. %prep %setup -q %patch0 -p1 -%{?with_ldap:%patch1 -p1} +%patch1 -p1 # This patch is required for dhcdbd to function # CHECK ME: adds -x (formerly -y): #The -x argument enables extended option information to be created in the @@ -226,7 +225,6 @@ Statyczna biblioteka kliencka DHCP. # however, fedora doesn't have this patch anymore, so can drop? #%%patch2 -p1 %patch3 -p1 -%patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 @@ -243,7 +241,6 @@ Statyczna biblioteka kliencka DHCP. %patch18 -p1 %patch19 -p1 %patch20 -p1 -%patch21 -p1 # Copy in documentation and example scripts for LDAP patch to dhcpd cp -a %{SOURCE11} README.ldap @@ -289,16 +286,17 @@ CFLAGS="%{rpmcflags} -fPIC -D_GNU_SOURCE=1" %configure \ %{!?with_static_libs:--disable-static} \ --enable-dhcpv6 \ - --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \ - --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \ - --with-srv-pid-file=/var/run/dhcpd.pid \ - --with-cli-pid-file=/var/run/dhclient.pid \ - --with-relay-pid-file=/var/run/dhcrelay.pid + --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \ + --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \ + --with-srv-pid-file=/var/run/dhcpd.pid \ + --with-cli-pid-file=/var/run/dhclient.pid \ + --with-relay-pid-file=/var/run/dhcrelay.pid \ + --with%{!?with_ldap:out}-ldap %{__make} %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},%{_pkgconfigdir},/var/lib/{dhcpd,dhclient}} +install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,dhclient-enter-hooks.d,dhclient-exit-hooks.d},%{_pkgconfigdir},/var/lib/{dhcpd,dhclient}} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT @@ -311,6 +309,7 @@ install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/dhcp-relay install %{SOURCE14} $RPM_BUILD_ROOT/sbin/dhclient-script install server/dhcpd.conf $RPM_BUILD_ROOT%{_sysconfdir} +:> $RPM_BUILD_ROOT%{_sysconfdir}/dhcpd6.conf %if %{with ldap} install -d $RPM_BUILD_ROOT%{schemadir} @@ -406,14 +405,24 @@ if [ "$1" = "0" ];then /sbin/chkconfig --del dhcp-relay fi +%triggerun client -- %{name}-client < 4:4.0.2-2 +if [ -f /etc/dhclient-enter-hooks ] ; then + mv /etc/dhclient-enter-hooks /etc/dhclient-enter-hooks.d/ +fi +if [ -f /etc/dhclient-exit-hooks ] ; then + mv /etc/dhclient-exit-hooks /etc/dhclient-exit-hooks.d/ +fi + %post -n libdhcp4client -p /sbin/ldconfig %postun -n libdhcp4client -p /sbin/ldconfig %files %defattr(644,root,root,755) -%doc doc/* README RELNOTES server/dhcpd.conf LICENSE contrib/ms2isc +%doc doc/* README RELNOTES server/dhcpd.conf LICENSE +%doc contrib/ms2isc %{?with_ldap:contrib/dhcpd-conf-to-ldap README.ldap} %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcpd %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd.conf +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcpd6.conf %attr(755,root,root) %{_bindir}/omshell %attr(755,root,root) %{_sbindir}/dhcpd %attr(754,root,root) /etc/rc.d/init.d/dhcpd @@ -432,6 +441,8 @@ fi %defattr(644,root,root,755) %doc contrib/sethostname.sh client/dhclient.conf %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhclient.conf +%{_sysconfdir}/dhclient-enter-hooks.d +%{_sysconfdir}/dhclient-exit-hooks.d %attr(755,root,root) /sbin/dhclient %attr(755,root,root) /sbin/dhclient-script %{_mandir}/man5/dhclient.conf.5*