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.
2010-07-08 06:57:36 +02:00
|
|
|
# $NetBSD: Linux.mk,v 1.40 2010/07/08 04:57:36 dholland Exp $
|
2001-06-12 14:49:55 +02:00
|
|
|
#
|
|
|
|
# Variable definitions for the Linux operating system.
|
|
|
|
|
2005-05-03 20:30:12 +02:00
|
|
|
ECHO_N?= ${ECHO} -n
|
2008-01-12 23:44:10 +01:00
|
|
|
.if !defined(X11_TYPE) || ${X11_TYPE} == "native"
|
2007-10-19 15:41:34 +02:00
|
|
|
IMAKE_MAKE?= ${GMAKE} # program which gets invoked by imake
|
2010-03-18 23:46:01 +01:00
|
|
|
IMAKE_TOOLS= gmake # extra tools required when we use imake
|
2008-01-12 23:44:10 +01:00
|
|
|
.endif
|
2005-05-03 20:30:12 +02:00
|
|
|
IMAKEOPTS+= -DBuildHtmlManPages=NO
|
2007-10-19 15:41:34 +02:00
|
|
|
PKGLOCALEDIR?= share
|
2005-05-03 20:30:12 +02:00
|
|
|
PS?= /bin/ps
|
2005-08-02 05:38:09 +02:00
|
|
|
# XXX: default from defaults/mk.conf. Verify/correct for this platform
|
2005-05-03 20:30:12 +02:00
|
|
|
# and remove this comment.
|
|
|
|
SU?= /bin/su
|
|
|
|
TYPE?= type # Shell builtin
|
|
|
|
|
2007-10-19 15:41:34 +02:00
|
|
|
CPP_PRECOMP_FLAGS?= # unset
|
|
|
|
DEF_UMASK?= 022
|
2001-11-21 15:10:06 +01:00
|
|
|
DEFAULT_SERIAL_DEVICE?= /dev/null
|
2002-09-04 16:47:32 +02:00
|
|
|
EXPORT_SYMBOLS_LDFLAGS?= # Don't add symbols to the dynamic symbol table
|
2001-11-21 15:10:06 +01:00
|
|
|
GROUPADD?= /usr/sbin/groupadd
|
2001-11-21 14:54:14 +01:00
|
|
|
MOTIF_TYPE_DEFAULT?= openmotif # default 2.0 compatible libs type
|
2010-02-13 09:29:12 +01:00
|
|
|
.if exists(/usr/bin/false)
|
|
|
|
NOLOGIN?= /usr/bin/false
|
|
|
|
.else
|
2004-09-13 14:09:22 +02:00
|
|
|
NOLOGIN?= /bin/false
|
2010-02-13 09:29:12 +01:00
|
|
|
.endif
|
2007-10-19 15:41:34 +02:00
|
|
|
PKG_TOOLS_BIN?= ${LOCALBASE}/sbin
|
2002-07-15 18:24:01 +02:00
|
|
|
ROOT_CMD?= ${SU} - root -c
|
2010-01-16 03:16:35 +01:00
|
|
|
.if exists(/etc/ssdlinux_version)
|
|
|
|
ROOT_GROUP?= wheel
|
|
|
|
.else
|
2003-08-25 17:47:15 +02:00
|
|
|
ROOT_GROUP?= root
|
2010-01-16 03:16:35 +01:00
|
|
|
.endif
|
2001-11-21 15:10:06 +01:00
|
|
|
ROOT_USER?= root
|
|
|
|
SERIAL_DEVICES?= /dev/null
|
2007-10-19 15:41:34 +02:00
|
|
|
ULIMIT_CMD_datasize?= ulimit -d `ulimit -H -d`
|
|
|
|
ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s`
|
|
|
|
ULIMIT_CMD_memorysize?= ulimit -m `ulimit -H -m`
|
2001-11-21 15:10:06 +01:00
|
|
|
USERADD?= /usr/sbin/useradd
|
2001-11-21 13:53:04 +01:00
|
|
|
|
2003-02-24 20:49:47 +01:00
|
|
|
# imake installs manpages in weird places
|
|
|
|
# these values from /usr/X11R6/lib/X11/config/linux.cf
|
|
|
|
IMAKE_MAN_SOURCE_PATH= man/man
|
|
|
|
IMAKE_MAN_SUFFIX= 1x
|
|
|
|
IMAKE_LIBMAN_SUFFIX= 3x
|
2004-01-31 17:52:16 +01:00
|
|
|
IMAKE_KERNMAN_SUFFIX= 4
|
2003-02-24 20:49:47 +01:00
|
|
|
IMAKE_FILEMAN_SUFFIX= 5x
|
2005-12-04 02:44:30 +01:00
|
|
|
IMAKE_GAMEMAN_SUFFIX= 6
|
2004-01-31 17:52:16 +01:00
|
|
|
IMAKE_MISCMAN_SUFFIX= 7
|
2003-02-24 20:49:47 +01:00
|
|
|
IMAKE_MAN_DIR= ${IMAKE_MAN_SOURCE_PATH}1
|
|
|
|
IMAKE_LIBMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}3
|
2004-01-31 17:52:16 +01:00
|
|
|
IMAKE_KERNMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}4
|
2003-02-24 20:49:47 +01:00
|
|
|
IMAKE_FILEMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}5
|
2005-12-04 02:44:30 +01:00
|
|
|
IMAKE_GAMEMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}6
|
2004-01-31 17:52:16 +01:00
|
|
|
IMAKE_MISCMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}7
|
2003-02-24 20:49:47 +01:00
|
|
|
IMAKE_MANNEWSUFFIX= ${IMAKE_MAN_SUFFIX}
|
2006-01-13 00:43:56 +01:00
|
|
|
IMAKE_MANINSTALL?= maninstall catinstall
|
2007-07-29 07:18:36 +02:00
|
|
|
|
|
|
|
_OPSYS_EMULDIR.linux= # empty
|
|
|
|
_OPSYS_EMULDIR.linux32= # empty
|
|
|
|
|
2010-05-16 08:59:26 +02:00
|
|
|
_OPSYS_SYSTEM_RPATH= /lib${LIBABISUFFIX}:/usr/lib${LIBABISUFFIX}
|
|
|
|
|
2003-03-20 01:34:17 +01:00
|
|
|
.if exists(/usr/include/netinet6) || exists(/usr/include/linux/in6.h)
|
2002-12-18 07:18:14 +01:00
|
|
|
_OPSYS_HAS_INET6= yes # IPv6 is standard
|
|
|
|
.else
|
|
|
|
_OPSYS_HAS_INET6= no # IPv6 is not standard
|
|
|
|
.endif
|
2002-12-03 21:53:39 +01:00
|
|
|
_OPSYS_HAS_JAVA= no # Java is not standard
|
2001-11-21 14:44:44 +01:00
|
|
|
_OPSYS_HAS_MANZ= no # no MANZ for gzipping of man pages
|
2001-11-21 14:57:31 +01:00
|
|
|
_OPSYS_HAS_OSSAUDIO= no # libossaudio is available
|
2002-12-03 22:13:37 +01:00
|
|
|
_OPSYS_PERL_REQD= # no base version of perl required
|
2003-09-14 18:30:34 +02:00
|
|
|
_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
|
2004-11-15 15:48:18 +01:00
|
|
|
_OPSYS_SHLIB_TYPE= ELF # shared lib type
|
2002-12-03 20:24:26 +01:00
|
|
|
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
|
2003-12-16 23:54:13 +01:00
|
|
|
_PATCH_BACKUP_ARG?= -b -V simple -z # switch to patch(1) for backup suffix
|
2001-11-21 14:44:44 +01:00
|
|
|
_USE_RPATH= yes # add rpath to LDFLAGS
|
2002-02-27 05:41:22 +01:00
|
|
|
|
2003-04-15 07:29:45 +02:00
|
|
|
# flags passed to the linker to extract all symbols from static archives.
|
|
|
|
# this is GNU ld.
|
|
|
|
_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive
|
|
|
|
_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive
|
|
|
|
|
2005-03-18 19:16:34 +01:00
|
|
|
_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip
|
|
|
|
_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip
|
2003-09-05 15:54:13 +02:00
|
|
|
|
2010-05-16 08:59:26 +02:00
|
|
|
_OPSYS_CAN_CHECK_SHLIBS= yes # use readelf in check/bsd.check-vars.mk
|
2009-07-26 07:32:43 +02:00
|
|
|
|
2004-04-19 22:19:46 +02:00
|
|
|
# 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.
|
|
|
|
# FIXME: Adjust to work on this system and enable the lines below.
|
2005-01-25 19:15:58 +01:00
|
|
|
#_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax
|
2004-05-12 16:10:18 +02:00
|
|
|
|
2006-01-06 23:47:24 +01:00
|
|
|
.if (${MACHINE_ARCH} == "x86_64")
|
2006-01-10 17:58:04 +01:00
|
|
|
ABI?= 64
|
2006-01-06 23:47:24 +01:00
|
|
|
LIBABISUFFIX?= 64
|
|
|
|
.endif
|
2010-05-20 09:57:22 +02:00
|
|
|
|
|
|
|
## Use _CMD so the command only gets run when needed!
|
|
|
|
.if exists(/lib/libc.so.6)
|
|
|
|
_GLIBC_VERSION_CMD= /lib/libc.so.6 --version | \
|
|
|
|
sed -ne's/^GNU C.*version \(.*\),.*$$/\1/p'
|
|
|
|
GLIBC_VERSION= ${_GLIBC_VERSION_CMD:sh}
|
|
|
|
.endif
|