Browse Source

dhcp-4.1.ESV.R9-2

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@8593 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 9 years ago
parent
commit
e93ec8b6fb
1 changed files with 53 additions and 12 deletions
  1. 53 12
      d/dhcp/dhcp-vl.spec

+ 53 - 12
d/dhcp/dhcp-vl.spec

@@ -1,8 +1,8 @@
 # vendor string (e.g., Fedora, EL)
 %define vvendor Vine
 
-%define pversion 4.1.ESV.R6
-%define sversion 4.1-ESV-R6
+%define pversion 4.1.ESV.R9
+%define sversion 4.1-ESV-R9
 
 Summary:  DHCP (Dynamic Host Configuration Protocol) server and relay agent
 Summary(ja): DHCP (動的ホスト設定プロトコル) サーバおよびリレーエージェント
@@ -29,10 +29,11 @@ Source5:  README.ldap
 Source6:  draft-ietf-dhc-ldap-schema-01.txt
 Source7:  dhcpd-conf-to-ldap
 Source8:  dhclient-script
-Source9: dhcp.schema
+Source9:  dhcp.schema
 Source10: get-ldap-patch.sh
+Source11: dhcpd6.init
 
-Patch0:   %{name}-4.1.0-errwarn-message.patch
+Patch0:   %{name}-4.1-ESV-R9-errwarn-message.patch
 Patch1:   %{name}-4.1-ESV-R3-ldap-configuration.patch
 Patch3:   %{name}-4.1-ESV-R3-options.patch
 Patch4:   %{name}-4.1.0-release-by-ifup.patch
@@ -41,7 +42,7 @@ Patch6:   %{name}-4.1.0-unicast-bootp.patch
 Patch7:   %{name}-4.1.0-failover-ports.patch
 Patch8:   %{name}-4.1-ESV-R3-dhclient-usage.patch
 Patch9:   %{name}-4.1.0-default-requested-options.patch
-Patch10:  %{name}-4.1-ESV-R3-xen-checksum.patch
+Patch10:  %{name}-4.1-ESV-R9-xen-checksum.patch
 Patch11:  %{name}-4.1-ESV-R3-dhclient-anycast.patch
 Patch12:  %{name}-4.1.0-manpages.patch
 Patch13:  %{name}-4.1.0-paths.patch
@@ -232,12 +233,17 @@ automake --foreign --add-missing --copy
 %build
 CFLAGS="%{optflags} -fPIC" \
 %configure \
-    --disable-dhcpv6 \
+    --enable-dhcpv6 \
     --with-srv-lease-file=%{_localstatedir}/lib/dhcpd/dhcpd.leases \
+    --with-srv6-lease-file=%{_localstatedir}/lib/dhcpd/dhcpd6.leases \
     --with-cli-lease-file=%{_localstatedir}/lib/dhclient/dhclient.leases \
+    --with-cli6-lease-file=%{_localstatedir}/lib/dhclient/dhclient6.leases \
     --with-srv-pid-file=%{_localstatedir}/run/dhcpd.pid \
+    --with-srv6-pid-file=%{_localstatedir}/run/dhcpd6.pid \
     --with-cli-pid-file=%{_localstatedir}/run/dhclient.pid \
-    --with-relay-pid-file=%{_localstatedir}/run/dhcrelay.pid
+    --with-cli6-pid-file=%{_localstatedir}/run/dhclient6.pid \
+    --with-relay-pid-file=%{_localstatedir}/run/dhcrelay.pid \
+    --enable-paranoia
 %{__make} %{?_smp_mflags}
 
 %install
@@ -245,8 +251,8 @@ CFLAGS="%{optflags} -fPIC" \
 %{__make} install DESTDIR=%{buildroot}
 
 # Remove files we don't want
-%{__rm} %{buildroot}%{_sysconfdir}/dhclient.conf
-%{__rm} %{buildroot}%{_sysconfdir}/dhcpd.conf
+%{__rm} -f %{buildroot}%{_sysconfdir}/dhclient.conf*
+%{__rm} -f %{buildroot}%{_sysconfdir}/dhcpd.conf*
 
 # Install correct dhclient-script
 %{__mkdir} -p %{buildroot}/sbin
@@ -256,11 +262,13 @@ CFLAGS="%{optflags} -fPIC" \
 # Install init scripts
 %{__mkdir} -p %{buildroot}%{_initrddir}
 %{__install} -p -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/dhcpd
+%{__install} -p -m 0755 %{SOURCE11} %{buildroot}%{_initrddir}/dhcpd6
 %{__install} -p -m 0755 %{SOURCE2} %{buildroot}%{_initrddir}/dhcrelay
 
 # Start empty lease databases
 %{__mkdir} -p %{buildroot}%{_localstatedir}/lib/dhcpd/
 touch %{buildroot}%{_localstatedir}/lib/dhcpd/dhcpd.leases
+touch %{buildroot}%{_localstatedir}/lib/dhcpd/dhcpd6.leases
 %{__mkdir} -p %{buildroot}%{_localstatedir}/lib/dhclient/
 
 # Create default sysconfig files for dhcpd and dhcrelay
