NetBSD Problem Report #46307

From jschauma@netmeister.org  Sat Apr  7 17:40:56 2012
Return-Path: <jschauma@netmeister.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 396A763B946
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  7 Apr 2012 17:40:56 +0000 (UTC)
Message-Id: <20120407173931.14BA9356A73@panix.netmeister.org>
Date: Sat,  7 Apr 2012 13:39:31 -0400 (EDT)
From: jschauma@netmeister.org
Reply-To: jschauma@netmeister.org
To: gnats-bugs@gnats.NetBSD.org
Subject: /usr/bootstrap.sh pkgsrc fails due to unknown compression
X-Send-Pr-Version: 3.95

>Number:         46307
>Category:       misc
>Synopsis:       /usr/bootstrap.sh pkgsrc fails due to unknown compression
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    riz
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 07 17:45:00 +0000 2012
>Last-Modified:  Sun Apr 15 20:16:28 +0000 2012
>Originator:     Jan Schaumann
>Release:        NetBSD 5.1.2
>Organization:

>Environment:
AMI ami-230fdf4a

NetBSD domU-12-31-39-06-69-29.compute-1.internal 5.1.2 NetBSD 5.1.2 (XEN3PAE_DOMU) #0: Thu Feb  2 17:18:36 UTC 2012  builds@b6.netbsd.org:/home/builds/ab/netbsd-5-1-2-RELEASE/i386/201202021012Z-obj/home/builds/ab/netbsd-5-1-2-RELEASE/src/sys/arch/i386/compile/XEN3PAE_DOMU i386

>Description:

AMI ami-230fdf4a includes in /etc/motd the hint to run '/usr/bootstrap.sh pkgsrc', but that command fails:

 /usr/bootstrap.sh pkgsrc
 [: missing ]
 Downloading latest pkgsrc stable release...
 Trying 2001:470:1f05:3d::21:80 ...
 ftp: Can't connect to `2001:470:1f05:3d::21:80': No route to host
 Trying 199.233.217.249:80 ...
 Requesting http://ftp.netbsd.org/pub//pkgsrc/stable/pkgsrc.tar.xz
 100% |*******************************************************| 21988 KiB  418.63 KiB/s    00:00 ETA
 22516236 bytes retrieved in 00:52 (418.63 KiB/s)
 gzip: unknown compression format
 tar: End of archive volume 1 reached
 tar: Sorry, unable to determine archive format.


>How-To-Repeat:

ec2-run-instances ami-230fdf4a
ssh <hostname>
/usr/bootstrap.sh pkgsrc


>Fix:

First, fix the missing space in the [ test in bootstrap.sh:

if [ $# -ne 1]; then

to become

if [ $# -ne 1 ]; then

(Add CVS keywords, perhaps, to facilitate finding the source for this?)

For the actual error, the pkgsrc tarball needs to be compressed using a format that is available on all systems. :-/



>Release-Note:

>Audit-Trail:
From: Jan Schaumann <jschauma@netmeister.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: misc/46307
Date: Sat, 7 Apr 2012 14:16:56 -0400

 --W/D3X8sky0X3AmG5
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable

 diff -bu /usr/bootstrap.sh /tmp/bootstrap.sh
 --- /usr/bootstrap.sh   2012-02-08 15:12:06.000000000 +0000
 +++ /tmp/bootstrap.sh   2012-04-07 18:16:03.000000000 +0000
 @@ -1,13 +1,13 @@
  #! /bin/sh
 =20
 -URLROOT=3D"http://ftp.netbsd.org/pub/"
 +URLROOT=3D"http://ftp.netbsd.org/pub"
 =20
  usage() {
         echo "Usage: ${0##*/} [src|pkgsrc]"
         exit
  }
 =20
 -if [ $# -ne 1]; then
 +if [ $# -ne 1 ]; then
         usage
  fi
 =20
 @@ -17,14 +17,16 @@
  src)
         echo "Downloading -current src..."
         ftp -a "$URLROOT/NetBSD/NetBSD-current/tar_files/src.tar.gz"
 +       echo "Extracting -current src under /usr..."
         tar -xzpf src.tar.gz -C /usr/
         rm -f src.tar.gz
         ;;
  pkgsrc)
         echo "Downloading latest pkgsrc stable release..."
 -       ftp -a "$URLROOT/pkgsrc/stable/pkgsrc.tar.xz"
 -       tar -xzpf pkgsrc.tar.xz -C /usr/
 -       rm -f pkgsrc.tar.xz
 +       ftp -a "$URLROOT/pkgsrc/stable/pkgsrc.tar.bz2"
 +       echo "Extracting latest pkgsrc stable release under /usr..."
 +       tar -jxpf pkgsrc.tar.bz2 -C /usr/
 +       rm -f pkgsrc.tar.bz2
         ;;
  *)
         usage


 --W/D3X8sky0X3AmG5
 Content-Type: application/pgp-signature
 Content-Disposition: inline

 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.9 (NetBSD)

 iQEVAwUBT4CEmGbOT+lva9PXAQL5yQf/Y8cz13dHyHeYO7ijma3KxgRdkMWL14h4
 +7Yf5qyXtgOkVSp2I9BtHwJg7GYPAnHuN3n+o+7UONbh3dmX0mS12DSICe3YhUEZ
 AKR1x6eVQVN+pcu0fDvWxIFzh9+OFPwevUbTP6og6RqgvW/vaCv14Zk4QRZ1XRwJ
 g/P7EVHtARUIOI/XXhoIg7zs1gXK/E3KKB+GJoujEkmiAe4xvQ5ZZFZ0Gi3o/2NA
 UVPKGsUmD8fBqckHaZx9Jnj7t8Vse7+Cy7Q0MEWwfGg23X5ig0sz4AIK3Bi9Ax6o
 r9LeqDi5JI9UmmaLL7C4nbweITo7qOmxZNEc0ULpS0dhkPAv6wfUXw==
 =7VI7
 -----END PGP SIGNATURE-----

 --W/D3X8sky0X3AmG5--

Responsible-Changed-From-To: misc-bug-people->riz
Responsible-Changed-By: riz@NetBSD.org
Responsible-Changed-When: Sun, 15 Apr 2012 20:16:28 +0000
Responsible-Changed-Why:
It's mine.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz 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.