summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2001-11-08 12:47:12 +0000
committeragc <agc@pkgsrc.org>2001-11-08 12:47:12 +0000
commitb3df2f05f85f4706602bd9bbfc1a33b9bd2fc881 (patch)
tree427021a3e65128716508510b86f3ba80b306be75 /mk
parent62355b0bfa0ab3f6840a32e094fb77e7ac9c5b34 (diff)
downloadpkgsrc-b3df2f05f85f4706602bd9bbfc1a33b9bd2fc881.tar.gz
Set the default values of SU_CMD and PRE_ROOT_CMD in bsd.pkg.defaults.mk,
not bsd.pkg.mk, so that the user is more aware of them (there were placeholder examples of both definitions in bsd.pkg.defaults.mk already). Explain PRE_ROOT_CMD a bit more throroughly, and correct an example of its use. Make an alternative definition for SU_CMD sync with reality.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.defaults.mk13
-rw-r--r--mk/bsd.pkg.mk6
2 files changed, 7 insertions, 12 deletions
diff --git a/mk/bsd.pkg.defaults.mk b/mk/bsd.pkg.defaults.mk
index 9fa97b34075..397f64a32be 100644
--- a/mk/bsd.pkg.defaults.mk
+++ b/mk/bsd.pkg.defaults.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.defaults.mk,v 1.11 2001/11/02 01:24:06 hubertf Exp $
+# $NetBSD: bsd.pkg.defaults.mk,v 1.12 2001/11/08 12:47:13 agc Exp $
#
# A file providing defaults for pkgsrc and the packages collection.
@@ -292,17 +292,16 @@ PATCH_FUZZ_FACTOR?= -F0
# Possible: any Fortran compiler
# Default: none
-#PRE_ROOT_CMD=${CHMOD} -R o+w ${WRKDIR}
+PRE_ROOT_CMD?= ${TRUE}
# Command to be run by normal user, just before becoming root (see
-# SU_CMD) to install the package. For example, the command shown
-# would allow root to write and modify files below ${WRKDIR}, if on an
-# NFS -noroot file system.
+# SU_CMD) to install the package. For example, "chmod -R o+w ${WRKDIR}"
+# would allow others to write and modify files below ${WRKDIR}.
# Possible: any shell commands
# Default: none
-#SU_CMD=
+SU_CMD?= su - root -c
# Command to perform before "make install", if the user does not have
-# an effective uid of 0. A possible substitute is "sudo -u root"
+# an effective uid of 0. A possible substitute is "sudo sh -c"
# Possible: su, sudo, or priv, with appropriate arguments
# Default: ${SU} root -c
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index a85b730019e..32747f698a8 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.843 2001/11/08 09:29:56 agc Exp $
+# $NetBSD: bsd.pkg.mk,v 1.844 2001/11/08 12:47:12 agc Exp $
#
# This file is in the public domain.
#
@@ -2034,10 +2034,6 @@ real-build: build-message pre-build do-build post-build build-cookie
real-install: do-su-install
real-package: do-su-package
-# sudo or priv are acceptable substitutes
-SU_CMD?= ${SU} - root -c
-PRE_ROOT_CMD?= ${TRUE}
-
_SU_TARGET= \
if [ `${ID} -u` = 0 ]; then \
${MAKE} ${MAKEFLAGS} $$realtarget; \