fix(yocto): avoid preserving source groups during unpack - #1225
Conversation
The dstack recipes copy source trees from outside BitBake's work directory. Archive-mode rsync attempts to preserve their group ownership, which can fail when the build user cannot assign the source group.\n\nDisable group preservation while retaining the other archive-mode attributes.
`--no-group` only covers the receiver-is-not-super-user path. When bitbake
runs as (fake) root -- rootless docker/podman, or `sudo os/build.sh` -- archive
mode still applies `-o`, and chown to an unmapped source uid fails the same
way:
rsync: [receiver] chown ".../.f.txt.nQSbHp" failed: Invalid argument (22)
rsync error: some files/attrs were not transferred (code 23)
The aborted transfer also leaves the file at the temp-file mode (0600) instead
of the source mode, so a partially-staged tree can fail later tasks.
Verified with rsync 3.2.7 across the three privilege setups (non-root without
the source group, non-root with an unmappable gid, userns-root with an
unmappable uid): only `--no-owner --no-group` succeeds in all three.
|
Right fix, right scope — these two recipes are the only in-tree places staging a tree from outside One gap, so I pushed a follow-up (fdfdfbd) instead of a round-trip: Ownership is meaningless for a LGTM with that on top. |
The dstack recipes copy source trees from outside BitBake's work directory. Archive-mode rsync attempts to preserve their group ownership, which can fail when the build user cannot assign the source group.
Disable group preservation while retaining the other archive-mode attributes.