From 45233ac07a4c6f9e80f4f9350cbb54ee23d8bd54 Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 4 Jul 2007 20:54:31 +0000 Subject: Make it easier to build and install packages "unprivileged", where the owner of all installed files is a non-root user. This change affects most packages that require special users or groups by making them use the specified unprivileged user and group instead. (1) Add two new variables PKG_GROUPS_VARS and PKG_USERS_VARS to unprivileged.mk. These two variables are lists of other bmake variables that define package-specific users and groups. Packages that have user-settable variables for users and groups, e.g. apache and APACHE_{USER,GROUP}, courier-mta and COURIER_{USER,GROUP}, etc., should list these variables in PKG_USERS_VARS and PKG_GROUPS_VARS so that unprivileged.mk can know to set them to ${UNPRIVILEGED_USER} and ${UNPRIVILEGED_GROUP}. (2) Modify packages to use PKG_GROUPS_VARS and PKG_USERS_VARS. --- mail/clamav/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mail/clamav') diff --git a/mail/clamav/Makefile b/mail/clamav/Makefile index 3c4547025fb..7648fddaf0b 100644 --- a/mail/clamav/Makefile +++ b/mail/clamav/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.75 2007/06/17 22:06:33 wiz Exp $ +# $NetBSD: Makefile,v 1.76 2007/07/04 20:54:40 jlam Exp $ DISTNAME= clamav-${CLAMAV_VERSION} PKGNAME= clamav-${CLAMAV_VERSION:S/-/./} @@ -33,7 +33,7 @@ CONFIGURE_ARGS+= --disable-readdir-r CONFIGURE_ARGS+= --enable-readdir_r .endif -BUILD_DEFS+= CLAMAV_USER CLAMAV_GROUP CLAMAV_DBDIR +BUILD_DEFS+= CLAMAV_DBDIR FILES_SUBST+= CLAMAV_USER=${CLAMAV_USER:Q} MESSAGE_SUBST+= CLAMAV_USER=${CLAMAV_USER} @@ -41,6 +41,9 @@ RCD_SCRIPTS= clamd freshclamd PKG_GROUPS+= ${CLAMAV_GROUP} PKG_USERS+= ${CLAMAV_USER}:${CLAMAV_GROUP} +PKG_GROUPS_VARS+= CLAMAV_GROUP +PKG_USERS_VARS+= CLAMAV_USER + EGDIR= ${PREFIX}/share/examples/clamav FILES_SUBST+= CLAMAV_DBDIR=${CLAMAV_DBDIR:Q} -- cgit v1.2.3