NetBSD Problem Report #39795
From www@NetBSD.org Fri Oct 24 14:53:28 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 401B263B978
for <gnats-bugs@gnats.netbsd.org>; Fri, 24 Oct 2008 14:53:28 +0000 (UTC)
Message-Id: <20081024145327.C138663B966@narn.NetBSD.org>
Date: Fri, 24 Oct 2008 14:53:27 +0000 (UTC)
From: telarson@west.com
Reply-To: telarson@west.com
To: gnats-bugs@NetBSD.org
Subject: install-sh fails at pax with IRIX /bin/sh
X-Send-Pr-Version: www-1.0
>Number: 39795
>Category: pkg
>Synopsis: install-sh fails at pax with IRIX /bin/sh
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: irix-pkg-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Oct 24 14:55:00 +0000 2008
>Closed-Date:
>Last-Modified: Mon Aug 13 18:56:41 +0000 2012
>Originator: Tim Larson
>Release:
>Organization:
>Environment:
IRIX franklin 6.5 6.5.22f 10070056 IP32
>Description:
Bootstrap fails on pax install.
=> Unwrapping files-to-be-installed.
===> Installing for pax-20080110
/usr/pkgsrc/bootstrap/work/bin/install-sh -c -o root -g sys -m 755 -d /usr/pkg/bin
/usr/pkgsrc/bootstrap/work/bin/install-sh -c -o root -g sys -m 755 -d /usr/pkg/man/man1
/usr/pkgsrc/bootstrap/work/bin/install-sh -c -o root -g sys -m 755 -d /usr/pkg/man/cat1
/usr/pkgsrc/bootstrap/work/bin/install-sh -c -o root -g sys pax /usr/pkg/bin/$(echo pax | sed 's,x,x,')
install: destination is not a directory
*** Error code 1
When run manually, the command executes just fine. But my shell is bash, and the script runs as /bin/sh. Changing to /bin/sh and running manually gives this error as well. In /bin/sh, the values of $msrc and $src (in the install-sh script) are:
msrc:pax /usr/pkg/bin/$(echo pax | sed
src:sed
The correct values are "pax" and "/usr/pkg/bin/pax".
>How-To-Repeat:
Run bootstrap on an IRIX system.
>Fix:
(Suggestions only, not known-working resolutions.)
I recommend that all scripts necessary for the bootstrap process be created from running sed on a script.in file rather than merely copied into place, so that the first line can be changed to whatever bootstrap's $shprog has been set to. The install-sh is already like this, so it just needs the extra replacement done. Using the specified $shprog would allow us to work around known shell deficiencies of an OS simply by using a working shell instead.
BUT, since IRIX-supplied shells sh and ksh are the same (and broken), IRIX should have $need_ksh set to yes. Bootstrapping ksh should happen earlier. Then $shprog can be set to this shell, and other scripts regenerated (see above) to use the new value.
ALSO, maybe the pax Makefile.in can be modified so that it does not have command substitution. If this were done, most likely parsing of the command line would be successful.
>Release-Note:
>Audit-Trail:
From: "Larson, Timothy E." <TELarson@west.com>
To: <gnats-bugs@NetBSD.org>
Cc:
Subject: RE: pkg/39795: install-sh fails at pax with IRIX /bin/sh
Date: Fri, 31 Oct 2008 15:31:09 -0500
This seems to do the trick:
root@franklin 568# diff -u archivers/pax/files/Makefile.in.orig
archivers/pax/files/Makefile.in
--- archivers/pax/files/Makefile.in.orig Thu Aug 28 08:50:37 2008
+++ archivers/pax/files/Makefile.in Fri Oct 31 08:47:58 2008
@@ -24,6 +24,10 @@
PROG=3D pax
+transformed_prog_name!=3D echo $(PROG) | sed
'$(program_transform_name)'
+transformed_cpio_name!=3D echo cpio | sed
'$(program_transform_name)'
+transformed_tar_name!=3D echo tar | sed '$(program_transform_name)'
+
OBJS=3D ar_io.o ar_subs.o buf_subs.o file_subs.o ftree.o \
gen_subs.o getoldopt.o options.o pat_rep.o pax.o sel_subs.o
tables.o \
tar.o tty_subs.o \
@@ -48,12 +52,12 @@
$(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
$(INSTALL) -m 755 -d $(DESTDIR)$(man1dir)
$(INSTALL) -m 755 -d $(DESTDIR)$(cat1dir)
- $(INSTALL) $(PROG) $(DESTDIR)$(bindir)/$$(echo $(PROG) | sed
'$(program_transform_name)')
- ln -f $(DESTDIR)$(bindir)/$$(echo $(PROG) | sed
'$(program_transform_name)') $(DESTDIR)$(bindir)/$$(echo cpio | sed
'$(program_transform_name)')
- ln -f $(DESTDIR)$(bindir)/$$(echo $(PROG) | sed
'$(program_transform_name)') $(DESTDIR)$(bindir)/$$(echo tar | sed
'$(program_transform_name)')
- $(INSTALL) -m 444 $(PROG).1 $(DESTDIR)$(man1dir)/$$(echo $(PROG)
| sed '$(program_transform_name)').1
- $(INSTALL) -m 444 $(PROG).cat1 $(DESTDIR)$(cat1dir)/$$(echo
$(PROG) | sed '$(program_transform_name)').0
- $(INSTALL) -m 444 cpio.1 $(DESTDIR)$(man1dir)/$$(echo cpio | sed
'$(program_transform_name)').1
- $(INSTALL) -m 444 cpio.cat1 $(DESTDIR)$(cat1dir)/$$(echo cpio |
sed '$(program_transform_name)').0
- $(INSTALL) -m 444 tar.1 $(DESTDIR)$(man1dir)/$$(echo tar | sed
'$(program_transform_name)').1
- $(INSTALL) -m 444 tar.cat1 $(DESTDIR)$(cat1dir)/$$(echo tar |
sed '$(program_transform_name)').0
+ $(INSTALL) $(PROG) $(DESTDIR)$(bindir)/$(transformed_prog_name)
+ ln -f $(DESTDIR)$(bindir)/$(transformed_prog_name)
$(DESTDIR)$(bindir)/$(transformed_cpio_name)
+ ln -f $(DESTDIR)$(bindir)/$(transformed_prog_name)
$(DESTDIR)$(bindir)/$(transformed_tar_name)
+ $(INSTALL) -m 444 $(PROG).1
$(DESTDIR)$(man1dir)/$(transformed_prog_name).1
+ $(INSTALL) -m 444 $(PROG).cat1
$(DESTDIR)$(cat1dir)/$(transformed_prog_name).0
+ $(INSTALL) -m 444 cpio.1
$(DESTDIR)$(man1dir)/$(transformed_cpio_name).1
+ $(INSTALL) -m 444 cpio.cat1
$(DESTDIR)$(cat1dir)/$(transformed_cpio_name).0
+ $(INSTALL) -m 444 tar.1
$(DESTDIR)$(man1dir)/$(transformed_tar_name).1
+ $(INSTALL) -m 444 tar.cat1
$(DESTDIR)$(cat1dir)/$(transformed_tar_name).0
--=20
Tim Larson AMT2 Unix Systems Administrator
InterCall, a division of West Corporation
Eschew obfuscation!
From: "Larson, Timothy E." <TELarson@west.com>
To: <gnats-bugs@NetBSD.org>, <pkg-manager@netbsd.org>,
<gnats-admin@netbsd.org>, <pkgsrc-bugs@netbsd.org>
Cc:
Subject: RE: pkg/39795: install-sh fails at pax with IRIX /bin/sh
Date: Fri, 9 Jan 2009 10:45:28 -0600
Can anyone review this IRIX patch?
--
Tim Larson=A0=A0=A0=A0=A0=A0=A0 AMT2 Unix Systems Administrator
=A0=A0=A0 InterCall, a division of West Corporation
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Eschew obfuscation!=20
=20
Responsible-Changed-From-To: pkg-manager->irix-pkg-people
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Sat, 10 Jan 2009 00:46:44 +0000
Responsible-Changed-Why:
Problem on IRIX.
From: Staffan =?iso-8859-1?Q?Thom=E9n?= <duck@shangtai.net>
To: gnats-bugs@NetBSD.org
Cc:
Subject: RE: pkg/39795: install-sh fails at pax with IRIX /bin/sh
Date: Mon, 6 Aug 2012 10:09:24 +0300
Another obvious patch moulding in gnats. Yes this works just fine.
--
Staffan Thomén - ADB3 455F 10D5 86D1 78D6 048D 11BB D66E 7C7E 2EF8
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/39795: install-sh fails at pax with IRIX /bin/sh
Date: Mon, 6 Aug 2012 10:08:49 +0200
(a) pax is no longer bootstrap tool.
(b) pdksh should be used on IRIX.
In short: does it even still apply?
Joerg
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 09 Aug 2012 06:50:02 +0000
State-Changed-Why:
as per Joerg's mail: is this still relevant?
State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 13 Aug 2012 18:56:41 +0000
State-Changed-Why:
feedback request bounced
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.36 2007/11/24 03:27:39 kano Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.