Source: python-parse-type
Severity: normal
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps hostname
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

There are two result.xml files shipped in the .deb package which contain
timestamp, timing, and hostname information about the build environment:

  ./usr/lib/python3/dist-packages/build/testing/report.xml

  - <testsuite name="pytest" errors="0" failures="0" skipped="0"
  tests="218" time="0.660" timestamp="2021-12-26T13:32:24.664241"
  hostname="osuosl174-amd64">

vs.
  
  + <testsuite name="pytest" errors="0" failures="0" skipped="0"
  tests="218" time="0.654" timestamp="2022-10-18T19:37:34.113136"
  hostname="osuosl174-amd64">


The attached patch fixes this by removing these files from debian/rules
in a dh_install override.


If it is not appropriate to remove the result.xml files, another
approach might be to sanitize out all the timestamps, timing and
hostname, although this might become a game of whack-a-mole over time.


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


Thanks for maintaining python-parse-type!


live well,
  vagrant
From 385bf9f6385cdbea8bc480290c10936f44df5f89 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@reproducible-builds.org>
Date: Mon, 27 Dec 2021 01:41:53 +0000
Subject: [PATCH] debian/rules: Delete test suite log from dh_install override.

---
 debian/rules | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/debian/rules b/debian/rules
index 02c38ce..62b5543 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,3 +4,10 @@ export PYBUILD_NAME=parse-type
 
 %:
 	dh $@ --with python3 --buildsystem=pybuild
+
+override_dh_install:
+	# Delete log of test suite which contains dates and timing
+	# information for reproducible builds.
+	find debian/python3-parse-type/usr/lib/python*/dist-packages/build/testing/ \
+		-name report.xml -delete -print
+	dh_install
-- 
2.34.1

Attachment: signature.asc
Description: PGP signature

Reply via email to