Module Name:    src
Committed By:   martin
Date:           Sat Jul 28 13:20:46 UTC 2018

Modified Files:
        src/external/bsd/dhcpcd [netbsd-7]: Makefile
        src/external/bsd/dhcpcd/sbin [netbsd-7]: Makefile.inc
        src/external/bsd/dhcpcd/sbin/dhcpcd [netbsd-7]: Makefile
Added Files:
        src/external/bsd/dhcpcd [netbsd-7]: Makefile.inc
        src/external/bsd/dhcpcd/examples [netbsd-7]: Makefile
        src/external/bsd/dhcpcd/examples/hooks [netbsd-7]: Makefile
        src/external/bsd/dhcpcd/include [netbsd-7]: config.h
        src/external/bsd/dhcpcd/libexec [netbsd-7]: Makefile
        src/external/bsd/dhcpcd/libexec/dhcpcd-hooks [netbsd-7]: Makefile
        src/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks [netbsd-7]: Makefile

Log Message:
Additionally pull up the following/apply patch requested by roy in
ticket #1621:

        external/bsd/dhcpcd/examples/hooks/Makefile     up to 1.1
        external/bsd/dhcpcd/examples/Makefile           up to 1.1
        external/bsd/dhcpcd/Makefile.inc                up to 1.3
        external/bsd/dhcpcd/include/config.h            up to 1.3
        external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile up to 1.3
        external/bsd/dhcpcd/libexec/Makefile            up to 1.2
        external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile up to 1.1
        external/bsd/dhcpcd/Makefile                    up to 1.3
        external/bsd/dhcpcd/sbin/Makefile.inc           up to 1.5
        external/bsd/dhcpcd/sbin/dhcpcd/Makefile        up to 1.43
        external/bsd/dhcpcd/include/config.h            (apply patch)
        external/bsd/dhcpcd/sbin/dhcpcd/Makefile        (apply patch)

Import dhcpcd-7.0.7


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.44.1 src/external/bsd/dhcpcd/Makefile
cvs rdiff -u -r0 -r1.3.2.2 src/external/bsd/dhcpcd/Makefile.inc
cvs rdiff -u -r0 -r1.1.18.2 src/external/bsd/dhcpcd/examples/Makefile
cvs rdiff -u -r0 -r1.1.18.2 src/external/bsd/dhcpcd/examples/hooks/Makefile
cvs rdiff -u -r0 -r1.3.4.2 src/external/bsd/dhcpcd/include/config.h
cvs rdiff -u -r0 -r1.2.18.2 src/external/bsd/dhcpcd/libexec/Makefile
cvs rdiff -u -r0 -r1.3.18.2 \
    src/external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile
cvs rdiff -u -r0 -r1.1.18.2 \
    src/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile
cvs rdiff -u -r1.2 -r1.2.42.1 src/external/bsd/dhcpcd/sbin/Makefile.inc
cvs rdiff -u -r1.22 -r1.22.2.1 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcpcd/Makefile
diff -u src/external/bsd/dhcpcd/Makefile:1.1 src/external/bsd/dhcpcd/Makefile:1.1.44.1
--- src/external/bsd/dhcpcd/Makefile:1.1	Sun Jul 27 19:31:03 2008
+++ src/external/bsd/dhcpcd/Makefile	Sat Jul 28 13:20:45 2018
@@ -1,5 +1,5 @@
-#	$NetBSD: Makefile,v 1.1 2008/07/27 19:31:03 joerg Exp $
+#	$NetBSD: Makefile,v 1.1.44.1 2018/07/28 13:20:45 martin Exp $
 
-SUBDIR=		sbin
+SUBDIR=		sbin libexec examples
 
 .include <bsd.subdir.mk>

Index: src/external/bsd/dhcpcd/sbin/Makefile.inc
diff -u src/external/bsd/dhcpcd/sbin/Makefile.inc:1.2 src/external/bsd/dhcpcd/sbin/Makefile.inc:1.2.42.1
--- src/external/bsd/dhcpcd/sbin/Makefile.inc:1.2	Fri Sep 19 23:00:49 2008
+++ src/external/bsd/dhcpcd/sbin/Makefile.inc	Sat Jul 28 13:20:46 2018
@@ -1,11 +1,10 @@
-# $NetBSD: Makefile.inc,v 1.2 2008/09/19 23:00:49 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.2.42.1 2018/07/28 13:20:46 martin Exp $
 
