-
Notifications
You must be signed in to change notification settings - Fork 52
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
Allow injecting coreos-cargo.eclass into portage-stable ebuilds #1780
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
2 tasks
krnowak
reviewed
Mar 21, 2024
sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-apps/zram-generator
Show resolved
Hide resolved
...container/src/third_party/coreos-overlay/coreos/config/env/sys-block/thin-provisioning-tools
Outdated
Show resolved
Hide resolved
Gentoo's cargo based ebuilds don't cross-compile well, so we need a way to inject coreos-cargo.eclass into them. Otherwise we'd need to fork the ebuilds into coreos-overlay and maintain them ourselves. The way we can do this is by sourcing the eclass from cros hooks and overriding src_unpack to call the eclass implementation. Inheriting an eclass is not allowed from hooks. Since we can't call any of the inherits a variable is introduced to skip them and EXPORT_FUNCTIONS. Signed-off-by: Jeremi Piotrowski <[email protected]>
The hook hijacks src_unpack and calls the cross-compilation friendly implementation. Signed-off-by: Jeremi Piotrowski <[email protected]>
We currently ship an amd64 binary of thin-provisioning-tools on arm64. To fix this add a hook that hijacks src_unpack and calls the cross-compilation friendly implementation. We also need to fixup the src_install implementation since it looks for the produced binary in the default cargo location. Signed-off-by: Jeremi Piotrowski <[email protected]>
jepio
force-pushed
the
jepio/portage-coreos-cargo
branch
from
March 28, 2024 11:59
cb6f5ba
to
b34894e
Compare
krnowak
approved these changes
Mar 28, 2024
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.
Allow injecting coreos-cargo.eclass into portage-stable ebuilds
Ebuilds in portage-stable that use cargo.eclass don't cross-compile cleanly. Arm64 builds produce host binaries. Modify coreos-cargo.eclass slightly to allow it to be sourced from cros hooks, which allows us to override src_unpack cleanly. This is equivalent to injecting coreos-cargo.eclass into unmodified ebuilds.
Tested that with this change
zram-generator
andthin-provisioning-tools
now produce arm64 binaries. This resolves the followingbuild_image
warning from arm64 builds:How to use
[ describe what reviewers need to do in order to validate this PR ]
Testing done
[Describe the testing you have done before submitting this PR. Please include both the commands you issued as well as the output you got.]
changelog/
directory (user-facing change, bug fix, security fix, update)/boot
and/usr
size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.