[arch-commits] Commit in dhcp/repos (7 files)

Kevin Piché kevin at archlinux.org
Wed Sep 9 03:50:50 UTC 2009


    Date: Tuesday, September 8, 2009 @ 23:50:49
  Author: kevin
Revision: 51491

Merged revisions 46753,46924,51490 via svnmerge from 
svn+ssh://gerolde.archlinux.org/srv/svn-packages/dhcp/trunk

........
  r46753 | kevin | 2009-07-19 23:16:29 -0400 (Sun, 19 Jul 2009) | 2 lines
  
  upgpkg: dhcp 4.1.0.p1-1
      Updated to 4.1.0p1 and fixed FS#12792
........
  r46924 | kevin | 2009-07-21 22:31:52 -0400 (Tue, 21 Jul 2009) | 2 lines
  
  Added missing file.
........
  r51490 | kevin | 2009-09-08 23:50:29 -0400 (Tue, 08 Sep 2009) | 2 lines
  
  upgpkg: dhcp 4.1.0.p1-1
      Updated version and added no ipv6 patch for x86_64
........

Added:
  dhcp/repos/extra-x86_64/ChangeLog
    (from rev 51490, dhcp/trunk/ChangeLog)
  dhcp/repos/extra-x86_64/dhcp-4.1.0-missing-ipv6-not-fatal.patch
    (from rev 51490, dhcp/trunk/dhcp-4.1.0-missing-ipv6-not-fatal.patch)
  dhcp/repos/extra-x86_64/dhcp.conf.d
    (from rev 51490, dhcp/trunk/dhcp.conf.d)
Modified:
  dhcp/repos/extra-x86_64/	(properties)
  dhcp/repos/extra-x86_64/PKGBUILD
  dhcp/repos/extra-x86_64/dhcpd
Deleted:
  dhcp/repos/extra-x86_64/dhcp-3.0.3-tr.c.patch

-----------------------------------------+
 ChangeLog                               |    8 ++++
 PKGBUILD                                |   37 +++++++++-----------
 dhcp-3.0.3-tr.c.patch                   |   10 -----
 dhcp-4.1.0-missing-ipv6-not-fatal.patch |   54 ++++++++++++++++++++++++++++++
 dhcp.conf.d                             |    6 +++
 dhcpd                                   |    3 +
 6 files changed, 87 insertions(+), 31 deletions(-)


Property changes on: dhcp/repos/extra-x86_64
___________________________________________________________________
Modified: svnmerge-integrated
   - /dhcp/trunk:1-23180
   + /dhcp/trunk:1-51490

Copied: dhcp/repos/extra-x86_64/ChangeLog (from rev 51490, dhcp/trunk/ChangeLog)
===================================================================
--- extra-x86_64/ChangeLog	                        (rev 0)
+++ extra-x86_64/ChangeLog	2009-09-09 03:50:49 UTC (rev 51491)
@@ -0,0 +1,8 @@
+
+2009-07-19  K. Piche  <kevin at archlinux.org>
+	* dhcp 4.1.0.p1-1
+	* Adopted RedHat patch to fix bug where dhcpd won't start if ipv6 module
+	  is not loaded.  Fixes FS#12792.
+	* Added /etc/conf.d/dhcp feature contributed by Fabiano Furtado Pessoa
+	  Coelho <fusca14 at gmail.com>	
+

Modified: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2009-09-09 03:50:29 UTC (rev 51490)
+++ extra-x86_64/PKGBUILD	2009-09-09 03:50:49 UTC (rev 51491)
@@ -1,46 +1,43 @@
 # $Id$
 # Maintainer: judd <jvinet at zeroflux.org>
 pkgname=dhcp
-pkgver=4.1.0
+# separate patch levels with a period to maintain proper versioning.
+pkgver=4.1.0.p1
+_pkgver=4.1.0p1
 pkgrel=1
 pkgdesc="A DHCP server, client, and relay agent"
-arch=(i686 x86_64)
+arch=('i686' 'x86_64')
 license=('custom:isc-dhcp')
-url="http://www.isc.org/sw/dhcp/"
+url="https://www.isc.org/software/dhcp"
 depends=('openssl>=0.9.8a')
-backup=('etc/dhcpd.conf' 'etc/dhclient.conf')
+backup=('etc/dhcpd.conf' 'etc/conf.d/dhcp')
 install=dhcp.install