-.include <bsd.own.mk>
+.include <bsd.own.mk>		# for MKDYNAMICROOT definition
 
-WARNS?=		4
+WARNS?=		5
 BINDIR=		/sbin
 
 .if (${MKDYNAMICROOT} == "no")
 LDSTATIC?=	-static
 .endif
-

Index: src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile
diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.22 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.22.2.1
--- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.22	Sat Jun 14 21:00:22 2014
+++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile	Sat Jul 28 13:20:46 2018
@@ -1,61 +1,85 @@
-# $NetBSD: Makefile,v 1.22 2014/06/14 21:00:22 roy Exp $
+# $NetBSD: Makefile,v 1.22.2.1 2018/07/28 13:20:46 martin Exp $
 #
 
+WARNS?=		6
+USE_FORT?=	yes	# network client (local server)
+
+.include <bsd.init.mk>
+.include "../../Makefile.inc"
+
 PROG=		dhcpcd
-SRCS=		common.c control.c dhcpcd.c duid.c eloop.c
-SRCS+=		if.c if-options.c script.c
+SRCS=		common.c control.c dhcpcd.c duid.c eloop.c logerr.c
+SRCS+=		if.c if-options.c route.c sa.c script.c
 SRCS+=		dhcp-common.c dhcpcd-embedded.c
 SRCS+=		if-bsd.c
 
-WARNS?=		5
-USE_FORT?=	yes	# network client (local server)
+# Compat srcs for NetBSD-7
+SRCS+=		hmac.c pidfile.c reallocarray.c
+
+# Need to generate this for dependencies
+DPSRCS+=	dhcpcd-embedded.h dhcpcd-embedded.c
 
-.include <bsd.own.mk>
+CPPFLAGS+=	-DHAVE_CONFIG_H -D_OPENBSD_SOURCE
 
-SRCS+=		auth.c hmac_md5.c
+USE_INET?=	yes
+
+.if defined(SMALLPROG)
+CPPFLAGS+=	-DSMALL
+DHCPCD_DEFS=	dhcpcd-definitions-small.conf
+.else
+DHCPCD_DEFS=	dhcpcd-definitions.conf
+CPPFLAGS+=	-DAUTH
+SRCS+=		auth.c
+.endif
 
-CPPFLAGS+=	-DINET
-SRCS+=		arp.c dhcp.c ipv4.c ipv4ll.c
+.if (${USE_INET} != "no")
+CPPFLAGS+=	-DARP -DINET
+SRCS+=		arp.c bpf.c dhcp.c ipv4.c
+.if !defined(SMALLPROG)
+CPPFLAGS+=	-DIPV4LL -DARPING
+SRCS+=		ipv4ll.c
+.endif
+.endif
 
 .if (${USE_INET6} != "no")
 CPPFLAGS+=	-DINET6
-SRCS+=		ipv6.c ipv6nd.c dhcp6.c
+SRCS+=		ipv6.c ipv6nd.c
+# -DSMALL already strips out prefix delegation
+# A network could be IPv6 only and require DHCPv6
+CPPFLAGS+=	-DDHCP6
+SRCS+=		dhcp6.c
 .endif
 
-DIST=		${NETBSDSRCDIR}/external/bsd/dhcpcd/dist
-CPPFLAGS+=	-I${DIST}
+CPPFLAGS+=	-I${SRCDIR}/include -I${DIST}/src -I${DIST} -I${.OBJDIR}
 
-.PATH: ${DIST} ${DIST}/crypt ${LIBC_NET}
+DPADD+=		${LIBUTIL}
+LDADD+=		-lutil
 
-SCRIPTS=			dhcpcd-run-hooks
-SCRIPTSDIR_dhcpcd-run-hooks=	/libexec
+.PATH: ${DIST}/src ${DIST}/src/crypt ${DIST}/compat ${DIST}/compat/crypt ${LIBC_NET}
 
 CONFIGFILES=			dhcpcd.conf
 FILESDIR_dhcpcd.conf=		/etc
+FILESMODE_dhcpcd.conf=		644	# -rw-r--r--
 
-HOOKS=			01-test 02-dump 10-mtu 10-wpa_supplicant 15-timezone
-HOOKS+=			20-resolv.conf 29-lookup-hostname 30-hostname
-HOOKS+=			50-ntp.conf
+MAN=			dhcpcd.conf.5 dhcpcd.8 
+CLEANFILES=		dhcpcd.conf.5 dhcpcd.8 
 
