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

Only calculate buildhost and buildtime during an actual build #935

Merged
merged 2 commits into from Nov 11, 2019

Conversation

pmatilai
Copy link
Contributor

Commit fa303d5 moved buildhost and
buildtime calculation out of the package generation to early spec
initialization, but this broke reproducable builds: if buildtime is
to be set from changelog, changelog needs to be parsed first.

So either we need to do it twice or we need to do it right, and
besides avoiding duplication, conceptually these values are only
meaningful during a build and not a parse, so this restores that part
of the original code while keeping things thread-safe.

Fixes: #932

Commit fa303d5 moved buildhost and
buildtime calculation out of the package generation to early spec
initialization, but this broke reproducable builds: if buildtime is
to be set from changelog, changelog needs to be parsed first.

So either we need to do it twice or we need to do it right, and
besides avoiding duplication, conceptually these values are only
meaningful during a build and not a parse, so this restores that part
of the original code while keeping things thread-safe.

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

To make it clear, this is an alternative to #933 to avoid the duplication added there.

We used to test against explicit digest values until commit
e20527a changed the rpmkeys output
to drop the actual values and breaking the reproducability test - it
was now only testing whether the package we just built has intact
digests. Doh.

And because of that, commit fa303d5 was
able to silently break setting buildtime from changelog (rpm-software-management#932) and
why commit 4b15a9e didn't require
adjustment of the test-suite, and why addition of the alternative
payload digest in commit 83a26ae didn't
require changing this test. Maybe something else too. Doh.
@pmatilai
Copy link
Contributor Author

The test also fixed now, indeed showing that the functionality was broken before.

Copy link
Contributor

@bmwiedemann bmwiedemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it. Looks good.

@pmatilai
Copy link
Contributor Author

Excellent, thanks.

@pmatilai pmatilai merged commit 7cb8ebd into rpm-software-management:master Nov 11, 2019
@pmatilai pmatilai deleted the buildfoo-pr branch November 15, 2019 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot set Build Date from changelog anymore
2 participants