summaryrefslogtreecommitdiff
path: root/pkgtools/pkg_tarup
diff options
context:
space:
mode:
authorcube <cube@pkgsrc.org>2004-08-09 21:13:37 +0000
committercube <cube@pkgsrc.org>2004-08-09 21:13:37 +0000
commit1a5d6acbd1fe099e99bf15843f450923025be75f (patch)
tree06a4ae46660486c8118bd0086b95ba6c83af5d30 /pkgtools/pkg_tarup
parentee0a9bedcacd98afef529dd32f170bc459a28ad6 (diff)
downloadpkgsrc-1a5d6acbd1fe099e99bf15843f450923025be75f.tar.gz
Gross hack to prevent quoting errors when root's shell is the unfamous csh.
Should hopefully fix PR 26551, but if anyone has a better solution, or is willing to do the necessary work to allow pkg_tarup to be run by any user, ideas are welcomed. Say hi to version 1.6.2.
Diffstat (limited to 'pkgtools/pkg_tarup')
-rw-r--r--pkgtools/pkg_tarup/Makefile7
-rw-r--r--pkgtools/pkg_tarup/files/pkg_tarup7
2 files changed, 9 insertions, 5 deletions
diff --git a/pkgtools/pkg_tarup/Makefile b/pkgtools/pkg_tarup/Makefile
index 2bcd493477d..e7adc1ef646 100644
--- a/pkgtools/pkg_tarup/Makefile
+++ b/pkgtools/pkg_tarup/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.21 2004/07/19 17:38:36 erh Exp $
+# $NetBSD: Makefile,v 1.22 2004/08/09 21:13:37 cube Exp $
-DISTNAME= pkg_tarup-1.6.1
+DISTNAME= pkg_tarup-1.6.2
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
@@ -26,7 +26,8 @@ SCRIPT_SUBST+= \
PKG_TOOLS_BIN=${PKG_TOOLS_BIN:Q} \
SED=${SED:Q} \
SH=${SH:Q} \
- SU=${SU:Q}
+ SU=${SU: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 05f34e94039..12a8a13ffd1 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.14 2004/07/19 17:38:36 erh Exp $
+# $Id: pkg_tarup,v 1.15 2004/08/09 21:13:37 cube Exp $
#
# Tar up installed package
#
@@ -22,11 +22,14 @@ ID=${ID:-@ID@}
SED=${SED:-@SED@}
SU=${SU:-@SU@}
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:]].*//'` ";\
- exec ${SU} root -c "$0 \"\$@\"" "$0" "$@"
+ ( for arg in "$@"; do echo \"${arg}\"; done ) |
+ ${SU} root -c "exec ${XARGS} \"$0\""
+ exit $?
fi
PKG_DBDIR=${PKG_DBDIR:-@PKG_DBDIR@}