-FILES=			${HOOKS:C,^,${DIST}/dhcpcd-hooks/,}
-FILESDIR=		/libexec/dhcpcd-hooks
+dhcpcd-embedded.h:	genembedh ${DHCPCD_DEFS} dhcpcd-embedded.h.in
+	${HOST_SH} ${.ALLSRC} $^ > $@
 
-MAN=			dhcpcd.conf.5 dhcpcd.8 dhcpcd-run-hooks.8
+dhcpcd-embedded.c:	genembedc ${DHCPCD_DEFS} dhcpcd-embedded.c.in
+	${HOST_SH} ${.ALLSRC} $^ > $@
 
-CLEANFILES=		dhcpcd.conf.5 dhcpcd.8 \
-			dhcpcd-run-hooks dhcpcd-run-hooks.8
+CLEANFILES+=		dhcpcd-embedded.c dhcpcd-embedded.h
 
-.for f in dhcpcd-run-hooks dhcpcd.conf.5 dhcpcd.8 dhcpcd-run-hooks.8
+.for f in dhcpcd.conf.5 dhcpcd.8
 ${f}:	${f}.in
-	${TOOL_SED} -e 's:@SYSCONFDIR@:/etc:g' -e 's:@DBDIR@:/var/db:g' \
-	    -e 's:@LIBDIR@:/lib:g' \
-	    -e 's:@RUNDIR@:/var/run:g' \
-	    -e 's:@HOOKDIR@:/libexec/dhcpcd-hooks:g' \
-	    -e 's:@SCRIPT@:/libexec/dhcpcd-run-hooks:g' \
-	    -e 's:@SERVICEEXISTS@::g' \
-	    -e 's:@SERVICECMD@::g' \
-	    -e 's:@SERVICESTATUS@::g' \
-	    ${DIST}/${f}.in > $@
+	${TOOL_SED} ${SED_SYS} ${DIST}/src/${f}.in > $@
 .endfor
 
+# XXXGCC5
+.if defined(HAVE_GCC) && ${HAVE_GCC} >= 5 && ${ACTIVE_CC} == "gcc"
+COPTS.if-bsd.c+=  -Wno-error=sign-conversion
+.endif
+
 .include <bsd.prog.mk>

Added files:

Index: src/external/bsd/dhcpcd/Makefile.inc
diff -u /dev/null src/external/bsd/dhcpcd/Makefile.inc:1.3.2.2
--- /dev/null	Sat Jul 28 13:20:46 2018
+++ src/external/bsd/dhcpcd/Makefile.inc	Sat Jul 28 13:20:45 2018
@@ -0,0 +1,16 @@
+# $NetBSD: Makefile.inc,v 1.3.2.2 2018/07/28 13:20:45 martin Exp $
+
+SRCDIR=		${NETBSDSRCDIR}/external/bsd/dhcpcd
+DIST=		${SRCDIR}/dist
+
+SED_SYS=	-e 's:@SYSCONFDIR@:/etc:g' \
+		-e 's:@DATADIR@:/usr/share/examples:g' \
+		-e 's:@DBDIR@:/var/db/dhcpcd:g' \
+		-e 's:@LIBDIR@:/lib:g' \
+		-e 's:@RUNDIR@:/var/run:g' \
+		-e 's:@HOOKDIR@:/libexec/dhcpcd-hooks:g' \
+		-e 's:@SCRIPT@:/libexec/dhcpcd-run-hooks:g' \
+		-e 's:@SERVICEEXISTS@::g' \
+		-e 's:@SERVICECMD@::g' \
+		-e 's:@SERVICESTATUS@::g' \
+		-e 's:@STATUSARG@::g'

Index: src/external/bsd/dhcpcd/examples/Makefile
diff -u /dev/null src/external/bsd/dhcpcd/examples/Makefile:1.1.18.2
--- /dev/null	Sat Jul 28 13:20:46 2018
+++ src/external/bsd/dhcpcd/examples/Makefile	Sat Jul 28 13:20:45 2018
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1.18.2 2018/07/28 13:20:45 martin Exp $
+
+SUBDIR=		hooks
+
+.include <bsd.subdir.mk>

