set SOURCE_DATE_EPOCH from changelog #143

merged 1 commit into from Feb 1, 2017


None yet

2 participants

ffesti commented Feb 1, 2017

Alternative implementation for #141

It sets the environment variable during the build stage and not while parsing the spec which should be free from side effects.

@bmwiedemann @ffesti bmwiedemann set SOURCE_DATE_EPOCH from changelog
if requested by macro
to allow for more reproducible builds of packages.

See for why this is good
for the definition of this variable.
ffesti commented Feb 1, 2017

@bmwiedemann would this work for you?
I left you as author of the patch but I can reset it if you wish.


change looks reasonable. I am giving it a round of testing.
Under what condition would headerGet return false here? OOM? no changelog entry found?


test looks good.

@ffesti ffesti merged commit 0e87aed into rpm-software-management:master Feb 1, 2017

1 check passed

Jenkins (Red Hat) 153/153 normal + 0/4 xfail
@ffesti ffesti deleted the ffesti:SOURCE_DATE_EPOCH branch Feb 1, 2017
ffesti commented Feb 2, 2017

Hmm, I am wondering if the
condition is really correct here. The problem is that rpmbuild might be used to build multiple packages in one go. But even if that was not possible someone using the API could.
Do we really need to give precedence of an already set SOURCE_DATE_EPOCH environment variable over %source_date_epoch_from_changelog ?


I put it there because the spec says:

Build systems MUST NOT overwrite this variable for child processes to consume if it is already present.

But then, it probably does not apply if we had set it ourselves (and not the user) for the previous rpm to build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment