diff options
author | jlam <jlam@pkgsrc.org> | 2008-03-04 06:45:33 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2008-03-04 06:45:33 +0000 |
commit | 26a6bb9ac414018f199b2fa7ffdfebbe0b930679 (patch) | |
tree | 53927b9cc2c07e26be3e7581f09a05ed030ac452 /mk/unprivileged.mk | |
parent | 810c83eb14cc8e59d1c701703e0d49763ee7a0a5 (diff) | |
download | pkgsrc-26a6bb9ac414018f199b2fa7ffdfebbe0b930679.tar.gz |
+ Conditionally add GAMES_USER and GAMES_GROUP to the platform *.mk
files. These variables are currently usable if ${SETGIDGAME} == yes.
These variables should be used when describing ownership of files
and directories to the pkginstall framework, e.g.
SPECIAL_PERMS= bin/foogame ${GAMES_USER} ${GAMES_GROUP} 2555
+ Rename SETGID_GAME_PERMS to SETGID_GAMES_PERMS because the default
group name is "games".
+ Define SETGID_GAMES_PERMS in terms of GAMES_USER and GAMES_GROUP so
that these names are protected from the normal flow of unprivileged.mk.
This fixes the +INSTALL scripts in "user-destdir" packages to
correctly refer to the games:games instead of the user:group of the
user that built the packages.
Diffstat (limited to 'mk/unprivileged.mk')
-rw-r--r-- | mk/unprivileged.mk | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/mk/unprivileged.mk b/mk/unprivileged.mk index 09f3c846937..46ff74b4bd2 100644 --- a/mk/unprivileged.mk +++ b/mk/unprivileged.mk @@ -1,4 +1,4 @@ -# $NetBSD: unprivileged.mk,v 1.15 2008/02/01 08:54:53 rillig Exp $ +# $NetBSD: unprivileged.mk,v 1.16 2008/03/04 06:45:33 jlam Exp $ # # This file collects definitions that are useful when using pkgsrc as an # unprivileged (non-root) user. It is included automatically by the @@ -170,6 +170,15 @@ PKG_USERS_VARS?= # empty PKG_GROUPS_VARS?= # empty BUILD_DEFS+= ${PKG_USERS_VARS} ${PKG_GROUPS_VARS} +.if defined(SETGIDGAME) && !empty(SETGIDGAME:M[yY][eE][sS]) +. if defined(GAMES_USER) +PKG_USERS_VARS+= GAMES_USER +. endif +. if defined(GAMES_GROUP) +PKG_GROUPS_VARS+= GAMES_GROUP +. endif +.endif + # Override per-package custom users and groups, except for groups listed # in UNPRIVILEGED_GROUPS. . for _var_ in ${PKG_USERS_VARS} |