diff options
author | Chris Frey <cdfrey@foursquare.net> | 2021-12-11 21:42:51 -0500 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-01-13 03:35:21 -0800 |
commit | 8f3759c04f5e987a97c5d2c73703dc8fedc308b5 (patch) | |
tree | c6249d87adb20ad440aae72ff255a81a09ee567e /Meta/build-root-filesystem.sh | |
parent | 951f7becec7e06554e5a9f5eec8b067fa2bb31f2 (diff) | |
download | serenity-8f3759c04f5e987a97c5d2c73703dc8fedc308b5.zip |
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.
Diffstat (limited to 'Meta/build-root-filesystem.sh')
-rwxr-xr-x | Meta/build-root-filesystem.sh | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Meta/build-root-filesystem.sh b/Meta/build-root-filesystem.sh index 14bd84bb8c..8cc8be1112 100755 --- a/Meta/build-root-filesystem.sh +++ b/Meta/build-root-filesystem.sh @@ -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" |