[Reproducible-builds] Bug#833380: roaraudio: please make the build reproducible

Chris Lamb lamby at debian.org
Wed Aug 3 17:08:56 UTC 2016


Source: roaraudio
Version: 1.0~beta11-7
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: environment
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org

Hi,

Whilst working on the "reproducible builds" effort [0], we noticed
that roaraudio could not be built reproducibly.

It also affects anything that uses libroar-dev, eg. roarplaylistd.

Patch attached.

 [0] https://wiki.debian.org/ReproducibleBuilds


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/06-reproducible-build.diff	1969-12-31 19:00:00.000000000 -0500
--- b/debian/patches/06-reproducible-build.diff	2016-08-03 12:59:22.903192842 -0400
@@ -0,0 +1,56 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2016-08-03
+
+--- roaraudio-1.0~beta11.orig/build-system/configure.tests
++++ roaraudio-1.0~beta11/build-system/configure.tests
+@@ -52,7 +52,12 @@ test_pkgversion() {
+ 
+ test_buildstamp() {
+  echo -n "checking for build stamp of this package... "
+- BUILD_STAMP="`date -u +'%F %X'` (`id -un`@`uname -n`)"
++ if [ "$SOURCE_DATE_EPOCH" != '' ]
++ then
++  BUILD_STAMP="`LC_ALL=C date -u -d @$SOURCE_DATE_EPOCH +'%F %X'`"
++ else
++  BUILD_STAMP="`date -u +'%F %X'` (`id -un`@`uname -n`)"
++ fi
+  echo "$BUILD_STAMP"
+  return 0
+ }
+--- roaraudio-1.0~beta11.orig/build-system/configure.lib
++++ roaraudio-1.0~beta11/build-system/configure.lib
+@@ -549,8 +549,14 @@ write_header_configlog() {
+  */
+ 
+ EOF
+-  echo '/* uname: ' $(uname -a) '*/'
+-  echo '/* Date : ' $(date)  '*/'
++  if [ "$SOURCE_DATE_EPOCH" != '' ]
++  then
++    echo '/* uname:  - */'
++    echo '/* Date : ' $(LC_ALL=C date --utc --date="@$SOURCE_DATE_EPOCH")  '*/'
++  else
++    echo '/* Date : ' $(uname -a) '*/'
++    echo '/* Date : ' $(date)  '*/'
++  fi
+   echo
+ 
+   echo
+@@ -588,8 +594,14 @@ write_header_configh() {
+   echo "#define $1"
+   echo
+   echo '#ifdef __RABS_COMMENT__'
+-  echo '/* uname: ' $(uname -a) '*/'
+-  echo '/* Date : ' $(date)  '*/'
++  if [ "$SOURCE_DATE_EPOCH" != '' ]
++  then
++    echo '/* uname:  - */'
++    echo '/* Date : ' $(LC_ALL=C date --utc --date="@$SOURCE_DATE_EPOCH")  '*/'
++  else
++    echo '/* uname: ' $(uname -a) '*/'
++    echo '/* Date : ' $(date)  '*/'
++  fi
+   echo '#endif'
+   echo
+  } >&3
--- a/debian/patches/series	2016-08-03 12:16:18.832908598 -0400
--- b/debian/patches/series	2016-08-03 12:24:38.629266072 -0400
@@ -3,3 +3,4 @@
 03-manpage-spelling-errors.diff
 04-more-spelling-errors.diff
 05-more-more-spelling-errors.diff
+06-reproducible-build.diff


More information about the Reproducible-builds mailing list