pkgsrc-WIP-changes archive

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

rcvd: Optimalization



Module Name:	pkgsrc-wip
Committed By:	Marcin Gondek <drixter%e-utp.net@localhost>
Pushed By:	drixter
Date:		Mon Oct 5 19:30:33 2026 +0200
Changeset:	e3a2595b736c3a8adee5ea9f9517d5167e90ab78

Modified Files:
	rcvd/Makefile

Log Message:
rcvd: Optimalization

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e3a2595b736c3a8adee5ea9f9517d5167e90ab78

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 rcvd/Makefile | 29 ++++++++++++++++++++---------
 1 file changed, 20 insertions(+), 9 deletions(-)

diffs:
diff --git a/rcvd/Makefile b/rcvd/Makefile
index 87d7a51174..99b8fd22e3 100644
--- a/rcvd/Makefile
+++ b/rcvd/Makefile
@@ -16,20 +16,31 @@ GO_VERSION_REQD=	127
 
 .include "go-modules.mk"
 
-# rcvd runs unprivileged and needs a dedicated user/group.
-PKG_GROUPS=		rcvd
-PKG_USERS=		rcvd:rcvd
-PKG_GECOS.rcvd=		rcvd DNS daemon
-PKG_HOME.rcvd=		/nonexistent
-PKG_SHELL.rcvd=		${NOLOGIN}
+# rcvd runs unprivileged and needs a dedicated user/group. The account is
+# overridable (RCVD_USER/RCVD_GROUP) so a site admin can rebuild with a
+# different service user; it defaults to rcvd:rcvd. The account is hardened:
+# no login shell, no home directory. bsd.prefs.mk is pulled in first so the
+# ?= defaults can be overridden from the environment or mk.conf.
+.include "../../mk/bsd.prefs.mk"
+
+RCVD_USER?=		rcvd
+RCVD_GROUP?=		rcvd
+
+PKG_GROUPS+=		${RCVD_GROUP}
+PKG_USERS+=		${RCVD_USER}:${RCVD_GROUP}
+PKG_GECOS.${RCVD_USER}=	rcvd DNS daemon
+PKG_HOME.${RCVD_USER}=	/nonexistent
+PKG_SHELL.${RCVD_USER}=	${NOLOGIN}
+PKG_GROUPS_VARS+=	RCVD_GROUP
+PKG_USERS_VARS+=	RCVD_USER
 
 RCD_SCRIPTS=		rcvd
 
-BUILD_DEFS+=		VARBASE
+BUILD_DEFS+=		VARBASE RCVD_USER RCVD_GROUP
 
 # Config and log directories, owned by the rcvd user.
-OWN_DIRS_PERMS+=	${PKG_SYSCONFDIR}/rcvd rcvd rcvd 0755
-OWN_DIRS_PERMS+=	${VARBASE}/log/rcvd rcvd rcvd 0755
+OWN_DIRS_PERMS+=	${PKG_SYSCONFDIR}/rcvd ${RCVD_USER} ${RCVD_GROUP} 0755
+OWN_DIRS_PERMS+=	${VARBASE}/log/rcvd ${RCVD_USER} ${RCVD_GROUP} 0755
 
 # The example forwarder profile becomes the default config on first install.
 EGDIR=			${PREFIX}/share/examples/rcvd


Home | Main Index | Thread Index | Old Index