diff options
author | Nirmoy Das <nirmoy.aiemd@gmail.com> | 2018-06-28 10:18:43 +0200 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2018-06-29 11:21:12 +0000 |
commit | c9f40227836b827b71a6cbc4744d4b7151b2fcef (patch) | |
tree | 22ce6114031e594adf40812338931d545df38c2d /src/tools/vppapigen | |
parent | 10a0989a30f00e4705078ccfc0c03e8a7652eb2d (diff) |
VPPAPIGEN: use SOURCE_DATE_EPOCH for datestring
bwiedemann@suse.com pointed me that:
For reproducible builds datestring should be generated using
SOURCE_DATE_EPOCH which distributions set centrally, and have build
tools that consume it to produce reproducible output.
https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Python
Change-Id: Iefa2b93231bbc4c8af49736be4d7a5720c46b28d
Signed-off-by: Nirmoy Das <nirmoy.aiemd@gmail.com>
Diffstat (limited to 'src/tools/vppapigen')
-rw-r--r-- | src/tools/vppapigen/C.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/vppapigen/C.py b/src/tools/vppapigen/C.py index c9e543f486b..b56e0722122 100644 --- a/src/tools/vppapigen/C.py +++ b/src/tools/vppapigen/C.py @@ -1,8 +1,9 @@ # C generation import datetime import os +import time -datestring = datetime.datetime.now() +datestring = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))) input_filename = 'inputfil' top_boilerplate = '''\ /* |