Source: python-suntime
Severity: normal
Tags: patch
User: [email protected]
Usertags: timestamps locales
X-Debbugs-Cc: [email protected]

All the timestamps in python-suntime vary based on the build time:

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

  1     
-rw-r--r--···0········0········0········4·2023-08-24·15:33:27.000000·debian-binary
      1       
-rw-r--r--···0········0········0········4·2022-07-22·09:11:52.000000·debian-binary
  2     
-rw-r--r--···0········0········0·····1212·2023-08-24·15:33:27.000000·control.tar.xz
     2       
-rw-r--r--···0········0········0·····1212·2022-07-22·09:11:52.000000·control.tar.xz
  3     
-rw-r--r--···0········0········0·····4196·2023-08-24·15:33:27.000000·data.tar.xz
        3       
-rw-r--r--···0········0········0·····4200·2022-07-22·09:11:52.000000·data.tar.xz

This *should* be handled by dpkg, but for some reason it does not. At
first, I thought it might be the incorrectly formatted line in
debian/changelog:

-  Sandro Tosi <[email protected]>  Mon, 20 Jun 2022 23:02:36 -0400
+ -- Sandro Tosi <[email protected]>  Mon, 20 Jun 2022 23:02:36 -0400

But that doesn't seem to be the case; SOURCE_DATE_EPOCH is set at all
stages during the build, and fixing this doesn't change the results.

I'm not sure why... but forcing a consistant locale appears to
fix/workaround the issue. Patch attached which sets LC_ALL and LANG to
C.UTF-8 in debian/rules, does not trigger the issue.


With this patch applied, python-suntime should build reproducibly on
tests.reproducible-builds.org!


Thanks for maintaining python-suntime!


live well,
  vagrant
From 4adc1ba9ea7c004d819029c8273287091c50978f Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <[email protected]>
Date: Sat, 13 Aug 2022 02:33:12 +0000
Subject: [PATCH] debian/rules: Set LC_ALL and LANG to ensure reproducible
 build.

The timestamps of all files seem to vary otherwise.
---
 debian/rules | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/rules b/debian/rules
index fd7232c..b123c57 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,8 @@
 #!/usr/bin/make -f
 
 export PYBUILD_NAME=suntime
+export LC_ALL=C.UTF-8
+export LANG=C.UTF-8
 
 %:
 	dh $@ --with python3 --buildsystem=pybuild
-- 
2.36.1

Attachment: signature.asc
Description: PGP signature

Reply via email to