Hi, I forgot startup framework for my pfresolved port.
- Better install daemon in sbin. Did I get the TRUEPREFIX and LOCALBASE correct? - Provide rc script, mostly copied from iked. - Add user and group. Can I recycle one of the list? ok? bluhm Index: net/pfresolved/Makefile =================================================================== RCS file: /cvs/ports/net/pfresolved/Makefile,v diff -u -p -r1.2 Makefile --- net/pfresolved/Makefile 26 Nov 2023 19:06:46 -0000 1.2 +++ net/pfresolved/Makefile 26 Nov 2023 20:45:06 -0000 @@ -1,6 +1,7 @@ COMMENT = pf table DNS update daemon VERSION = 1.00 +REVISION = 0 DISTNAME = pfresolved-${VERSION} SUPDISTFILES = ${DISTFILES}.asc Index: net/pfresolved/patches/patch-Makefile =================================================================== RCS file: net/pfresolved/patches/patch-Makefile diff -N net/pfresolved/patches/patch-Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ net/pfresolved/patches/patch-Makefile 26 Nov 2023 20:45:06 -0000 @@ -0,0 +1,28 @@ +Index: Makefile +--- Makefile.orig ++++ Makefile +@@ -3,20 +3,20 @@ SRCS= pfresolved.c + SRCS+= forwarder.c log.c pftable.c proc.c timer.c util.c + SRCS+= parse.y + MAN= pfresolved.8 pfresolved.conf.5 +-BINDIR?= /usr/local/bin +-MANDIR?= /usr/local/man/man ++BINDIR?= ${TRUEPREFIX}/sbin ++MANDIR?= ${TRUEPREFIX}/man/man + + LDADD+= -lutil -levent -lexecinfo -lunbound + DPADD+= ${LIBUTIL} ${LIBEVENT} ${LIBEXECINFO} ${LIBUNBOUND} + +-CFLAGS+= -I${.CURDIR} -I/usr/local/include ++CFLAGS+= -I${.CURDIR} -I${LOCALBASE}/include + CFLAGS+= -Wall + CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes + CFLAGS+= -Wmissing-declarations + CFLAGS+= -Wshadow -Wpointer-arith -Wcast-qual + CFLAGS+= -Wsign-compare + +-LDFLAGS+= -L/usr/local/lib ++LDFLAGS+= -L${LOCALBASE}/lib + + VERSION= 1.00 + CLEANFILES= pfresolved-${VERSION}.tar.gz* Index: net/pfresolved/pkg/PLIST =================================================================== RCS file: /cvs/ports/net/pfresolved/pkg/PLIST,v diff -u -p -r1.1.1.1 PLIST --- net/pfresolved/pkg/PLIST 24 Nov 2023 19:45:58 -0000 1.1.1.1 +++ net/pfresolved/pkg/PLIST 26 Nov 2023 20:45:06 -0000 @@ -1,3 +1,6 @@ -@bin bin/pfresolved +@newgroup _pfresolved:601 +@newuser _pfresolved:601:_pfresolved::pf DNS daemon:/var/empty:/sbin/nologin +@rcscript ${RCDIR}/pfresolved @man man/man5/pfresolved.conf.5 @man man/man8/pfresolved.8 +@bin sbin/pfresolved Index: net/pfresolved/pkg/pfresolved.rc =================================================================== RCS file: net/pfresolved/pkg/pfresolved.rc diff -N net/pfresolved/pkg/pfresolved.rc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ net/pfresolved/pkg/pfresolved.rc 26 Nov 2023 20:45:06 -0000 @@ -0,0 +1,14 @@ +#!/bin/ksh + +daemon="${TRUEPREFIX}/sbin/pfresolved" + +. /etc/rc.d/rc.subr + +pexp="pfresolved: parent.*" + +rc_configtest() { + # use rc_exec here since daemon_flags may contain arguments with spaces + rc_exec "${daemon} -n ${daemon_flags}" +} + +rc_cmd $1 Index: infrastructure/db/user.list =================================================================== RCS file: /cvs/ports/infrastructure/db/user.list,v diff -u -p -r1.432 user.list --- infrastructure/db/user.list 18 Nov 2023 13:28:43 -0000 1.432 +++ infrastructure/db/user.list 26 Nov 2023 20:45:06 -0000 @@ -109,7 +109,7 @@ id user group port 598 _iodine _iodine net/iodine 599 _bacula-sd sysutils/bacula #600 _ntlmaps _ntlmaps www/ntlmaps -#601 _unbound _unbound net/unbound +601 _pfresolved _pfresolved net/pfresolved 602 _havp _havp www/havp 603 _argus _argus net/argus 604 _haproxy _haproxy net/haproxy