Set repodata mtime to SOURCE_DATE_EPOCH
repodata/repomd.xml include timestamps of all the other repodata files. Even when those files are created reproducibly, they have current modification time. In general case this is a good thing (ease checking if repodata cache is up to date). But in case of composing installation image, it breaks reproducibility. Avoid this by instructing createrepo to set mtime and revision to $SOURCE_DATE_EPOCH. Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
This commit is contained in:
parent
2aeb8de459
commit
d6e72c8e61
@ -1440,6 +1440,9 @@ class Pungi(PungiBase):
|
||||
conf.baseurl = baseurl
|
||||
if compress_type:
|
||||
conf.compress_type = compress_type
|
||||
if 'SOURCE_DATE_EPOCH' in os.environ:
|
||||
conf.revision = os.environ['SOURCE_DATE_EPOCH']
|
||||
conf.clamp_mtime_to = int(os.environ['SOURCE_DATE_EPOCH'])
|
||||
repomatic = createrepo.MetaDataGenerator(conf)
|
||||
self.logger.info('Making repodata')
|
||||
repomatic.doPkgMetadata()
|
||||
|
Loading…
Reference in New Issue
Block a user