-source=(http://ftp.isc.org/isc/dhcp/dhcp-${pkgver}.tar.gz dhcp-3.0.3-tr.c.patch
-dhcpd)
-md5sums=('1fffed2e8c3d67b111316d6a9b33db7a' '39866416303b674df08b66b2d094e523'
-         '025b8fe98b6c0814428b671b1819a810')
+source=(http://ftp.isc.org/isc/${pkgname}/${pkgname}-${_pkgver}.tar.gz
+dhcpd dhcp.conf.d dhcp-4.1.0-missing-ipv6-not-fatal.patch)
+md5sums=('325ff8338c5a21f89d5304ac13ffebdf' 'df22cffa7d7415ece7bb025b7bf774dd'
+         '49da3192e5c885e3c7d02f447c2dea5e' '463fe58e8ba594b1946d77f685f9f5f5')
 
 build() {
-  cd ${srcdir}/${pkgname}-${pkgver}
-  patch -p1 -i ../dhcp-3.0.3-tr.c.patch || return 1
+  cd ${srcdir}/${pkgname}-${_pkgver}
   # Define _GNU_SOURCE to fix IPV6.
   sed '/^CFLAGS="$CFLAGS/ s/INGS"/INGS -D_GNU_SOURCE"/' -i configure
+  # Make not having ipv6 non-fatal.
+  patch -Np0 -i ${srcdir}/dhcp-4.1.0-missing-ipv6-not-fatal.patch
   ./configure --prefix=/usr --sysconfdir=/etc \
       --with-srv-lease-file=/var/state/dhcp/dhcpd.leases \
       --with-srv6-lease-file=/var/state/dhcp/dhcpd6.leases
   make || return 1
   make DESTDIR=${pkgdir} install
 
-  #install -D -m644 server/dhcpd.conf ${pkgdir}/etc/dhcpd.conf
-  #install -D -m644 client/dhclient.conf ${pkgdir}/etc/dhclient.conf
   install -D -m755 ${srcdir}/dhcpd ${pkgdir}/etc/rc.d/dhcpd
+  install -D -m644 ${srcdir}/dhcp.conf.d ${pkgdir}/etc/conf.d/${pkgname}
   mkdir -p ${pkgdir}/var/state/dhcp
-  #touch ${pkgdir}/var/state/dhcp/dhcpd.leases
-  #chmod -R 644 ${pkgdir}/usr/share/man/*
-  #chmod 755 ${pkgdir}/usr/share/man/man{1,3,5,8}
-  #sed -i 's|etc/dhclient-script|sbin/dhclient-script|g' \
-  #${pkgdir}/etc/dhclient.conf
-  #rm -f ${pkgdir}/var/state/dhcp/dhcpd.leases
-  #rm -f ${pkgdir}/sbin/{dhclient,dhclient-script}
   rm -f ${pkgdir}/etc/dhclient.conf
   rm -f ${pkgdir}/usr/sbin/dhclient
   rm -f ${pkgdir}/usr/share/man/man{5,8}/dhclient*
   # install licenses
-  install -m644 -D ${srcdir}/${pkgname}-${pkgver}/LICENSE \
+  install -m644 -D ${srcdir}/${pkgname}-${_pkgver}/LICENSE \
                    ${pkgdir}/usr/share/licenses/dhcp/LICENSE
 }
+md5sums=('325ff8338c5a21f89d5304ac13ffebdf' 'df22cffa7d7415ece7bb025b7bf774dd'
+         '49da3192e5c885e3c7d02f447c2dea5e' 'edf327eabb82e54b1e9d80b2750134ed')

