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

PoC/draft: make build reproducible #12515

Closed
wants to merge 1 commit into from

Conversation

bmwiedemann
Copy link

While working on reproducible builds for openSUSE, I found that our golang-github-prometheus-prometheus package varied between builds because our Open Build Service randomly selects worker nodes from its pool and prometheus embeds the buildhost name in its binaries.

I'd like to avoid to carry this patch downstream,
but don't know enough about the build system to override BuildUser from the outside.

While working on reproducible builds for openSUSE, I found that
our golang-github-prometheus-prometheus package varied between builds
because our Open Build Service randomly selects worker nodes from its pool
and prometheus embeds the buildhost name in its binaries.

I'd like to avoid to carry this patch downstream,
but don't know enough about the build system to override BuildUser
from the outside.

Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
@roidelapluie
Copy link
Member

We have discussed this pull request during our weekly bug scrub.

Thank you for your pull request, this usename/host information is actually useful for us when we get the output of prometheus --version from our users to know if the build has been made by our CI or if it is custom.

Since you are building using RPM's, did you consider applying this as a patch downstream ?

Thanks

@bmwiedemann
Copy link
Author

Yes. As I wrote above: "I'd like to avoid to carry this patch downstream"

Is there a way to have the user+host included by default but be able to override/drop by us, e.g. by setting the SOURCE_DATE_EPOCH env var?

@bmwiedemann
Copy link
Author

I think, https://github.com/prometheus/promu/blob/master/cmd/build.go#L195 provides a good template there.

@roidelapluie
Copy link
Member

Yes, you can send a patch to Promu

@bmwiedemann
Copy link
Author

This is now moved to prometheus/promu#267

@bmwiedemann bmwiedemann deleted the host branch July 26, 2023 09:15
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.

None yet

2 participants