Sun Dec 21 21:24:08 2008 UTC ()
Despite supporting --sysconfdir isc-dhcp hard sets the location of
configuration files and binaries in a number of cases.  This should hopefully
fix them all.  Without this patch they look in /etc only and fail to start
if the file is not present.


(adrianp)
diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhclient4/Makefile
diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhclient4/distinfo
diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhcp4/Makefile
diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhcp4/distinfo
diff -r1.2 -r1.3 pkgsrc/net/isc-dhcp4/Makefile.common
diff -r0 -r1.1 pkgsrc/net/isc-dhcp4/patches/patch-ac
diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhcpd4/Makefile
diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhcpd4/distinfo
diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhcrelay4/Makefile
diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhcrelay4/distinfo

cvs diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhclient4/Makefile (expand / switch to context diff)
--- pkgsrc/net/isc-dhclient4/Makefile 2008/02/13 22:05:21 1.1.1.1
+++ pkgsrc/net/isc-dhclient4/Makefile 2008/12/21 21:24:08 1.2
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.1.1.1 2008/02/13 22:05:21 adrianp Exp $
+# $NetBSD: Makefile,v 1.2 2008/12/21 21:24:08 adrianp Exp $
 #
 
 COMMENT=	ISC Dynamic Host Configuration Protocol (DHCP) Client
 COMPONENT=	client
+PKGREVISION=	1
 SUBDIR=		client
 
 CONF_FILES+=	${EGDIR}/dhclient.conf ${PKG_SYSCONFDIR}/dhclient.conf

cvs diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhclient4/Attic/distinfo (expand / switch to context diff)
--- pkgsrc/net/isc-dhclient4/Attic/distinfo 2008/02/13 22:05:21 1.1.1.1
+++ pkgsrc/net/isc-dhclient4/Attic/distinfo 2008/12/21 21:24:08 1.2
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.1.1.1 2008/02/13 22:05:21 adrianp Exp $
+$NetBSD: distinfo,v 1.2 2008/12/21 21:24:08 adrianp Exp $
 
 SHA1 (dhcp-4.0.0.tar.gz) = acb4ab7634ba002893b15baba1443ef4d6c92201
 RMD160 (dhcp-4.0.0.tar.gz) = 86963598124617bc7d1059262c75176db431f26d
 Size (dhcp-4.0.0.tar.gz) = 1043725 bytes
 SHA1 (patch-aa) = 162f8950cfcbb9647b81d8d1518867aaf8ec7905
 SHA1 (patch-ab) = cd38b5075d2f3a3121fb7dc9f870a6091c603ef1
+SHA1 (patch-ac) = 7079a37a7bbdf7ede805ecba61700ecf86fffaea

cvs diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhcp4/Makefile (expand / switch to context diff)
--- pkgsrc/net/isc-dhcp4/Makefile 2008/02/13 22:03:58 1.1.1.1
+++ pkgsrc/net/isc-dhcp4/Makefile 2008/12/21 21:24:08 1.2
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.1.1.1 2008/02/13 22:03:58 adrianp Exp $
+# $NetBSD: Makefile,v 1.2 2008/12/21 21:24:08 adrianp Exp $
 #
 
 COMMENT=	ISC Dynamic Host Configuration Protocol (DHCP) Base
 COMPONENT=	base
+PKGREVISION=	1
 SUBDIR=		includes common minires dst
 
 .include "options.mk"

cvs diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhcp4/distinfo (expand / switch to context diff)
--- pkgsrc/net/isc-dhcp4/distinfo 2008/02/13 22:03:58 1.1.1.1
+++ pkgsrc/net/isc-dhcp4/distinfo 2008/12/21 21:24:08 1.2
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.1.1.1 2008/02/13 22:03:58 adrianp Exp $
+$NetBSD: distinfo,v 1.2 2008/12/21 21:24:08 adrianp Exp $
 
 SHA1 (dhcp-4.0.0.tar.gz) = acb4ab7634ba002893b15baba1443ef4d6c92201
 RMD160 (dhcp-4.0.0.tar.gz) = 86963598124617bc7d1059262c75176db431f26d
 Size (dhcp-4.0.0.tar.gz) = 1043725 bytes
 SHA1 (patch-aa) = 162f8950cfcbb9647b81d8d1518867aaf8ec7905
 SHA1 (patch-ab) = cd38b5075d2f3a3121fb7dc9f870a6091c603ef1
+SHA1 (patch-ac) = 7079a37a7bbdf7ede805ecba61700ecf86fffaea

cvs diff -r1.2 -r1.3 pkgsrc/net/isc-dhcp4/Makefile.common (expand / switch to context diff)
--- pkgsrc/net/isc-dhcp4/Makefile.common 2008/12/02 12:07:47 1.2
+++ pkgsrc/net/isc-dhcp4/Makefile.common 2008/12/21 21:24:08 1.3
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.2 2008/12/02 12:07:47 martti Exp $
+# $NetBSD: Makefile.common,v 1.3 2008/12/21 21:24:08 adrianp Exp $
 #
 # used by net/isc-dhcp4/Makefile
 # used by net/isc-dhcpd4/Makefile
@@ -34,6 +34,13 @@
 CONFIGURE_ARGS+=	--with-srv-pid-file=${DHCP_PID}/isc-dhcpd.pid
 CONFIGURE_ARGS+=	--with-cli-pid-file=${DHCP_PID}/isc-dhclient.pid
 CONFIGURE_ARGS+=	--with-relay-pid-file=${DHCP_PID}/isc-dhcrelay.pid
