NetBSD Problem Report #20826
Received: (qmail 4286 invoked by uid 605); 20 Mar 2003 23:32:08 -0000
Message-Id: <200303202332.h2KNW6l21809@nool.mines.edu>
Date: Thu, 20 Mar 2003 16:32:06 -0700 (MST)
From: jbernard@mines.edu
Sender: gnats-bugs-owner@netbsd.org
Reply-To: jbernard@mines.edu
To: gnats-bugs@gnats.netbsd.org
Subject: parallel/pvm3 fails to install
X-Send-Pr-Version: 3.95
>Number: 20826
>Category: pkg
>Synopsis: parallel/pvm3 fails to install
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 20 23:33:00 +0000 2003
>Closed-Date: Thu Mar 20 23:35:06 +0000 2003
>Last-Modified: Fri Mar 21 00:27:01 +0000 2003
>Originator: Jim Bernard
>Release: NetBSD 1.6P
>Organization:
>Environment:
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
>Description:
At installation (make install) after building from source, the
tr command that builds _PVM_ARCH for use in constructing PVM_ARCH
fails:
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/arch.mk" 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
>How-To-Repeat:
make && make install
>Fix:
Quoting the arguments to tr in arch.mk 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
in arch.mk.
--- arch.mk-dist 2002-10-30 03:48:03.000000000 -0700
+++ arch.mk 2003-03-20 16:04:16.000000000 -0700
@@ -3,11 +3,11 @@
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "NetBSD"
_PVM_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"
_PVM_OPSYS= LINUX
. if !empty(MACHINE_ARCH:Malpha*)
_PVM_ARCH= ALPHA
. elif !empty(MACHINE_ARCH:Marm*)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: wiz
State-Changed-When: Thu Mar 20 15:34:46 PST 2003
State-Changed-Why:
Committed, thanks!
From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: pr/20826 CVS commit: pkgsrc/parallel/pvm3
Date: Fri, 21 Mar 2003 01:34:37 +0200 (EET)
Module Name: pkgsrc
Committed By: wiz
Date: Thu Mar 20 23:34:36 UTC 2003
Modified Files:
pkgsrc/parallel/pvm3: arch.mk
Log Message:
Quote tr arguments. From Jim Bernard in PR 20826.
To generate a diff of this commit:
cvs rdiff -r1.4 -r1.5 pkgsrc/parallel/pvm3/arch.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: David Laight <david@l8s.co.uk>
To: netbsd-bugs@netbsd.org
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/20826: parallel/pvm3 fails to install
Date: Fri, 21 Mar 2003 00:23:19 +0000
> >Fix:
> Quoting the arguments to tr in arch.mk 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
> in arch.mk.
They MUST be quoted, all shells (hopefully including bash) will expand
[a-z] to the list of all single character filenames in the current
directory. If no such files exist they will be left alone.
Failing to quote [a-z] is a common problem :-(
David
--
David Laight: david@l8s.co.uk
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.