Root access is required for creating tmpfs mounts in the context of
the current mount namespace, and creating a tmpfs in the context of a
new mount namespace is less useful because a process in the parent
namespace can't easily access it.
So add an option to avoid creating tmpfs mounts, which will be used by
the rootless bootstrap mode for now.
In addition, when tmp directories aren't mounted as tmpfs, their
contents can't be removed using os.umount(). So instead remove them
recursively using shutil.rmtree().
This keeps the prepartion and bootstrap initiation logic in the same
place for each bootstrap mode, and allows each mode to specify its
own requirements and expectations from the different bootstrap steps.
These better describe the actions, and will make more sense with the
addition of the rootless bootstrap mode which would make use of these
preparation steps.
This allows creating *.checksums files instead of checking against
them when UPDATE_CHECKSUMS is set to True in bootstrap.cfg.
The checksums are also copied to /usr/src so they can be accessed
easily after the bootstrap completes.
* Bzip2 was manually installed directly into filesystem, so bzip2 package was empty.
Fixed by installing it to destdir. bzip2 moves out its binary before installing
its own package.
* sha256sum from stage0-posix was not checking any checksums because it does not
accept piped input. Fixed by using temporary file.
* grep was broken for a short time (but with fixed bzip2 package this caused failures)
due to touch creating grep file of zero size (egrep symlink was touched).
Fixed by implementing touch -h
Resolves#156, resolves#166, resolves#167
These variables should only affect live-bootstrap's scripts, yet they
currently "pollute" the build environment of most packages during the
bootstrap unnecessarily.
This change also makes bootstrap.cfg keep the same format between the
different bootstrap stages, which simplifies the input to each step.
This improves the readablility of the scripts. It also helps avoid
cases where a variable could be set twice in bootstrap.cfg, such as
the DISK variable.
XBPS packages don't seem to have an option to manipulate file
permissions at package creation time.
So as a best effort, set the umask as soon as possible to ensure
file permissions are the same when running the bootstrap.
This is enough to allow reproducible XBPS packages when starting the
bootstrap with a umask different than 0022.
This makes the order of objects in archives created by libtool
consistent.
It is known to affect cases where the *_LIBADD automake variable is
used to add extra objects from a separate archive.
Fixing this allows us to remove a few workarounds.
This allows to use makefile rather than kaem script for building sed.
Makefiles for musl and mes are unified into one makefile with some
conditional code.