pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net
Module Name: pkgsrc
Committed By: roy
Date: Thu Oct 23 16:36:18 UTC 2025
Modified Files:
pkgsrc/net: Makefile
Added Files:
pkgsrc/net/dhcpsd: DESCR Makefile PLIST distinfo
pkgsrc/net/dhcpsd/files: dhcpsd.sh
Log Message:
Import dhcpsd-0.0.4
This is a DHCP server, driven by plugins rather than a specific
configuration.
There is an auto plugin which makes an opinionated automatic
DHCP setup based on your IP address.
There is a leasefile plugin which stores the leases to a
persistent flat file periodically.
There is an ethers plugin to lookup a nodes hostname from their
ethernet address.
There is an addrinfo plugin to lookup a nodes ip address from their
hostname.
There is an ICMP plugin to detect if an ip address is in use
before offering it.
And if that is not enough there is a LUA plugin which allows you
to script pretty much everything, but there is likely room for
improvement here.
Out of the box, dhcpsd is fast by using 2 hashmaps for clientid
and ip address lookups and then by using a Red Black tree for
lease expiry ordering.
dhcpsd is written in C and uses Verstable for a hashmap and
NetBSD's Red Black tree.
It's also event driven with timeouts and callbacks which
allows for example the ICMP plugin to hold the DHCP request
until finished and then continue it once done and dhcpsd
will process other tasks in the middle of this.
dhcpsd is also secure by supporting Capsicum from FreeBSD,
pledge from OpenBSD send SECCOMP from Linux.
Other OS's enjoy a POSIX resource limited chrooted sandbox.
I hope you all enjoy using this as much as I have creating it :)
To generate a diff of this commit:
cvs rdiff -u -r1.1610 -r1.1611 pkgsrc/net/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/net/dhcpsd/DESCR pkgsrc/net/dhcpsd/Makefile \
pkgsrc/net/dhcpsd/PLIST pkgsrc/net/dhcpsd/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/dhcpsd/files/dhcpsd.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/net/Makefile
diff -u pkgsrc/net/Makefile:1.1610 pkgsrc/net/Makefile:1.1611
--- pkgsrc/net/Makefile:1.1610 Sun Sep 28 08:23:31 2025
+++ pkgsrc/net/Makefile Thu Oct 23 16:36:17 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1610 2025/09/28 08:23:31 vins Exp $
+# $NetBSD: Makefile,v 1.1611 2025/10/23 16:36:17 roy Exp $
#
COMMENT= Networking tools
@@ -107,6 +107,7 @@ SUBDIR+= dhcpcd-gtk
SUBDIR+= dhcpcd-icons
SUBDIR+= dhcpcd-qt
SUBDIR+= dhcpd-pools
+SUBDIR+= dhcpsd
SUBDIR+= dhid
SUBDIR+= dhisd
SUBDIR+= djbdns
Added files:
Index: pkgsrc/net/dhcpsd/DESCR
diff -u /dev/null pkgsrc/net/dhcpsd/DESCR:1.1
--- /dev/null Thu Oct 23 16:36:18 2025
+++ pkgsrc/net/dhcpsd/DESCR Thu Oct 23 16:36:17 2025
@@ -0,0 +1,30 @@
+This is a DHCP server, driven by plugins rather than a specific
+configuration.
+
+There is an auto plugin which makes an opinionated automatic
+DHCP setup based on your IP address.
+There is a leasefile plugin which stores the leases to a
+persistent flat file periodically.
+There is an ethers plugin to lookup a nodes hostname from their
+ethernet address.
+There is an addrinfo plugin to lookup a nodes ip address from their
+hostname.
+There is an ICMP plugin to detect if an ip address is in use
+before offering it.
+And if that is not enough there is a LUA plugin which allows you
+to script pretty much everything, but there is likely room for
+improvement here.
+
+Out of the box, dhcpsd is fast by using 2 hashmaps for clientid
+and ip address lookups and then by using a Red Black tree for
+lease expiry ordering.
+dhcpsd is written in C and uses Verstable for a hashmap and
+NetBSD's Red Black tree.
+It's also event driven with timeouts and callbacks which
+allows for example the ICMP plugin to hold the DHCP request
+until finished and then continue it once done and dhcpsd
+will process other tasks in the middle of this.
+
+dhcpsd is also secure by supporting Capsicum from FreeBSD,
+pledge from OpenBSD send SECCOMP from Linux.
+Other OS's enjoy a POSIX resource limited chrooted sandbox.
Index: pkgsrc/net/dhcpsd/Makefile
diff -u /dev/null pkgsrc/net/dhcpsd/Makefile:1.1
--- /dev/null Thu Oct 23 16:36:18 2025
+++ pkgsrc/net/dhcpsd/Makefile Thu Oct 23 16:36:17 2025
@@ -0,0 +1,55 @@
+# $NetBSD: Makefile,v 1.1 2025/10/23 16:36:17 roy Exp $
+
+DISTNAME= dhcpsd-0.0.4
+CATEGORIES= net
+MASTER_SITES= ${MASTER_SITE_GITHUB:=NetworkConfiguration/}
+GITHUB_PROJECT= dhcpsd
+#GITHUB_TAG= v${PKGVERSION_NOREV}
+GITHUB_RELEASE= v${PKGVERSION_NOREV}
+EXTRACT_SUFX= .tar.xz
+
+MAINTAINER= roy%NetBSD.org@localhost
+HOMEPAGE= https://roy.marples.name/projects/dhcpsd/
+COMMENT= DHCP server
+LICENSE= modified-bsd
+
+.include "../../mk/bsd.prefs.mk"
+
+.if !defined(DHCPSD_USER)
+DHCPSD_USER?= dhcpsd
+DHCPSD_GROUP?= dhcpsd
+DHCPSD_CHROOTDIR?= ${VARBASE}/dhcpsd
+
+BUILD_DEFS+= DHCPSD_CHROOTDIR VARBASE
+
+PKG_USERS_VARS+= DHCPSD_USER
+PKG_GROUPS_VARS+= DHCPSD_GROUP
+PKG_GROUPS= ${DHCPSD_GROUP}
+PKG_USERS= ${DHCPSD_USER}:${DHCPSD_GROUP}
+
+MAKE_DIRS+= ${DHCPSD_CHROOTDIR}
+
+PKG_GECOS.${DHCPSD_USER}= dhcpsd user
+PKG_HOME.${DHCPSD_USER}= ${DHCPSD_CHROOTDIR}
+PKG_SHELL.${DHCPSD_USER}= ${NOLOGIN}
+.endif
+
+USE_LANGUAGES= c11
+USE_TOOLS= pkg-config
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS+= --user=${DHCPSD_USER}
+CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
+
+.if ${USE_CROSS_COMPILE:tl} == "yes"
+CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM:Q}
+CONFIGURE_ARGS+= --build=${NATIVE_MACHINE_GNU_PLATFORM:Q}
+.endif
+
+#EGDIR= ${PREFIX}/share/examples/dhcpsd
+#INSTALL_MAKE_FLAGS+= SYSCONFDIR=${EGDIR}
+#CONF_FILES+= ${EGDIR}/dhcpcd.conf ${PKG_SYSCONFDIR}/dhcpcd.conf
+
+RCD_SCRIPTS+= dhcpsd
+
+.include "../../lang/lua/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/net/dhcpsd/PLIST
diff -u /dev/null pkgsrc/net/dhcpsd/PLIST:1.1
--- /dev/null Thu Oct 23 16:36:18 2025
+++ pkgsrc/net/dhcpsd/PLIST Thu Oct 23 16:36:17 2025
@@ -0,0 +1,15 @@
+@comment $NetBSD: PLIST,v 1.1 2025/10/23 16:36:17 roy Exp $
+lib/dhcpsd/addrinfo.so
+lib/dhcpsd/auto.so
+lib/dhcpsd/ethers.so
+lib/dhcpsd/icmp.so
+lib/dhcpsd/leasefile.so
+lib/dhcpsd/lua.so
+man/man8/dhcpsd.8
+man/man8/dhcpsd_addrinfo.8
+man/man8/dhcpsd_auto.8
+man/man8/dhcpsd_ethers.8
+man/man8/dhcpsd_icmp.8
+man/man8/dhcpsd_leasefile.8
+man/man8/dhcpsd_lua.8
+sbin/dhcpsd
Index: pkgsrc/net/dhcpsd/distinfo
diff -u /dev/null pkgsrc/net/dhcpsd/distinfo:1.1
--- /dev/null Thu Oct 23 16:36:18 2025
+++ pkgsrc/net/dhcpsd/distinfo Thu Oct 23 16:36:17 2025
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1 2025/10/23 16:36:17 roy Exp $
+
+BLAKE2s (dhcpsd-0.0.4.tar.xz) = 66455ed45d0018918f1aeb5cc191b1bb20e7982b63a88d8f65284b733bcec20b
+SHA512 (dhcpsd-0.0.4.tar.xz) = 60e3eab7a3a04c4adf5a68e3a93766cafc88cc1c4e22878ff70f7a64bc8402ce0cf9d2251022af7adf0ce9c65882ef95460e796defb3c40c0fc672b945c604bb
+Size (dhcpsd-0.0.4.tar.xz) = 90632 bytes
Index: pkgsrc/net/dhcpsd/files/dhcpsd.sh
diff -u /dev/null pkgsrc/net/dhcpsd/files/dhcpsd.sh:1.1
--- /dev/null Thu Oct 23 16:36:18 2025
+++ pkgsrc/net/dhcpsd/files/dhcpsd.sh Thu Oct 23 16:36:18 2025
@@ -0,0 +1,18 @@
+#!@RCD_SCRIPTS_SHELL@
+
+# PROVIDE: dhcpsd
+# REQUIRE: NETWORKING
+# KEYWORD: chrootdir
+
+# To get syslog support for chroots, add this to rc.conf:
+#dhcpsd_chrootdir=/var/chroot/dhcpsd
+# The directory should match the home directory of the dhcpsd user.
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="dhcpsd"
+rcvar=$name
+command="@PREFIX@/sbin/$name"
+
+load_rc_config $name
+run_rc_command "$1"
Home |
Main Index |
Thread Index |
Old Index