ci/build.sh leaves host target/ root-owned after local runs #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ci/build.shruns the shared CI container viadocker runwith no--userflag, so the container's default user is root:The final
cp -a /cargo-target/. /workspace/target/step writes directly onto the host bind-mount (-v "${REPO_ROOT}:/workspace") as root, so every local invocation ofci/build.shleaves the product repo'starget/owned byroot:rooton the host afterward. Any later host-sidecargoinvocation (e.g.cargo clippy) then fails with a permission error ontarget/debug/.cargo-build-lockuntil someone manuallychowns it back.Found this while running a clippy pass across the ecosystem on 2026-08-06 — root-owned
target/blocked builds in breadmon, breadshot, breadclip, and breadpad (all had to bechown'd back to the invoking user beforecargo clippywould run). Likely affects every product wired up toci/build.sh(breadbar's CI just got ported onto it per #4) the first time it's run locally rather than in the actual CI runner.Fix: pass
--user "$(id -u):$(id -g)"todocker run(works fine since the container only needs write access to the named cargo-cache volumes and the bind-mounted workspace, both already host-writable), orchownthe copied files back to the invoking user's uid/gid as the last step before the container exits.