From 1a5d6acbd1fe099e99bf15843f450923025be75f Mon Sep 17 00:00:00 2001 From: cube Date: Mon, 9 Aug 2004 21:13:37 +0000 Subject: 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. --- pkgtools/pkg_tarup/Makefile | 7 ++++--- pkgtools/pkg_tarup/files/pkg_tarup | 7 +++++-- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'pkgtools/pkg_tarup') 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@} -- cgit v1.2.3