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

Various .gsb and .gtx files get touched in the build process in a way
that results in a timezone-dependent timestamp for these files in the
shipped package:

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

  
-rw-r--r--···0·root·········(0)·root·········(0)····83696·2018-02-22·07:28:23.000000·./usr/share/proj/BETA2007.gsb
  vs.
  
-rw-r--r--···0·root·········(0)·root·········(0)····83696·2018-02-21·05:28:23.000000·./usr/share/proj/BETA2007.gsb

The attached patch fixes this by not touching these files during the
build process.

According to my local tests, with this patch applied, proj should build
reproducibly on tests.reproducible-builds.org once it lands in
bookworm/testing!

Unfortunately, there are unresolved issues with build paths, which are
tested in unstable and experimental, so will not show as reproducible
there without further fixes.


Thanks for maintaining proj!


live well,
  vagrant
From 25dbf89dae803e4e5e207c253d9f83c889680ed9 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Tue, 2 May 2023 16:39:31 -0700
Subject: [PATCH] debian/datumgrids*.shar: Avoid updating timestamps.

This results in timezone-specific differences in various .gsb and .gtx
files.

https://reproducible-builds.org/docs/timestamps/
---
 debian/datumgrids-ch.shar | 21 ++-------------------
 debian/datumgrids.shar    | 21 ++-------------------
 2 files changed, 4 insertions(+), 38 deletions(-)

diff --git a/debian/datumgrids-ch.shar b/debian/datumgrids-ch.shar
index 308ca93..37194b7 100644
--- a/debian/datumgrids-ch.shar
+++ b/debian/datumgrids-ch.shar
@@ -84,25 +84,8 @@ st2=123123592001.59
 st2tr=123123592001.5 # old SysV 14-char limit
 st3=1231235901
 
-if   touch -am -t ${st1} ${f} >/dev/null 2>&1 && \
-     test ! -f ${st1} && test -f ${f}; then
-  shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
-
-elif touch -am ${st2} ${f} >/dev/null 2>&1 && \
-     test ! -f ${st2} && test ! -f ${st2tr} && test -f ${f}; then
-  shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
-
-elif touch -am ${st3} ${f} >/dev/null 2>&1 && \
-     test ! -f ${st3} && test -f ${f}; then
-  shar_touch='touch -am $3$4$5$6$2 "$8"'
-
-else
-  shar_touch=:
-  echo
-  ${echo} 'WARNING: not restoring timestamps.  Consider getting and
-installing GNU '\''touch'\'', distributed in GNU coreutils...'
-  echo
-fi
+# Avoid mangling timestamps
+shar_touch=:
 rm -f ${st1} ${st2} ${st2tr} ${st3} ${f}
 #
 if test ! -d ${lock_dir} ; then :
diff --git a/debian/datumgrids.shar b/debian/datumgrids.shar
index d9a0161..f41ae56 100644
--- a/debian/datumgrids.shar
+++ b/debian/datumgrids.shar
@@ -97,25 +97,8 @@ st2=123123592001.59
 st2tr=123123592001.5 # old SysV 14-char limit
 st3=1231235901
 
-if   touch -am -t ${st1} ${f} >/dev/null 2>&1 && \
-     test ! -f ${st1} && test -f ${f}; then
-  shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
-
-elif touch -am ${st2} ${f} >/dev/null 2>&1 && \
-     test ! -f ${st2} && test ! -f ${st2tr} && test -f ${f}; then
-  shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
-
-elif touch -am ${st3} ${f} >/dev/null 2>&1 && \
-     test ! -f ${st3} && test -f ${f}; then
-  shar_touch='touch -am $3$4$5$6$2 "$8"'
-
-else
-  shar_touch=:
-  echo
-  ${echo} 'WARNING: not restoring timestamps.  Consider getting and
-installing GNU '\''touch'\'', distributed in GNU coreutils...'
-  echo
-fi
+# avoid mangling timestamps on files
+shar_touch=:
 rm -f ${st1} ${st2} ${st2tr} ${st3} ${f}
 #
 if test ! -d ${lock_dir} ; then :
-- 
2.39.2

Attachment: signature.asc
Description: PGP signature

Reply via email to