Subject: pkg/20826: parallel/pvm3 fails to install
To: None <>
From: None <>
List: netbsd-bugs
Date: 03/20/2003 16:32:06
>Number:         20826
>Category:       pkg
>Synopsis:       parallel/pvm3 fails to install
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 20 15:33:00 PST 2003
>Originator:     Jim Bernard
>Release:        NetBSD 1.6P
System: NetBSD nool 1.6P NetBSD 1.6P (NOOL-$Revision: 1.35 $) #0: Sun Mar 16 12:27:03 MST 2003 jim@roc:/wd1/var/tmp/compile/sys/arch/i386/compile/NOOL i386
Architecture: i386
Machine: i386
	At installation (make install) after building from source, the
	tr command that builds _PVM_ARCH for use in constructing PVM_ARCH
usage: tr [-cs] string1 string2
       tr [-c] -d string1
       tr [-c] -s string1
       tr [-c] -ds string1 string2
make: "/usr/local/src/netbsd-current/usr/pkgsrc/parallel/pvm3/" line 8: warning: "echo i386 | /usr/bin/tr [a-z] [A-Z]" returned non-zero status

	causing one of the install commands to fail because PVM_ARCH is
	incorrectly set to NETBSD instead of NETBSDI386:

install -c -s -o root -g wheel -m 555 /home/usr.local/src/netbsd-current/usr/pkgsrc/parallel/pvm3/work.nool/pvm3/bin/NETBSD/*                     /usr/pkg/pvm3/bin/NETBSD
install: /home/usr.local/src/netbsd-current/usr/pkgsrc/parallel/pvm3/work.nool/pvm3/bin/NETBSD/*: stat: No such file or directory
*** Error code 1

	make && make install
	Quoting the arguments to tr in fixes the problem.

	Curiously, bash evaluates the command

	  echo i386 | /usr/bin/tr [a-z] [A-Z]

	successfully, whereas our sh does not.  Is this a bug in sh
	or a bug in bash, or is either behavior deemed acceptable?
	In any case, it seems like a good idea to quote the arguments

---	2002-10-30 03:48:03.000000000 -0700
+++	2003-03-20 16:04:16.000000000 -0700
@@ -3,11 +3,11 @@
 .include "../../mk/"
 .if ${OPSYS} == "NetBSD"
-_PVM_ARCH!=	${ECHO} ${MACHINE_ARCH} | ${TR} [a-z] [A-Z]
+_PVM_ARCH!=	${ECHO} ${MACHINE_ARCH} | ${TR} "[a-z]" "[A-Z]"
 .elif ${OPSYS} == "Linux"
 .  if !empty(MACHINE_ARCH:Malpha*)
 .  elif !empty(MACHINE_ARCH:Marm*)