moby--moby/builder/remotecontext
Sebastiaan van Stijn cddaa84777
pkg/archive: remove backward compat hack for go < 1.9
The fillGo18FileTypeBits func was added in 1a451d9a7b
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 1a451d9a7b.
This reverts commit 41eb61d5c2.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-09-04 21:44:02 +02:00
..
git refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
urlutil gofmt GoDoc comments with go1.19 2022-07-08 19:56:23 +02:00
archive.go Add canonical import comment 2018-02-05 16:51:57 -05:00
detect.go pkg/urlutil: deprecate, and move to builder/remotecontext/urlutil 2022-04-12 19:58:05 +02:00
detect_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
filehash.go Add canonical import comment 2018-02-05 16:51:57 -05:00
generate.go Add canonical import comment 2018-02-05 16:51:57 -05:00
git.go Add canonical import comment 2018-02-05 16:51:57 -05:00
lazycontext.go LCOW: lazycontext: Use correct lstat, fix archive check 2018-06-27 13:29:21 -07:00
mimetype.go Add canonical import comment 2018-02-05 16:51:57 -05:00
mimetype_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
remote.go gofmt GoDoc comments with go1.19 2022-07-08 19:56:23 +02:00
remote_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
tarsum.go remove unneeded "digest" alias for "go-digest" 2022-03-04 14:49:42 +01:00
tarsum.pb.go LCOW: Implemented support for docker cp + build 2017-09-14 12:07:52 -07:00
tarsum.proto Implement incremental file sync using client session 2017-06-22 11:52:35 -07:00
tarsum_test.go pkg/archive: remove backward compat hack for go < 1.9 2022-09-04 21:44:02 +02:00
utils_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00