build: allow overriding docker UID for rootless environments#85
Open
Suraj-kumar00 wants to merge 1 commit intoDasharo:masterfrom
Open
build: allow overriding docker UID for rootless environments#85Suraj-kumar00 wants to merge 1 commit intoDasharo:masterfrom
Suraj-kumar00 wants to merge 1 commit intoDasharo:masterfrom
Conversation
|
Tested that on a rootless docker installation. The build succeeds with and without the fix in my case - contradictory to the message in the PR. Can you verify that @Suraj-kumar00? The
The hash on the commit prior (d198b64) (built on the same rootless docker installation):
I've re-used the environment from Dasharo/coreboot#862 (comment) here.
A hex diff shows that the binaries only differ with the build timestamp. --- clevo_nv40mz_ec.hex 2026-03-24 10:45:45.471109845 +0100
+++ suraj.hex 2026-03-24 10:45:35.051142712 +0100
@@ -2424,8 +2424,8 @@
00009770: f6f7 f8f9 fafb fcfd feff 3736 4543 5f42 ..........76EC_B
00009780: 4f41 5244 3d63 6c65 766f 2f6e 7634 306d OARD=clevo/nv40m
00009790: 7a00 3736 4543 5f56 4552 5349 4f4e 3d32 z.76EC_VERSION=2
-000097a0: 3032 362d 3033 2d31 325f 6431 3938 6236 026-03-12_d198b6
-000097b0: 3400 0419 0019 1900 1819 0006 1900 0819 4...............
+000097a0: 3032 362d 3033 2d31 355f 3633 6466 3534 026-03-15_63df54
+000097b0: 6100 0419 0019 1900 1819 0006 1900 0819 a...............
000097c0: 0007 1900 0919 000b 1900 0a19 000c 1900 ................
000097d0: 0e19 000d 1900 3819 0039 1900 3a19 003b ......8..9..:..;
000097e0: 1900 3c19 003d 1900 3e19 003f 1900 4019 ..<..=..>..?..@.@Suraj-kumar00 Can you explain how did you get the same SHA hash? The EC build script does not use the 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 EC firmware using a rootless Docker setup, fixing Dasharo/dasharo-issues#1197.
Currently,
build.shhardcodes the user ID passed to the Docker container via-u "$(id -u)". In a rootless Docker environment, the Docker daemon runs in userspace, and forcing the host's UID inside the container causes user-namespace mapping issues, leading toPermission deniederrors.This introduces a
DOCKER_UIDenvironment variable that falls back to$(id -u). This allows developers using rootless Docker to easily bypass the restriction by running:Because of rootless Docker user namespaces, the container runs as
rootinternally, but the resulting.romfile is safely owned by the standard developer user on the host machine.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.