summaryrefslogtreecommitdiff
path: root/mk/unprivileged.mk
AgeCommit message (Collapse)AuthorFilesLines
2007-07-04Make it easier to build and install packages "unprivileged", wherejlam1-5/+36
the owner of all installed files is a non-root user. This change affects most packages that require special users or groups by making them use the specified unprivileged user and group instead. (1) Add two new variables PKG_GROUPS_VARS and PKG_USERS_VARS to unprivileged.mk. These two variables are lists of other bmake variables that define package-specific users and groups. Packages that have user-settable variables for users and groups, e.g. apache and APACHE_{USER,GROUP}, courier-mta and COURIER_{USER,GROUP}, etc., should list these variables in PKG_USERS_VARS and PKG_GROUPS_VARS so that unprivileged.mk can know to set them to ${UNPRIVILEGED_USER} and ${UNPRIVILEGED_GROUP}. (2) Modify packages to use PKG_GROUPS_VARS and PKG_USERS_VARS.
2007-06-06Fixed indentation.rillig1-3/+3
2007-04-19Drop NO_MTREE by making it the default. Introduce USE_MTREE to get thejoerg1-5/+1
old behaviour back. Discussed on tech-pkg@.
2006-11-05Rename _INSTALL_ROOT_USER to REAL_ROOT_USER. Use it as default forjoerg1-3/+3
SETUID_ROOT_PERMS.
2006-11-05DOCOWN and DOCGRP should be unprivileged as well.joerg1-1/+3
2006-10-15Include some more magic to set ownership of packages build withjoerg1-1/+3
use-destdir to ${ROOT_USER}:${ROOT_GROU}. This allows us to safely use it on all packages which don't install setuid/setgid binaries.
2006-10-09Main infrastructure for DESTDIR support.joerg1-2/+8
Packages may set PKG_DESTDIR_SUPPORT to either "destdir" or "user-destdir" to flag support for this, following the same rules as PKG_INSTALLATION_TYPES (e.g. define before first include of bsd.prefs.mk). The user activates it via USE_DESTDIR. When set to "yes", packages with "user-destdir" are handled as "destdir". The installation of the package will not go to ${LOCALBASE}, but a subdirectory of ${WRKDIR} instead. pre/post install scripts are not run and the package is not registered either. A binary package can be created instead to be installed normally with pkg_add. For "user-destdir" packages, everything is run as normal user and ownership is supposed to be correctled by pkg_create later. Since the current pkg_install code uses pax and it doesn't allow overwriting owners, this does not work yet. For "destdir" packages, installation, packaging and cleaning is run as root. This commit does not change the handling of DEPENDS_TARGET or bin-install to allow recursive usage.
2006-08-31Instead of the variables CHOWN and CHGRP, the TOOLS_PLATFORM.* variablesrillig1-3/+3
need to be overridden to generate tool wrappers that also work when called with their simple names (for example chown instead of ${CHOWN}).
2006-07-15Converted the header comment to the canonical form. Changed therillig1-10/+16
definitions of CHOWN and CHGRP so that they still include the command that is skipped, which is useful when viewing the build logs.
2005-09-28Replaced "# defined" with "yes" in Makefile variables like GNU_CONFIGURE,rillig1-2/+2
NO_BUILD, USE_LIBTOOL.
2005-08-22Do not attempt to modify /etc/shells as a regular user.reed1-2/+5
Also set PKG_CREATE_USERGROUP with = instead of ?=.
2005-05-29Simplify unprivileged builds by adding a new variable, UNPRIVILEGED, that,jmmv1-0/+56
when set to YES, changes multiple defaults to let this work properly.