build: allow overriding docker UID for rootless environments#862
Open
Suraj-kumar00 wants to merge 1 commit intoDasharo:dasharofrom
Open
build: allow overriding docker UID for rootless environments#862Suraj-kumar00 wants to merge 1 commit intoDasharo:dasharofrom
Suraj-kumar00 wants to merge 1 commit intoDasharo:dasharofrom
Conversation
Contributor
|
Looks like you've copied most of the PR comment from the EC comment. The Test does not really make sense here. I've tested that myself on a rootless docker installation.
The hash on the commit prior (5db5cf9) (built on a rootful docker installation):
We can check what has changed in the binary using romscope. Test procedure
|
This file contains hidden or 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
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.
Description
This PR enables building the coreboot firmware using a rootless Docker setup, fixing Dasharo/dasharo-issues#1197.
Currently,
build.shuses-u $UIDfor thedocker runcommands. In a rootless Docker setup, mapping the host's UID into the container causes user-namespace conflict errors. Because$UIDis a read-only variable in Bash, it cannot be overridden safely from the command line.This introduces a
DOCKER_UIDenvironment variable that falls back to$UID. Developers using rootless setups can now reproduce builds by running:Because of rootless Docker user namespaces, the container will run as
rootinternally and bypass the permission constraint. The final.romoutput file will still be safely owned by the host's standard user.Testing
Standard Docker (Regression Test):
Builds successfully.
Rootless Docker:
Successfully completes the build.
Verification:
The SHA256 hashes of the resulting
ec.romfiles match perfectly between both build environments, confirming reproducible builds without permission errors.