• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..25-Jun-2018-

LICENSEH A D25-Jun-20181.4 KiB2824

README.mdH A D25-Jun-20181.6 KiB2822

common.goH A D25-Jun-201823.6 KiB721474

format.goH A D25-Jun-201811.1 KiB304162

reader.goH A D25-Jun-201825.7 KiB856623

stat_actime1.goH A D25-Jun-2018414 2111

stat_actime2.goH A D25-Jun-2018414 2111

stat_unix.goH A D25-Jun-20182.4 KiB7754

strconv.goH A D25-Jun-20189 KiB327219

writer.goH A D25-Jun-201818.2 KiB645424

README.md

1This is a fork of Go 1.10 `archive/tar` package from the official
2[repo](https://github.com/golang/go/tree/release-branch.go1.10/src/archive/tar),
3with a partial [revert](https://github.com/kolyshkin/go-tar/commit/d651d6e45972363e9bb62b8e9d876df440b31628)
4of upstream [commit 0564e304a6ea](https://github.com/golang/go/commit/0564e304a6ea394a42929060c588469dbd6f32af).
5It is suggested as a replacement to the original package included with Go 1.10
6in case you want to build a static Linux/glibc binary that works, and
7can't afford to use `CGO_ENABLED=0`.
8
9## Details
10
11Using Go 1.10 [archive/tar](https://golang.org/pkg/archive/tar/) from a static binary
12compiled with glibc on Linux can result in a panic upon calling
13[`tar.FileInfoHeader()`](https://golang.org/pkg/archive/tar/#FileInfoHeader).
14This is a major regression in Go 1.10, filed as
15[Go issue #24787](https://github.com/golang/go/issues/24787).
16
17The above issue is caused by an unfortunate combination of:
181. glibc way of dynamic loading of nss libraries even for a static build;
192. Go `os/user` package hard-coded reliance on libc to resolve user/group IDs to names (unless CGO is disabled).
20
21While glibc can probably not be fixed and is not considered a bug per se,
22the `os/user` issue is documented (see [Go issue #23265](https://github.com/golang/go/issues/23265))
23and already fixed by [Go commit 62f0127d81](https://github.com/golang/go/commit/62f0127d8104d8266d9a3fb5a87e2f09ec8b6f5b).
24The fix is expected to make its way to Go 1.11, and requires `osusergo` build tag
25to be used for a static build.
26
27This repository serves as a temporary workaround until the above fix is available.
28