Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 25-Jun-2018 | - | ||||
LICENSE | H A D | 25-Jun-2018 | 1.4 KiB | 28 | 24 | |
README.md | H A D | 25-Jun-2018 | 1.6 KiB | 28 | 22 | |
common.go | H A D | 25-Jun-2018 | 23.6 KiB | 721 | 474 | |
format.go | H A D | 25-Jun-2018 | 11.1 KiB | 304 | 162 | |
reader.go | H A D | 25-Jun-2018 | 25.7 KiB | 856 | 623 | |
stat_actime1.go | H A D | 25-Jun-2018 | 414 | 21 | 11 | |
stat_actime2.go | H A D | 25-Jun-2018 | 414 | 21 | 11 | |
stat_unix.go | H A D | 25-Jun-2018 | 2.4 KiB | 77 | 54 | |
strconv.go | H A D | 25-Jun-2018 | 9 KiB | 327 | 219 | |
writer.go | H A D | 25-Jun-2018 | 18.2 KiB | 645 | 424 |
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