Deleted: extra-x86_64/dhcp-3.0.3-tr.c.patch
===================================================================
--- extra-x86_64/dhcp-3.0.3-tr.c.patch	2009-09-09 03:50:29 UTC (rev 51490)
+++ extra-x86_64/dhcp-3.0.3-tr.c.patch	2009-09-09 03:50:49 UTC (rev 51491)
@@ -1,10 +0,0 @@
---- work.linux-2.2/common/tr.c	2005/08/14 11:34:24	1.1
-+++ work.linux-2.2/common/tr.c	2005/08/14 11:35:16
-@@ -40,6 +40,7 @@ static char copyright[] =
- #include "includes/netinet/if_ether.h"
- #include "netinet/if_tr.h"
- #include <sys/time.h>
-+#include <linux/types.h>
- 
- /*
-  * token ring device handling subroutines.  These are required as token-ring

Copied: dhcp/repos/extra-x86_64/dhcp-4.1.0-missing-ipv6-not-fatal.patch (from rev 51490, dhcp/trunk/dhcp-4.1.0-missing-ipv6-not-fatal.patch)
===================================================================
--- extra-x86_64/dhcp-4.1.0-missing-ipv6-not-fatal.patch	                        (rev 0)
+++ extra-x86_64/dhcp-4.1.0-missing-ipv6-not-fatal.patch	2009-09-09 03:50:49 UTC (rev 51491)
@@ -0,0 +1,54 @@
+Based on patch from redhat:  http://cvs.fedoraproject.org/viewvc/devel/dhcp/dhcp-4.1.0-missing-ipv6-not-fatal.patch?revision=1.2
+
+--- common/discover.c.orig	2008-08-29 13:48:57.000000000 -0400
++++ common/discover.c	2009-09-08 23:32:45.000000000 -0400
+@@ -443,16 +443,20 @@
+ 	}
+ 
+ #ifdef DHCPv6
+-	ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
+-	if (ifaces->fp6 == NULL) {
+-		log_error("Error opening '/proc/net/if_inet6' to "
+-			  "list IPv6 interfaces; %m");
+-		close(ifaces->sock);
+-		ifaces->sock = -1;
+-		fclose(ifaces->fp);
+-		ifaces->fp = NULL;
+-		return 0;
+-	}
++ 	if (!access("/proc/net/if_inet6", R_OK)) {
++		ifaces->fp6 = fopen("/proc/net/if_inet6", "r");
++		if (ifaces->fp6 == NULL) {
++			log_error("Error opening '/proc/net/if_inet6' to "
++				  "list IPv6 interfaces; %m");
++			close(ifaces->sock);
++			ifaces->sock = -1;
++			fclose(ifaces->fp);
++			ifaces->fp = NULL;
++			return 0;
++		}
++ 	} else {
++ 		ifaces->fp6 = NULL;
++  	}
+ #endif
+ 
+ 	return 1;
+@@ -719,7 +723,7 @@
+ 		return 1;
+ 	}
+ #ifdef DHCPv6
+-	if (!(*err)) {
++	if (!(*err) && ifaces->fp6) {
+ 		return next_iface6(info, err, ifaces);
+ 	}
+ #endif
+@@ -736,7 +740,8 @@
+ 	close(ifaces->sock);
+ 	ifaces->sock = -1;
+ #ifdef DHCPv6
+-	fclose(ifaces->fp6);
++	if (ifaces->fp6)
++		fclose(ifaces->fp6);
+ 	ifaces->fp6 = NULL;
+ #endif
+ }

Copied: dhcp/repos/extra-x86_64/dhcp.conf.d (from rev 51490, dhcp/trunk/dhcp.conf.d)
===================================================================
--- extra-x86_64/dhcp.conf.d	                        (rev 0)
+++ extra-x86_64/dhcp.conf.d	2009-09-09 03:50:49 UTC (rev 51491)
@@ -0,0 +1,6 @@
+#
+# Arguments to be passed to the DHCP server daemon
+#
+
+DHCP_ARGS="-q"
+

Modified: extra-x86_64/dhcpd
===================================================================
--- extra-x86_64/dhcpd	2009-09-09 03:50:29 UTC (rev 51490)
+++ extra-x86_64/dhcpd	2009-09-09 03:50:49 UTC (rev 51491)
@@ -2,6 +2,7 @@
 
 . /etc/rc.conf
 . /etc/rc.d/functions
+. /etc/conf.d/dhcp
 
 PIDFILE="/var/run/dhcpd.pid"
 PID=`cat $PIDFILE 2>/dev/null`
@@ -9,7 +10,7 @@
   start)
     stat_busy "Starting DHCP Server"
     if [ "$PID" = "" ]; then 
-       /usr/sbin/dhcpd -q
+       /usr/sbin/dhcpd $DHCP_ARGS 
     fi
     if [ "$PID" != "" -o $? -gt 0 ]; then
       stat_fail




More information about the arch-commits mailing list