@@ -277,9 +285,16 @@ EOF
 DHCPDARGS=
 EOF
 
+%{__cat} <<EOF > %{buildroot}%{_sysconfdir}/sysconfig/dhcpd6
+# Command line options here
+DHCPDARGS=
+EOF
+
 # Copy sample conf files into position (called by doc macro)
-%{__cp} -p client/dhclient.conf dhclient.conf.sample
-%{__cp} -p server/dhcpd.conf dhcpd.conf.sample
+%{__cp} -p client/dhclient.conf.example dhclient.conf.sample
+%{__cp} -p server/dhcpd.conf.example dhcpd.conf.sample
+%{__cp} -p doc/examples/dhclient-dhcpv6.conf dhclient6.conf.sample
+%{__cp} -p doc/examples/dhcpd-dhcpv6.conf dhcpd6.conf.sample
 
 # Install default (empty) dhcpd.conf:
 %{__mkdir} -p %{buildroot}%{_sysconfdir}/dhcp
@@ -291,6 +306,16 @@ EOF
 #
 EOF
 
+# Install default (empty) dhcpd6.conf:
+%{__cat} << EOF > %{buildroot}%{_sysconfdir}/dhcp/dhcpd6.conf
+#
+# DHCP for IPv6 Server Configuration file.
+#   see /usr/share/doc/dhcp*/dhcpd6.conf.sample
+#   see 'man 5 dhcpd.conf'
+#   run 'service dhcpd6 start' or 'dhcpd -6 -cf /etc/dhcp/dhcpd6.conf'
+#
+EOF
+
 # Install dhcp.schema for LDAP configuration
 %{__mkdir} -p %{buildroot}%{_sysconfdir}/openldap/schema
 %{__install} -p -m 0644 -D %{SOURCE9} %{buildroot}%{_sysconfdir}/openldap/schema
@@ -311,6 +336,7 @@ if [ -f /etc/dhcpd.conf -a ! -f /etc/dhcp/dhcpd.conf ]; then
 fi
 	
 /sbin/chkconfig --add dhcpd
+/sbin/chkconfig --add dhcpd6
 /sbin/chkconfig --add dhcrelay || :
 
 %post -n dhclient
@@ -332,33 +358,44 @@ if [ $1 = 0 ]; then
         /sbin/service dhcpd stop >/dev/null 2>&1
     fi
 
+    /sbin/service dhcpd6 status >/dev/null 2>&1
+    if [ $? = 3 ]; then
+        /sbin/service dhcpd6 stop >/dev/null 2>&1
+    fi
+
     /sbin/service dhcrelay status >/dev/null 2>&1
     if [ $? = 3 ]; then
         /sbin/service dhcrelay stop >/dev/null 2>&1
     fi
 
     /sbin/chkconfig --del dhcpd
+    /sbin/chkconfig --del dhcpd6
     /sbin/chkconfig --del dhcrelay || :
 fi
 
 %postun
 if [ $1 -ge 1 ]; then
     /sbin/service dhcpd condrestart >/dev/null 2>&1
+    /sbin/service dhcpd6 condrestart >/dev/null 2>&1
     /sbin/service dhcrelay condrestart >/dev/null 2>&1 || :
 fi
 
 %files
 %defattr(-,root,root,-)
-%doc LICENSE README README.ldap RELNOTES dhcpd.conf.sample
+%doc LICENSE README README.ldap RELNOTES dhcpd*.conf.sample
 %doc doc/IANA-arp-parameters doc/api+protocol doc/*.txt __fedora_contrib/*
 %dir %{_localstatedir}/lib/dhcpd
 %dir %{_sysconfdir}/dhcp
 %verify(not size md5 mtime) %config(noreplace) %{_localstatedir}/lib/dhcpd/dhcpd.leases
+%verify(not size md5 mtime) %config(noreplace) %{_localstatedir}/lib/dhcpd/dhcpd6.leases
 %config(noreplace) %{_sysconfdir}/sysconfig/dhcpd
+%config(noreplace) %{_sysconfdir}/sysconfig/dhcpd6
 %config(noreplace) %{_sysconfdir}/sysconfig/dhcrelay
 %config(noreplace) %{_sysconfdir}/dhcp/dhcpd.conf
+%config(noreplace) %{_sysconfdir}/dhcp/dhcpd6.conf
 %config(noreplace) %{_sysconfdir}/openldap/schema/dhcp.schema
 %{_initrddir}/dhcpd
+%{_initrddir}/dhcpd6
 %{_initrddir}/dhcrelay
 %{_bindir}/omshell
 %{_sbindir}/dhcpd
@@ -398,6 +435,10 @@ fi
 %attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
 
 %changelog
+* Sat Jun 21 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.1.ESV.R9-1
+- new upstream release.
+- re-enabled dhcpv6.
+
 * Tue Dec 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.1.ESV.R6-2
 - rebuild with VineSeed environment
 - add Patch1000 (dhcp-4.1-ESV-R6-openssl.patch)