Source: cadvisor
Version: 0.25.0+dfsg-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: timestamps
X-Debbugs-Cc: [email protected]
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
`. `'` [email protected] / chris-lamb.co.uk
`-
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}"