-
Notifications
You must be signed in to change notification settings - Fork 315
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
Support a statically built hab
binary for use in the build toolchain for artifact signing
#389
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Namely, this adds support for the x86_64-unknown-linux-musl rustc target. If more targets are required in the future, it's all just arrays, yay!
@fnichol just like with studio, this is exactly how I wanted it to turn out but wasn't sure if we'd be able to get there 100%. Just like with studio - we did! Merge after your rebase :) |
This crate is no longer used anywhere in code and brings in more build dependencies than we need.
This change ensures that we can build all crates and also only build the binary targets. The default Makefile target will be `make bin` and `make all` will compile all crates. Similarly, the `make clean` has been augmented to clean all crates.
This was, frankly, a mistake when I was extracting and refactoring the code; we really want these error cases.
This strips the dependency on `hab` until we either add it to the `hab-bpm` Plan or replace `hab-bpm` altogether with `hab` itself.
This change is necessary as this release adds static compilation support to the crate.
This change introduces a new Plan (under `components/hab/static`) which uses a musl-based libc chain of dependencies and produces a ~6.0mb statically built binary which should be portable enough to work in our stage1 Studios and potentially on third-party 64-bit Linux operating systems. As a hedge on not getting everything totally right the first time, the default build is an improved glibc-based, dynamic binary as before, although using the `cargo build --release` flag for a tighter resulting binary.
Note that the `pkg_gpg_key` still remains in `hab-plan-build` as we haven't yet cut over to the new signing.
fnichol
force-pushed
the
fnichol/portable-hab
branch
from
April 14, 2016 21:32
d61723c
to
dd7c7b2
Compare
This PR has passed 'Verify' and is ready for review and approval! |
@delivery approve |
Change: f36c3b9c-953b-4a63-b6e5-834ad4906b43 approved by: @metadave |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We did it, gang! A ~6mb static binary called
hab
which works for signing artifacts!Why do I put it this way? I fear there are a few issues to iron out in the install logic as musl has a very small stack size by default (80k). This PR includes a patch which grows this to 2mb, but it's also a temporary fix. (References: musl git, musl wiki, example project failure, openvswitch mailing list).
Details aside though,