summaryrefslogtreecommitdiff
path: root/mk/platform
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2010-07-08 04:57:36 +0000
committerdholland <dholland@pkgsrc.org>2010-07-08 04:57:36 +0000
commit2f7458b53db10bf615dcee56207514351572f2f3 (patch)
tree2df7fde13e69eb07a9e22b7d3d36bc22d57f2fcf /mk/platform
parent82d37be69c3b7244056c53d69c53a16a70fcbcd3 (diff)
downloadpkgsrc-2f7458b53db10bf615dcee56207514351572f2f3.tar.gz
Begin cleanup of setgid game infrastructure.
* Introduce USE_GAMESGROUP, which causes the games user and group to be made available. * Retain SETGIDGAME as an alias for USE_GAMESGROUP. Describe it as deprecated. * Always define GAMES_USER, GAMES_GROUP, GAMEMODE, GAMEDIRMODE, and GAMEDATAMODE, regardless of whether USE_GAMESGROUP is turned on or not. * Define these variables in defaults/mk.conf instead of separately in every platform/*.mk file. The definitions used to be the same for each of these platforms anyway, except for some where they were randomly missing or commented out for no clear reason, leading to broken game packages. * Handle all these variables properly when unprivileged. * Update the comments/documentation for these variables. * Describe GAMEOWN and GAMEGRP as deprecated. These need to be retained as aliases for GAMES_USER and GAMES_GROUP respectively for supporting packages that use bsd.*.mk but should otherwise not be used. * Add GAMEDATA_PERMS and GAMEDIR_PERMS using GAMEDATAMODE and GAMEDIRMODE respectively. * Fix a bug I noticed that was improperly mixing the "games" group and "games" user. Things this does *not* do: - get rid of GAMES_USER, for which there should ultimately be no need. - move the declaration/documentation/default value of USE_GAMESGROUP to a suitable place. (It is currently where SETGIDGAME was, which is suboptimal.) - touch any of the games, all of which need updating with at least s/SETGIDGAME/USE_GAMESGROUP/ and probably more. - update the guide to explain how to handle games properly. Also, it would be nice if using GAMES_GROUP without setting USE_GAMESGROUP=yes caused an error but as far as I know there isn't any particularly good way to arrange this right now. Note that these changes may alter the build/install behavior of broken game packages, e.g. some may silently become setgid when they weren't before or things like that. If you run into any of this file a PR. While one might arguably bump the PKGREVISION of all games or other packages using any of these variables as a precaution, that seems like a bad idea. Instead, I think I will be bumping each game once it itself has been fixed up to do everything the right way.
Diffstat (limited to 'mk/platform')
-rw-r--r--mk/platform/AIX.mk16
-rw-r--r--mk/platform/BSDOS.mk16
-rw-r--r--mk/platform/Darwin.mk16
-rw-r--r--mk/platform/DragonFly.mk15
-rw-r--r--mk/platform/FreeBSD.mk15
-rw-r--r--mk/platform/Haiku.mk16
-rw-r--r--mk/platform/IRIX.mk16
-rw-r--r--mk/platform/Interix.mk16
-rw-r--r--mk/platform/Linux.mk16
-rw-r--r--mk/platform/NetBSD.mk15
-rw-r--r--mk/platform/OpenBSD.mk16
-rw-r--r--mk/platform/SunOS.mk15
-rw-r--r--mk/platform/UnixWare.mk16
13 files changed, 13 insertions, 191 deletions
diff --git a/mk/platform/AIX.mk b/mk/platform/AIX.mk
index 37ea528587c..bb46f64f755 100644
--- a/mk/platform/AIX.mk
+++ b/mk/platform/AIX.mk
@@ -1,4 +1,4 @@
-# $NetBSD: AIX.mk,v 1.34 2009/07/26 05:32:43 agc Exp $
+# $NetBSD: AIX.mk,v 1.35 2010/07/08 04:57:36 dholland Exp $
#
# Variable definitions for the AIX operating system.
@@ -76,17 +76,3 @@ _OPSYS_CAN_CHECK_SHLIBS= no # can't use readelf in check/bsd.check-vars.mk
# to avoid a test required by the libtool script that takes forever.
# FIXME: Adjust to work on this system and enable the lines below.
#_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax
-
-# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
-# (it defaults to 'no' as per defaults/mk.conf).
-# Set the group and mode to meaningful values in that case (defaults to
-# BINOWN, BINGRP and BINMODE as per defaults/mk.conf).
-# FIXME: Adjust to work on this system and enable the lines below.
-#.if !(empty(SETGIDGAME:M[yY][eE][sS]))
-#GAMES_USER= games
-#GAMES_GROUP= games
-#GAMEOWN= ${GAMES_USER}
-#GAMEGRP= ${GAMES_GROUP}
-#GAMEMODE= 2555
-#GAMEDIRMODE= 0775
-#.endif
diff --git a/mk/platform/BSDOS.mk b/mk/platform/BSDOS.mk
index a9f432dd360..2b6dbabf3f5 100644
--- a/mk/platform/BSDOS.mk
+++ b/mk/platform/BSDOS.mk
@@ -1,4 +1,4 @@
-# $NetBSD: BSDOS.mk,v 1.27 2009/07/26 05:32:43 agc Exp $
+# $NetBSD: BSDOS.mk,v 1.28 2010/07/08 04:57:36 dholland Exp $
#
# Variable definitions for the BSD/OS operating system.
@@ -84,17 +84,3 @@ PKG_CREATE_USERGROUP= NO # until it works
# to avoid a test required by the libtool script that takes forever.
# FIXME: Adjust to work on this system and enable the lines below.
#_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax
-
-# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
-# (it defaults to 'no' as per defaults/mk.conf).
-# Set the group and mode to meaningful values in that case (defaults to
-# BINOWN, BINGRP and BINMODE as per defaults/mk.conf).
-# FIXME: Adjust to work on this system and enable the lines below.
-#.if !(empty(SETGIDGAME:M[yY][eE][sS]))
-#GAMES_USER= games
-#GAMES_GROUP= games
-#GAMEOWN= ${GAMES_USER}
-#GAMEGRP= ${GAMES_GROUP}
-#GAMEMODE= 2555
-#GAMEDIRMODE= 0775
-#.endif
diff --git a/mk/platform/Darwin.mk b/mk/platform/Darwin.mk
index 4afcae68da7..bb374e4f281 100644
--- a/mk/platform/Darwin.mk
+++ b/mk/platform/Darwin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: Darwin.mk,v 1.42 2009/09/24 06:31:27 tron Exp $
+# $NetBSD: Darwin.mk,v 1.43 2010/07/08 04:57:36 dholland Exp $
#
# Variable definitions for the Darwin operating system.
@@ -127,17 +127,3 @@ CONFIGURE_ENV+= ac_cv_func_poll=no
.if empty(OS_VERSION:M[0-8].*) && exists(/bin/ksh)
WRAPPER_BIN_SH?= /bin/ksh
.endif
-
-# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
-# (it defaults to 'no' as per defaults/mk.conf).
-# Set the group and mode to meaningful values in that case (defaults to
-# BINOWN, BINGRP and BINMODE as per defaults/mk.conf).
-# FIXME: Adjust to work on this system and enable the lines below.
-#.if !(empty(SETGIDGAME:M[yY][eE][sS]))
-#GAMES_USER= games
-#GAMES_GROUP= games
-#GAMEOWN= ${GAMES_USER}
-#GAMEGRP= ${GAMES_GROUP}
-#GAMEMODE= 2555
-#GAMEDIRMODE= 0775
-#.endif
diff --git a/mk/platform/DragonFly.mk b/mk/platform/DragonFly.mk
index 23ba0157af0..edca4dfdbcc 100644
--- a/mk/platform/DragonFly.mk
+++ b/mk/platform/DragonFly.mk
@@ -1,4 +1,4 @@
-# $NetBSD: DragonFly.mk,v 1.38 2009/12/16 19:48:09 joerg Exp $
+# $NetBSD: DragonFly.mk,v 1.39 2010/07/08 04:57:36 dholland Exp $
#
# Variable definitions for the DragonFly operating system.
@@ -84,16 +84,3 @@ PKG_HAVE_KQUEUE= # defined
# check for maximum command line length and set it in configure's environment,
# to avoid a test required by the libtool script that takes forever.
_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax
-
-# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
-# (it defaults to 'no' as per defaults/mk.conf).
-# Set the group and mode to meaningful values in that case (defaults to
-# BINOWN, BINGRP and BINMODE as per defaults/mk.conf).
-.if !(empty(SETGIDGAME:M[yY][eE][sS]))
-GAMES_USER= games
-GAMES_GROUP= games
-GAMEOWN= ${GAMES_USER}
-GAMEGRP= ${GAMES_GROUP}
-GAMEMODE= 2555
-GAMEDIRMODE= 0775
-.endif
diff --git a/mk/platform/FreeBSD.mk b/mk/platform/FreeBSD.mk
index 718afe1a4ee..f3c4207691f 100644
--- a/mk/platform/FreeBSD.mk
+++ b/mk/platform/FreeBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: FreeBSD.mk,v 1.26 2009/07/26 05:32:43 agc Exp $
+# $NetBSD: FreeBSD.mk,v 1.27 2010/07/08 04:57:36 dholland Exp $
#
# Variable definitions for the FreeBSD operating system.
@@ -87,16 +87,3 @@ _OPSYS_CAN_CHECK_SHLIBS= yes # use readelf in check/bsd.check-vars.mk
# check for maximum command line length and set it in configure's environment,
# to avoid a test required by the libtool script that takes forever.
_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax
-
-# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
-# (it defaults to 'no' as per defaults/mk.conf).
-# Set the group and mode to meaningful values in that case (defaults to
-# BINOWN, BINGRP and BINMODE as per defaults/mk.conf).
-.if !(empty(SETGIDGAME:M[yY][eE][sS]))
-GAMES_USER= games
-GAMES_GROUP= games
-GAMEOWN= ${GAMES_USER}
-GAMEGRP= ${GAMES_GROUP}
-GAMEMODE= 2555
-GAMEDIRMODE= 0775
-.endif
diff --git a/mk/platform/Haiku.mk b/mk/platform/Haiku.mk
index 5eeb86f6943..d7bbcb0c66f 100644
--- a/mk/platform/Haiku.mk
+++ b/mk/platform/Haiku.mk
@@ -1,4 +1,4 @@
-# $NetBSD: Haiku.mk,v 1.2 2010/06/20 04:05:39 obache Exp $
+# $NetBSD: Haiku.mk,v 1.3 2010/07/08 04:57:36 dholland Exp $
#
# Variable definitions for the Haiku operating system.
@@ -74,17 +74,3 @@ _OPSYS_CAN_CHECK_SHLIBS= no # can't use readelf in check/bsd.check-vars.mk
# to avoid a test required by the libtool script that takes forever.
# FIXME: Adjust to work on this system and enable the lines below.
#_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax
-
-# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
-# (it defaults to 'no' as per defaults/mk.conf).
-# Set the group and mode to meaningful values in that case (defaults to
-# BINOWN, BINGRP and BINMODE as per defaults/mk.conf).
-# FIXME: Adjust to work on this system and enable the lines below.
-#.if !(empty(SETGIDGAME:M[yY][eE][sS]))
-#GAMES_USER= games
-#GAMES_GROUP= games
-#GAMEOWN= ${GAMES_USER}
-#GAMEGRP= ${GAMES_GROUP}
-#GAMEMODE= 2555
-#GAMEDIRMODE= 0775
-#.endif
diff --git a/mk/platform/IRIX.mk b/mk/platform/IRIX.mk
index 525dc5631f9..50a273c9d66 100644
--- a/mk/platform/IRIX.mk
+++ b/mk/platform/IRIX.mk
@@ -1,4 +1,4 @@
-# $NetBSD: IRIX.mk,v 1.35 2009/07/26 05:32:43 agc Exp $
+# $NetBSD: IRIX.mk,v 1.36 2010/07/08 04:57:36 dholland Exp $
#
# Variable definitions for the IRIX operating system.
@@ -110,17 +110,3 @@ _OPSYS_CAN_CHECK_SHLIBS= no # can't use readelf in check/bsd.check-vars.mk
# check for maximum command line length and set it in configure's environment,
# to avoid a test required by the libtool script that takes forever.
_OPSYS_MAX_CMDLEN_CMD= /usr/sbin/sysconf ARG_MAX
-
-# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
-# (it defaults to 'no' as per defaults/mk.conf).
-# Set the group and mode to meaningful values in that case (defaults to
-# BINOWN, BINGRP and BINMODE as per defaults/mk.conf).
-# FIXME: Adjust to work on this system and enable the lines below.
-#.if !(empty(SETGIDGAME:M[yY][eE][sS]))
-#GAMES_USER= games
-#GAMES_GROUP= games
-#GAMEOWN= ${GAMES_USER}
-#GAMEGRP= ${GAMES_GROUP}
-#GAMEMODE= 2555
-#GAMEDIRMODE= 0775
-#.endif
diff --git a/mk/platform/Interix.mk b/mk/platform/Interix.mk
index 1429036f4fd..07289c068a9 100644
--- a/mk/platform/Interix.mk
+++ b/mk/platform/Interix.mk
@@ -1,4 +1,4 @@
-# $NetBSD: Interix.mk,v 1.63 2009/12/16 19:48:09 joerg Exp $
+# $NetBSD: Interix.mk,v 1.64 2010/07/08 04:57:36 dholland Exp $
#
# Variable definitions for the Interix operating system.
@@ -160,17 +160,3 @@ CONFIGURE_ENV+= ${GNU_CONFIGURE:Dac_cv_func_hstrerror=yes}
# check for maximum command line length and set it in configure's environment,
# to avoid a test required by the libtool script that takes forever.
_OPSYS_MAX_CMDLEN_CMD= ${ECHO} 262144
-
-# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
-# (it defaults to 'no' as per defaults/mk.conf).
-# Set the group and mode to meaningful values in that case (defaults to
-# BINOWN, BINGRP and BINMODE as per defaults/mk.conf).
-# FIXME: Adjust to work on this system and enable the lines below.
-#.if !(empty(SETGIDGAME:M[yY][eE][sS]))
-#GAMES_USER= games
-#GAMES_GROUP= games
-#GAMEOWN= ${GAMES_USER}
-#GAMEGRP= ${GAMES_GROUP}
-#GAMEMODE= 2555
-#GAMEDIRMODE= 0775
-#.endif
diff --git a/mk/platform/Linux.mk b/mk/platform/Linux.mk
index 133ad115622..ab892f75c0d 100644
--- a/mk/platform/Linux.mk
+++ b/mk/platform/Linux.mk
@@ -1,4 +1,4 @@
-# $NetBSD: Linux.mk,v 1.39 2010/05/20 07:57:23 sbd Exp $
+# $NetBSD: Linux.mk,v 1.40 2010/07/08 04:57:36 dholland Exp $
#
# Variable definitions for the Linux operating system.
@@ -93,20 +93,6 @@ _OPSYS_CAN_CHECK_SHLIBS= yes # use readelf in check/bsd.check-vars.mk
# FIXME: Adjust to work on this system and enable the lines below.
#_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax
-# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
-# (it defaults to 'no' as per defaults/mk.conf).
-# Set the group and mode to meaningful values in that case (defaults to
-# BINOWN, BINGRP and BINMODE as per defaults/mk.conf).
-# FIXME: Adjust to work on this system and enable the lines below.
-#.if !(empty(SETGIDGAME:M[yY][eE][sS]))
-#GAMES_USER= games
-#GAMES_GROUP= games
-#GAMEOWN= ${GAMES_USER}
-#GAMEGRP= ${GAMES_GROUP}
-#GAMEMODE= 2555
-#GAMEDIRMODE= 0775
-#.endif
-
.if (${MACHINE_ARCH} == "x86_64")
ABI?= 64
LIBABISUFFIX?= 64
diff --git a/mk/platform/NetBSD.mk b/mk/platform/NetBSD.mk
index 75edeb5eb90..414ca5ca8df 100644
--- a/mk/platform/NetBSD.mk
+++ b/mk/platform/NetBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: NetBSD.mk,v 1.32 2009/07/26 05:32:43 agc Exp $
+# $NetBSD: NetBSD.mk,v 1.33 2010/07/08 04:57:36 dholland Exp $
#
# Variable definitions for the NetBSD operating system.
@@ -147,16 +147,3 @@ _OPSYS_CAN_CHECK_SHLIBS= yes # use readelf in check/bsd.check-vars.mk
# check for maximum command line length and set it in configure's environment,
# to avoid a test required by the libtool script that takes forever.
_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax
-
-# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
-# (it defaults to 'no' as per defaults/mk.conf).
-# Set the group and mode to meaningful values in that case (defaults to
-# BINOWN, BINGRP and BINMODE as per defaults/mk.conf).
-.if !(empty(SETGIDGAME:M[yY][eE][sS]))
-GAMES_USER= games
-GAMES_GROUP= games
-GAMEOWN= ${GAMES_USER}
-GAMEGRP= ${GAMES_GROUP}
-GAMEMODE= 2555
-GAMEDIRMODE= 0775
-.endif
diff --git a/mk/platform/OpenBSD.mk b/mk/platform/OpenBSD.mk
index d429625f0fe..5e22a04fe0d 100644
--- a/mk/platform/OpenBSD.mk
+++ b/mk/platform/OpenBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: OpenBSD.mk,v 1.29 2009/07/26 05:32:43 agc Exp $
+# $NetBSD: OpenBSD.mk,v 1.30 2010/07/08 04:57:36 dholland Exp $
#
# Variable definitions for the OpenBSD operating system.
@@ -100,17 +100,3 @@ _OPSYS_CAN_CHECK_SHLIBS= no # can't use readelf in check/bsd.check-vars.mk
# check for maximum command line length and set it in configure's environment,
# to avoid a test required by the libtool script that takes forever.
_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax
-
-# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
-# (it defaults to 'no' as per defaults/mk.conf).
-# Set the group and mode to meaningful values in that case (defaults to
-# BINOWN, BINGRP and BINMODE as per defaults/mk.conf).
-# FIXME: Adjust to work on this system and enable the lines below.
-#.if !(empty(SETGIDGAME:M[yY][eE][sS]))
-#GAMES_USER= games
-#GAMES_GROUP= games
-#GAMEOWN= ${GAMES_USER}
-#GAMEGRP= ${GAMES_GROUP}
-#GAMEMODE= 2555
-#GAMEDIRMODE= 0775
-#.endif
diff --git a/mk/platform/SunOS.mk b/mk/platform/SunOS.mk
index 2ee89b9e732..4ec7028651a 100644
--- a/mk/platform/SunOS.mk
+++ b/mk/platform/SunOS.mk
@@ -1,4 +1,4 @@
-# $NetBSD: SunOS.mk,v 1.38 2009/12/16 19:48:09 joerg Exp $
+# $NetBSD: SunOS.mk,v 1.39 2010/07/08 04:57:36 dholland Exp $
#
# Variable definitions for the SunOS/Solaris operating system.
@@ -89,16 +89,3 @@ _OPSYS_CAN_CHECK_SHLIBS= no # can't use readelf in check/bsd.check-vars.mk
# to avoid a test required by the libtool script that takes forever.
# FIXME: Adjust to work on this system and enable the lines below.
#_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax
-
-# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
-# (it defaults to 'no' as per defaults/mk.conf).
-# Set the group and mode to meaningful values in that case (defaults to
-# BINOWN, BINGRP and BINMODE as per defaults/mk.conf).
-.if !(empty(SETGIDGAME:M[yY][eE][sS]))
-GAMES_USER= games
-GAMES_GROUP= games
-GAMEOWN= ${GAMES_USER}
-GAMEGRP= ${GAMES_GROUP}
-GAMEMODE= 2555
-GAMEDIRMODE= 0775
-.endif
diff --git a/mk/platform/UnixWare.mk b/mk/platform/UnixWare.mk
index 29adb45a667..27439a77049 100644
--- a/mk/platform/UnixWare.mk
+++ b/mk/platform/UnixWare.mk
@@ -1,4 +1,4 @@
-# $NetBSD: UnixWare.mk,v 1.28 2009/07/26 05:32:43 agc Exp $
+# $NetBSD: UnixWare.mk,v 1.29 2010/07/08 04:57:36 dholland Exp $
#
# Variable definitions for the UnixWare 7 operating system.
@@ -82,17 +82,3 @@ _OPSYS_CAN_CHECK_SHLIBS= no # can't use readelf in check/bsd.check-vars.mk
# to avoid a test required by the libtool script that takes forever.
# FIXME: Adjust to work on this system and enable the lines below.
#_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax
-
-# If games are to be installed setgid, then SETGIDGAME is set to 'yes'
-# (it defaults to 'no' as per defaults/mk.conf).
-# Set the group and mode to meaningful values in that case (defaults to
-# BINOWN, BINGRP and BINMODE as per defaults/mk.conf).
-# FIXME: Adjust to work on this system and enable the lines below.
-#.if !(empty(SETGIDGAME:M[yY][eE][sS]))
-#GAMES_USER= games
-#GAMES_GROUP= games
-#GAMEOWN= ${GAMES_USER}
-#GAMEGRP= ${GAMES_GROUP}
-#GAMEMODE= 2555
-#GAMEDIRMODE= 0775
-#.endif