Subject: pkg/25259: extra `$' in pkgtools/pkg_tarup
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <hira@po6.nsk.ne.jp>
List: pkgsrc-bugs
Date: 04/21/2004 01:11:27
>Number: 25259
>Category: pkg
>Synopsis: extra `$' in pkgtools/pkg_tarup
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Apr 20 16:12:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Kouichirou Hiratsuka
>Release: NetBSD 2.0_BETA
>Organization:
>Environment:
System: NetBSD firefly.localdomain 2.0_BETA NetBSD 2.0_BETA (FIREFLY.MP) #11: Sun Apr 18 19:26:24 JST 2004 root@firefly.localdomain:/usr/src/sys/arch/i386/compile/FIREFLY.MP i386
Architecture: i386
Machine: i386
>Description:
When the pkgtools/pkg_tarup is used by a non-root user, it fails to
execute the awk(1).
% pkg_tarup mozilla-gtk2
Becoming root@firefly.localdomain to create a binary package
/usr/bin/awk: illegal field $(/usr/bin/su), name "1"
input record number 1, file
source line number 1
Password:
>How-To-Repeat:
cd ${PKGSRCDIR}/pkgtools/pkg_tarup
make && make install
pkg_tarup <installed package>
>Fix:
Index: files/pkg_tarup
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/pkgtools/pkg_tarup/files/pkg_tarup,v
retrieving revision 1.11
diff -u -r1.11 pkg_tarup
--- files/pkg_tarup 11 Dec 2003 16:29:08 -0000 1.11
+++ files/pkg_tarup 20 Apr 2004 15:22:34 -0000
@@ -24,7 +24,7 @@
if [ `${ID} -u` != 0 ]; then
${ECHO} "Becoming root@`/bin/hostname` to create a binary package"
- ${ECHO} -n "`${ECHO} ${SU} | ${AWK} '{ print $$1 }'` ";\
+ ${ECHO} -n "`${ECHO} ${SU} | ${AWK} '{ print $1 }'` ";\
exec ${SU} root -c "$0 $@"
fi
Index: files/pkg_tarup_all
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/pkgtools/pkg_tarup/files/pkg_tarup_all,v
retrieving revision 1.2
diff -u -r1.2 pkg_tarup_all
--- files/pkg_tarup_all 16 Sep 2003 23:19:47 -0000 1.2
+++ files/pkg_tarup_all 20 Apr 2004 15:24:02 -0000
@@ -21,7 +21,7 @@
if [ `${ID} -u` != 0 ]; then
${ECHO} "Becoming root@`/bin/hostname` to create binary packages"
- ${ECHO} -n "`${ECHO} ${SU} | ${AWK} '{ print $$1 }'` ";\
+ ${ECHO} -n "`${ECHO} ${SU} | ${AWK} '{ print $1 }'` ";\
exec ${SU} root -c "$0 $@"
fi
>Release-Note:
>Audit-Trail:
>Unformatted: