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 PREFIX=/usr
export SOURCES=/after export SOURCES=/after
mkdir -p "${PREFIX}/sbin"
export PATH="${PREFIX}/bin:${PREFIX}/sbin"
create_sysb() { create_sysb() {
# Copy everything in # Copy everything in
echo "Creating sysb rootfs" echo "Creating sysb rootfs"
mkdir -p /sysb/usr 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 # Minimise RAM (storage) use - use hard links
cp -rl "${PREFIX}/${d}" "/sysb/usr/${d}" cp -rl "${PREFIX}/${d}" "/sysb/usr/${d}"
done done

View File

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

View File

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

View File

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