1 # $NetBSD: unprivileged.mk,v 1.2 2005/08/22 17:13:28 reed Exp $
3 # Ease configuration of unprivileged (non-root) builds.
5 # UNPRIVILEGED If set to 'yes', enable unprivileged builds.
8 # UNPRIVILEGED_GROUP Specifies the group name (or gid) that will be used
9 # to install files. Guessed if empty.
11 # UNPRIVILEGED_USER Specifies the user name (or uid) that will be used
12 # to install files. Guessed if empty.
14 .if defined(UNPRIVILEGED) && !empty(UNPRIVILEGED:M[Yy][Ee][Ss])
16 # Guess which user/group has to be used.
17 . if !defined(UNPRIVILEGED_USER) || empty(UNPRIVILEGED_USER)
18 UNPRIVILEGED_USER!= ${ID} -n -u
20 . if !defined(UNPRIVILEGED_GROUP) || empty(UNPRIVILEGED_GROUP)
21 UNPRIVILEGED_GROUP!= ${ID} -n -g
24 # Override super-user account.
25 ROOT_GROUP= ${UNPRIVILEGED_GROUP}
26 ROOT_USER= ${UNPRIVILEGED_USER}
28 # Override user/group pairs used to install files.
29 BINGRP= ${UNPRIVILEGED_GROUP}
30 BINOWN= ${UNPRIVILEGED_USER}
31 GAMEGRP= ${UNPRIVILEGED_GROUP}
32 GAMEOWN= ${UNPRIVILEGED_USER}
33 MANGRP= ${UNPRIVILEGED_GROUP}
34 MANOWN= ${UNPRIVILEGED_USER}
35 SHAREGRP= ${UNPRIVILEGED_GROUP}
36 SHAREOWN= ${UNPRIVILEGED_USER}
38 # Override installation modes. As a regular user, we may have problems
39 # when overwriting files if they are not writable.
43 # mtree is useless as a regular user because it won't set directory
44 # ownerships correctly.
47 # As a regular user, creation of other users and groups won't work, so
48 # disable this step by default.
49 PKG_CREATE_USERGROUP= NO
51 # Override commands that won't work as a regular user.
56 # Do not attempt to modify /etc/shells as a regular user.
57 PKG_REGISTER_SHELLS= NO