[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#990862: marked as done (infinipath-psm: reproducible builds: Embedded timestamps in libpsm_infinipath.so)



Your message dated Sat, 16 Dec 2023 23:34:12 +0000
with message-id <E1rEeAe-00F3Zb-Oc@fasolo.debian.org>
and subject line Bug#990862: fixed in infinipath-psm 3.3+20.604758e7-6.3
has caused the Debian Bug report #990862,
regarding infinipath-psm: reproducible builds: Embedded timestamps in libpsm_infinipath.so
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
990862: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990862
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: infinipath-psm
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The build timestamp is embedded in libpsm_infinipath.so.*:

  https://tests.reproducible-builds.org/debian/rb-pkg/bullseye/amd64/diffoscope-results/infinipath-psm.html

  ./usr/lib/libpsm1/libpsm_infinipath.so.1.16

  $Date:·2022-07-17·21:34·InfiniPath·$
  vs.
  $Date:·2021-06-15·17:13·InfiniPath·$

The attached patch fixes this by changing buildflags.mak to set a
BUILD_DATE variable, which uses SOURCE_DATE_EPOCH for the current value
if set, falling back to the current time/date; two Makefiles are also
adjusted to use BUILD_DATE instead of calling "date" directly.

  https://reproducible-builds.org/docs/source-date-epoch/


With this patch applied, infinipath-psm should be reproducible on
tests.reproducible-builds.org in the testing (currently bullseye) suite,
where build paths are not varied. In the unstable/experimental suites,
varied build paths trigger other issues which could use further
exploration.


Thanks for maintaining infinipath-psm!


live well,
  vagrant
From d9ce27e80d5b0d7028ac20136017147f49a780f4 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Fri, 9 Jul 2021 15:13:24 +0000
Subject: [PATCH] Use the build date from SOURCE_DATE_EPOCH if set, falling
 back to current time.

https://reproducible-builds.org/docs/source-date-epoch/
---
 Makefile       | 2 +-
 buildflags.mak | 8 ++++++++
 ipath/Makefile | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index d79c4bd..64d6f6b 100644
--- a/Makefile
+++ b/Makefile
@@ -270,7 +270,7 @@ ${TARGLIB}.so.${MAJOR}: ${TARGLIB}.so.${MAJOR}.${MINOR}
 # file around.  Generate it such that the ident command can find it
 # and strings -a | grep InfiniPath does a reasonable job as well.
 ${TARGLIB}.so.${MAJOR}.${MINOR}: ${${TARGLIB}-objs}
-	date +'char psmi_infinipath_revision[] ="$$""Date: %F %R ${rpm_extra_description}InfiniPath $$";' > ${lib_build_dir}/_revision.c
+	printf 'char psmi_infinipath_revision[] ="$$""Date: %s ${rpm_extra_description} InfiniPath $$";\n' "$(BUILD_DATE)" > ${lib_build_dir}/_revision.c
 	$(CC) -c $(BASECFLAGS) $(INCLUDES) _revision.c -o _revision.o
 	$(CC) $(LDFLAGS) -o $@ -Wl,-soname=${TARGLIB}.so.${MAJOR} -shared -Wl,--unique='*fastpath*' \
 		${${TARGLIB}-objs} _revision.o -L$(build_dir)/ipath $(LDLIBS)
diff --git a/buildflags.mak b/buildflags.mak
index 34fdf1c..3e25649 100644
--- a/buildflags.mak
+++ b/buildflags.mak
@@ -96,3 +96,11 @@ endif
 CFLAGS += $(BASECFLAGS) $(if $(filter $(CC),gcc),-Wno-strict-aliasing) \
 	$(if $(PSM_VALGRIND:0=),-DPSM_VALGRIND,-DNVALGRIND)
 
+# Use SOURCE_DATE_EPOCH for build date, falling back to current time
+# https://reproducible-builds.org/docs/source-date-epoch/
+DATE_FMT="+'%F %R'"
+ifdef FIXME_SOURCE_DATE_EPOCH
+    BUILD_DATE ?= $(shell 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)")
+else
+    BUILD_DATE ?= $(shell date "$(DATE_FMT)")
+endif
diff --git a/ipath/Makefile b/ipath/Makefile
index 8c2cc6e..e627b3d 100644
--- a/ipath/Makefile
+++ b/ipath/Makefile
@@ -70,7 +70,7 @@ ${TARGLIB}.so.${MAJOR}: ${TARGLIB}.so.${MAJOR}.${MINOR}
 # file around.  Generate it such that the ident command can find it
 # and strings -a | grep InfiniPath does a reasonable job as well.
 ${TARGLIB}.so.${MAJOR}.${MINOR}: ${${TARGLIB}-objs}
-	date +'static __attribute__ ((unused)) char __psc_infinipath_revision[] ="$$""Date: %F %R ${rpm_extra_description}InfiniPath $$";' > _revision.c
+	printf 'static __attribute__ ((unused)) char __psc_infinipath_revision[] ="$$""Date: %s ${rpm_extra_description}InfiniPath $$";\n' "$(BUILD_DATE)" > _revision.c
 	$(CC) -c $(BASECFLAGS) $(INCLUDES) _revision.c -o _revision.o
 	$(CC) -o $@ -Wl,-soname=${TARGLIB}.so.${MAJOR} -shared \
 		-Wl,--unique='*fastpath*' \
-- 
2.32.0

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: infinipath-psm
Source-Version: 3.3+20.604758e7-6.3
Done: Vagrant Cascadian <vagrant@reproducible-builds.org>

We believe that the bug you reported is fixed in the latest version of
infinipath-psm, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 990862@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Vagrant Cascadian <vagrant@reproducible-builds.org> (supplier of updated infinipath-psm package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 06 Dec 2023 14:25:32 -0800
Source: infinipath-psm
Architecture: source
Version: 3.3+20.604758e7-6.3
Distribution: unstable
Urgency: medium
Maintainer: Debian HPC Team <debian-hpc@lists.debian.org>
Changed-By: Vagrant Cascadian <vagrant@reproducible-builds.org>
Closes: 990862
Changes:
 infinipath-psm (3.3+20.604758e7-6.3) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * Use the build date from SOURCE_DATE_EPOCH if set, falling back to
     current time. (Closes: #990862)
Checksums-Sha1:
 243144d5fb2ca3bf33743f86af65dff234c43874 1842 infinipath-psm_3.3+20.604758e7-6.3.dsc
 62119e6dc040fc93a9bfe219bdad1f456e75f16c 10672 infinipath-psm_3.3+20.604758e7-6.3.debian.tar.xz
Checksums-Sha256:
 d8fd95c814331dd56d24a8557c972daed5c0f50e8875997ffef7e5f4e1849c94 1842 infinipath-psm_3.3+20.604758e7-6.3.dsc
 f1098a032a1b7e8ec429247ce550dd3408ace9d04a0562c26be6539bab53b1ee 10672 infinipath-psm_3.3+20.604758e7-6.3.debian.tar.xz
Files:
 e3eb4b8b1078976b072711610775a7f7 1842 libs optional infinipath-psm_3.3+20.604758e7-6.3.dsc
 9278ce21d33485cc0f279480e078e4c1 10672 libs optional infinipath-psm_3.3+20.604758e7-6.3.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iJYEARYKAD4WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCZXD2OiAcdmFncmFudEBy
ZXByb2R1Y2libGUtYnVpbGRzLm9yZwAKCRDcUY/If5cWqh9lAQDaTnS9xFlDmvgK
3yX8QN6NFoogiAGULEl2M2ELUf8XpwEA0yUvbcORxIYI82grI9kOli6sTp8mt5xf
WPK0h7bwJAA=
=a4w7
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: