summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVagrant Cascadian <vagrant@reproducible-builds.org>2023-02-28 11:31:36 +0100
committerHelmut Grohne <helmut@subdivi.de>2023-03-01 12:24:53 +0100
commite03e4eff50d1541ff295f1c50dd09d4551dbe5be (patch)
treec31ed96c447e2718c697119e05942aef73d4d655
parent538fc2b58474388b962c04006889066b9081410a (diff)
[PATCH] Make timestamps in manual pages reproducible
From 6c58ba63bfb85487bd26ee793c5c2bc29c270780 Mon Sep 17 00:00:00 2001 Forwarded: https://github.com/borgbackup/borg/pull/7394 Bug-Debian: https://bugs.debian.org/1029807 Refer to https://reproducible-builds.org/docs/source-date-epoch/ for documentation on SOURCE_DATE_EPOCH. Signed-off-by: Helmut Grohne <helmut@subdivi.de> Gbp-Pq: Name 0001-Make-timestamps-in-manual-pages-reproducible.patch
-rw-r--r--setup_docs.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/setup_docs.py b/setup_docs.py
index 3c21a17c..6dff1eba 100644
--- a/setup_docs.py
+++ b/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,10 @@ 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()