Source: insighttoolkit5
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timezone
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

The build date is embedded in libITKCommon-5.2.so.1:

  
https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/insighttoolkit5.html

  
http://www.itk.oThe·URL·of·projeThe·version·at·configuration·tim2021-12-31·08:41The·date·of·conf
 ...
vs.
  
http://www.itk.oThe·URL·of·projeThe·version·at·configuration·tim2022-01-01·10:41The·date·of·conf
 ...


While CMake respects SOURCE_DATE_EPOCH, it still can produce a different
date depending on the timezone of the running system.

Applying the attached patch explicitly sets the timezone to UTC and
should result in a reproducible build for the testing/bookworm suite.

There may be other reproducibility issues caused by changing build path
for sid tests that are not addressed by this patch.


Thanks for maintaining insighttoolkit5!


live well,
  vagrant
From 0b58affa9a5eb82293ce412766b2d0db8077fc23 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Fri, 7 Jan 2022 23:39:29 +0000
Subject: [PATCH 1/3] Modules/Core/Common/src/CMakeLists.txt: Use UTC
 timestamp.

While cmake respects SOURCE_DATE_EPOCH, the timezone may still change
the embedded timestamp used.

https://reproducible-builds.org/docs/source-date-epoch/
---
 Modules/Core/Common/src/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Modules/Core/Common/src/CMakeLists.txt b/Modules/Core/Common/src/CMakeLists.txt
index 774a164d..1486c670 100644
--- a/Modules/Core/Common/src/CMakeLists.txt
+++ b/Modules/Core/Common/src/CMakeLists.txt
@@ -8,7 +8,7 @@ if( GIT_LOCAL_MODIFICATIONS MATCHES ".*files changed.*")
    set(GIT_LOCAL_MODIFICATIONS " (with uncommitted code modifications ${GIT_LOCAL_MODIFICATIONS} )")
 endif()
 
-string(TIMESTAMP CONFIGURE_DATE "%Y-%m-%d %H:%M")
+string(TIMESTAMP CONFIGURE_DATE "%Y-%m-%d %H:%M" UTC)
 
 ## MAKE_MAP_ENTRY is a macro to facilitate placing items in the itk::BuildInformation class
 ##                /--------------------------_---------------------------_-------------------------------------------------/
-- 
2.34.1

Attachment: signature.asc
Description: PGP signature

Reply via email to