automake
[Top][All Lists]
Advanced

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

AM_INIT_AUTOMAKE([1.9 tar-ustar]) and GNU TAR problems


From: Kent Boortz
Subject: AM_INIT_AUTOMAKE([1.9 tar-ustar]) and GNU TAR problems
Date: Mon, 09 Nov 2009 16:30:29 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin)

Hi,

My real question is, how can I specify what TAR to use in "make dist",
and avoid GNU TAR for my packaging, when 'tar-ustar' is specified to
automake?

Now the longer story ;)

As most systems I build on now have a system TAR that knows the USTAR
format, I did some experiments with specifying this in automake

  AM_INIT_AUTOMAKE([1.9 tar-ustar]) 

GNU autotools versions used

  autoconf 2.63
  automake 1.10.2
  libtool 2.2.6

What I understand from reading the produced "configure" script, and
from my experiments, when the user invoke the configure script it
tries hard to find GNU TAR, then falls back and try find other TAR
implementations. I have GNU tar in path, but the Solaris TAR first,
still Solaris TAR is skipped and the GNU tar is picked.

The exact line in resulting Makefile will be

  am__tar = gtar --format=ustar -chf - "$$tardir"

The problem is, even with GNU TAR 1.22 the format it produces is not
fully compatible with most other USTAR TAR implementations I have
tried. These I found could not unpack the test TAR I produced with
GNU TAR and the flag "--format=ustar"

  AIX 5.3
  HP-UX 11.11, 11.23, 11.31
  Solaris 8, 9, 10, 11
  SCO OpenServer 6

I tried the small snippet below. Then distributed the resulting TAR to
the AIX, HP-UX and other hosts, and tried unpack it there with the TAR
that came with that operating system. If I packed with GNU TAR they
could not unpack it correctly (only the top directory was created), if
packed with Solaris TAR all could unpack it, even GNU TAR

  # I try be as nice as I can, 98 + 20 + 77 should be within USTAR
  # format limits even if one or two chars are wasted on '\0' or the
  # '/' delimiter
  
a=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  b=bbbbbbbbbbbbbbbbbbbb
  
c=ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc

  rm -fr $a
  mkdir -p $a/$b
  touch $a/$b/$c

  # GNU TAR
  gtar --format=ustar -cf foo.tar $a
  # Solaris TAR
  #/usr/bin/tar -cf foo.tar $a

Do you know how can I specify what TAR to use in "make dist", and
avoid GNU TAR for my packaging, when 'tar-ustar' is specified to
automake?

I can of course solve this by adding an extra step after "make dist",
unpack the produced source TAR using GNU TAR and repack it with
Solaris TAR again... ;)

kent

-- 
Kent Boortz, Senior Production Engineer
Sun Microsystems Inc., the MySQL team
Office: +46 863 11 363
Mobile: +46 70 279 11 71




reply via email to

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