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 /databases | |
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 'databases')
-rw-r--r-- | databases/gnats/Makefile | 5 | ||||
-rw-r--r-- | databases/mysql4-client/Makefile.common | 5 | ||||
-rw-r--r-- | databases/mysql5-client/Makefile.common | 5 | ||||
-rw-r--r-- | databases/openldap-server/Makefile | 3 | ||||
-rw-r--r-- | databases/openldap/Makefile.common | 5 | ||||
-rw-r--r-- | databases/phpmyadmin/Makefile | 6 | ||||
-rw-r--r-- | databases/postgresql80-server/Makefile | 7 | ||||
-rw-r--r-- | databases/postgresql81-server/Makefile | 7 | ||||
-rw-r--r-- | databases/postgresql82-server/Makefile | 7 | ||||
-rw-r--r-- | databases/sqlitemanager/Makefile | 4 |
10 files changed, 38 insertions, 16 deletions
diff --git a/databases/gnats/Makefile b/databases/gnats/Makefile index 04083d4e98f..610cb00555e 100644 --- a/databases/gnats/Makefile +++ b/databases/gnats/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.29 2006/06/16 09:32:33 rillig Exp $ +# $NetBSD: Makefile,v 1.30 2007/07/04 20:54:34 jlam Exp $ DISTNAME= gnats-4.1.0 PKGREVISION= 2 @@ -36,6 +36,9 @@ GNATS_HOME?= ${VARBASE}/db/gnats PKG_GROUPS= ${GNATS_GROUP} PKG_USERS= ${GNATS_USER}:${GNATS_GROUP} +PKG_GROUPS_VARS+= GNATS_GROUP +PKG_USERS_VARS+= GNATS_USER + PKG_GECOS.${GNATS_USER}= GNATS database owner PKG_HOME.${GNATS_USER}= ${GNATS_HOME} PKG_SHELL.${GNATS_USER}= ${SH} diff --git a/databases/mysql4-client/Makefile.common b/databases/mysql4-client/Makefile.common index e167c5ff47b..d67c12cb09f 100644 --- a/databases/mysql4-client/Makefile.common +++ b/databases/mysql4-client/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.57 2007/05/23 08:11:48 martti Exp $ +# $NetBSD: Makefile.common,v 1.58 2007/07/04 20:54:35 jlam Exp $ DISTNAME= mysql-4.1.22 CATEGORIES= databases @@ -22,6 +22,9 @@ MYSQL_USER?= mysql MYSQL_GROUP?= mysql MYSQL_DATADIR?= ${VARBASE}/mysql +PKG_USERS_VARS+= MYSQL_USER +PKG_GROUPS_VARS+= MYSQL_GROUP + # MYSQL_CHARSET default character set # MYSQL_EXTRA_CHARSET additional character set to be compiled in. # diff --git a/databases/mysql5-client/Makefile.common b/databases/mysql5-client/Makefile.common index 0a548f80489..f8c6368085f 100644 --- a/databases/mysql5-client/Makefile.common +++ b/databases/mysql5-client/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.21 2007/05/21 04:39:59 xtraeme Exp $ +# $NetBSD: Makefile.common,v 1.22 2007/07/04 20:54:35 jlam Exp $ DISTNAME= mysql-5.0.41 CATEGORIES= databases @@ -22,6 +22,9 @@ MYSQL_USER?= mysql MYSQL_GROUP?= mysql MYSQL_DATADIR?= ${VARBASE}/mysql +PKG_USERS_VARS+= MYSQL_USER +PKG_GROUPS_VARS+= MYSQL_GROUP + # MYSQL_CHARSET default character set # MYSQL_EXTRA_CHARSET additional character set to be compiled in. # diff --git a/databases/openldap-server/Makefile b/databases/openldap-server/Makefile index 0daa511954f..d0229d69e10 100644 --- a/databases/openldap-server/Makefile +++ b/databases/openldap-server/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2007/01/02 11:29:16 ghen Exp $ +# $NetBSD: Makefile,v 1.7 2007/07/04 20:54:35 jlam Exp $ PKGNAME= ${DISTNAME:S/-/-server-/} COMMENT= Lightweight Directory Access Protocol server suite @@ -32,7 +32,6 @@ BUILD_DIRS= include libraries servers TEST_DIRS= tests INSTALL_DIRS= servers -BUILD_DEFS+= SLAPD_USER SLURPD_USER LDAP_GROUP BUILD_DEFS+= OPENLDAP_ETCDIR OPENLDAP_VARDIR PKG_GROUPS= ${LDAP_GROUP} diff --git a/databases/openldap/Makefile.common b/databases/openldap/Makefile.common index ef32fa3c040..c1e59332cdc 100644 --- a/databases/openldap/Makefile.common +++ b/databases/openldap/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.8 2007/01/10 18:15:36 ghen Exp $ +# $NetBSD: Makefile.common,v 1.9 2007/07/04 20:54:35 jlam Exp $ # please stick to the "stable" releases as much as possible! DISTNAME= openldap-2.3.32 @@ -44,6 +44,9 @@ SLAPD_USER?= slapd SLURPD_USER?= slurpd LDAP_GROUP?= ldap +PKG_GROUPS_VARS+= LDAP_GROUP +PKG_USERS_VARS+= SLAPD_USER SLURPD_USER + # the internal avl_* prototypes conflict with those in <sys/avl.h> which # is included by another system header file on Solaris, so subst them. .if ${OPSYS} == "SunOS" diff --git a/databases/phpmyadmin/Makefile b/databases/phpmyadmin/Makefile index 84448d57202..ed6d097e4d7 100644 --- a/databases/phpmyadmin/Makefile +++ b/databases/phpmyadmin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.60 2007/07/03 14:18:14 tron Exp $ +# $NetBSD: Makefile,v 1.61 2007/07/04 20:54:36 jlam Exp $ DISTNAME= phpMyAdmin-${DIST_VERSION}-all-languages PKGNAME= phpmyadmin-${DIST_VERSION:S/-//} @@ -30,7 +30,9 @@ APACHE_USER?= www APACHE_GROUP?= www PKG_GROUPS= ${APACHE_GROUP} PKG_USERS= ${APACHE_USER}:${APACHE_GROUP} -BUILD_DEFS+= APACHE_USER APACHE_GROUP + +PKG_USERS_VARS+= APACHE_USER +PKG_GROUPS_VARS+= APACHE_GROUP EXDIR= ${PREFIX}/share/examples/phpmyadmin PMCONFFILE= ${PKG_SYSCONFDIR}/config.inc.php diff --git a/databases/postgresql80-server/Makefile b/databases/postgresql80-server/Makefile index 953b3d223ac..d63fb6ac99b 100644 --- a/databases/postgresql80-server/Makefile +++ b/databases/postgresql80-server/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.24 2007/05/08 15:58:38 joerg Exp $ +# $NetBSD: Makefile,v 1.25 2007/07/04 20:54:36 jlam Exp $ PKGNAME= postgresql80-server-${BASE_VERS} PKGREVISION= 1 @@ -58,7 +58,10 @@ PGHOME?= ${PREFIX}/${PGUSER} FILES_SUBST+= PGUSER=${PGUSER:Q} FILES_SUBST+= PGGROUP=${PGGROUP:Q} FILES_SUBST+= PGHOME=${PGHOME:Q} -BUILD_DEFS+= PGUSER PGGROUP PGHOME +BUILD_DEFS+= PGHOME + +PKG_GROUPS_VARS+= PGGROUP +PKG_USERS_VARS+= PGUSER PKG_GROUPS= ${PGGROUP} PKG_USERS= ${PGUSER}:${PGGROUP} diff --git a/databases/postgresql81-server/Makefile b/databases/postgresql81-server/Makefile index 0fac65e3a05..4ee2a221951 100644 --- a/databases/postgresql81-server/Makefile +++ b/databases/postgresql81-server/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2007/01/08 18:55:39 adam Exp $ +# $NetBSD: Makefile,v 1.8 2007/07/04 20:54:36 jlam Exp $ PKGNAME= postgresql81-server-${BASE_VERS} COMMENT= PostgreSQL database server programs @@ -59,7 +59,10 @@ PGHOME?= ${PREFIX}/${PGUSER} FILES_SUBST+= PGUSER=${PGUSER} FILES_SUBST+= PGGROUP=${PGGROUP} FILES_SUBST+= PGHOME=${PGHOME} -BUILD_DEFS+= PGUSER PGGROUP PGHOME +BUILD_DEFS+= PGHOME + +PKG_GROUPS_VARS+= PGGROUP +PKG_USERS_VARS+= PGUSER PKG_GROUPS= ${PGGROUP} PKG_USERS= ${PGUSER}:${PGGROUP} diff --git a/databases/postgresql82-server/Makefile b/databases/postgresql82-server/Makefile index 44376a0bdef..28d7e9668e9 100644 --- a/databases/postgresql82-server/Makefile +++ b/databases/postgresql82-server/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.1.1 2006/12/09 15:34:40 adam Exp $ +# $NetBSD: Makefile,v 1.2 2007/07/04 20:54:37 jlam Exp $ PKGNAME= postgresql82-server-${BASE_VERS} COMMENT= PostgreSQL database server programs @@ -59,7 +59,10 @@ PGHOME?= ${PREFIX}/${PGUSER} FILES_SUBST+= PGUSER=${PGUSER} FILES_SUBST+= PGGROUP=${PGGROUP} FILES_SUBST+= PGHOME=${PGHOME} -BUILD_DEFS+= PGUSER PGGROUP PGHOME +BUILD_DEFS+= PGHOME + +PKG_GROUPS_VARS+= PGGROUP +PKG_USERS_VARS+= PGUSER PKG_GROUPS= ${PGGROUP} PKG_USERS= ${PGUSER}:${PGGROUP} diff --git a/databases/sqlitemanager/Makefile b/databases/sqlitemanager/Makefile index d6eb7f3137b..476bfa4ef57 100644 --- a/databases/sqlitemanager/Makefile +++ b/databases/sqlitemanager/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2006/06/16 10:58:08 rillig Exp $ +# $NetBSD: Makefile,v 1.5 2007/07/04 20:54:37 jlam Exp $ # DISTNAME= SQLiteManager-1.0.4 @@ -14,7 +14,7 @@ DEPENDS+= php>=5.0.3nb1:../../lang/php5 NO_BUILD= yes -BUILD_DEFS+= APACHE_USER +PKG_USERS_VARS+= APACHE_USER do-install: ${INSTALL_DATA_DIR} ${PREFIX}/share |