Merge /usr/sbin and /usr/bin

Required for some stupid build system (and is also better for us).
This commit is contained in:
fosslinux 2022-01-14 21:57:47 +11:00
parent 07d4408fb6
commit c64367f608
4 changed files with 4 additions and 11 deletions

View File

@ -14,14 +14,12 @@ set -e
export PREFIX=/usr
export SOURCES=/after
mkdir -p "${PREFIX}/sbin"
export PATH="${PREFIX}/bin:${PREFIX}/sbin"
create_sysb() {
# Copy everything in
echo "Creating sysb rootfs"
mkdir -p /sysb/usr
for d in bin include lib libexec sbin share; do
for d in bin include lib libexec share; do
# Minimise RAM (storage) use - use hard links
cp -rl "${PREFIX}/${d}" "/sysb/usr/${d}"
done

View File

@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_prepare() {
default
@ -9,13 +10,10 @@ src_prepare() {
AUTOPOINT=true autoreconf -fi
}
# --target=i386-unknown-linux-gnu \
# --host=i386-unknown-linux-gnu \
# --build=i386-unknown-linux-gnu \
src_configure() {
./configure --prefix=${PREFIX} \
--bindir="${PREFIX}/bin" \
--sbindir="${PREFIX}/sbin" \
--sbindir="${PREFIX}/bin" \
--libdir="${PREFIX}/lib/musl" \
--disable-libuuid \
--without-ncurses \

View File

@ -11,8 +11,6 @@ set -e
# shellcheck source=/dev/null
. bootstrap.cfg
export PATH=/usr/bin:/usr/sbin
# Unload the current kernel before things go weird
kexec -u

View File

@ -22,9 +22,8 @@ create_fhs() {
for d in bin lib sbin; do
ln -s "usr/${d}" "/${d}"
done
# Make sbin a symlink to bin
mv /usr/sbin/* /usr/bin/
rmdir /usr/sbin
rm -r /sbin /usr/sbin
ln -s bin /usr/sbin
ln -s bin /sbin
mkdir /etc /proc /run /sys /tmp /var