diff options
author | jschauma <jschauma@pkgsrc.org> | 2004-05-12 01:03:58 +0000 |
---|---|---|
committer | jschauma <jschauma@pkgsrc.org> | 2004-05-12 01:03:58 +0000 |
commit | 559a0860937c75daef4472bba5b31189bedebe0c (patch) | |
tree | 85530d8aa6f36e134f408bc511c854f0bc25babe | |
parent | e1c0bff6139b84474f38aae9ea2fdd15c41b9b3d (diff) | |
download | pkgsrc-559a0860937c75daef4472bba5b31189bedebe0c.tar.gz |
Introduce new variables:
SETGIDGAME: specifies whether or not certain games are installed setgid
GAMEGRP: the group owning games if SETGIDGAME is set
GAMEOWN: the user owning games if SETFIDGAME is set
GAMEMODE: the mode to install games as
Use these to provide INSTALL_GAME (for example for PR pkg/25313), and
set them to meaningful values under NetBSD.
-rw-r--r-- | mk/bsd.pkg.defaults.mk | 32 | ||||
-rw-r--r-- | mk/bsd.pkg.mk | 28 | ||||
-rw-r--r-- | mk/defs.NetBSD.mk | 10 |
3 files changed, 56 insertions, 14 deletions
diff --git a/mk/bsd.pkg.defaults.mk b/mk/bsd.pkg.defaults.mk index 07d2ec7dd71..d49112a2d20 100644 --- a/mk/bsd.pkg.defaults.mk +++ b/mk/bsd.pkg.defaults.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.defaults.mk,v 1.237 2004/05/02 20:04:36 xtraeme Exp $ +# $NetBSD: bsd.pkg.defaults.mk,v 1.238 2004/05/12 01:03:58 jschauma Exp $ # # A file providing defaults for pkgsrc and the packages collection. @@ -490,6 +490,13 @@ PRE_ROOT_CMD?= ${TRUE} # Possible: any shell commands # Default: none +SETGIDGAME?= no +# This flags specifies whether or not certain games are installed setgid, +# which would allow them to write to a group-owned score file. +# See also: GAMEGRP, GAMEMODE, GAMEOWN +# Possible: yes, no +# Default: no + SU_CMD?= ${ROOT_CMD} # Command to perform before "make install", if the user does not have # an effective uid of 0. A possible substitute is "sudo sh -c" @@ -905,6 +912,29 @@ FREEWNN_GROUP?= jserver # Possible: any group name # Default: jserver +GAMEGRP?= ${BINGRP} +# Used for various games to allow writing to a group-owned score file. +# If SETGIDGAME is 'yes', setting this to a dedicated group, such as 'games' +# would make sense. +# See also: GAMEMODE, GAMEOWN, SETGIDGAME +# Possible: any group name +# Default: ${BINGRP} + +GAMEMODE?= ${BINMODE} +# Used for various games to allow writing to a group-owned score file. +# If SETGIDGAME is 'yes', setting this to 2555 would make sense. +# See also: GAMEGRP, GAMEOWN, SETGIDGAME +# Possible: any mode +# Default: ${BINMODE} + +GAMEOWN?= ${BINOWN} +# Used for various games to allow writing to a group-owned score file. +# If SETGIDGAME is 'yes', setting this to a dedicated user, such as 'games' +# would make sense. +# See also: GAMEGRP, GAMEMODE, SETGIDGAME +# Possible: any user name +# Default: ${BINOWN} + GAWK_ENABLE_PORTALS?= NO # Used by gawk package to enable/disable handling file names that start with # `/p/' as a 4.4 BSD type portal file, i.e., a two-way pipe for `|&'. diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index b36db844761..4a872742447 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1456 2004/05/08 16:14:55 reed Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1457 2004/05/12 01:03:59 jschauma Exp $ # # This file is in the public domain. # @@ -572,29 +572,33 @@ PKG_FAIL_REASON+='assignment of WRKSRC= $${WRKDIR}' # A few aliases for *-install targets .if !defined(INSTALL_UNSTRIPPED) || empty(INSTALL_UNSTRIPPED:M[yY][eE][sS]) -INSTALL_PROGRAM?= \ +INSTALL_PROGRAM?= \ ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} +INSTALL_GAME?= \ + ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o ${GAMEOWN} -g ${GAMEGRP} -m ${GAMEMODE} .else -INSTALL_PROGRAM?= \ +INSTALL_PROGRAM?= \ ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} +INSTALL_GAME?= \ + ${INSTALL} ${COPY} -o ${GAMEOWN} -g ${GAMEGRP} -m ${GAMEMODE} .endif -INSTALL_SCRIPT?= \ +INSTALL_SCRIPT?= \ ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} -INSTALL_LIB?= \ +INSTALL_LIB?= \ ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} -INSTALL_DATA?= \ +INSTALL_DATA?= \ ${INSTALL} ${COPY} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} -INSTALL_MAN?= \ +INSTALL_MAN?= \ ${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} -INSTALL_PROGRAM_DIR?= \ +INSTALL_PROGRAM_DIR?= \ ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m ${PKGDIRMODE} -INSTALL_SCRIPT_DIR?= \ +INSTALL_SCRIPT_DIR?= \ ${INSTALL_PROGRAM_DIR} -INSTALL_LIB_DIR?= \ +INSTALL_LIB_DIR?= \ ${INSTALL_PROGRAM_DIR} -INSTALL_DATA_DIR?= \ +INSTALL_DATA_DIR?= \ ${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m ${PKGDIRMODE} -INSTALL_MAN_DIR?= \ +INSTALL_MAN_DIR?= \ ${INSTALL} -d -o ${MANOWN} -g ${MANGRP} -m ${PKGDIRMODE} INSTALL_MACROS= BSD_INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ diff --git a/mk/defs.NetBSD.mk b/mk/defs.NetBSD.mk index 13591f4d4b3..7a313e8939f 100644 --- a/mk/defs.NetBSD.mk +++ b/mk/defs.NetBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: defs.NetBSD.mk,v 1.64 2004/04/27 13:43:05 tv Exp $ +# $NetBSD: defs.NetBSD.mk,v 1.65 2004/05/12 01:04:00 jschauma Exp $ # # Variable definitions for the NetBSD operating system. @@ -207,3 +207,11 @@ PKG_HAVE_KQUEUE= # defined _OPSYS_MAX_CMDLEN!= /sbin/sysctl -n kern.argmax CONFIGURE_ENV+= lt_cv_sys_max_cmd_len=${_OPSYS_MAX_CMDLEN} .endif + +# if games are to be installed setgid, set the group and mode to meaningful +# values +.if !(empty(SETGIDGAME:M[yY][eE][sS])) +GAMEOWN= games +GAMEGRP= games +GAMEMODE= 2555 +.endif |