Subject: pkg/23218: pkg_install uses tar --fast-read but not in gnutar
To: None <>
From: None <>
List: netbsd-bugs
Date: 10/21/2003 15:03:11
>Number:         23218
>Category:       pkg
>Synopsis:       pkg_install uses tar --fast-read but not in gnutar
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 21 22:04:00 UTC 2003
>Release:        NetBSD 1.6.1_STABLE
System: NetBSD 1.6.1_STABLE NetBSD 1.6.1_STABLE (GENERIC) #0: Tue Aug 12 02:52:57 PDT 2003 i386
Architecture: i386
Machine: i386
(I originally mentioned this to tech-pkg on 22/Sep/2003.)

my tar doesn't have --fast-read. (My work-around will be to change my

revision 1.8 of pkgsrc/pkgtools/pkg_install/files/add/perform.c forces
--fast-read. It previously used:

  #if defined(HAVE_TAR__FAST_READ)

Should all implementations of tar have --fast-read??

My later work-around was simply:

diff -b -u -r1.12 perform.c
--- pkgtools/pkg_install/files/add/perform.c	2003/09/23 13:22:38	1.12
+++ pkgtools/pkg_install/files/add/perform.c	2003/10/21 21:49:05
@@ -185,7 +185,7 @@
 						goto bomb;
-				extra1 = "--fast-read";
+				extra1 = NULL; /* "--fast-read"; */
 				extra2 = CONTENTS_FNAME;
 			} else {
 			        /* some values for stdin */

The pkgtools/pkg_install/Makefile says:
CONFIGURE_ARGS+=        --with-pax=${PAX}
CONFIGURE_ARGS+=        --with-tar=${TAR}

The configure --help says:
  --with-tar=path         Path to pax-as-tar (PREFIX/bin/tar)
  --with-pax=path         Path to pax (PREFIX/bin/pax)

But TAR on some systems may be ${LOCALBASE}/bin/tar. Which is where
gtar-base may install it if GNU_PROGRAM_PREFIX is nothing.

Please note that I already discussed this problem in PR
pkg/22693. But I am making a new PR, because I want the pkg_add
to work with any implementation of tar.

Have GNU tar located at ${LOCALBASE}/bin/tar and try to use pkg_add.
Allow pkg_add to work with any implementation of tar.

If it really must use fast-read then don't use "tar" as command it runs.