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

krane: write krane binary to a tempfile #405

Merged
merged 2 commits into from
Nov 8, 2024

Conversation

sam-berning
Copy link
Contributor

Issue number:

Closes #403

Description of changes:

While looking into #403, I noticed that the krane binary produced in the build works as expected if I just copy the binary over to an affected system.

This PR changes the way that the krane-bundle lib installs krane. Instead of keeping the file in memory and sealing it, we create a temp directory and write the krane binary to that directory.

This PR also improves the error message when krane fails to run.

Testing done:

Built twoliter with

cross build --target=x86_64-unknown-linux-musl --release

and copied the produced binary over to a system that was affected by the bug in #403. I ran twoliter update in the bottlerocket repo without issue.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@sam-berning sam-berning requested a review from cbgbt November 8, 2024 18:49
@@ -11,6 +11,7 @@ anyhow.workspace = true
flate2.workspace = true
lazy_static.workspace = true
pentacle.workspace = true
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe you can remove this dependency.

@cbgbt
Copy link
Contributor

cbgbt commented Nov 8, 2024

Too bad that the sealed file bit struggles on some systems -- it's still not clear to me why. Nice work!

@sam-berning
Copy link
Contributor Author

^ address comments from @cbgbt and update krane README

@sam-berning sam-berning merged commit 1c306ae into bottlerocket-os:develop Nov 8, 2024
1 check 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.

Twoliter's build of krane appears to be linking against libc
3 participants