Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/external/bsd/dhcpcd Additionally pull up the following/ap...



details:   https://anonhg.NetBSD.org/src/rev/c421435b226b
branches:  netbsd-7
changeset: 800506:c421435b226b
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Jul 28 13:20:45 2018 +0000

description:
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

diffstat:

 external/bsd/dhcpcd/Makefile                          |   4 +-
 external/bsd/dhcpcd/Makefile.inc                      |  16 +++
 external/bsd/dhcpcd/examples/Makefile                 |   5 +
 external/bsd/dhcpcd/examples/hooks/Makefile           |  24 ++++
 external/bsd/dhcpcd/include/config.h                  |  18 +++
 external/bsd/dhcpcd/libexec/Makefile                  |   5 +
 external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile     |  15 +++
 external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile |  22 ++++
 external/bsd/dhcpcd/sbin/Makefile.inc                 |   7 +-
 external/bsd/dhcpcd/sbin/dhcpcd/Makefile              |  92 +++++++++++-------
 10 files changed, 168 insertions(+), 40 deletions(-)

diffs (285 lines):

diff -r 50443fafee68 -r c421435b226b external/bsd/dhcpcd/Makefile
--- a/external/bsd/dhcpcd/Makefile      Fri Jul 27 10:47:51 2018 +0000
+++ b/external/bsd/dhcpcd/Makefile      Sat Jul 28 13:20:45 2018 +0000
@@ -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>
diff -r 50443fafee68 -r c421435b226b external/bsd/dhcpcd/Makefile.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/dhcpcd/Makefile.inc  Sat Jul 28 13:20:45 2018 +0000
@@ -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'
diff -r 50443fafee68 -r c421435b226b external/bsd/dhcpcd/examples/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/dhcpcd/examples/Makefile     Sat Jul 28 13:20:45 2018 +0000
@@ -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>
diff -r 50443fafee68 -r c421435b226b external/bsd/dhcpcd/examples/hooks/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/dhcpcd/examples/hooks/Makefile       Sat Jul 28 13:20:45 2018 +0000
@@ -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>
diff -r 50443fafee68 -r c421435b226b external/bsd/dhcpcd/include/config.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/dhcpcd/include/config.h      Sat Jul 28 13:20:45 2018 +0000
@@ -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"
diff -r 50443fafee68 -r c421435b226b external/bsd/dhcpcd/libexec/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/dhcpcd/libexec/Makefile      Sat Jul 28 13:20:45 2018 +0000
@@ -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>
diff -r 50443fafee68 -r c421435b226b external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/dhcpcd/libexec/dhcpcd-hooks/Makefile Sat Jul 28 13:20:45 2018 +0000
@@ -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>
diff -r 50443fafee68 -r c421435b226b external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/dhcpcd/libexec/dhcpcd-run-hooks/Makefile     Sat Jul 28 13:20:45 2018 +0000
@@ -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>
diff -r 50443fafee68 -r c421435b226b external/bsd/dhcpcd/sbin/Makefile.inc
--- a/external/bsd/dhcpcd/sbin/Makefile.inc     Fri Jul 27 10:47:51 2018 +0000
+++ b/external/bsd/dhcpcd/sbin/Makefile.inc     Sat Jul 28 13:20:45 2018 +0000
@@ -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
-
diff -r 50443fafee68 -r c421435b226b external/bsd/dhcpcd/sbin/dhcpcd/Makefile
--- a/external/bsd/dhcpcd/sbin/dhcpcd/Makefile  Fri Jul 27 10:47:51 2018 +0000
+++ b/external/bsd/dhcpcd/sbin/dhcpcd/Makefile  Sat Jul 28 13:20:45 2018 +0000
@@ -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
 
-.include <bsd.own.mk>
+# Need to generate this for dependencies
+DPSRCS+=       dhcpcd-embedded.h dhcpcd-embedded.c
+
+CPPFLAGS+=     -DHAVE_CONFIG_H -D_OPENBSD_SOURCE
+
+USE_INET?=     yes
 
-SRCS+=         auth.c hmac_md5.c
+.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
-
-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
+FILESMODE_dhcpcd.conf=         644     # -rw-r--r--
 
-FILES=                 ${HOOKS:C,^,${DIST}/dhcpcd-hooks/,}
-FILESDIR=              /libexec/dhcpcd-hooks
+MAN=                   dhcpcd.conf.5 dhcpcd.8 
+CLEANFILES=            dhcpcd.conf.5 dhcpcd.8 
 
-MAN=                   dhcpcd.conf.5 dhcpcd.8 dhcpcd-run-hooks.8
+dhcpcd-embedded.h:     genembedh ${DHCPCD_DEFS} dhcpcd-embedded.h.in
+       ${HOST_SH} ${.ALLSRC} $^ > $@
 
-CLEANFILES=            dhcpcd.conf.5 dhcpcd.8 \
-                       dhcpcd-run-hooks dhcpcd-run-hooks.8
+dhcpcd-embedded.c:     genembedc ${DHCPCD_DEFS} dhcpcd-embedded.c.in
+       ${HOST_SH} ${.ALLSRC} $^ > $@
 
-.for f in dhcpcd-run-hooks dhcpcd.conf.5 dhcpcd.8 dhcpcd-run-hooks.8
+CLEANFILES+=           dhcpcd-embedded.c dhcpcd-embedded.h
+
+.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>



Home | Main Index | Thread Index | Old Index