pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk + Conditionally add GAMES_USER and GAMES_GROUP to t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5640d616ef9d
branches:  trunk
changeset: 539336:5640d616ef9d
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Mar 04 06:45:33 2008 +0000

description:
+ 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:

 mk/pkginstall/bsd.pkginstall.mk |  10 +++++-----
 mk/platform/AIX.mk              |   8 +++++---
 mk/platform/BSDOS.mk            |   8 +++++---
 mk/platform/Darwin.mk           |   8 +++++---
 mk/platform/DragonFly.mk        |   8 +++++---
 mk/platform/FreeBSD.mk          |   8 +++++---
 mk/platform/IRIX.mk             |   8 +++++---
 mk/platform/Interix.mk          |   8 +++++---
 mk/platform/Linux.mk            |   8 +++++---
 mk/platform/NetBSD.mk           |   8 +++++---
 mk/platform/OpenBSD.mk          |   8 +++++---
 mk/platform/SunOS.mk            |   8 +++++---
 mk/platform/UnixWare.mk         |   8 +++++---
 mk/unprivileged.mk              |  11 ++++++++++-
 14 files changed, 75 insertions(+), 42 deletions(-)

diffs (truncated from 327 to 300 lines):

diff -r e39a9cd5cdad -r 5640d616ef9d mk/pkginstall/bsd.pkginstall.mk
--- a/mk/pkginstall/bsd.pkginstall.mk   Tue Mar 04 05:55:42 2008 +0000
+++ b/mk/pkginstall/bsd.pkginstall.mk   Tue Mar 04 06:45:33 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkginstall.mk,v 1.44 2008/03/04 05:55:42 jlam Exp $
+# $NetBSD: bsd.pkginstall.mk,v 1.45 2008/03/04 06:45:33 jlam Exp $
 #
 # This Makefile fragment is included by bsd.pkg.mk and implements the
 # common INSTALL/DEINSTALL scripts framework.  To use the pkginstall
@@ -50,7 +50,7 @@
        FONTS_DIRS.ttf FONTS_DIRS.type1 FONTS_DIRS.x11 \
 _SYS_VARS.pkginstall= \
        SETUID_ROOT_PERMS \
-       SETGID_GAME_PERMS \
+       SETGID_GAMES_PERMS \
        SHLIB_TYPE \
        LDCONFIG_ADD_CMD \
        LDCONFIG_REMOVE_CMD
@@ -363,16 +363,16 @@
 #
 #      SPECIAL_PERMS+= /path/to/suidroot ${SETUID_ROOT_PERMS}
 #
-# SETGID_GAME_PERMS is a convenience definition to note an executable is
+# SETGID_GAMES_PERMS is a convenience definition to note an executable is
 # meant to be setgid-game, and should be used as follows:
 #
-#      SPECIAL_PERMS+= /path/to/sgidgame ${SETGID_GAME_PERMS}
+#      SPECIAL_PERMS+= /path/to/sgidgame ${SETGID_GAMES_PERMS}
 #
 # Keywords: setuid setgid st_mode perms
 #
 SPECIAL_PERMS?=                # empty
 SETUID_ROOT_PERMS?=    ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 4511
-SETGID_GAME_PERMS?=    ${GAMEOWN} ${GAMEGRP} ${GAMEMODE}
+SETGID_GAMES_PERMS?=   ${GAMES_USER} ${GAMES_GROUP} ${GAMEMODE}
 
 _INSTALL_PERMS_FILE=           ${_PKGINSTALL_DIR}/perms
 _INSTALL_PERMS_DATAFILE=       ${_PKGINSTALL_DIR}/perms-data
diff -r e39a9cd5cdad -r 5640d616ef9d mk/platform/AIX.mk
--- a/mk/platform/AIX.mk        Tue Mar 04 05:55:42 2008 +0000
+++ b/mk/platform/AIX.mk        Tue Mar 04 06:45:33 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: AIX.mk,v 1.29 2007/10/19 13:41:34 rillig Exp $
+# $NetBSD: AIX.mk,v 1.30 2008/03/04 06:45:34 jlam Exp $
 #
 # Variable definitions for the AIX operating system.
 
@@ -81,8 +81,10 @@
 # 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]))
-#GAMEOWN=              games
-#GAMEGRP=              games
+#GAMES_USER=           games
+#GAMES_GROUP=          games
+#GAMEOWN=              ${GAMES_USER}
+#GAMEGRP=              ${GAMES_GROUP}
 #GAMEMODE=             2555
 #GAMEDIRMODE=          0775
 #.endif
diff -r e39a9cd5cdad -r 5640d616ef9d mk/platform/BSDOS.mk
--- a/mk/platform/BSDOS.mk      Tue Mar 04 05:55:42 2008 +0000
+++ b/mk/platform/BSDOS.mk      Tue Mar 04 06:45:33 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: BSDOS.mk,v 1.23 2007/10/19 13:41:34 rillig Exp $
+# $NetBSD: BSDOS.mk,v 1.24 2008/03/04 06:45:34 jlam Exp $
 #
 # Variable definitions for the BSD/OS operating system.
 
