Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Build Date from changelog again #933

Closed

Conversation

bmwiedemann
Copy link
Contributor

Set Build Date from changelog again

This is needed because fa303d5 had moved the code that used getenv("SOURCE_DATE_EPOCH") to run before we do setenv here.

See https://reproducible-builds.org/ for why this is good.

Fixes #932

@Conan-Kudo
Copy link
Member

@pmatilai I think this qualifies as a regression to fix in 4.15.1.

@pmatilai
Copy link
Contributor

Why do we need this code in two places now?

@bmwiedemann
Copy link
Contributor Author

Why do we need this code in two places now?

The old one is still needed in case SOUCE_DATE_EPOCH is set by the caller of rpmbuild.
The new one is now needed for the case where we use the last changelog date via %source_date_epoch_from_changelog Y

The duplication is rather small, though.

@pmatilai
Copy link
Contributor

It's not a big duplication but such things look fishy nevertheless.
At the very least that explanation needs to go the the commit message.

fa303d5 had moved the code that used SOURCE_DATE_EPOCH
to run before we do setenv here.

The old code is still needed in case SOUCE_DATE_EPOCH is set by
the caller of rpmbuild.
The new code is now needed for the case where we use the last
changelog date via %source_date_epoch_from_changelog Y

See https://reproducible-builds.org/ for why this is good.

Fixes rpm-software-management#932
@bmwiedemann
Copy link
Contributor Author

Added it.

@pmatilai
Copy link
Contributor

Thanks.

In the meanwhile, I ended up looking at the bigger picture, commit fa303d5 moved buildhost and buildtime calculation to a wrong place conceptually. So when it's wrong both conceptually and functionally... can you test if #935 works for you?

@pmatilai
Copy link
Contributor

Resolved via #935, thanks for bringing this to our attention and the patch though!

@pmatilai pmatilai closed this Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot set Build Date from changelog anymore
3 participants