[pkg-golang-devel] Bug#819030: dh_strip_nondeterminism makes golang-src contents unpredictable
Sean Burford
sburford at google.com
Wed Mar 23 03:24:31 UTC 2016
Package: golang
Version: 1.4.3
This bug refers to
https://wiki.debian.org/ReproducibleBuilds/TimestampsInGzipHeaders
golang ships with several prebuilt gzip test cases that are being modified
(mtime is being replaced) during the Debian build process. This means that
functionally identical files have a unique hash for every release of the
Debian golang-src package.
./usr/share/go/src/encoding/json/testdata/code.json.gz
./usr/share/go/src/debug/elf/testdata/hello-world-core.gz
./usr/share/go/src/compress/gzip/testdata/issue6550.gz
Expected behavior is that these test files match the files shipped from
upstream.
Verification (expected date in my timezone is Tue Nov 15 04:51:22 2011):
dpkg -x debs/debian/golang-src_1.6-1_amd64.deb out
file out/usr/share/go/src/compress/gzip/testdata/issue6550.gz
out/usr/share/go/src/compress/gzip/testdata/issue6550.gz: gzip compressed
data, extra field, encrypted, last modified: Tue Mar 1 11:10:32 2016
dh_strip_nondeterminism is probably being run because of the build
dependency on dh_strip_nondeterminism. The build log shows it running:
https://buildd.debian.org/status/fetch.php?pkg=golang&arch=i386&ver=2%3A1.4.3-2&stamp=1443738946
To fix this two things should be done. The lint warning needs to be
addressed and exclude arguments need to be supplied in a build rules
override.
Here's the lint warning:
https://lintian.debian.org/tags/package-contains-timestamped-gzip.html
Here's an example lint override for that warning:
https://anonscm.debian.org/cgit/pkg-go/packages/golang-github-klauspost-compress.git/tree/debian/golang-github-klauspost-compress-dev.lintian-overrides
which could eg. be added to:
https://anonscm.debian.org/cgit/pkg-golang/golang.git/tree/debian/golang-src.lintian-overrides
The override would presumably be called override_dh_strip_nondeterminism
and it would run the strip with --exclude "issue6550.gz" --exclude
"hello-world-core.gz" --exclude "code.json.gz"
Turning off dh_strip_nondeterminism would result in the man pages having
non deterministic dates, which is not desirable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-golang-devel/attachments/20160323/9853110f/attachment.html>
More information about the pkg-golang-devel
mailing list