Unverified Commit 368a504f authored by Santiago Torres-Arias's avatar Santiago Torres-Arias
Browse files

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-Arias's avatarSantiago Torres <santiago@archlinux.org>
parent a2b08c5f
...@@ -20,7 +20,9 @@ rootfs: hooks ...@@ -20,7 +20,9 @@ rootfs: hooks
# remove passwordless login for root (see CVE-2019-5021 for reference) # remove passwordless login for root (see CVE-2019-5021 for reference)
sed -i -e 's/^root::/root:!:/' "$(BUILDDIR)/etc/shadow" 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 rm -rf $(BUILDDIR) alpm-hooks
compress-rootfs: archlinux.tar compress-rootfs: archlinux.tar
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment