Merge pull request #163 from doraskayo/rootless-prep-2

Additional preparations for rootless bootstrap
This commit is contained in:
fosslinux 2022-05-20 22:45:37 +10:00 committed by GitHub
commit b199aa3396
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View file

@ -382,8 +382,8 @@ canonicalise_all_files_timestamp() {
populate_device_nodes() {
# http://www.linuxfromscratch.org/lfs/view/6.1/chapter06/devices.html
mkdir -p "${1}/dev"
rm "${1}/dev/null" -f
test -c "${1}/dev/null" || mknod -m 666 "${1}/dev/null" c 1 3
test -c "${1}/dev/null" || (rm -f "${1}/dev/null" &&
mknod -m 666 "${1}/dev/null" c 1 3)
test -c "${1}/dev/zero" || mknod -m 666 "${1}/dev/zero" c 1 5
test -c "${1}/dev/random" || mknod -m 444 "${1}/dev/random" c 1 8
test -c "${1}/dev/urandom" || mknod -m 444 "${1}/dev/urandom" c 1 9

View file

@ -6,9 +6,9 @@
src_prepare() {
default
rm libltdl/config/ltmain.sh
rm -f libltdl/config/ltmain.sh
rm doc/*.info
rm -f doc/*.info
./bootstrap
}

View file

@ -18,11 +18,11 @@ create_fhs() {
for d in bin lib sbin; do
ln -s "usr/${d}" "/${d}"
done
mkdir -p /etc /proc /run /sys /tmp /var
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mkdir -p /etc /run /var
test -d /proc || (mkdir /proc && mount -t proc proc /proc)
test -d /sys || (mkdir /sys && mount -t sysfs sysfs /sys)
# Make /tmp a ramdisk (speeds up configure etc significantly)
mount -t tmpfs tmpfs /tmp
test -d /tmp || (mkdir /tmp && mount -t tmpfs tmpfs /tmp)
}
populate_device_nodes ""