bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] --sparse-version ignored for --format=gnu


From: Sergey Poznyakoff
Subject: Re: [Bug-tar] --sparse-version ignored for --format=gnu
Date: Tue, 03 Oct 2017 23:10:00 +0300

Hi Chris,

> The man page section on sparse files[1] suggests that the "old GNU
> format" is risky, as it violates POSIX. As such, I was expecting to use
> tar --sparse-version=1.0 to get better behaviour, or for that to be the
> default for --sparse.
> 
> However, for the default of --format=gnu, --sparse-version=1.0 is

The only sparse format that can be used when creating legacy gnu
archives is "Old GNU" [1]. Both 0.1 [2] and 1.0 [3] formats
can be used only with archives in pax format. In fact, the
--sparse-version option is silently ignored when used with --format=gnu.
Arguably it would be better to just bail out in that case. I'm not
quite sure.

> I note that the pax format embeds the current pid[2] into[3] the tar
> file, apparently as a source of a "unique" random number, which seems

That's what mandated by the standard [4]:

  "If no -o exthdr.name= string is specified, pax shall use the
  following default value:

  %d/PaxHeaders.%p/%f"

You can use the --pax-option (analogous to the pax -o option), as
suggested above, if that doesn't suit your needs.

Best regards,
Sergey

[1] http://www.gnu.org/software/tar/manual/html_node/Old-GNU-Format.html
[2] http://www.gnu.org/software/tar/manual/html_node/PAX-0.html
[3] http://www.gnu.org/software/tar/manual/html_node/PAX-1.html
[4] http://pubs.opengroup.org/onlinepubs/009695399/utilities/pax.html




reply via email to

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