Debian Bug report logs - #1029227
ectrans: reproducible-builds: timestamps and kernel version embeded in /usr/bin/ectrans

version graph

Package: src:ectrans; Maintainer for src:ectrans is Alastair McKinstry <mckinstry@debian.org>;

Reported by: Vagrant Cascadian <vagrant@reproducible-builds.org>

Date: Fri, 20 Jan 2023 02:21:02 UTC

Severity: normal

Tags: patch

Fixed in version ectrans/1.1.0-3

Done: Alastair McKinstry <mckinstry@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Alastair McKinstry <mckinstry@debian.org>:
Bug#1029227; Package src:ectrans. (Fri, 20 Jan 2023 02:21:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Alastair McKinstry <mckinstry@debian.org>. (Fri, 20 Jan 2023 02:21:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: submit@bugs.debian.org
Subject: ectrans: reproducible-builds: timestamps and kernel version embeded in /usr/bin/ectrans
Date: Thu, 19 Jan 2023 18:17:48 -0800
[Message part 1 (text/plain, inline)]
Source: ectrans
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps kernel
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The timestamp and kernel version is embedded in /usr/bin/ectrans:
  
  https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/ectrans.html

  echo·"··timestamp·······:·20240111001706"
  vs.
  echo·"··timestamp·······:·20221209195542"

  echo·"··op.·system······:·Linux-6.0.0-0.deb11.2-amd64·(linux.64)"
  vs.
  echo·"··op.·system······:·Linux-5.10.0-19-amd64·(linux.64)"

The attached two patches fix this by using CMAKE_SYSTEM_NAME instead of
CMAKE_SYSTEM, and using CMake's timestamp function for the build date,
which supports a consistent timestamp if the SOURCE_DATE_EPOCH
environment variable is set.

According to my local tests, with these patches applied ectrans should
build reproducibly on tests.reproducible-builds.org once the package
migrates to bookworm/testing!

Unfortunately, there are other outstanding issues with build paths,
which are tested in unstable and experimental.


Thanks for maintaining ectrans!


live well,
  vagrant
[0001-src-programs-ectrans.in-Avoid-embedding-the-running-.patch (text/x-diff, inline)]
From 8807b944d1f770f44304586ddc57a99e9900bc3d Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Fri, 20 Jan 2023 01:20:29 +0000
Subject: [PATCH 1/2] src/programs/ectrans.in: Avoid embedding the running
 kernel version.

Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM to avoid embedding the
running kernel version.

https://tests.reproducible-builds.org/debian/issues/bookworm/captures_kernel_version_via_CMAKE_SYSTEM_issue.html
---
 src/programs/ectrans.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/programs/ectrans.in b/src/programs/ectrans.in
index a80893d..4d28884 100755
--- a/src/programs/ectrans.in
+++ b/src/programs/ectrans.in
@@ -42,7 +42,7 @@ info()
   echo "Build:"
   echo "  build type      : @CMAKE_BUILD_TYPE@"
   echo "  timestamp       : @EC_BUILD_TIMESTAMP@"
-  echo "  op. system      : @CMAKE_SYSTEM@ (@EC_OS_NAME@.@EC_OS_BITS@)"
+  echo "  op. system      : @CMAKE_SYSTEM_NAME@ (@EC_OS_NAME@.@EC_OS_BITS@)"
   echo "  processor       : @CMAKE_SYSTEM_PROCESSOR@"
   echo "  c compiler      : @CMAKE_C_COMPILER_ID@ @CMAKE_C_COMPILER_VERSION@"
   echo "    flags         : @EC_C_FLAGS@"
-- 
2.39.0

[0002-Pass-BUILD_TIMESTAMP-via-CMakeLists.txt-and-use-in-e.patch (text/x-diff, inline)]
From 337d2242cfa3b168ce998f1d3747cc5e4c18ce65 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Fri, 20 Jan 2023 01:19:06 +0000
Subject: [PATCH 2/2] Pass BUILD_TIMESTAMP via CMakeLists.txt and use in
 ectrans.in for the build timestamp.

The CMake TIMESTAMP function respects SOURCE_DATE_EPOCH when
specifying UTC timezone.

https://reproducible-builds.org/docs/timestamps/
---
 src/programs/CMakeLists.txt | 1 +
 src/programs/ectrans.in     | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/programs/CMakeLists.txt b/src/programs/CMakeLists.txt
index b7cdc1f..74755b1 100644
--- a/src/programs/CMakeLists.txt
+++ b/src/programs/CMakeLists.txt
@@ -50,6 +50,7 @@ foreach( lang ${langs} )
   set( EC_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} ${CMAKE_${lang}_FLAGS_${CMAKE_BUILD_TYPE_CAPS}}" )
 endforeach()
 
+string(TIMESTAMP BUILD_TIMESTAMP "%Y%m%d%H%M%S" UTC)
 configure_file( ectrans.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/ectrans @ONLY )
 
 file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/ectrans
