mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-04 10:25:25 +01:00
- This idea originates from very early in the project and was, at the
time, a very easy way to categorise things.
- Now, it doesn't really make much sense - it is fairly arbitary, often
occuring when there is a change in kernel, but not from builder-hex0
to fiwix, and sysb is in reality completely unnecessary.
- In short, the sys* stuff is a bit of a mess that makes the project
more difficult to understand.
- This puts everything down into one folder and has a manifest file that
is used to generate the build scripts on the fly rather than using
coded scripts.
- This is created in the "seed" stage.
stage0-posix -- (calls) --> seed -- (generates) --> main steps
Alongside this change there are a variety of other smaller fixups to the
general structure of the live-bootstrap rootfs.
- Creating a rootfs has become much simpler and is defined as code in
go.sh. The new structure, for an about-to-be booted system, is
/
-- /steps (direct copy of steps/)
-- /distfiles (direct copy of distfiles/)
-- all files from seed/*
-- all files from seed/stage0-posix/*
- There is no longer such a thing as /usr/include/musl, this didn't
really make any sense, as musl is the final libc used. Rather, to
separate musl and mes, we have /usr/include/mes, which is much easier
to work with.
- This also makes mes easier to blow away later.
- A few things that weren't properly in packages have been changed;
checksum-transcriber, simple-patch, kexec-fiwix have all been given
fully qualified package names.
- Highly breaking change, scripts now exist in their package directory
but NOT WITH THE packagename.sh. Rather, they use pass1.sh, pass2.sh,
etc. This avoids manual definition of passes.
- Ditto with patches; default directory is patches, but then any patch
series specific to a pass are named patches-passX.
100 lines
2.7 KiB
Bash
Executable file
100 lines
2.7 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
# SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
|
|
# SPDX-FileCopyrightText: 2010-2019, 2021 Bootstrap Authors
|
|
# SPDX-FileCopyrightText: 2010-2019, 2021-2022 Free Software Foundation, Inc.
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
EXIT_FALURE=1
|
|
|
|
#######################################
|
|
# Extracted from the output of: #
|
|
# ./bootstrap --verbose --force #
|
|
#######################################
|
|
|
|
MAKE='make'
|
|
SED='/usr/bin/sed'
|
|
|
|
build_aux='build-aux'
|
|
ltdl_dir='libltdl'
|
|
macro_dir='m4'
|
|
|
|
package_name='GNU Libtool'
|
|
package='libtool'
|
|
package_bugreport='bug-libtool@gnu.org'
|
|
package_url='http://www.gnu.org/s/libtool/'
|
|
package_version='2.4.7'
|
|
|
|
#############################
|
|
# Inspired by "bootstrap" #
|
|
#############################
|
|
|
|
func_show_eval ()
|
|
{
|
|
eval "$1"
|
|
_G_status=$?
|
|
if test 0 -ne "$_G_status"; then
|
|
exit $_G_status
|
|
fi
|
|
}
|
|
|
|
##################################
|
|
# Copied from "bootstrap.conf" #
|
|
##################################
|
|
|
|
# libtool_build_prerequisites
|
|
# ---------------------------
|
|
# Libtool generates some files that are required before any autotools
|
|
# can be run successfully.
|
|
libtool_build_prerequisites ()
|
|
{
|
|
$debug_cmd
|
|
|
|
$require_build_aux
|
|
$require_ltdl_dir
|
|
$require_macro_dir
|
|
$require_package
|
|
$require_package_bugreport
|
|
$require_package_name
|
|
$require_package_url
|
|
$require_package_version
|
|
|
|
# Whip up a dirty Makefile:
|
|
makes='Makefile.am libltdl/ltdl.mk'
|
|
rm -f Makefile
|
|
{
|
|
echo "aux_dir = $build_aux"
|
|
echo "ltdl_dir = $ltdl_dir"
|
|
echo "macro_dir = $macro_dir"
|
|
|
|
# The following allow us to tie bootstrap-deps output verbosity
|
|
# into the bootstrap --verbose option:
|
|
echo 'AM_V_GEN = $(am__v_GEN_$(V))'
|
|
echo 'am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))'
|
|
echo 'am__v_GEN_0 = @echo " GEN " $@;'
|
|
echo 'AM_V_at = $(am__v_at_$(V))'
|
|
echo 'am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))'
|
|
echo 'am__v_at_0 = @'
|
|
|
|
$SED '/^if /,/^endif$/d;/^else$/,/^endif$/d;/^include /d' $makes
|
|
} > Makefile
|
|
|
|
# Building distributed files from configure is bad for automake, so we
|
|
# generate them here, and have Makefile rules to keep them up to date.
|
|
func_show_eval "$MAKE V=1 bootstrap-deps \
|
|
AM_DEFAULT_VERBOSITY=0 `$opt_verbose && echo V=1` \
|
|
PACKAGE='$package' PACKAGE_BUGREPORT='$package_bugreport' \
|
|
PACKAGE_NAME='$package_name' PACKAGE_URL='$package_url' \
|
|
SED='$SED' srcdir=. VERSION='$package_version'"
|
|
status=$?
|
|
|
|
rm -f Makefile
|
|
test 0 -eq "$status" ||exit $EXIT_FAILURE
|
|
}
|
|
|
|
###################
|
|
# Run functions #
|
|
###################
|
|
|
|
libtool_build_prerequisites
|