mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
4a3cfda45e
With docker-17.06.0 some images pulled do not extract properly. Some files don't appear in correct directories. This may or may not cause the pull to fail. These images can't be pushed or saved. 17.06 is the first version of Docker built with go1.8. Cause There are multiple updates to the tar package in go1.8. https://go-review.googlesource.com/c/32234/ disables using "prefix" field when new tar archives are being written. Prefix field was previously set when a record in the archive used a path longer than 100 bytes. Another change https://go-review.googlesource.com/c/31444/ makes the reader ignore the "prefix" field value if the record is in GNU format. GNU format defines that same area should be used for access and modified times. If the "prefix" field is not read, a file will only be extracted by the basename. The problem is that with a previous version of the golang archive package headers could be written, that use the prefix field while at the same time setting the header format to GNU. This happens when numeric fields are big enough that they can not be written as octal strings and need to be written in binary. Usually, this shouldn't happen: uid, gid, devmajor, devminor can use up to 7 bytes, size and timestamp can use 11. If one of the records does overflow it switches the whole writer to GNU mode and all next files will be saved in GNU format. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> |
||
---|---|---|
.. | ||
testdata | ||
archive.go | ||
archive_linux.go | ||
archive_linux_test.go | ||
archive_other.go | ||
archive_test.go | ||
archive_unix.go | ||
archive_unix_test.go | ||
archive_windows.go | ||
archive_windows_test.go | ||
changes.go | ||
changes_linux.go | ||
changes_other.go | ||
changes_posix_test.go | ||
changes_test.go | ||
changes_unix.go | ||
changes_windows.go | ||
copy.go | ||
copy_unix.go | ||
copy_unix_test.go | ||
copy_windows.go | ||
diff.go | ||
diff_test.go | ||
example_changes.go | ||
README.md | ||
time_linux.go | ||
time_unsupported.go | ||
utils_test.go | ||
whiteouts.go | ||
wrap.go | ||
wrap_test.go |
This code provides helper functions for dealing with archive files.