mirror of
https://gitlab.archlinux.org/archlinux/archlinux-docker.git
synced 2026-03-28 10:21:01 +01:00
Makefile: use fakeroot for tar-ing rootfs
When tar-ing the rootfs, the permissions preserved are from the worker process. This is not the intended behavior, as we want to preserve the permissions of the root user to most of the files. Use fakeroot during the tar process to automagically map the uid of the user to that of root's. Fixes #22 Signed-off-by: Santiago Torres <santiago@archlinux.org>
This commit is contained in:
parent
a2b08c5fc1
commit
368a504fa3
4
Makefile
4
Makefile
@ -20,7 +20,9 @@ rootfs: hooks
|
||||
# remove passwordless login for root (see CVE-2019-5021 for reference)
|
||||
sed -i -e 's/^root::/root:!:/' "$(BUILDDIR)/etc/shadow"
|
||||
|
||||
tar --numeric-owner --xattrs --acls --exclude-from=exclude -C $(BUILDDIR) -c . -f archlinux.tar
|
||||
# fakeroot to map the gid/uid of the builder process to root
|
||||
# fixes #22
|
||||
fakeroot -- tar --numeric-owner --xattrs --acls --exclude-from=exclude -C $(BUILDDIR) -c . -f archlinux.tar
|
||||
rm -rf $(BUILDDIR) alpm-hooks
|
||||
|
||||
compress-rootfs: archlinux.tar
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user