Descriptionarchive/tar: Fix support for long links and improve PAX support.
The tar/archive code from golang has a problem with linknames with length >
100. A pax header is added but the original header still written with a too
long field length.
As it is clear that pax support is incomplete I have added missing
implementation parts.
This commit contains code from the golang project in the folder tar/archiv.
The following pax header records are now automatically written:
- gname)
- linkpath
- path
- uname
The following fields can be written with PAX, but the default is to use the
star binary extension.
- gid (value > 2097151)
- size (value > 8589934591)
- uid (value > 2097151)
The string fields are written when the value is longer as the field or if the
string contains a char that is not encodable as 7-bit ASCII value.
The change was tested against a current ubuntu-cloud image tarball comparing
the compressed result.
+ added some automated tests for the new functionality.
Fixes issue 6056.
Patch Set 1 #Patch Set 2 : diff -r fbc1a650b595 https://code.google.com/p/go #Patch Set 3 : diff -r fbc1a650b595 https://code.google.com/p/go #Patch Set 4 : diff -r fbc1a650b595 https://code.google.com/p/go #
Total comments: 22
Patch Set 5 : diff -r fbc1a650b595 https://code.google.com/p/go #
Total comments: 16
Patch Set 6 : diff -r fbc1a650b595 https://code.google.com/p/go #
MessagesTotal messages: 13
|