Fix overlay file ownerships

By default, `tar` copies file ownership UID/GID.  This works fine when
the build is running in a rootless container, since the source UID/GID
numbers are mapped to 0/0 inside the container.  In other scenarios,
though, such as building in a microvm with the source directory on a
shared filesystem, the original numbers are preserved.  We need to
explicitly state that the files must be owned by root.
gentoo
Dustin 2023-03-03 12:26:51 -06:00
parent 4900085a1c
commit 5e4e37259e
1 changed files with 2 additions and 2 deletions

View File

@ -59,8 +59,8 @@ while read name; do
fi
done < busybox.symlinks
tar -c -C overlay . \
| tar -x --keep-newer-files -C /mnt/gentoo
tar -c -C overlay --owner=root --group=root . \
| tar -x -C /mnt/gentoo
cp -uv /usr/${target}/usr/bin/grub-editenv /mnt/gentoo/usr/bin/