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

Making the Optflags and Spec fields in the SRPM empty for reproducibility #2602

Closed
Conan-Kudo opened this issue Aug 4, 2023 · 2 comments
Closed

Comments

@Conan-Kudo
Copy link
Member

As part of the production of SRPMs, RPM injects the C/C++ compiler flags into the Optflags tag and a processed spec file into the Spec tag.

As we can't reasonably use the Optflags and Spec tags effectively for builds and it creates issues when noarch packages are built on different host architectures, would it be possible to make these fields empty? That way there's less weird content to deal with when verifying reproducibility and we can save some space on package header generation.

@pmatilai
Copy link
Member

pmatilai commented Aug 9, 2023

There's reproducability and there's reproducability. Without the contents of the RPMTAG_SPEC, you may have matching hashes but you have absolutely no clue whether you've reproduced the parse. Optflags is similar, although for noarch packages those are kinda moot.

@pmatilai
Copy link
Member

pmatilai commented Aug 9, 2023

So no, RPMTAG_SPEC is not going away. It was just introduced, and it has already proven quite useful, for one to diagnose build issues in ways that were previously simply impossible.
On the contrary, ability to rebuild from RPMTAG_SPEC without reparsing the original spec, (and with macro expansion disabled) would be a neat thing to have, for reproducability.

I symphatize with wanting a more reproducable source archive format, but cannibalizing the existing src.rpm is not the way to do get that.

@pmatilai pmatilai closed this as completed Aug 9, 2023
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

No branches or pull requests

2 participants