diff options
author | jlam <jlam@pkgsrc.org> | 2007-07-04 20:54:31 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2007-07-04 20:54:31 +0000 |
commit | 4390d56940778d6ab856866401c0690f1c28c724 (patch) | |
tree | 651c1d29a5b557efafa04d2bb6f2cb512a979f64 /devel | |
parent | a6f8cbe795a03d65965cf24d3c410970c17f620e (diff) | |
download | pkgsrc-4390d56940778d6ab856866401c0690f1c28c724.tar.gz |
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.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/RTx-Shredder/Makefile | 4 | ||||
-rw-r--r-- | devel/bugzilla/Makefile | 7 | ||||
-rw-r--r-- | devel/cvsd/Makefile | 4 | ||||
-rw-r--r-- | devel/distcc/Makefile | 4 | ||||
-rw-r--r-- | devel/mantis/Makefile | 4 | ||||
-rw-r--r-- | devel/monotone-server/Makefile | 7 | ||||
-rw-r--r-- | devel/p4d/Makefile | 7 | ||||
-rw-r--r-- | devel/rt-mysql/Makefile.common | 5 | ||||
-rw-r--r-- | devel/rt3/Makefile | 4 | ||||
-rw-r--r-- | devel/rt3/options.mk | 4 |
10 files changed, 34 insertions, 16 deletions
diff --git a/devel/RTx-Shredder/Makefile b/devel/RTx-Shredder/Makefile index c59c08d51c0..32713d54f5f 100644 --- a/devel/RTx-Shredder/Makefile +++ b/devel/RTx-Shredder/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.1.1 2006/05/01 09:42:13 cube Exp $ +# $NetBSD: Makefile,v 1.2 2007/07/04 20:54:37 jlam Exp $ # DISTNAME= RTx-Shredder-0.03 @@ -15,6 +15,8 @@ BUILD_DEPENDS+= p5-DBD-SQLite-[0-9]*:../../databases/p5-DBD-SQLite .include "../../devel/rt3/dirs.mk" +PKG_USERS_VARS+= APACHE_USER + OWN_DIRS_PERMS+= ${RT_VAR_DIR}/data/RTx-Shredder ${APACHE_USER} ${APACHE_GROUP} 0770 PLIST_SUBST+= RT_SHARE_DIR=share/rt3 diff --git a/devel/bugzilla/Makefile b/devel/bugzilla/Makefile index 318e1c9fb63..4a97aacc2c8 100644 --- a/devel/bugzilla/Makefile +++ b/devel/bugzilla/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.24 2007/06/15 14:20:10 jlam Exp $ +# $NetBSD: Makefile,v 1.25 2007/07/04 20:54:37 jlam Exp $ # DISTNAME= bugzilla-2.22.2 @@ -31,7 +31,10 @@ BZ_WEB_GROUP?= ${APACHE_GROUP} SENDMAIL?= /usr/sbin/sendmail CVS?= /usr/bin/cvs -BUILD_DEFS+= BZ_WEB_GROUP SENDMAIL APACHE_USER APACHE_GROUP CVS +BUILD_DEFS+= SENDMAIL CVS + +PKG_USERS_VARS+= APACHE_USER +PKG_GROUPS_VARS+= BZ_WEB_GROUP APACHE_GROUP MESSAGE_SUBST+= BZDIR=${BZDIR:Q} PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q} diff --git a/devel/cvsd/Makefile b/devel/cvsd/Makefile index d3606b8a318..f83a36a89c4 100644 --- a/devel/cvsd/Makefile +++ b/devel/cvsd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2007/02/17 20:59:47 wiz Exp $ +# $NetBSD: Makefile,v 1.6 2007/07/04 20:54:37 jlam Exp $ DISTNAME= cvsd-1.0.13 CATEGORIES= devel scm @@ -24,6 +24,8 @@ CVSD_GROUP?= cvsd PKG_USERS= ${CVSD_USER}:${CVSD_GROUP} PKG_GECOS.${CVSD_USER}= CVS wrapper PKG_GROUPS= ${CVSD_GROUP} +PKG_GROUPS_VARS+= CVSD_GROUP +PKG_USERS_VARS+= CVSD_USER pre-install: ${INSTALL_DATA_DIR} ${EGDIR} diff --git a/devel/distcc/Makefile b/devel/distcc/Makefile index dd384e5e124..6012efc7680 100644 --- a/devel/distcc/Makefile +++ b/devel/distcc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.30 2006/10/12 17:25:18 rillig Exp $ +# $NetBSD: Makefile,v 1.31 2007/07/04 20:54:38 jlam Exp $ PKGNAME= ${DISTNAME} PKGREVISION= 2 @@ -17,6 +17,8 @@ DISTCC_USER?= distcc DISTCC_GROUP?= distcc PKG_GROUPS= ${DISTCC_GROUP} PKG_USERS= ${DISTCC_USER:Q}:${DISTCC_GROUP:Q} +PKG_GROUPS_VARS+= DISTCC_GROUP +PKG_USERS_VARS+= DISTCC_USER DISTCC_PIDDIR?= ${VARBASE}/run/distccd OWN_DIRS_PERMS= ${DISTCC_PIDDIR} ${DISTCC_USER:Q} ${DISTCC_GROUP:Q} 0750 diff --git a/devel/mantis/Makefile b/devel/mantis/Makefile index 362bfde7135..70e7e8d484a 100644 --- a/devel/mantis/Makefile +++ b/devel/mantis/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.26 2007/06/15 18:08:25 jlam Exp $ +# $NetBSD: Makefile,v 1.27 2007/07/04 20:54:38 jlam Exp $ DISTNAME= mantis-1.0.6 CATEGORIES= devel www @@ -26,7 +26,7 @@ DEPENDS+= ${PHP_PKG_PREFIX}-jpgraph-[0-9]*:../../graphics/php-jpgraph APACHE_USER?= www -BUILD_DEFS+= APACHE_USER +PKG_USERS_VARS+=APACHE_USER MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q} MANTIS_HOME= ${PREFIX}/share/mantis diff --git a/devel/monotone-server/Makefile b/devel/monotone-server/Makefile index b488acad535..b5d1706d619 100644 --- a/devel/monotone-server/Makefile +++ b/devel/monotone-server/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.32 2007/06/24 20:55:27 jmmv Exp $ +# $NetBSD: Makefile,v 1.33 2007/07/04 20:54:38 jlam Exp $ # DISTNAME= monotone-server-0.35 @@ -24,8 +24,6 @@ PKG_SYSCONFSUBDIR= monotone-server OWN_DIRS_PERMS= ${PKG_SYSCONFDIR}/keys \ ${MONOTONE_USER} ${MONOTONE_GROUP} 700 -BUILD_DEFS+= MONOTONE_GROUP MONOTONE_USER - EXAMPLEDIR= ${PREFIX}/share/examples/monotone-server CONF_FILES_PERMS= ${EXAMPLEDIR}/hooks.conf \ ${PKG_SYSCONFDIR}/hooks.conf \ @@ -40,6 +38,9 @@ CONF_FILES_PERMS+= ${EXAMPLEDIR}/write-permissions \ PKG_GROUPS= ${MONOTONE_GROUP} PKG_USERS= ${MONOTONE_USER}:${MONOTONE_GROUP} +PKG_GROUPS_VARS+= MONOTONE_GROUP +PKG_USERS_VARS+= MONOTONE_USER + .include "../../mk/bsd.prefs.mk" PKG_GECOS.${MONOTONE_USER}= Monotone dedicated server diff --git a/devel/p4d/Makefile b/devel/p4d/Makefile index 2cafd8fbc19..e0f273c6cac 100644 --- a/devel/p4d/Makefile +++ b/devel/p4d/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2006/08/31 08:37:53 rillig Exp $ +# $NetBSD: Makefile,v 1.11 2007/07/04 20:54:38 jlam Exp $ # DISTNAME= p4d @@ -10,7 +10,7 @@ P4BINONLY= # defined .include "../../devel/p4/Makefile.common" -BUILD_DEFS+= P4USER P4GROUP P4ROOT P4PORT +BUILD_DEFS+= P4ROOT P4PORT FILES_SUBST+= P4USER=${P4USER:Q} FILES_SUBST+= P4ROOT=${P4ROOT:Q} @@ -21,6 +21,9 @@ FILES_SUBST+= P4JOURNAL=${P4JOURNAL:Q} PKG_GROUPS?= ${P4GROUP} PKG_USERS?= ${P4USER}:${P4GROUP} +PKG_GROUPS_VARS+= P4GROUP +PKG_USERS_VARS+= P4USER + PKG_GECOS.${P4USER}?= Perforce Server PKG_HOME.${P4USER}?= ${P4ROOT} diff --git a/devel/rt-mysql/Makefile.common b/devel/rt-mysql/Makefile.common index 6b76659b678..4f6100900a7 100644 --- a/devel/rt-mysql/Makefile.common +++ b/devel/rt-mysql/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.14 2007/02/22 19:26:25 wiz Exp $ +# $NetBSD: Makefile.common,v 1.15 2007/07/04 20:54:38 jlam Exp $ DISTNAME= rt-2-0-15 CATEGORIES= devel @@ -24,6 +24,9 @@ RT_DB_PASS?= changemeplease RT_WEB_USER?= nobody RT_WEB_GROUP?= nobody +PKG_GROUPS_VARS+= RT_GROUP RT_WEB_GROUP +PKG_USERS_VARS+= RT_DB_USER RT_WEB_USER + PKGDIR= ${.CURDIR}/../../devel/rt-mysql DISTINFO_FILE= ${PKGDIR}/distinfo FILESDIR= ${PKGDIR}/files diff --git a/devel/rt3/Makefile b/devel/rt3/Makefile index 783e0260d1c..e56ed85e728 100644 --- a/devel/rt3/Makefile +++ b/devel/rt3/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.24 2007/05/19 14:05:45 wiz Exp $ +# $NetBSD: Makefile,v 1.25 2007/07/04 20:54:39 jlam Exp $ DISTNAME= rt-3.4.5 PKGREVISION= 4 @@ -107,6 +107,8 @@ NO_BUILD= yes PKG_SYSCONFSUBDIR= rt3 PKG_GROUPS= ${RT_GROUP} +PKG_GROUPS_VARS+= RT_GROUP APACHE_GROUP +PKG_USERS_VARS+= APACHE_USER CONFIGURE_ARGS+= --enable-layout=pkgsrc CONFIGURE_ARGS+= --with-rt-group=${RT_GROUP:Q} diff --git a/devel/rt3/options.mk b/devel/rt3/options.mk index c8ce377c23d..3d317947dcb 100644 --- a/devel/rt3/options.mk +++ b/devel/rt3/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.3 2006/10/01 18:44:57 rillig Exp $ +# $NetBSD: options.mk,v 1.4 2007/07/04 20:54:39 jlam Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.rt PKG_OPTIONS_REQUIRED_GROUPS= backend frontend @@ -17,4 +17,4 @@ PKG_OPTIONS_LEGACY_OPTS= backend-mysql:mysql backend-pgsql:pgsql \ # Other options RT_GROUP?= rt -BUILD_DEFS+= RT_GROUP +PKG_GROUPS_VARS+= RT_GROUP |