@@ -89,8 +89,10 @@
 # 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]))
-#GAMEOWN=              games
-#GAMEGRP=              games
+#GAMES_USER=           games
+#GAMES_GROUP=          games
+#GAMEOWN=              ${GAMES_USER}
+#GAMEGRP=              ${GAMES_GROUP}
 #GAMEMODE=             2555
 #GAMEDIRMODE=          0775
 #.endif
diff -r e39a9cd5cdad -r 5640d616ef9d mk/platform/Darwin.mk
--- a/mk/platform/Darwin.mk     Tue Mar 04 05:55:42 2008 +0000
+++ b/mk/platform/Darwin.mk     Tue Mar 04 06:45:33 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Darwin.mk,v 1.30 2008/02/17 11:45:14 yyamano Exp $
+# $NetBSD: Darwin.mk,v 1.31 2008/03/04 06:45:34 jlam Exp $
 #
 # Variable definitions for the Darwin operating system.
 
@@ -118,8 +118,10 @@
 # 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]))
-#GAMEOWN=              games
-#GAMEGRP=              games
+#GAMES_USER=           games
+#GAMES_GROUP=          games
+#GAMEOWN=              ${GAMES_USER}
+#GAMEGRP=              ${GAMES_GROUP}
 #GAMEMODE=             2555
 #GAMEDIRMODE=          0775
 #.endif
diff -r e39a9cd5cdad -r 5640d616ef9d mk/platform/DragonFly.mk
--- a/mk/platform/DragonFly.mk  Tue Mar 04 05:55:42 2008 +0000
+++ b/mk/platform/DragonFly.mk  Tue Mar 04 06:45:33 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: DragonFly.mk,v 1.35 2008/01/16 14:03:31 joerg Exp $
+# $NetBSD: DragonFly.mk,v 1.36 2008/03/04 06:45:34 jlam Exp $
 #
 # Variable definitions for the DragonFly operating system.
 
@@ -89,8 +89,10 @@
 # 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]))
-GAMEOWN=               games
-GAMEGRP=               games
+GAMES_USER=            games
+GAMES_GROUP=           games
+GAMEOWN=               ${GAMES_USER}
+GAMEGRP=               ${GAMES_GROUP}
 GAMEMODE=              2555
 GAMEDIRMODE=           0775
 .endif
diff -r e39a9cd5cdad -r 5640d616ef9d mk/platform/FreeBSD.mk
--- a/mk/platform/FreeBSD.mk    Tue Mar 04 05:55:42 2008 +0000
+++ b/mk/platform/FreeBSD.mk    Tue Mar 04 06:45:33 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: FreeBSD.mk,v 1.23 2007/10/19 13:41:35 rillig Exp $
+# $NetBSD: FreeBSD.mk,v 1.24 2008/03/04 06:45:34 jlam Exp $
 #
 # Variable definitions for the FreeBSD operating system.
 
@@ -89,8 +89,10 @@
 # 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]))
-GAMEOWN=               games
-GAMEGRP=               games
+GAMES_USER=            games
+GAMES_GROUP=           games
+GAMEOWN=               ${GAMES_USER}
+GAMEGRP=               ${GAMES_GROUP}
 GAMEMODE=              2555
 GAMEDIRMODE=           0775
 .endif
diff -r e39a9cd5cdad -r 5640d616ef9d mk/platform/IRIX.mk
--- a/mk/platform/IRIX.mk       Tue Mar 04 05:55:42 2008 +0000
+++ b/mk/platform/IRIX.mk       Tue Mar 04 06:45:33 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: IRIX.mk,v 1.33 2008/02/21 04:23:58 tnn Exp $
+# $NetBSD: IRIX.mk,v 1.34 2008/03/04 06:45:34 jlam Exp $
 #
 # Variable definitions for the IRIX operating system.
 
@@ -115,8 +115,10 @@
 # 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]))
-#GAMEOWN=              games
-#GAMEGRP=              games
+#GAMES_USER=           games
+#GAMES_GROUP=          games
+#GAMEOWN=              ${GAMES_USER}
+#GAMEGRP=              ${GAMES_GROUP}
 #GAMEMODE=             2555
 #GAMEDIRMODE=          0775
 #.endif
diff -r e39a9cd5cdad -r 5640d616ef9d mk/platform/Interix.mk
--- a/mk/platform/Interix.mk    Tue Mar 04 05:55:42 2008 +0000
+++ b/mk/platform/Interix.mk    Tue Mar 04 06:45:33 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Interix.mk,v 1.55 2008/02/21 04:23:58 tnn Exp $
+# $NetBSD: Interix.mk,v 1.56 2008/03/04 06:45:34 jlam Exp $
 #
 # Variable definitions for the Interix operating system.
 
@@ -170,8 +170,10 @@
 # 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]))
