Age | Commit message (Collapse) | Author |
|
Despite carefully adding homebrew's e2fsprogs to the PATH,
the script then defined E2FSCK as if we are always on Linux.
|
|
According to its manpage genext2fs tries to create the file system with
as few inodes as possible. This causes SerenityOS to fail at boot time
when creating temporary files.
|
|
Under Debian `e2fsck` is found in `/sbin/` which does not match the
existing "version" the script currently uses (`/usr/sbin/e2fsck`
versus `/sbin/e2fsck`); therefore I added a simple `if` condition to
remedy the situation by verifying whether the original path exists or
not, so I can use the one Debian expects.
Special thanks goes to Tim Flynn a.k.a. `trflynn89` for his valuable
feedback.
|
|
Let which find the fuse2fs executable path for us, as it is not in
`/usr/sbin` in every distro.
|
|
|
|
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 is a whitespace only commit to avoid confusion with the
next feature commit.
|
|
When calling sub-programs from shell with exec, the useful || die
idiom does not actually do anything, since the first script is gone.
|
|
|
|
We want to use use the 'du' option '--apparent-size' which is a
GNU coreutils extension. GNU coreutils is a build dependency so
we know it is available. With this commit we first try to pick up
du as 'gdu', and if that fails, try 'du' instead.
|
|
There was previously a case where the build-image-qemu.sh script
decided to mount an existing disk image, but without creating the
memory disk device and recording its /dev file name.
After this commit, We create the memory disk device just before
it is used to mount the disk image.
|
|
Having lots of small files in Base/ may require more inodes in the
ext2 filesystem than the format utility sets aside by default. Let's
make a more educated guess since we have a rough idea of how many
inodes we need by counting files and directories.
|
|
|
|
|
|
Previously we'd add 100MB on top of what du returned for the Root
directory. This increases that to 500MB.
|
|
Fixes #7172.
|
|
If mounting disk image fails (e.g. fuse is not available on macos),
always try using genext2fs before giving up.
|
|
This adds support for re-using and re-sizing existing disk images.
Disk images are checked with e2fsck prior to re-use and a new disk
image is automatically created when that check fails.
|
|
|
|
realpath(1) is specific to coreutils and its behavior can be had
with readlink -f
Create the Toolchain Build directory if it doesn't exist before
calling readlink, since realpath(3) on at least OpenBSD will error
on a non-existent path
|
|
|
|
Oops. I didn't know there was a style guide for the scripts.
|
|
This reduces the size of the default build, while allowing people to
install as many ports as they want, without having to manually specify
disk size.
|
|
In the GNU coreutils version of chown, ":" is a valid argument
(the command will result in a no-op), but POSIX chown does not
consider that valid.
If the user who ran build-image-*.sh was root, SUDO_UID and SUDO_GID
would not be set and, if the version of chown installed on the system
did not allow passing just a ":" as argument, the script would fail.
Let's default the value of SUDO_UID and SUDO_GID to 0 just in case.
|
|
|
|
|
|
Closes https://github.com/SerenityOS/serenity/issues/2080
|