live-bootstrap/steps/coreutils-8.32/pass1.sh
fosslinux 6ed2e09f3a Remove the notion of "sys*"
- 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.
2023-12-15 21:43:19 +11:00

50 lines
1.7 KiB
Bash
Executable file

# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
# SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
#
# SPDX-License-Identifier: GPL-3.0-or-later
regenerate_files() {
build-aux/gen-lists-of-programs.sh --autoconf > m4/cu-progs.m4
build-aux/gen-lists-of-programs.sh --automake > src/cu-progs.mk
build-aux/gen-single-binary.sh src/local.mk > src/single-binary.mk
touch ChangeLog
cp ../gnulib-d279bc/build-aux/po/Makefile.in.in po/Makefile.in.in
. ../../import-gnulib.sh
# Disable generation of man pages due to lack of needed perl 5.8
# dependency.
cp man/dummy-man man/help2man
VERSION=$(basename "${BASH_SOURCE[0]}" .sh | sed 's/coreutils-//')
echo "$VERSION" > .tarball-version
# We don't have autopoint from gettext yet.
AUTOPOINT=true AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi
}
src_prepare() {
default
regenerate_files
}
src_configure() {
# FORCE_UNSAFE_CONFIGURE disables "you should not run configure as root"
# error from configuration system of coreutils.
# gl_cv_func_getcwd_path_max is set to improve reproducibility.
# In some environments, the configure script would set it to
# "no, but it is partly working", and in others it would set it
# to "yes", producing different build outputs.
FORCE_UNSAFE_CONFIGURE=1 ./configure CFLAGS="-static" \
--prefix="${PREFIX}" \
--build=i386-unknown-linux-musl \
gl_cv_func_getcwd_path_max="no, but it is partly working"
}
src_compile() {
make "${MAKEJOBS}" PREFIX="${PREFIX}" MAKEINFO="true"
}
src_install() {
make install PREFIX="${PREFIX}" MAKEINFO="true" DESTDIR="${DESTDIR}"
}