-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/archive: remove backward compat hack for go < 1.9
The fillGo18FileTypeBits func was added in 1a451d9 to keep the tar headers consistent with headers created with go1.8 and older. go1.8 and older incorrectly preserved all file-mode bits, including file-type, instead of stripping those bits and only preserving the _permission_ bits, as defined in; - the GNU tar spec: https://www.gnu.org/software/tar/manual/html_node/Standard.html - and POSIX: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/tar.h.html We decided at the time to copy the "wrong" behavior to prevent a cache-bust and to keep the archives identical, however: - It's not matching the standards, which causes differences between our tar implementation and the standard tar implementations, as well as implementations in other languages, such as Python (see docker/compose#883). - BuildKit does not implement this hack. - We don't _need_ this extra information (as it's already preserved in the type header; https://pkg.go.dev/archive/tar#pkg-constants In short; let's remove this hack. This reverts commit 1a451d9. This reverts commit 41eb61d. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Loading branch information
Showing
3 changed files
with
5 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters