mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-08 04:15:24 +01:00
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.
This commit is contained in:
parent
0907cfd073
commit
6ed2e09f3a
546 changed files with 700 additions and 1299 deletions
298
steps/coreutils-8.32/import-gnulib.sh
Normal file
298
steps/coreutils-8.32/import-gnulib.sh
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
#!/bin/sh
|
||||
|
||||
# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
../gnulib-d279bc/gnulib-tool --import --local-dir=gl \
|
||||
--lib=libcoreutils \
|
||||
--source-base=lib \
|
||||
--m4-base=m4 \
|
||||
--doc-base=doc \
|
||||
--tests-base=gnulib-tests \
|
||||
--aux-dir=build-aux \
|
||||
--with-tests \
|
||||
--makefile-name=gnulib.mk \
|
||||
--no-conditional-dependencies \
|
||||
--no-libtool \
|
||||
--macro-prefix=gl \
|
||||
--avoid=canonicalize-lgpl \
|
||||
--avoid=dummy \
|
||||
acl \
|
||||
alignof \
|
||||
alloca \
|
||||
announce-gen \
|
||||
areadlink-with-size \
|
||||
argmatch \
|
||||
argv-iter \
|
||||
assert \
|
||||
autobuild \
|
||||
backup-rename \
|
||||
backupfile \
|
||||
base32 \
|
||||
base64 \
|
||||
btowc \
|
||||
buffer-lcm \
|
||||
c-strcase \
|
||||
calloc-gnu \
|
||||
canon-host \
|
||||
canonicalize \
|
||||
chmodat \
|
||||
chown \
|
||||
chownat \
|
||||
cl-strtod \
|
||||
cl-strtold \
|
||||
cloexec \
|
||||
closein \
|
||||
closeout \
|
||||
config-h \
|
||||
configmake \
|
||||
crypto/md5 \
|
||||
crypto/sha1 \
|
||||
crypto/sha256 \
|
||||
crypto/sha512 \
|
||||
cycle-check \
|
||||
d-ino \
|
||||
d-type \
|
||||
di-set \
|
||||
diacrit \
|
||||
dirfd \
|
||||
dirname \
|
||||
do-release-commit-and-tag \
|
||||
dtoastr \
|
||||
dup2 \
|
||||
environ \
|
||||
error \
|
||||
euidaccess \
|
||||
exclude \
|
||||
exitfail \
|
||||
explicit_bzero \
|
||||
faccessat \
|
||||
fadvise \
|
||||
fchdir \
|
||||
fclose \
|
||||
fcntl \
|
||||
fcntl-safer \
|
||||
fd-reopen \
|
||||
fdatasync \
|
||||
fdl \
|
||||
fdopen \
|
||||
fdutimensat \
|
||||
file-has-acl \
|
||||
file-type \
|
||||
fileblocks \
|
||||
filemode \
|
||||
filenamecat \
|
||||
filevercmp \
|
||||
flexmember \
|
||||
fnmatch-gnu \
|
||||
fopen-safer \
|
||||
fprintftime \
|
||||
freopen \
|
||||
freopen-safer \
|
||||
fseeko \
|
||||
fstatat \
|
||||
fsusage \
|
||||
fsync \
|
||||
ftoastr \
|
||||
ftruncate \
|
||||
fts \
|
||||
full-read \
|
||||
full-write \
|
||||
getgroups \
|
||||
gethrxtime \
|
||||
getline \
|
||||
getloadavg \
|
||||
getlogin \
|
||||
getndelim2 \
|
||||
getopt-gnu \
|
||||
getpagesize \
|
||||
getpass-gnu \
|
||||
gettext-h \
|
||||
gettime \
|
||||
gettimeofday \
|
||||
getugroups \
|
||||
getusershell \
|
||||
git-version-gen \
|
||||
gitlog-to-changelog \
|
||||
gnu-make \
|
||||
gnu-web-doc-update \
|
||||
gnumakefile \
|
||||
gnupload \
|
||||
group-member \
|
||||
hard-locale \
|
||||
hash \
|
||||
hash-pjw \
|
||||
heap \
|
||||
host-os \
|
||||
human \
|
||||
idcache \
|
||||
ignore-value \
|
||||
inttostr \
|
||||
inttypes \
|
||||
isapipe \
|
||||
isatty \
|
||||
isblank \
|
||||
largefile \
|
||||
lchmod \
|
||||
lchown \
|
||||
ldtoastr \
|
||||
lib-ignore \
|
||||
linebuffer \
|
||||
link \
|
||||
link-follow \
|
||||
linkat \
|
||||
long-options \
|
||||
lstat \
|
||||
maintainer-makefile \
|
||||
malloc-gnu \
|
||||
manywarnings \
|
||||
mbrlen \
|
||||
mbrtowc \
|
||||
mbsalign \
|
||||
mbschr \
|
||||
mbslen \
|
||||
mbswidth \
|
||||
memcasecmp \
|
||||
memchr \
|
||||
memcmp2 \
|
||||
mempcpy \
|
||||
memrchr \
|
||||
mgetgroups \
|
||||
minmax \
|
||||
mkancesdirs \
|
||||
mkdir \
|
||||
mkdir-p \
|
||||
mkfifo \
|
||||
mknod \
|
||||
mkostemp \
|
||||
mkstemp \
|
||||
mktime \
|
||||
modechange \
|
||||
mountlist \
|
||||
mpsort \
|
||||
netinet_in \
|
||||
non-recursive-gnulib-prefix-hack \
|
||||
nproc \
|
||||
nstrftime \
|
||||
obstack \
|
||||
open \
|
||||
openat-safer \
|
||||
parse-datetime \
|
||||
pathmax \
|
||||
perl \
|
||||
physmem \
|
||||
pipe-posix \
|
||||
pipe2 \
|
||||
posix-shell \
|
||||
posixtm \
|
||||
posixver \
|
||||
priv-set \
|
||||
progname \
|
||||
pthread-cond \
|
||||
pthread-mutex \
|
||||
pthread-thread \
|
||||
pthread_sigmask \
|
||||
putenv \
|
||||
quote \
|
||||
quotearg \
|
||||
randint \
|
||||
randperm \
|
||||
read-file \
|
||||
readlink \
|
||||
readtokens \
|
||||
readtokens0 \
|
||||
readutmp \
|
||||
realloc-gnu \
|
||||
regex \
|
||||
remove \
|
||||
rename \
|
||||
renameat \
|
||||
renameatu \
|
||||
rmdir \
|
||||
root-dev-ino \
|
||||
rpmatch \
|
||||
safe-read \
|
||||
same \
|
||||
save-cwd \
|
||||
savedir \
|
||||
savewd \
|
||||
select \
|
||||
selinux-at \
|
||||
setenv \
|
||||
settime \
|
||||
sig2str \
|
||||
sigaction \
|
||||
smack \
|
||||
ssize_t \
|
||||
stat-macros \
|
||||
stat-size \
|
||||
stat-time \
|
||||
statat \
|
||||
stdbool \
|
||||
stdlib-safer \
|
||||
stpcpy \
|
||||
stpncpy \
|
||||
strdup-posix \
|
||||
strncat \
|
||||
strnumcmp \
|
||||
strsignal \
|
||||
strtoimax \
|
||||
strtoumax \
|
||||
symlinkat \
|
||||
sys_ioctl \
|
||||
sys_resource \
|
||||
sys_stat \
|
||||
sys_wait \
|
||||
tempname \
|
||||
termios \
|
||||
time_rz \
|
||||
timer-time \
|
||||
timespec \
|
||||
tzset \
|
||||
uname \
|
||||
unistd-safer \
|
||||
unlink-busy \
|
||||
unlinkat \
|
||||
unlinkdir \
|
||||
unlocked-io \
|
||||
unsetenv \
|
||||
update-copyright \
|
||||
uptime \
|
||||
useless-if-before-free \
|
||||
userspec \
|
||||
utimecmp \
|
||||
utimens \
|
||||
vasprintf-posix \
|
||||
vc-list-files \
|
||||
verify \
|
||||
verror \
|
||||
version-etc-fsf \
|
||||
wchar-single \
|
||||
wcswidth \
|
||||
wcwidth \
|
||||
winsz-ioctl \
|
||||
winsz-termios \
|
||||
write-any-file \
|
||||
xalloc \
|
||||
xbinary-io \
|
||||
xdectoint \
|
||||
xfts \
|
||||
xgetcwd \
|
||||
xgetgroups \
|
||||
xgethostname \
|
||||
xmemcoll \
|
||||
xnanosleep \
|
||||
xprintf \
|
||||
xprintf-posix \
|
||||
xreadlink \
|
||||
xstrtod \
|
||||
xstrtoimax \
|
||||
xstrtol \
|
||||
xstrtol-error \
|
||||
xstrtold \
|
||||
xstrtoumax \
|
||||
year2038 \
|
||||
yesno
|
||||
|
||||
../gnulib-d279bc/build-aux/prefix-gnulib-mk --lib-name=libcoreutils lib/gnulib.mk
|
||||
50
steps/coreutils-8.32/pass1.sh
Executable file
50
steps/coreutils-8.32/pass1.sh
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
# 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}"
|
||||
}
|
||||
38
steps/coreutils-8.32/patches/force_to_use_nanosleep.patch
Normal file
38
steps/coreutils-8.32/patches/force_to_use_nanosleep.patch
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Replace test for support of correct values produced by nanosleep.
|
||||
We always assume that kernel doesn't have correct implementation and
|
||||
instead use function from gnulib with fix. That fixes reproducibility
|
||||
problem across different kernels.
|
||||
|
||||
--- ../gnulib-d279bc/m4/nanosleep.m4
|
||||
+++ ../gnulib-d279bc/m4/nanosleep.m4
|
||||
@@ -85,23 +85,9 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
|
||||
ts_sleep.tv_nsec = 1;
|
||||
#if HAVE_DECL_ALARM
|
||||
{
|
||||
- static struct sigaction act;
|
||||
- act.sa_handler = check_for_SIGALRM;
|
||||
- sigemptyset (&act.sa_mask);
|
||||
- sigaction (SIGALRM, &act, NULL);
|
||||
- alarm (1);
|
||||
- if (nanosleep (&ts_sleep, NULL) != 0)
|
||||
- return 3;
|
||||
- /* Test for a minor problem: the handling of large arguments. */
|
||||
- ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
|
||||
- ts_sleep.tv_nsec = 999999999;
|
||||
- alarm (1);
|
||||
- if (nanosleep (&ts_sleep, &ts_remaining) != -1)
|
||||
- return 4;
|
||||
- if (errno != EINTR)
|
||||
- return 5;
|
||||
- if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
|
||||
- return 6;
|
||||
+ /* Force to use HAVE_BUG_BIG_NANOSLEEP 1 across kernels even
|
||||
+ if it correctly handles big nanosleeps. */
|
||||
+ return 6;
|
||||
}
|
||||
#else /* A simpler test for native Windows. */
|
||||
if (nanosleep (&ts_sleep, &ts_remaining) < 0)
|
||||
50
steps/coreutils-8.32/patches/gperf_dependency.patch
Normal file
50
steps/coreutils-8.32/patches/gperf_dependency.patch
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Remove dependency on gperf. This drops support for outputting unicode
|
||||
characters. We do that, because inclusion of unicodeio.h and propername.h
|
||||
from gnulib brings dependencies on gperf generated files. We don't have
|
||||
gperf at this stage so we can't regenerate them.
|
||||
|
||||
--- ./src/printf.c
|
||||
+++ ./src/printf.c
|
||||
@@ -59,7 +59,6 @@
|
||||
#include "die.h"
|
||||
#include "error.h"
|
||||
#include "quote.h"
|
||||
-#include "unicodeio.h"
|
||||
#include "xprintf.h"
|
||||
|
||||
/* The official name of this program (e.g., no 'g' prefix). */
|
||||
@@ -292,8 +291,12 @@ print_esc (const char *escstart, bool octal_0)
|
||||
|| (uni_value >= 0xd800 && uni_value <= 0xdfff))
|
||||
die (EXIT_FAILURE, 0, _("invalid universal character name \\%c%0*x"),
|
||||
esc_char, (esc_char == 'u' ? 4 : 8), uni_value);
|
||||
-
|
||||
- print_unicode_char (stdout, uni_value, 0);
|
||||
+ putchar ('\\');
|
||||
+ if (*p)
|
||||
+ {
|
||||
+ putchar (*p);
|
||||
+ p++;
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
--- ./src/system.h
|
||||
+++ ./src/system.h
|
||||
@@ -361,13 +361,13 @@ enum
|
||||
#include "version-etc.h"
|
||||
#undef emit_bug_reporting_address
|
||||
|
||||
-#include "propername.h"
|
||||
/* Define away proper_name (leaving proper_name_utf8, which affects far
|
||||
fewer programs), since it's not worth the cost of adding ~17KB to
|
||||
the x86_64 text size of every single program. This avoids a 40%
|
||||
(almost ~2MB) increase in the on-disk space utilization for the set
|
||||
of the 100 binaries. */
|
||||
#define proper_name(x) (x)
|
||||
+#define proper_name_utf8(x, y) (x, y)
|
||||
|
||||
#include "progname.h"
|
||||
|
||||
31
steps/coreutils-8.32/patches/remove_gettext.patch
Normal file
31
steps/coreutils-8.32/patches/remove_gettext.patch
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Remove dependency on gettext, because we don't have it at this stage
|
||||
of the build.
|
||||
|
||||
--- ./configure.ac
|
||||
+++ ./configure.ac
|
||||
@@ -624,8 +624,8 @@ AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
|
||||
|
||||
# As long as "grep 'PRI[diouxX]' po/*.pot" reports matches in
|
||||
# translatable strings, we must use need-formatstring-macros here.
|
||||
-AM_GNU_GETTEXT([external], [need-formatstring-macros])
|
||||
-AM_GNU_GETTEXT_VERSION([0.19.2])
|
||||
+# AM_GNU_GETTEXT([external], [need-formatstring-macros])
|
||||
+# AM_GNU_GETTEXT_VERSION([0.19.2])
|
||||
|
||||
# For a test of uniq: it uses the $LOCALE_FR envvar.
|
||||
gt_LOCALE_FR
|
||||
--- ./Makefile.am
|
||||
+++ ./Makefile.am
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
ALL_RECURSIVE_TARGETS =
|
||||
|
||||
-SUBDIRS = po . gnulib-tests
|
||||
+SUBDIRS = . gnulib-tests
|
||||
|
||||
EXTRA_DIST = \
|
||||
.mailmap \
|
||||
2
steps/coreutils-8.32/sources
Normal file
2
steps/coreutils-8.32/sources
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
http://git.savannah.gnu.org/cgit/coreutils.git/snapshot/coreutils-8.32.tar.gz 6f7cfc0ac6717afb6ba1f41b0da43a713ba0dd97dec1227e32effc12d79f08c1
|
||||
http://git.savannah.gnu.org/cgit/gnulib.git/snapshot/gnulib-d279bc.tar.gz 12cfa21abf618a274017d6b18e95fc6582519d7c08e2403e5c5772ccdd5b85f4
|
||||
Loading…
Add table
Add a link
Reference in a new issue