diff --git a/src/programs/ectrans.in b/src/programs/ectrans.in
index 4d28884..ba52641 100755
--- a/src/programs/ectrans.in
+++ b/src/programs/ectrans.in
@@ -41,7 +41,7 @@ info()
   echo ""
   echo "Build:"
   echo "  build type      : @CMAKE_BUILD_TYPE@"
-  echo "  timestamp       : @EC_BUILD_TIMESTAMP@"
+  echo "  timestamp       : @BUILD_TIMESTAMP@"
   echo "  op. system      : @CMAKE_SYSTEM_NAME@ (@EC_OS_NAME@.@EC_OS_BITS@)"
   echo "  processor       : @CMAKE_SYSTEM_PROCESSOR@"
   echo "  c compiler      : @CMAKE_C_COMPILER_ID@ @CMAKE_C_COMPILER_VERSION@"
-- 
2.39.0

[signature.asc (application/pgp-signature, inline)]

Reply sent to Alastair McKinstry <mckinstry@debian.org>:
You have taken responsibility. (Fri, 20 Jan 2023 16:39:07 GMT) (full text, mbox, link).


Notification sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Bug acknowledged by developer. (Fri, 20 Jan 2023 16:39:07 GMT) (full text, mbox, link).


Message #10 received at 1029227-close@bugs.debian.org (full text, mbox, reply):

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 1029227-close@bugs.debian.org
Subject: Bug#1029227: fixed in ectrans 1.1.0-3
Date: Fri, 20 Jan 2023 16:35:11 +0000
Source: ectrans
Source-Version: 1.1.0-3
Done: Alastair McKinstry <mckinstry@debian.org>

We believe that the bug you reported is fixed in the latest version of
ectrans, 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 1029227@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alastair McKinstry <mckinstry@debian.org> (supplier of updated ectrans 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: SHA256

Format: 1.8
Date: Fri, 20 Jan 2023 15:45:54 +0000
Source: ectrans
Architecture: source
Version: 1.1.0-3
Distribution: unstable
Urgency: medium
Maintainer: Alastair McKinstry <mckinstry@debian.org>
Changed-By: Alastair McKinstry <mckinstry@debian.org>
Closes: 1029227
Changes:
 ectrans (1.1.0-3) unstable; urgency=medium
 .
   * Add patches from Vagrant Cascadian for reproducibility. Closes: #1029227
Checksums-Sha1:
 610c7fbd4361c9c0171c42a8e50fa597a2a95a92 2670 ectrans_1.1.0-3.dsc
 ac4daf2891bfe778b4c365726686fbc717d85700 4024 ectrans_1.1.0-3.debian.tar.xz
Checksums-Sha256:
 cbd4bf2d0fa8026d49e48b03d6f2557d3cdb355d2f9bc977dce2c4b079592e1a 2670 ectrans_1.1.0-3.dsc
 8ddc4ac288b0ae52d562c81b54f5057b75ff5e2e222428c71e7bc78202456fff 4024 ectrans_1.1.0-3.debian.tar.xz
Files:
 968b50f779fb14180ba01a403ef8ce9b 2670 science optional ectrans_1.1.0-3.dsc
 f120bbda5e5c8d405ba7c45ce4ee8dd6 4024 science optional ectrans_1.1.0-3.debian.tar.xz

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

iQIzBAEBCAAdFiEEgjg86RZbNHx4cIGiy+a7Tl2a06UFAmPKve4ACgkQy+a7Tl2a
06VO0A//QZluDAaTHl9IkBq+Fry5ppVXv76kC9Z8Ag6duGxXdi4I96LHMC3+3mZg
DxonmJA0xusi6TlXYZ/MA24VO5jereXj4v4ID4DF31F1qulPYiwLzKmw2FG5+WJD
nBE3q/9wzqQgKExy/RsgJppNLutDLYbFQlulH+TmVWpY2iG6oKJ1FAfLjya7wZa3
EAuEV1w943Ab/QANIESarkbkS0pB8EJl+3Anu1tVtK6GVfhrZHEARwdVA73VnKu1
D5NKpMl+InyNmbp2bfvrSTTvsUmZ22Usd7aB948LqX5eMN5chgCpZfUng/h7wSaG
dTC8ZpwxewtQaaCnV9jp8vdj048cbuIAiwrOu3fgtpCpumw1NLyclN0dHuYOdy5t
ewCd/VKgOWAhMWmMFJXci/H3G4jYBFzegxIGlsW+bWYArKUVz5SUnYYkW3fuIDY7
LdX1kCDx4tZBg6TyGPW8LOIUWsNmK72vwnwiZai/z2/8Y1y7EFmDl0WjpnWZdnuf
qpS6oTVdAm4/asUlxf1x2wO6ll2S1dYRx2kMo5LVmcG2vKPEr1dZV44ZIC2AOof0
XMUnnz2gWlGiTTggSGMuKh8QYzI0QNpiV33BqpSav5X/gJ7aLp10KqSP6/CG6kpj
NCb7qTnI37vg6P4bK6l5CKwP+bIY2RdI/07aDSX6cNOz7OJSr9Q=
=9c0t
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 26 Feb 2023 07:27:49 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 17 10:59:01 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.