Bruno Haible via Gnulib discussion list <bug-gnulib@gnu.org> writes: >> 2) Some choices may be opinionated, but I'm not sure which ones. Maybe >> PAX archives as in --format=posix? I recall seeing some people >> recommend --format=ustar for greater compatibility > > I use --format=ustar because I want the oldest (= most compatible) format > that fits my needs. > - The default is --format=v7 (with Automake). > - But with it I got errors such as > tar: > gettext-0.19.8.1.74-72e49-dirty/gettext-tools/gnulib-tests/test-term-ostream-xterm-linux-mandriva.out: > file name is too long (max 99); not dumped > tar: > gettext-0.19.8.1.74-72e49-dirty/gettext-runtime/intl-csharp/doc/GNU_Gettext_GettextResourceManager.html: > file name is too long (max 99); not dumped > > Looking at [1], --format=posix brings only features that most GNU package > tarballs will never need.
I found a situation where --format=posix doesn't work well and --format=ustar works fine. For GNU libtasn1 I want to support old platforms, so this matters a bit. It seems tar 1.13.25 from Debian 3 doesn't understand the virtual ./PaxHeaders/ sub-directory and print warnings. It still exits successfully though. But it create a ./PaxHeaders/ sub-directory in the current directory. This breaks some workflows that assume that the first directory entry of a release tarball is the sub-directory to cd into and start the build process. https://gitlab.com/gnutls/libtasn1/-/jobs/8988818560 $ tar xfz tar/b-trisquel11/libtasn1-*.tar.gz tar: ./PaxHeaders/libtasn1-4.19.0.78-9537: Unknown file type 'x', extracted as normal file tar: libtasn1-4.19.0.78-9537/PaxHeaders/.tarball-version: Unknown file type 'x', extracted as normal file ... $ cd $(tar tfz tar/b-trisquel11/libtasn1-*.tar.gz | head -n1) /bin/bash: cd: ./PaxHeaders/libtasn1-4.19.0.78-9537: Not a directory Tar 1.14 from Debian 3.1 do handle the same --format=posix tarball fine: https://gitlab.com/gnutls/libtasn1/-/jobs/8988818562 I changed this to use 'tar-ustar' and then the tarball works fine on Debian 3 too: https://gitlab.com/gnutls/libtasn1/-/jobs/8988906320 So it seems --format=ustar is a bit more conservative than --format=posix. That wasn't completely clear to me from the documentation, but maybe this post helps someone. FWIW, the tarball used here was prepared using tar 1.34. /Simon
signature.asc
Description: PGP signature