summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authortv <tv@pkgsrc.org>2004-10-29 14:51:41 +0000
committertv <tv@pkgsrc.org>2004-10-29 14:51:41 +0000
commit52c771b5f76525401c7e916972f5b0cd9a5e3c90 (patch)
tree0169c7037009d4b576ae17f58b174057cd24ff2d /pkgtools
parentd5ec323ef3e487ef3690d406e371c3696d0a4dbd (diff)
downloadpkgsrc-52c771b5f76525401c7e916972f5b0cd9a5e3c90.tar.gz
1.6.4: Fix "su" logic to match that in bsd.pkg.mk.
Makes "make replace" work correctly on Interix.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_tarup/Makefile10
-rw-r--r--pkgtools/pkg_tarup/files/pkg_tarup14
2 files changed, 14 insertions, 10 deletions
diff --git a/pkgtools/pkg_tarup/Makefile b/pkgtools/pkg_tarup/Makefile
index b75e12b9e33..2b41e5a25e5 100644
--- a/pkgtools/pkg_tarup/Makefile
+++ b/pkgtools/pkg_tarup/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.23 2004/10/06 15:27:28 erh Exp $
+# $NetBSD: Makefile,v 1.24 2004/10/29 14:51:41 tv Exp $
-DISTNAME= pkg_tarup-1.6.3
+DISTNAME= pkg_tarup-1.6.4
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
@@ -17,6 +17,7 @@ NO_MTREE= yes
# Set SCRIPT_SUBST to substitute "@VARIABLE@" with "value"
SCRIPT_SUBST+= \
ECHO=${ECHO:Q} \
+ ECHO_N=${ECHO_N:Q} \
GREP=${GREP:Q} \
HEAD=${HEAD:Q} \
ID=${ID:Q} \
@@ -24,9 +25,10 @@ SCRIPT_SUBST+= \
PKG_SUFX=${PKG_SUFX:Q} \
PREFIX=${PREFIX:Q} \
PKG_TOOLS_BIN=${PKG_TOOLS_BIN:Q} \
- SED=${SED:Q} \
+ ROOT_USER=${ROOT_USER:Q} \
+ SED=${SED:Q} \
SH=${SH:Q} \
- SU=${SU:Q} \
+ SU_CMD=${SU_CMD:Q} \
XARGS=${XARGS:Q}
SCRIPT_SUBST_SED= ${SCRIPT_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
diff --git a/pkgtools/pkg_tarup/files/pkg_tarup b/pkgtools/pkg_tarup/files/pkg_tarup
index dc68c4a5803..526a47e221f 100644
--- a/pkgtools/pkg_tarup/files/pkg_tarup
+++ b/pkgtools/pkg_tarup/files/pkg_tarup
@@ -1,6 +1,6 @@
#! @SH@
#
-# $Id: pkg_tarup,v 1.17 2004/10/13 23:18:35 xtraeme Exp $
+# $Id: pkg_tarup,v 1.18 2004/10/29 14:51:41 tv Exp $
#
# Tar up installed package
#
@@ -17,18 +17,20 @@ export PATH
OS=`uname -s`
ECHO=${ECHO:-@ECHO@}
+ECHO_N=${ECHO_N:-@ECHO_N@}
HEAD=${HEAD:-@HEAD@}
ID=${ID:-@ID@}
+ROOT_USER=${ROOT_USER:-@ROOT_USER@}
SED=${SED:-@SED@}
-SU=${SU:-@SU@}
+SU_CMD=${SU_CMD:-@SU_CMD@}
GREP=${GREP:-@GREP@}
XARGS=${XARGS:-@XARGS@}
-if [ `${ID} -u` != 0 ]; then
- ${ECHO} "Becoming root@`/bin/hostname` to create a binary package"
- ${ECHO} -n "`${ECHO} ${SU} | ${SED} -e's/[[:space:]].*//'` ";\
+if [ `${ID} -u` != `${ID} -u ${ROOT_USER}` ]; then
+ ${ECHO} "Becoming ${ROOT_USER}@`/bin/hostname` to create a binary package"
+ ${ECHO_N} "`${ECHO} ${SU_CMD} | ${SED} -e's/[[:space:]].*//'` ";\
( for arg in "$@"; do echo \"${arg}\"; done ) |
- ${SU} root -c "exec ${XARGS} \"$0\""
+ ${SU_CMD} "exec ${XARGS} \"$0\""
exit $?
fi