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>
This commit is contained in:
Nirmoy Das
2018-06-28 10:18:43 +02:00
committed by Ole Trøan
parent 10a0989a30
commit c9f4022783

View File

@ -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 = '''\
/*