Index: src/external/bsd/dhcpcd/examples/hooks/Makefile
diff -u /dev/null src/external/bsd/dhcpcd/examples/hooks/Makefile:1.1.18.2
--- /dev/null	Sat Jul 28 13:20:46 2018
+++ src/external/bsd/dhcpcd/examples/hooks/Makefile	Sat Jul 28 13:20:45 2018
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile,v 1.1.18.2 2018/07/28 13:20:45 martin Exp $
+#
+
+.include <bsd.own.mk>
+
+.include "../../Makefile.inc"
+.PATH:			${DIST}/hooks
+
+.if ${MKSHARE} != "no"
+FILES=			10-wpa_supplicant 15-timezone 29-lookup-hostname
+FILES+=			50-ypbind
+
+FILESBUILD_50-ypbind=	YES
+CLEANFILES+=		50-ypbind
+
+FILESDIR=		/usr/share/examples/dhcpcd/hooks
+
+.SUFFIXES:		.in
+
+.in:	../../Makefile.inc
+	${TOOL_SED} ${SED_SYS} $< > $@
+.endif
+
+.include <bsd.prog.mk>

Index: src/external/bsd/dhcpcd/include/config.h
diff -u /dev/null src/external/bsd/dhcpcd/include/config.h:1.3.4.2
--- /dev/null	Sat Jul 28 13:20:46 2018
+++ src/external/bsd/dhcpcd/include/config.h	Sat Jul 28 13:20:46 2018
@@ -0,0 +1,18 @@
+/* netbsd */
+#define	SYSCONFDIR		"/etc"
+#define	SBINDIR			"/sbin"
+#define	LIBDIR			"/lib"
+#define	LIBEXECDIR		"/libexec"
+#define	DBDIR			"/var/db/dhcpcd"
+#define	RUNDIR			"/var/run"
+#include			"compat/pidfile.h"
+#define	HAVE_SETPROCTITLE
+#define	HAVE_SYS_QUEUE_H
+#include			"compat/reallocarray.h"
+#define	HAVE_REALLOCARRAY
+#define	HAVE_KQUEUE
+#define	HAVE_KQUEUE1
+#define	HAVE_SYS_BITOPS_H
+#define	HAVE_MD5_H
+#define	SHA2_H			<sha2.h>
+#include			"compat/crypt/hmac.h"

Index: src/external/bsd/dhcpcd/libexec/Makefile
diff -u /dev/null src/external/bsd/dhcpcd/libexec/Makefile:1.2.18.2
--- /dev/null	Sat Jul 28 13:20:46 2018
+++ src/external/bsd/dhcpcd/libexec/Makefile	Sat Jul 28 13:20:46 2018
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.2.18.2 2018/07/28 13:20:46 martin Exp $
+
+SUBDIR=		dhcpcd-run-hooks dhcpcd-hooks
+
+.include <bsd.subdir.mk>

Index: src/external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile
diff -u /dev/null src/external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile:1.3.18.2
--- /dev/null	Sat Jul 28 13:20:46 2018
+++ src/external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile	Sat Jul 28 13:20:46 2018
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile,v 1.3.18.2 2018/07/28 13:20:46 martin Exp $
+#
+
+.include <bsd.own.mk>
+
+.include "../../Makefile.inc"
+
+.PATH:			${DIST}/hooks
+
+FILES=			01-test 02-dump 20-resolv.conf 30-hostname
+FILES+=			50-ntp.conf
+
+FILESDIR=		/libexec/dhcpcd-hooks
+
+.include <bsd.prog.mk>

Index: src/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile
diff -u /dev/null src/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile:1.1.18.2
--- /dev/null	Sat Jul 28 13:20:46 2018
+++ src/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile	Sat Jul 28 13:20:46 2018
@@ -0,0 +1,22 @@
+# $NetBSD: Makefile,v 1.1.18.2 2018/07/28 13:20:46 martin Exp $
+#
+
+.include <bsd.own.mk>
+
+.include "../../Makefile.inc"
+HOOKSRC=	${DIST}/hooks
+.PATH:		${HOOKSRC}
+
+SCRIPTS=	dhcpcd-run-hooks
+SCRIPTSDIR=	/libexec
+
+MAN=		dhcpcd-run-hooks.8
+
+CLEANFILES=	dhcpcd-run-hooks dhcpcd-run-hooks.8
+
+.for f in ${SCRIPTS} ${MAN}
+${f}:	../../Makefile.inc ${f}.in
+	${TOOL_SED} ${SED_SYS} ${HOOKSRC}/${f}.in > $@
+.endfor
+
+.include <bsd.prog.mk>

Reply via email to