[pkg-go] Bug#877928: cadvisor: please make the build reproducible
Chris Lamb
lamby at debian.org
Sat Oct 7 11:25:26 UTC 2017
Source: cadvisor
Version: 0.25.0+dfsg-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed
that cadvisor could not be built reproducibly as it encodes the
current year into a copyright header.
Patch attached.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
diff --git a/build/assets.sh b/build/assets.sh
index 0eff872..2cbf903 100755
--- a/build/assets.sh
+++ b/build/assets.sh
@@ -35,7 +35,7 @@ build_asset () {
local output_path=$2
local input_dirs=${@:3}
local tmp_output=$(mktemp)
- local year=$(date +%Y)
+ local year="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y)"
go-bindata -nometadata -o $output_path -pkg $package $input_dirs
cat build/boilerplate/boilerplate.go.txt | sed "s/YEAR/$year/" > "${tmp_output}"
More information about the Pkg-go-maintainers
mailing list