Bug#834945: libquvi: please make the build reproducible
Hi Boyuan,
> Looks like your patch is not enough. After merging the new patch, the updated
> libquvi/0.9.3-2 still fails to build reproducibly. Can you take a look into
> it?
So this is because since I wrote this patch in 2016, Debian is
injecting the build path into the CFLAGS variable. Here is an updated
version of the 0005-Make-the-build-reproducible.patch file to filter
this:
§
From: Chris Lamb <lamby@debian.org>
Date: Sat, 20 Aug 2016 20:55:08 +0100
Subject: Make the build reproducible
Last-Update: 2016-08-20
Bug-Debian: https://bugs.debian.org/834945
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- libquvi-0.9.3.orig/configure.ac
+++ libquvi-0.9.3/configure.ac
@@ -57,7 +57,9 @@ LT_PREREQ([2.2.6])
AC_PROG_CC
AM_PROG_CC_C_O
-AC_DEFINE_UNQUOTED([CFLAGS], "$CFLAGS", [Define to compiler flags])
+PWD=`pwd`
+FILTERED_CFLAGS=`echo $CFLAGS | sed -e "s@$PWD@«BUILDDIR»@g"`
+AC_DEFINE_UNQUOTED([CFLAGS], "$FILTERED_CFLAGS", [Define to compiler flags])
AC_DEFINE_UNQUOTED([CC], "$CC", [Define to compiler])
AC_PATH_PROG([DOXYGEN], [doxygen], [no])
@@ -71,7 +73,7 @@ AS_IF([test x"$A2X" = "xno" && test -d "
AC_MSG_ERROR([a2x is required to create man pages when building from git])])
AC_PATH_PROG([DATE], [date], [no])
-AS_IF([test x"$DATE" != "xno"], [build_time=`$DATE +"%F %T %z"`])
+AS_IF([test x"$DATE" != "xno" && test x"$SOURCE_DATE_EPOCH" = "x" ], [build_time=`$DATE +"%F %T %z"`])
AC_DEFINE_UNQUOTED([BUILD_TIME], ["$build_time"], [We have build time])
BUILD_TIME="$build_time"
§
(You might know of a cleaner way of doing this in automake.)
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby@debian.org 🍥 chris-lamb.co.uk
`-
Reply to: