helpGNU tar - Support: sr #109437, Please document portability...

 
 

sr #109437: Please document portability considerations of the various tar formats better

Submitted by:  Bruno Haible <haible>
Submitted on:  Wed 03 Jan 2018 12:40:37 AM UTC  
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 03 Jan 2018 12:40:37 AM UTC, original submission:

The documentation chapter 8 https://www.gnu.org/software/tar/manual/html_chapter/tar_8.html contains information about the various tar formats that GNU tar can create. However, this information fails to give a clear answer to the question:

When I create a tarball meant to be unpacked on various operating systems, which format should I use?

In my case the only important restriction is that the tarball has a file name of length 103: gettext-0.19.8.1.74-72e49-dirty/gettext-runtime/intl-csharp/doc/GNU_Gettext_GettextResourceManager.html

Section 8.3.4 says: "it might be safer for you to always use `--format=v7' for your distributions. Notice, however, that `ustar' format is a better alternative, as it is free from many of `v7''s drawbacks."

Section 8.3.5 says: "Along with V7 format, ustar format is a good choice for archives intended to be read with other implementations of tar."

So, which one to choose? It is not clear.

To answer the question, I created tarballs in the various formats and unpacked them on:
- AIX 7.1 (src/bos/usr/bin/tar/tar.c 1.49.14.15 2014)
- HP-UX 11.31 (tar.c 2011)
- Solaris 10
- FreeBSD 11: bsdtar 3.2.1
- NetBSD 7: tar.c,v 1.71 2013
- OpenBSD 6

Results:

gnu
AIX 7.1 OK
HP-UX 11.31 Files with names longer than 99 bytes: Names are truncated.
Solaris 10 warning "././@LongLink: typeflag 'L' not recognized, converting to regular file",
Files with names longer than 99 bytes: Names are truncated.
FreeBSD 11 OK
NetBSD 7 OK
OpenBSD 6 OK

oldgnu
AIX 7.1 OK
HP-UX 11.31 Files with names longer than 99 bytes: Names are truncated.
Solaris 10 warning "././@LongLink: typeflag 'L' not recognized, converting to regular file",
Files with names longer than 99 bytes: Names are truncated.
FreeBSD 11 OK
NetBSD 7 OK
OpenBSD 6 OK

v7
AIX 7.1 Files with names longer than 99 bytes are skipped.
HP-UX 11.31 Files with names longer than 99 bytes are skipped.
Solaris 10 Files with names longer than 99 bytes are skipped.
FreeBSD 11 Files with names longer than 99 bytes are skipped.
NetBSD 7 Files with names longer than 99 bytes are skipped.
OpenBSD 6 Files with names longer than 99 bytes are skipped.

ustar
AIX 7.1 OK
HP-UX 11.31 OK
Solaris 10 OK
FreeBSD 11 OK
NetBSD 7 OK
OpenBSD 6 OK

posix
AIX 7.1 Lots of added PaxHeaders.* files.
HP-UX 11.31 Generates lots of warnings "creating as regular file".
Lots of added PaxHeaders.* files.
Solaris 10 Generates lots of warnings "typeflag 'x' not recognized, converting to regular file".
Lots of added PaxHeaders.* files.
FreeBSD 11 OK
NetBSD 7 Generates lots of warnings "File extended headers posix ustar archive."
Lots of added PaxHeaders.* files.
OpenBSD 6 OK

Result summary:
- ustar is the only viable format.
- With v7 the files with long names are missing.
- With gnu and oldgnu, the files with long names have their names truncated on Solaris and HP-UX.
- With posix, many PaxHeaders.* files get created during extraction, which requires manual cleanup after extraction.

Bruno Haible <haible>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.3