Bug#861133: tf: please make the build reproducible

Chris Lamb lamby at debian.org
Mon Apr 24 21:43:45 UTC 2017


Source: tf
Version: 1:4.0s1-19
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: uname
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that tf could not be built reproducibly as it embeds the output
of uname.

Patch attached.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/debian-changes	2017-04-24 22:32:39.474929808 +0100
--- b/debian/patches/debian-changes	2017-04-24 22:42:05.953741865 +0100
@@ -855,16 +855,22 @@
  ### Stripping.
 --- tf-4.0s1.orig/unix/tfconfig
 +++ tf-4.0s1/unix/tfconfig
-@@ -66,7 +66,7 @@ X=''
+@@ -66,8 +66,12 @@ X=''
  if [ -z "$USER" ]; then USER=$LOGNAME; fi
  export USER
  
 -UNAME=`{ uname -s && uname -v && uname -r || uname -a; } 2>/dev/null`
+-echo "#define UNAME     " \"$UNAME\" >&4
 +UNAME=`{ uname -smo; } 2>/dev/null`
- echo "#define UNAME     " \"$UNAME\" >&4
++if test -n "$SOURCE_DATE_EPOCH"; then
++    echo "#define UNAME     \"\"" >&4
++else
++    echo "#define UNAME     " \"$UNAME\" >&4
++fi
  case "$UNAME" in
  "SunOS 5.4")
  
--- a/unix/tfconfig	2017-04-24 22:32:39.474929808 +0100
--- b/unix/tfconfig	2017-04-24 22:42:08.865755086 +0100
@@ -67,7 +67,11 @@
 export USER
 
 UNAME=`{ uname -smo; } 2>/dev/null`
-echo "#define UNAME     " \"$UNAME\" >&4
+if test -n "$SOURCE_DATE_EPOCH"; then
+    echo "#define UNAME     \"\"" >&4
+else
+    echo "#define UNAME     " \"$UNAME\" >&4
+fi
 case "$UNAME" in
 "SunOS 5.4")
     echo "#define SUNOS_5_4" >&4


More information about the Reproducible-bugs mailing list