summaryrefslogtreecommitdiff
path: root/net/dhcpcd
diff options
context:
space:
mode:
authorroy <roy@pkgsrc.org>2020-04-13 16:24:09 +0000
committerroy <roy@pkgsrc.org>2020-04-13 16:24:09 +0000
commitc581b5814e04b66c9c02de77a65e6bc941b29c85 (patch)
treecbd21ddac06152eb4cbb7065e334b04a99a25298 /net/dhcpcd
parentc9f309af3d28656db8b6aeeb5ec40361b126057d (diff)
downloadpkgsrc-c581b5814e04b66c9c02de77a65e6bc941b29c85.tar.gz
Update to dhcpcd-9.0.1 with the following changes:
* Privilege Separation * Linux default hostname is (none), everyone is is a blank string * Leases are now dumped over the control socket - you get RA's now as well. * Better support for many IPv6 routers * NetBSD: RTM_MISS filtering * RA: Deprecate stale addresses by setting pltime 0 * DHCP6: Deprecate stale addresses by setting pltime 0 * Linux: Improve router reachability detection Note that the kernel will still say it's failed when deleting the entry * Linux: Note router preference in ip -6 route output * Linux: Fix compile warning if HAVE_IN6_ADDR_GEN_MODE_NONE isn't supported * Linux: Fix syslog support when /dev/log isn't in /dev * privsep: configure defaults to user dhcpcd if _dhcpcd or _dhcp are unsuitable * privsep: Improve error when we don't have permission to write lease * privsep: Fix hooks restarting other daemons
Diffstat (limited to 'net/dhcpcd')
-rw-r--r--net/dhcpcd/Makefile37
-rw-r--r--net/dhcpcd/PLIST3
-rw-r--r--net/dhcpcd/distinfo10
-rwxr-xr-xnet/dhcpcd/files/dhcpcd.sh5
4 files changed, 46 insertions, 9 deletions
diff --git a/net/dhcpcd/Makefile b/net/dhcpcd/Makefile
index 99071bf6fcc..49dfb9fbe7c 100644
--- a/net/dhcpcd/Makefile
+++ b/net/dhcpcd/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.98 2020/04/09 16:31:53 roy Exp $
+# $NetBSD: Makefile,v 1.99 2020/04/13 16:24:09 roy Exp $
-DISTNAME= dhcpcd-8.1.7
+DISTNAME= dhcpcd-9.0.1
PKGNAME= ${DISTNAME:S/-rc/rc/}
CATEGORIES= net
MASTER_SITES= ftp://roy.marples.name/pub/dhcpcd/
@@ -13,12 +13,45 @@ HOMEPAGE= https://roy.marples.name/projects/dhcpcd/
COMMENT= DHCP / IPv4LL / IPv6RA / DHCPv6 client
LICENSE= modified-bsd
+.include "../../mk/bsd.prefs.mk"
+
+# Use the system _dhcpcd user introduced in NetBSD-9.99.53
+# Don't use the _dhcp user in other BSDs as their home directory
+# is /var/empty and that shouldn't be used as a chroot.
+.if !empty(MACHINE_PLATFORM:MNetBSD-*) && \
+ (empty(MACHINE_PLATFORM:MNetBSD-[0-9].*) || \
+ !empty(MACHINE_PLATFORM:MNetBSD-9.99.5[3-9]-*) || \
+ !empty(MACHINE_PLATFORM:MNetBSD-9.99.[6-9]*-*))
+DHCPCD_USER?= _dhcpcd
+DHCPCD_GROUP?= _dhcpcd
+.endif
+
+.if !defined(DHCPCD_USER)
+DHCPCD_USER?= dhcpcd
+DHCPCD_GROUP?= dhcpcd
+DHCPCD_CHROOTDIR?= ${VARBASE}/dhcpcd
+
+BUILD_DEFS+= DHCPCD_CHROOTDIR VARBASE
+
+PKG_USERS_VARS+= DHCPCD_USER
+PKG_GROUPS_VARS+= DHCPCD_GROUP
+PKG_GROUPS= ${DHCPCD_GROUP}
+PKG_USERS= ${DHCPCD_USER}:${DHCPCD_GROUP}
+
+MAKE_DIRS+= ${DHCPCD_CHROOTDIR}
+
+PKG_GECOS.${DHCPCD_USER}= dhcpcd user
+PKG_HOME.${DHCPCD_USER}= ${DHCPCD_CHROOTDIR}
+PKG_SHELL.${DHCPCD_USER}= ${NOLOGIN}
+.endif
+
USE_LANGUAGES= c99
HAS_CONFIGURE= yes
CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --with-hooks=ntp
CONFIGURE_ARGS+= --datadir=${PREFIX}/share/examples
+CONFIGURE_ARGS+= --privsepuser=${DHCPCD_USER}
EGDIR= ${PREFIX}/share/examples/dhcpcd
INSTALL_MAKE_FLAGS+= SYSCONFDIR=${EGDIR}
diff --git a/net/dhcpcd/PLIST b/net/dhcpcd/PLIST
index eb6844d6db2..9e1f5e20e57 100644
--- a/net/dhcpcd/PLIST
+++ b/net/dhcpcd/PLIST
@@ -1,6 +1,5 @@
-@comment $NetBSD: PLIST,v 1.8 2016/01/07 17:29:48 roy Exp $
+@comment $NetBSD: PLIST,v 1.9 2020/04/13 16:24:09 roy Exp $
libexec/dhcpcd-hooks/01-test
-libexec/dhcpcd-hooks/02-dump
libexec/dhcpcd-hooks/20-resolv.conf
libexec/dhcpcd-hooks/30-hostname
libexec/dhcpcd-hooks/50-ntp.conf
diff --git a/net/dhcpcd/distinfo b/net/dhcpcd/distinfo
index 6c7073f8e5b..a33836d8ecd 100644
--- a/net/dhcpcd/distinfo
+++ b/net/dhcpcd/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.95 2020/04/09 16:31:53 roy Exp $
+$NetBSD: distinfo,v 1.96 2020/04/13 16:24:09 roy Exp $
-SHA1 (dhcpcd-8.1.7.tar.xz) = 2216815e680755769b827edf1e0c4a2b614e1a07
-RMD160 (dhcpcd-8.1.7.tar.xz) = d3525efe5529966c1dc455c2ab07c92c2750da2c
-SHA512 (dhcpcd-8.1.7.tar.xz) = ea58ef3db8254d677820c44b2842ef2f3697b2d90fcbd89b2ecfcbac87e705047cac17053bbe076a3f6d2775903c8e75eac38089d25c097e2f24a045c24977e8
-Size (dhcpcd-8.1.7.tar.xz) = 230308 bytes
+SHA1 (dhcpcd-9.0.1.tar.xz) = 572154cb44497458d0a7994ccb35249b3c0e12d6
+RMD160 (dhcpcd-9.0.1.tar.xz) = c03fdbcc39b855aeec92248dafd92f51d83a4ffc
+SHA512 (dhcpcd-9.0.1.tar.xz) = dea153c9a2f4a9d9c983bf50d8c18b544d7dbe1a2972ccc8eb33bbbc8b09178b39bdb9a38cc293db7861024509ccd475e11d84004bc4cd45947786f5e10db0a3
+Size (dhcpcd-9.0.1.tar.xz) = 244816 bytes
diff --git a/net/dhcpcd/files/dhcpcd.sh b/net/dhcpcd/files/dhcpcd.sh
index 11471976e12..e09b397277c 100755
--- a/net/dhcpcd/files/dhcpcd.sh
+++ b/net/dhcpcd/files/dhcpcd.sh
@@ -3,6 +3,11 @@
# PROVIDE: dhcpcd
# REQUIRE: network mountcritlocal
# BEFORE: NETWORKING
+# KEYWORD: chrootdir
+
+# To get syslog support for chroots, add this to rc.conf:
+#dhcpcd_chrootdir=/var/chroot/dhcpcd
+# The directory should match the home directory of the dhcpcd user.
$_rc_subr_loaded . /etc/rc.subr