[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'tar' in the GNU Coding Standards

From: Ralf Wildenhues
Subject: Re: 'tar' in the GNU Coding Standards
Date: Sun, 1 Nov 2009 10:42:13 +0100
User-agent: Mutt/1.5.20 (2009-08-09)

Hello David,

sorry about the delay.

* Dr. David Kirkby wrote on Sat, Oct 24, 2009 at 04:35:36PM CEST:
> ----------------------------------------------------------
> The configure script and the Makefile rules for building and
> installation should not use any utilities directly except these:
>      awk cat cmp cp diff echo egrep expr false grep install-info
>      ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch tr true
> ----------------------------------------------------------

> I believe 'tar' should removed from that list, but allow someone to
> select a variable for 'tar'. On Solaris for instance, Sun's tar can
> not extract all tar files programs written with GNU tar, though it
> does manage most of them. (It's not simply the fact some options
> just as z and j are not supported, but more fundamental issues.

I agree that there are problems with non-portable tarballs.  That brings
up a couple of points:

The typical user downloading a tarball from the net and extracting it
does not use the $(TAR) in the makefile inside the tarball; he uses tar
on the command line, before the makefile is used for the first time, and
he doesn't need `make dist' or similar which would use tar again from
within the makefile.

If tar is not sufficient to extract some package tarball, then this
ought to be clear from the installation instructions.  However,
requiring, say, GNU tar in general, would be quite some move; we don't
usually any other GNU tools to be preinstalled, if only for
bootstrapping reasons.

The 'Releases' node of the GCS describes some of the precautions to use
when creating package tarballs.  If possible, I think it would be
prudent to advise the tarball creator to use the most portable archive
format possible.  The GNU tar manual has `Portability' and `Formats'
sections about this, and the GNU Automake manual node `Options' shows
how to apply them to your package, should you use automake.  Automake
uses old v7 archive format by default for `make dist'.

I'm unsure of how wide-spread installation of a more capable tar program
is on systems with a limited vendor tar.

> Issues with non-GNU versions of tar are common on lots of non-linux
> platforms when using GNU tools.
> hence it's better the user was able to write:
> $ TAR=/usr/local/bin/gtar
> $ export TAR

How would you set $(TAR) if not supplied by the user though?  I haven't
yet seen a good Autoconf test for a capable tar, besides one that
wouldn't select GNU tar only; writing such a macro would probably be a
good thing to do before changing GCS.  Requiring the user to select a
tar program manually seems a bit awkward.  Note that one alternative to
choosing a tar program is to use something like the `missing' program
that Automake selects for some tools that may not be present.  OTOH I
don't see how packages can ignore or replace tar's functionality in that
case, unlike, say, makeinfo, where the info files are typically
distributed in the tarball.

BTW, I agree that egrep and fgrep should be fixed, as you noted
somewhere in this thread.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]