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

Add rcodesign installation to golang-builder #242

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

gitperr
Copy link
Contributor

@gitperr gitperr commented Jan 28, 2024

Preparation for code signing OSX builds, will help fixing issues like prometheus/node_exporter#2539.

See https://github.com/indygreg/apple-platform-rs/tree/main/apple-codesign#rcodesign-cli for more info.

@gitperr gitperr marked this pull request as draft January 28, 2024 14:45
@gitperr gitperr marked this pull request as ready for review January 28, 2024 18:09
@gitperr
Copy link
Contributor Author

gitperr commented Feb 3, 2024

@SuperQ did you have any feedback for this?

1.20/main/Dockerfile Outdated Show resolved Hide resolved
1.20/main/Dockerfile Outdated Show resolved Hide resolved
@gitperr gitperr force-pushed the master branch 2 times, most recently from 84cf3b5 to 6fd9f07 Compare February 5, 2024 20:00
1.21/main/Dockerfile Outdated Show resolved Hide resolved
Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

Minor nit, otherwise LGTM.

Signed-off-by: Alper Polat <[email protected]>

Install rust and rcodesign

This method was chosen because rust shipped with debian is 1.63.0,
which does not seem to be sufficient for the binary to be built.
So, we have to install rust from source.

Signed-off-by: Alper Polat <[email protected]>

Move rust installation further down for better flow

Seems like build pipeline fails because we remove the osxcross
directory, so might be better to concatenate the path and install
rust a bit later.

Signed-off-by: Alper Polat <[email protected]>

Use rust image to add rcodesign instead of rustup

Signed-off-by: Alper Polat <[email protected]>

Copy from the correct directory

Seems like the rcodesign binary ended up in `/usr/local/cargo`
not /root...
Signed-off-by: Alper Polat <[email protected]>

Use `/usr/local/bin` instead

Keep it simpler, we don't need the `cargo` directory.
Signed-off-by: Alper Polat <[email protected]>

Remove redundant space

Signed-off-by: Alper Polat <[email protected]>
@gitperr
Copy link
Contributor Author

gitperr commented Feb 5, 2024

Should be good to go. I can look at improving the pipelines to add code signing next.

@SuperQ SuperQ merged commit f77765f into prometheus:master Feb 6, 2024
4 checks passed
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.

2 participants