mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-04 18:35:24 +01:00
All expected environment variables are passed through the .env file. Any other variable passed from /init and the environment in which it is executed only "pollutes" the build environment. No change in package hashes.
84 lines
1.8 KiB
Bash
Executable file
84 lines
1.8 KiB
Bash
Executable file
#!/usr/bin/bash
|
|
|
|
# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
|
|
# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
set -e
|
|
|
|
PREFIX=/usr
|
|
LIBDIR="${PREFIX}/lib/i386-unknown-linux-musl"
|
|
SOURCES="${PREFIX}/src"
|
|
DESTDIR=/tmp/destdir
|
|
DISTFILES=/distfiles
|
|
SRCDIR="${SOURCES}"
|
|
|
|
export PATH="${PREFIX}/bin:${PREFIX}/sbin"
|
|
export HOME=/tmp
|
|
export SOURCE_DATE_EPOCH=0
|
|
|
|
# shellcheck source=sysa/helpers.sh
|
|
. "${SOURCES}/helpers.sh"
|
|
|
|
MAKEJOBS="-j${JOBS}"
|
|
|
|
echo
|
|
echo "Installing packages into sysc"
|
|
|
|
install_tar() {
|
|
echo "${1}: installing package"
|
|
src_apply "$@"
|
|
}
|
|
|
|
# Install packages.
|
|
# First two packages must be coreutils and sed
|
|
|
|
install_tar coreutils-5.0 0
|
|
install_tar sed-4.0.9 0
|
|
|
|
install_tar autoconf-2.64 0
|
|
install_tar autoconf-2.69 0
|
|
install_tar automake-1.11.2 0
|
|
install_tar automake-1.15.1 0
|
|
install_tar binutils-2.30 0
|
|
install_tar bzip2-1.0.8 0
|
|
install_tar bison-3.4.1 2
|
|
install_tar coreutils-6.10 0
|
|
install_tar dhcpcd-10.0.1 0
|
|
install_tar diffutils-2.7 0
|
|
install_tar findutils-4.2.33 0
|
|
install_tar flex-2.6.4 0
|
|
install_tar gawk-3.0.4 0
|
|
install_tar gcc-4.0.4 1
|
|
install_tar grep-2.4 0
|
|
install_tar help2man-1.36.4 0
|
|
install_tar libtool-2.2.4 0
|
|
install_tar linux-headers-5.10.41 0
|
|
install_tar m4-1.4.7 0
|
|
install_tar make-3.82 0
|
|
install_tar musl-1.2.4 1
|
|
install_tar perl-5.6.2 0
|
|
install_tar util-linux-2.19.1 0
|
|
|
|
# Fix invocation of bash from perl
|
|
ln -s /usr/bin/bash /usr/bin/sh
|
|
|
|
# Begin sysc bootstrapping process
|
|
cd "${SOURCES}"
|
|
|
|
cat > .env <<- EOF
|
|
export PATH=${PATH}
|
|
export HOME=${HOME}
|
|
export SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}
|
|
PREFIX=${PREFIX}
|
|
LIBDIR=${LIBDIR}
|
|
SOURCES=${SOURCES}
|
|
DESTDIR=${DESTDIR}
|
|
DISTFILES=${DISTFILES}
|
|
SRCDIR=${SRCDIR}
|
|
MAKEJOBS=${MAKEJOBS}
|
|
INTERNAL_CI=${INTERNAL_CI}
|
|
EOF
|
|
|
|
exec env -i bash run.sh
|