Control: tags 824501 pending

On 2016-05-16, Alexis Bienvenüe wrote:
> While working on the `€œreproducible builds'€ effort [1], we have noticed
> that 'cclive' could not be built reproducibly.
>
> The attached patch honours the SOURCE_DATE_EPOCH environment
> variable [2] to get a reproducible build date from the last
> debian changelog entry.
> Once applied, cclive can be built reproducibly in our current
> experimental framework.

I have uploaded an NMU to DELAYED/10 applying this fix.

diff -Nru cclive-0.9.3/debian/changelog cclive-0.9.3/debian/changelog
--- cclive-0.9.3/debian/changelog       2021-01-18 12:29:07.000000000 -0800
+++ cclive-0.9.3/debian/changelog       2022-09-22 12:46:21.000000000 -0700
@@ -1,3 +1,12 @@
+cclive (0.9.3-0.3) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Alexis Bienvenüe ]
+  * configure.ac: Honour SOURCE_DATE_EPOCH (Closes: #824501)
+
+ -- Vagrant Cascadian <vagr...@reproducible-builds.org>  Thu, 22 Sep 2022 
19:46:21 +0000
+
 cclive (0.9.3-0.2) unstable; urgency=medium

   * Non-maintainer upload.
diff -Nru 
cclive-0.9.3/debian/patches/configure.ac-honour-source_date_epoch.patch 
cclive-0.9.3/debian/patches/configure.ac-honour-source_date_epoch.patch
--- cclive-0.9.3/debian/patches/configure.ac-honour-source_date_epoch.patch     
1969-12-31 16:00:00.000000000 -0800
+++ cclive-0.9.3/debian/patches/configure.ac-honour-source_date_epoch.patch     
2022-09-22 12:46:21.000000000 -0700
@@ -0,0 +1,28 @@
+From: Alexis Bienvenüe <p...@passoire.fr>
+Date: Mon, 16 May 2016 21:03:42 +0200
+X-Dgit-Generated: 0.9.3-0.3 0d3d512774b1bee8ebdf3736620689c4e5d96bbf
+Subject: configure.ac: Honour SOURCE_DATE_EPOCH
+
+(Closes: #824501)
+
+Get build date from the environment variable SOURCE_DATE_EPOCH (is
+set) to make the build reproducible.  See
+https://reproducible-builds.org/specs/source-date-epoch/
+
+---
+
+diff --git a/configure.ac b/configure.ac
+index 0bae286..7becddd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -37,7 +37,9 @@ AC_DEFINE_UNQUOTED([CXXFLAGS], "$CXXFLAGS", [Define to 
compiler flags])
+ AC_DEFINE_UNQUOTED([CXX], "$CXX", [Define to compiler])
+
+ AC_PATH_PROG([DATE], [date], [no])
+-AS_IF([test x"$DATE" != "xno"], [build_time=`$DATE +"%F %T %z"`])
++DATE_FMT="%F %T %z"
++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" 2>/dev/null)
+ AC_DEFINE_UNQUOTED([BUILD_TIME], ["$build_time"], [We have build time])
+
+ AC_PATH_PROG([A2X], [a2x], [no])
diff -Nru cclive-0.9.3/debian/patches/series cclive-0.9.3/debian/patches/series
--- cclive-0.9.3/debian/patches/series  2021-01-18 12:10:55.000000000 -0800
+++ cclive-0.9.3/debian/patches/series  2022-09-22 12:46:21.000000000 -0700
@@ -2,3 +2,4 @@
 gcc5.diff
 fix-FTBFS-missing-includes.patch
 fix_ftbfs.patch
+configure.ac-honour-source_date_epoch.patch


live well,
  vagrant

Attachment: signature.asc
Description: PGP signature

Reply via email to