From 4390d56940778d6ab856866401c0690f1c28c724 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/sympa/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mail/sympa') diff --git a/mail/sympa/Makefile b/mail/sympa/Makefile index 61b1374a19f..41f5548d5cf 100644 --- a/mail/sympa/Makefile +++ b/mail/sympa/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.28 2007/06/15 18:15:19 jlam Exp $ +# $NetBSD: Makefile,v 1.29 2007/07/04 20:54:47 jlam Exp $ # DISTNAME= sympa-5.2.4 @@ -83,8 +83,6 @@ SYMPA_USER?= sympa SYMPA_GROUP?= sympa SYMPA_VARBASE?= ${HOMEBASE}/sympa -BUILD_DEFS+= SYMPA_USER SYMPA_GROUP SYMPA_VARBASE - SYMPA_PREFIX= ${PREFIX}/sympa SYMPA_SPOOL= ${SYMPA_VARBASE}/spool SYMPA_BIN= ${SYMPA_PREFIX}/bin @@ -94,6 +92,10 @@ PKG_USERS= ${SYMPA_USER}:${SYMPA_GROUP} PKG_HOME.${SYMPA_USER}= ${SYMPA_VARBASE} +PKG_GROUPS_VARS+= SYMPA_GROUP +PKG_USERS_VARS+= SYMPA_USER +BUILD_DEFS+= SYMPA_VARBASE + .for d in sympa sympa/create_list_templates sympa/general_task_models \ sympa/scenari sympa/task_models sympa/templates sympa/wws_templates OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/${d} ${SYMPA_USER} ${SYMPA_GROUP} 755 -- cgit v1.2.3