| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: bsd.pkginstall.mk,v 1.43 2008/03/04 05:11:18 jlam Exp $ | | 1 | # $NetBSD: bsd.pkginstall.mk,v 1.44 2008/03/04 05:55:42 jlam Exp $ |
2 | # | | 2 | # |
3 | # This Makefile fragment is included by bsd.pkg.mk and implements the | | 3 | # This Makefile fragment is included by bsd.pkg.mk and implements the |
4 | # common INSTALL/DEINSTALL scripts framework. To use the pkginstall | | 4 | # common INSTALL/DEINSTALL scripts framework. To use the pkginstall |
5 | # framework, simply set the relevant variables to customize the install | | 5 | # framework, simply set the relevant variables to customize the install |
6 | # scripts to the package. | | 6 | # scripts to the package. |
7 | # | | 7 | # |
8 | # User-settable variables: | | 8 | # User-settable variables: |
9 | # | | 9 | # |
10 | # PKGINSTALL_VERBOSE | | 10 | # PKGINSTALL_VERBOSE |
11 | # A list of scriptlets that will be verbose and output a message | | 11 | # A list of scriptlets that will be verbose and output a message |
12 | # noting the actions taken. | | 12 | # noting the actions taken. |
13 | # | | 13 | # |
14 | # * "all" is a special value that implies all of the other items | | 14 | # * "all" is a special value that implies all of the other items |
| @@ -362,27 +362,27 @@ su-create-usergroup: ${_INSTALL_USERGROU | | | @@ -362,27 +362,27 @@ su-create-usergroup: ${_INSTALL_USERGROU |
362 | # meant to be setuid-root, and should be used as follows: | | 362 | # meant to be setuid-root, and should be used as follows: |
363 | # | | 363 | # |
364 | # SPECIAL_PERMS+= /path/to/suidroot ${SETUID_ROOT_PERMS} | | 364 | # SPECIAL_PERMS+= /path/to/suidroot ${SETUID_ROOT_PERMS} |
365 | # | | 365 | # |
366 | # SETGID_GAME_PERMS is a convenience definition to note an executable is | | 366 | # SETGID_GAME_PERMS is a convenience definition to note an executable is |
367 | # meant to be setgid-game, and should be used as follows: | | 367 | # meant to be setgid-game, and should be used as follows: |
368 | # | | 368 | # |
369 | # SPECIAL_PERMS+= /path/to/sgidgame ${SETGID_GAME_PERMS} | | 369 | # SPECIAL_PERMS+= /path/to/sgidgame ${SETGID_GAME_PERMS} |
370 | # | | 370 | # |
371 | # Keywords: setuid setgid st_mode perms | | 371 | # Keywords: setuid setgid st_mode perms |
372 | # | | 372 | # |
373 | SPECIAL_PERMS?= # empty | | 373 | SPECIAL_PERMS?= # empty |
374 | SETUID_ROOT_PERMS?= ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 4511 | | 374 | SETUID_ROOT_PERMS?= ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 4511 |
375 | SETGID_GAME_PERMS?= ${GAMEOWN} ${GAMEGRP} 2755 | | 375 | SETGID_GAME_PERMS?= ${GAMEOWN} ${GAMEGRP} ${GAMEMODE} |
376 | | | 376 | |
377 | _INSTALL_PERMS_FILE= ${_PKGINSTALL_DIR}/perms | | 377 | _INSTALL_PERMS_FILE= ${_PKGINSTALL_DIR}/perms |
378 | _INSTALL_PERMS_DATAFILE= ${_PKGINSTALL_DIR}/perms-data | | 378 | _INSTALL_PERMS_DATAFILE= ${_PKGINSTALL_DIR}/perms-data |
379 | _INSTALL_UNPACK_TMPL+= ${_INSTALL_PERMS_FILE} | | 379 | _INSTALL_UNPACK_TMPL+= ${_INSTALL_PERMS_FILE} |
380 | _INSTALL_DATA_TMPL+= ${_INSTALL_PERMS_DATAFILE} | | 380 | _INSTALL_DATA_TMPL+= ${_INSTALL_PERMS_DATAFILE} |
381 | | | 381 | |
382 | ${_INSTALL_PERMS_DATAFILE}: | | 382 | ${_INSTALL_PERMS_DATAFILE}: |
383 | ${RUN}${MKDIR} ${.TARGET:H} | | 383 | ${RUN}${MKDIR} ${.TARGET:H} |
384 | ${RUN}${_FUNC_STRIP_PREFIX}; \ | | 384 | ${RUN}${_FUNC_STRIP_PREFIX}; \ |
385 | set -- dummy ${SPECIAL_PERMS}; shift; \ | | 385 | set -- dummy ${SPECIAL_PERMS}; shift; \ |
386 | exec 1>>${.TARGET}; \ | | 386 | exec 1>>${.TARGET}; \ |
387 | while ${TEST} $$# -gt 0; do \ | | 387 | while ${TEST} $$# -gt 0; do \ |
388 | file="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \ | | 388 | file="$$1"; owner="$$2"; group="$$3"; mode="$$4"; \ |