Source: pmemkv
Version: 1.1-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
pmemkv could not be built reproducibly.
This is because, whilst it used the date in manpages from
SOURCE_DATE_EPOCH [1] (ie. the `dt` variable), it used the current
build year when templating the `year` variable.
Patch attached.
[0] https://reproducible-builds.org/
[1] https://reproducible-builds.org/docs/source-date-epoch/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected] / chris-lamb.co.uk
`-
--- a/utils/md2man/md2man.sh 2020-03-02 08:33:26.468163145 -0800
--- b/utils/md2man/md2man.sh 2020-03-02 09:05:23.560324541 -0800
@@ -56,6 +56,7 @@
secondary_title=`sed -n 's/^secondary_title:\ *\(.*\)$/\1/p' $filename`
dt="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%F)"
+year="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y)"
# since genereted docs are not kept in the repo the output dir may not exist
out_dir=`echo $outfile | sed 's/\(.*\)\/.*/\1/'`
mkdir -p $out_dir
@@ -64,7 +65,7 @@
pandoc -s -t man -o $outfile --template=$template \
-V title=$title -V section=$section \
-V date="$dt" -V version="$version" \
- -V year=$(date +"%Y") -V secondary_title="$secondary_title" |
+ -V year="$year" -V secondary_title="$secondary_title" |
sed '/^\.IP/{
N
/\n\.nf/{