Subject: pkg/22693: pax and gtar install bin/tar and pax and gcpio install cpio
To: None <gnats-bugs@gnats.netbsd.org>
From: None <reed@reedmedia.net>
List: netbsd-bugs
Date: 09/04/2003 23:21:30
>Number:         22693
>Category:       pkg
>Synopsis:       pax and gtar install bin/tar and pax and gcpio install cpio
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 05 06:22:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.6.1_STABLE
>Organization:
http://bsd.reedmedia.net/
>Environment:
	
	
System: NetBSD rainier.reedmedia.net 1.6.1_STABLE NetBSD 1.6.1_STABLE (GENERIC) #0: Tue Aug 12 02:52:57 PDT 2003 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
On one of my systems today, gtar gave me an error message saying "pax".
For some reason my gtar command was not gnutar but was pax.

The pax source Makefile's install target does:
        $(INSTALL) $(PROG) $(PREFIX)/bin
        ln -f $(PREFIX)/bin/$(PROG) $(PREFIX)/bin/tar
        ln -f $(PREFIX)/bin/$(PROG) $(PREFIX)/bin/cpio
        $(INSTALL) -m 444 $(PROG).1 $(mandirman1)/$(PROG).1
        $(INSTALL) -m 444 cpio.1 $(mandirman1)/cpio.1
        $(INSTALL) -m 444 tar.1 $(mandirman1)/tar.1
        $(INSTALL) -m 444 $(PROG).cat1 $(mandircat1)/$(PROG).0
        $(INSTALL) -m 444 cpio.cat1 $(mandircat1)/cpio.0
        $(INSTALL) -m 444 tar.cat1 $(mandircat1)/tar.0

(My GNU_PROGRAM_PREFIX is "".)

gtar-base installs:
 ${PREFIX}/man/man1/${GNU_PROGRAM_PREFIX}tar.1
and also does:
 ${LN} -sf ${GNU_PROGRAM_PREFIX}tar ${PREFIX}/bin/gtar

And gcpio installs to:
 bin/${GNU_PROGRAM_PREFIX}cpio
 man/man1/${GNU_PROGRAM_PREFIX}cpio.1

>How-To-Repeat:
Set GNU_PROGRAM_PREFIX to nothing and see that man pages and binaries
have same name with pax, gtar-base, and gcpio.
>Fix:
	
On many systems, GNU tar is known as "tar" and GNU cpio is known as "cpio".
I don't mind using pax equivalents, but I don't want them overwriting
each other -- especially when transfering binary packages (that
may have wrong binaries).

Maybe some config in pax so if GNU_PROGRAM_PREFIX is not set or nothing,
then pax won't overwrite tar or cpio.

Also maybe a ptar or pcpio for pax versions?
Well maybe not: ptar, I believe, is for CPIO archives -- IEEE Std. 1003.1-1988
(Archive/Interchange File format). But it has different switches.
(ptar and pcpio are with Caldera and SCO Unix.)

>Release-Note:
>Audit-Trail:
>Unformatted: