Source: borgbackup2 Severity: normal Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: timestamps X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
The date is embedded in various manpages: https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/diffoscope-results/borgbackup2.html /usr/share/man/man1/borg2-benchmark-cpu.1.gz .TH·"BORG-BENCHMARK-CPU"·1·"2023-01-27"·""·"borg·backup·tool" vs. .TH·"BORG-BENCHMARK-CPU"·1·"2024-02-29"·""·"borg·backup·tool" The attached patch fixes this by modifying setup_docs.py to use SOURCE_DATE_EPOCH for a deterministic timestamp. According to my local tests, with these patches applied borgbackup2 should build reproducibly on tests.reproducible-builds.org! Thanks for maintaining borgbackup2! live well, vagrant
Use deterministic timestamp if SOURCE_DATE_EPOCH is set, falling back to current time. https://reproducible-builds.org/docs/source-date-epoch/ Index: borgbackup2/setup_docs.py =================================================================== --- borgbackup2.orig/setup_docs.py +++ borgbackup2/setup_docs.py @@ -7,6 +7,7 @@ import sys import textwrap from collections import OrderedDict from datetime import datetime +import time from setuptools import Command @@ -470,7 +471,9 @@ class build_man(Command): self.write_heading(write, description, double_sided=True) # man page metadata write(":Author: The Borg Collective") - write(":Date:", datetime.utcnow().date().isoformat()) + write(":Date:", datetime.utcfromtimestamp( + int(os.environ.get('SOURCE_DATE_EPOCH', + time.time()))).date().isoformat()) write(":Manual section: 1") write(":Manual group: borg backup tool") write()
signature.asc
Description: PGP signature