mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
The fillGo18FileTypeBits func was added in1a451d9a7bto 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 commit1a451d9a7b. This reverts commit41eb61d5c2. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>