+
+SUBST_CLASSES+=		config
+SUBST_STAGE.config=	post-patch
+SUBST_FILES.config=	includes/dhcpd.h
+SUBST_SED.config=       -e "s|@@PREFIX@@|${PREFIX}|g"
+SUBST_SED.config+=      -e "s|@@PKG_SYSCONFDIR@@|${PKG_SYSCONFDIR}|g"
+SUBST_MESSAGE.config=   Fixing configuration files.
 
 do-install:
 .	for d in ${SUBDIR}

File Added: pkgsrc/net/isc-dhcp4/patches/patch-ac
$NetBSD: patch-ac,v 1.1 2008/12/21 21:24:08 adrianp Exp $

--- includes/dhcpd.h.orig	2007-12-08 19:36:00.000000000 +0000
+++ includes/dhcpd.h
@@ -1241,7 +1241,7 @@ typedef unsigned char option_mask [16];
 #else /* !DEBUG */
 
 #ifndef _PATH_DHCPD_CONF
-#define _PATH_DHCPD_CONF	"/etc/dhcpd.conf"
+#define _PATH_DHCPD_CONF	"@@PKG_SYSCONFDIR@@/dhcpd.conf"
 #endif /* DEBUG */
 
 #ifndef _PATH_DHCPD_DB
@@ -1263,11 +1263,11 @@ typedef unsigned char option_mask [16];
 #endif /* DEBUG */
 
 #ifndef _PATH_DHCLIENT_CONF
-#define _PATH_DHCLIENT_CONF	"/etc/dhclient.conf"
+#define _PATH_DHCLIENT_CONF	"@@PKG_SYSCONFDIR@@/dhclient.conf"
 #endif
 
 #ifndef _PATH_DHCLIENT_SCRIPT
-#define _PATH_DHCLIENT_SCRIPT	"/sbin/dhclient-script"
+#define _PATH_DHCLIENT_SCRIPT	"@@PREFIX@@/sbin/dhclient-script"
 #endif
 
 #ifndef _PATH_DHCLIENT_PID

cvs diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhcpd4/Makefile (expand / switch to context diff)
--- pkgsrc/net/isc-dhcpd4/Makefile 2008/02/13 22:06:15 1.1.1.1
+++ pkgsrc/net/isc-dhcpd4/Makefile 2008/12/21 21:24:08 1.2
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.1.1.1 2008/02/13 22:06:15 adrianp Exp $
+# $NetBSD: Makefile,v 1.2 2008/12/21 21:24:08 adrianp Exp $
 #
 
 COMMENT=	ISC Dynamic Host Configuration Protocol (DHCP) Server
 COMPONENT=	server
+PKGREVISION=	1
 SUBDIR=		omapip dhcpctl server
 
 CONF_FILES+=	${EGDIR}/dhcpd.conf ${PKG_SYSCONFDIR}/dhcpd.conf

cvs diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhcpd4/Attic/distinfo (expand / switch to context diff)
--- pkgsrc/net/isc-dhcpd4/Attic/distinfo 2008/02/13 22:06:15 1.1.1.1
+++ pkgsrc/net/isc-dhcpd4/Attic/distinfo 2008/12/21 21:24:08 1.2
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.1.1.1 2008/02/13 22:06:15 adrianp Exp $
+$NetBSD: distinfo,v 1.2 2008/12/21 21:24:08 adrianp Exp $
 
 SHA1 (dhcp-4.0.0.tar.gz) = acb4ab7634ba002893b15baba1443ef4d6c92201
 RMD160 (dhcp-4.0.0.tar.gz) = 86963598124617bc7d1059262c75176db431f26d
 Size (dhcp-4.0.0.tar.gz) = 1043725 bytes
 SHA1 (patch-aa) = 162f8950cfcbb9647b81d8d1518867aaf8ec7905
 SHA1 (patch-ab) = cd38b5075d2f3a3121fb7dc9f870a6091c603ef1
+SHA1 (patch-ac) = 7079a37a7bbdf7ede805ecba61700ecf86fffaea

cvs diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhcrelay4/Makefile (expand / switch to context diff)
--- pkgsrc/net/isc-dhcrelay4/Makefile 2008/02/13 22:06:55 1.1.1.1
+++ pkgsrc/net/isc-dhcrelay4/Makefile 2008/12/21 21:24:08 1.2
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.1.1.1 2008/02/13 22:06:55 adrianp Exp $
+# $NetBSD: Makefile,v 1.2 2008/12/21 21:24:08 adrianp Exp $
 #
 
 COMMENT=	ISC Dynamic Host Configuration Protocol (DHCP) Relay
 COMPONENT=	relay
+PKGREVISION=	1
 SUBDIR=		relay
 
 RCD_SCRIPTS=	isc_dhcrelay

cvs diff -r1.1.1.1 -r1.2 pkgsrc/net/isc-dhcrelay4/Attic/distinfo (expand / switch to context diff)
--- pkgsrc/net/isc-dhcrelay4/Attic/distinfo 2008/02/13 22:06:55 1.1.1.1
+++ pkgsrc/net/isc-dhcrelay4/Attic/distinfo 2008/12/21 21:24:08 1.2
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.1.1.1 2008/02/13 22:06:55 adrianp Exp $
+$NetBSD: distinfo,v 1.2 2008/12/21 21:24:08 adrianp Exp $
 
 SHA1 (dhcp-4.0.0.tar.gz) = acb4ab7634ba002893b15baba1443ef4d6c92201
 RMD160 (dhcp-4.0.0.tar.gz) = 86963598124617bc7d1059262c75176db431f26d
 Size (dhcp-4.0.0.tar.gz) = 1043725 bytes
 SHA1 (patch-aa) = 162f8950cfcbb9647b81d8d1518867aaf8ec7905
 SHA1 (patch-ab) = cd38b5075d2f3a3121fb7dc9f870a6091c603ef1
+SHA1 (patch-ac) = 7079a37a7bbdf7ede805ecba61700ecf86fffaea