mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-03 02:05:54 +00:00
Make timestamps in manual pages reproducible
Refer to https://reproducible-builds.org/docs/source-date-epoch/ for
documentation on SOURCE_DATE_EPOCH.
Bug-Debian: https://bugs.debian.org/1029807
Signed-off-by: Helmut Grohne <helmut@subdivi.de>
(cherry picked from commit 98352cf667
)
This commit is contained in:
parent
a7a80ffe90
commit
a5c9231e88
1 changed files with 5 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
|||
import textwrap
|
||||
from collections import OrderedDict
|
||||
from datetime import datetime
|
||||
import time
|
||||
|
||||
from setuptools import Command
|
||||
|
||||
|
@ -459,7 +460,10 @@ def write_man_header(self, write, title, description):
|
|||
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()
|
||||
|
|
Loading…
Reference in a new issue