-#GAMEOWN=              games
-#GAMEGRP=              games
+#GAMES_USER=           games
+#GAMES_GROUP=          games
+#GAMEOWN=              ${GAMES_USER}
+#GAMEGRP=              ${GAMES_GROUP}
 #GAMEMODE=             2555
 #GAMEDIRMODE=          0775
 #.endif
diff -r e39a9cd5cdad -r 5640d616ef9d mk/platform/Linux.mk
--- a/mk/platform/Linux.mk      Tue Mar 04 05:55:42 2008 +0000
+++ b/mk/platform/Linux.mk      Tue Mar 04 06:45:33 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Linux.mk,v 1.32 2008/01/12 22:44:10 joerg Exp $
+# $NetBSD: Linux.mk,v 1.33 2008/03/04 06:45:34 jlam Exp $
 #
 # Variable definitions for the Linux operating system.
 
@@ -87,8 +87,10 @@
 # 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]))
-#GAMEOWN=              games
-#GAMEGRP=              games
+#GAMES_USER=           games
+#GAMES_GROUP=          games
+#GAMEOWN=              ${GAMES_USER}
+#GAMEGRP=              ${GAMES_GROUP}
 #GAMEMODE=             2555
 #GAMEDIRMODE=          0775
 #.endif
diff -r e39a9cd5cdad -r 5640d616ef9d mk/platform/NetBSD.mk
--- a/mk/platform/NetBSD.mk     Tue Mar 04 05:55:42 2008 +0000
+++ b/mk/platform/NetBSD.mk     Tue Mar 04 06:45:33 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: NetBSD.mk,v 1.28 2008/01/16 14:03:31 joerg Exp $
+# $NetBSD: NetBSD.mk,v 1.29 2008/03/04 06:45:34 jlam Exp $
 #
 # Variable definitions for the NetBSD operating system.
 
@@ -153,8 +153,10 @@
 # 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]))
-GAMEOWN=               games
-GAMEGRP=               games
+GAMES_USER=            games
+GAMES_GROUP=           games
+GAMEOWN=               ${GAMES_USER}
+GAMEGRP=               ${GAMES_GROUP}
 GAMEMODE=              2555
 GAMEDIRMODE=           0775
 .endif
diff -r e39a9cd5cdad -r 5640d616ef9d mk/platform/OpenBSD.mk
--- a/mk/platform/OpenBSD.mk    Tue Mar 04 05:55:42 2008 +0000
+++ b/mk/platform/OpenBSD.mk    Tue Mar 04 06:45:33 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: OpenBSD.mk,v 1.27 2007/10/19 13:41:35 rillig Exp $
+# $NetBSD: OpenBSD.mk,v 1.28 2008/03/04 06:45:34 jlam Exp $
 #
 # Variable definitions for the OpenBSD operating system.
 
@@ -105,8 +105,10 @@
 # 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]))
-#GAMEOWN=              games
-#GAMEGRP=              games
+#GAMES_USER=           games
+#GAMES_GROUP=          games
+#GAMEOWN=              ${GAMES_USER}
+#GAMEGRP=              ${GAMES_GROUP}
 #GAMEMODE=             2555
 #GAMEDIRMODE=          0775
 #.endif
diff -r e39a9cd5cdad -r 5640d616ef9d mk/platform/SunOS.mk
--- a/mk/platform/SunOS.mk      Tue Mar 04 05:55:42 2008 +0000
+++ b/mk/platform/SunOS.mk      Tue Mar 04 06:45:33 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: SunOS.mk,v 1.33 2007/11/20 17:49:49 rillig Exp $
+# $NetBSD: SunOS.mk,v 1.34 2008/03/04 06:45:34 jlam Exp $
 #
 # Variable definitions for the SunOS/Solaris operating system.
 
@@ -95,8 +95,10 @@
 # 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]))
-#GAMEOWN=              games
-#GAMEGRP=              games
+#GAMES_USER=           games
+#GAMES_GROUP=          games
+#GAMEOWN=              ${GAMES_USER}
+#GAMEGRP=              ${GAMES_GROUP}
 #GAMEMODE=             2555
 #GAMEDIRMODE=          0775
 #.endif
diff -r e39a9cd5cdad -r 5640d616ef9d mk/platform/UnixWare.mk
--- a/mk/platform/UnixWare.mk   Tue Mar 04 05:55:42 2008 +0000
+++ b/mk/platform/UnixWare.mk   Tue Mar 04 06:45:33 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: UnixWare.mk,v 1.26 2007/10/19 13:41:35 rillig Exp $
+# $NetBSD: UnixWare.mk,v 1.27 2008/03/04 06:45:34 jlam Exp $
 #
 # Variable definitions for the UnixWare 7 operating system.
 
@@ -87,8 +87,10 @@
 # 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]))
-#GAMEOWN=              games
-#GAMEGRP=              games
+#GAMES_USER=           games
+#GAMES_GROUP=          games
+#GAMEOWN=              ${GAMES_USER}
+#GAMEGRP=              ${GAMES_GROUP}
 #GAMEMODE=             2555



Home | Main Index | Thread Index | Old Index