1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:07:34 +00:00

Meta: Use fuse2fs if available to avoid root when building image

The fuse2fs tool that is part of e2fsprogs-1.46 has a 'fakeroot'
mount option.  This allows a non-root users to modify file ownership
and permissions without actually being root.  This package is
available in Debian bullseye and buster-backports.

If available, the script assumes the user wants to use it.
Otherwise, it falls back to the usual root requirements.

Now that root is not required, the root check in
build-root-filesystem.sh is not necessary.  Since
build-root-filesystem.sh has 'set -e' enabled, removing this check
will not cause a change in functionality.
This commit is contained in:
Chris Frey 2021-12-11 21:42:51 -05:00 committed by Brian Gianforcaro
parent 951f7becec
commit 8f3759c04f
2 changed files with 17 additions and 9 deletions

View file

@ -22,10 +22,6 @@ die() {
exit 1
}
if [ "$(id -u)" != 0 ]; then
die "this script needs to run as root"
fi
[ -z "$SERENITY_SOURCE_DIR" ] && die "SERENITY_SOURCE_DIR is not set"
[ -d "$SERENITY_SOURCE_DIR/Base" ] || die "$SERENITY_SOURCE_DIR/Base doesn't exist"