On Sun, Nov 26, 2023 at 09:21:44PM +0000, Klemens Nanni wrote:
> On Sun, Nov 26, 2023 at 09:52:57PM +0100, Alexander Bluhm wrote:
> >   Did I get the TRUEPREFIX and LOCALBASE correct?
> 
> I wouldn't bother, really, and just hard-code /usr/local these days.
> Lots of churn and patching for something practically noone does.

This makes patch much smaller.

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 22:17:05 -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 22:17:05 -0000
@@ -0,0 +1,12 @@
+Index: Makefile
+--- Makefile.orig
++++ Makefile
+@@ -3,7 +3,7 @@ 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
++BINDIR?=      /usr/local/sbin
+ MANDIR?=      /usr/local/man/man
+ 
+ LDADD+=               -lutil -levent -lexecinfo -lunbound
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 22:17:05 -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 22:17:05 -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 22:17:05 -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

Reply via email to