On 2020-02-24, Chris Lamb wrote:
> Whilst working on the Reproducible Builds effort [0] we noticed that
> xavs2 could not be built reproducibly.
>
> Patch attached, although that xavs2 will still vary due to the
> embedding the path in calls to assert(...).

> --- a/debian/patches/1003_reproducible_build.patch    1969-12-31 
> 16:00:00.000000000 -0800
> --- b/debian/patches/1003_reproducible_build.patch    2020-02-24 
> 15:38:11.940987381 -0800
> @@ -0,0 +1,17 @@
> +Description: Make the build reproducible
> +Author: Chris Lamb <la...@debian.org>
> +Last-Update: 2020-02-24
> +
> +--- xavs2-1.3.orig/version.sh
> ++++ xavs2-1.3/version.sh
> +@@ -24,7 +24,9 @@ VER_MAJOR=`echo $(($api / 10))`
> + VER_MINOR=`echo $(($api % 10))`
> + 
> + # date and time information
> +-BUILD_TIME=`date "+%Y-%m-%d %H:%M:%S"`
> ++DATE_FMT="+%Y-%m-%d %H:%M:%S"
> ++SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}"
> ++BUILD_TIME=$(date -u -d "@$SOURCE_DATE_EPOCH" "$DATE_FMT" 2>/dev/null || 
> date -u -r "$SOURCE_DATE_EPOCH" "$DATE_FMT" 2>/dev/null || date -u 
> "$DATE_FMT")
> + 
> + # generate the file version.h
> + echo "// 
> ==========================================================================="  
> > version.h

I can confirm that this patch still works, though the build path issues
still remain.

Though fixing just the timestamp issues should build reproducibly when
the package migrates to testing, as tests.reproducible-builds.org does
not test build path variations, and would make it easier to debug the
remaining issues.


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to