live-bootstrap/sysc/run.sh
Andrius Štikonas 21f4174dc3 Fix packaging issues
* 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
2022-05-17 10:19:50 +01:00

34 lines
978 B
Bash
Executable file

#!/usr/bin/bash
# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space>
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -e
# shellcheck source=sysa/helpers.sh
. helpers.sh
create_fhs() {
# Add the rest of the FHS that we will use and is not created pre-boot
rm -rf /sbin /usr/sbin
ln -s bin /usr/sbin # Hack to fix xbps (alternatively need to install which)
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
# Make /tmp a ramdisk (speeds up configure etc significantly)
mount -t tmpfs tmpfs /tmp
}
populate_device_nodes ""
create_fhs
build bash-5.1
exec env -i PATH="${PATH}" PREFIX="${PREFIX}" SOURCES="${SOURCES}" DESTDIR="${DESTDIR}" DISTFILES="${DISTFILES}" bash run2.sh