galeb

Једноставна статичка дистрибуција заснована на musl-у
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување 769febdd9cc95e0fe51739dd8faa761bf95cee62
родитељ 3dd11a23775bba1fb83d671000df8ce39fe12412
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Sat,  9 Jul 2022 22:54:36 +0200

Chroot up to musl-fts

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
M01-cross.sh | 4++++
M03-chroot.sh | 548+++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------
AFAQ | 100+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MREADME | 57+++------------------------------------------------------
MTODO | 4++++
Rsplitfort -> art/splitfort | 0
Mlib/env.sh | 9+++++----
Mlib/fun.sh | 42+++++++++++++++++++++++-------------------
Mlib/pkgs.tsv | 8++++++++
Apat-11.2.1/perl-alpine/musl-locale.patch | 37+++++++++++++++++++++++++++++++++++++
Apat-11.2.1/perl-alpine/musl-stack-size.patch | 16++++++++++++++++
измењених датотека: 11, додавања: 566(+), брисања: 259(-)

diff --git a/01-cross.sh b/01-cross.sh @@ -3,6 +3,10 @@ . ./lib/env.sh . ./lib/fun.sh +mkdir -p ${G_LOG} +:>${G_LOGFILE} +:>${G_SHORTLOG} + WD=${PWD} trap exit_cleanup HUP PIPE INT QUIT TERM EXIT diff --git a/03-chroot.sh b/03-chroot.sh @@ -23,7 +23,7 @@ step=1 begin_step "final system" -totalsubsteps=20 +totalsubsteps=100 substep=1 msg info "Creating temporary links" @@ -84,7 +84,6 @@ if [ -e /include/linux/stddef.h ]; then msg info "%s exists, skipping %s" \ /include/linux/stddef.h "${substepname}" else - fetch_pkg https://www.kernel.org/pub/linux/kernel/v5.x/${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -103,7 +102,6 @@ begin_substep texinfo-6.8 if [ -x ${TL}/bin/texi2dvi ]; then msg info "%s exists, skipping %s" ${TL}/bin/texi2dvi ${pkg} else - fetch_pkg https://ftp.gnu.org/gnu/texinfo/${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -128,7 +126,6 @@ if [ -e /share/man/man2/fork.2 ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -157,7 +154,6 @@ if [ -e /lib/ld-musl-${G_ARCH_EXT_ALT}.so.1 ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://musl.libc.org/releases/${pkg}.tar.gz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz ( cd_or_fail ${G_SRC}/${pkg} @@ -263,8 +259,6 @@ if [ -e /lib/libz.so.1.2.11.zlib-ng ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://github.com/zlib-ng/zlib-ng/archive/refs/tags/\ -2.0.6.tar.gz zlib-ng-2.0.6.tar.gz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz ( cd_or_fail ${G_SRC}/${pkg} @@ -304,7 +298,6 @@ if [ -e /bin/file ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://astron.com/pub/file/${pkg}.tar.gz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz ( cd_or_fail ${G_SRC}/${pkg} @@ -338,7 +331,6 @@ if [ -e /sucks/lib/libreadline.so.8.1 ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://ftp.gnu.org/gnu/readline/${pkg}.tar.gz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz ( cd_or_fail ${G_SRC}/${pkg} @@ -376,7 +368,6 @@ if [ -x /sucks/bin/m4 ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://ftp.gnu.org/gnu/m4/${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -412,7 +403,6 @@ if [ -L /bin/pkg-config ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://distfiles.dereferenced.org/pkgconf/${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -459,9 +449,6 @@ elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then else check_dir ${G_SRC}/${pkg} cd_or_fail ${G_SRC}/${pkg} - fetch_pkg https://dev.alpinelinux.org/archive/posixtz/posixtz-0.5.tar.xz - fetch_pkg https://www.iana.org/time-zones/repository/releases/tzdata2022a.tar.gz - fetch_pkg https://www.iana.org/time-zones/repository/releases/tzcode2022a.tar.gz extract_pkg ${G_SRC}/${pkg} "" tzdata2022a.tar.gz extract_pkg ${G_SRC}/${pkg} "" tzcode2022a.tar.gz extract_pkg ${G_SRC}/${pkg} posixtz-0.5 posixtz-0.5.tar.xz @@ -512,8 +499,8 @@ fi end_substep begin_substep 9base-20220706 -if [ -x /9base/bin/bc ]; then - msg info "%s exists, skipping %s" /9base/bin/bc ${pkg} +if [ -x /plan9/bin/bc ]; then + msg info "%s exists, skipping %s" /plan9/bin/bc ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else @@ -557,7 +544,6 @@ if [ -x /sucks/bin/ar ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://ftp.gnu.org/gnu/binutils/binutils-2.38.tar.xz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -581,9 +567,10 @@ mkpk_name() mkpk_install() { CFLAGS='-O3 -march=native -mtune=native -pipe' + CXXFLAGS='-O3 -march=native -mtune=native -pipe' DESTDIR=/build EXTRA_CONFIG=' --enable-targets=x86_64-pep ' - export CFLAGS DESTDIR EXTRA_CONFIG + export CFLAGS CXXFLAGS DESTDIR EXTRA_CONFIG ./configure \\ --prefix=/sucks \\ @@ -621,7 +608,7 @@ mkpk_install() mkpk ${pkg} unpack_pkg ${pkg} / ) || exit 1 - #remove_dir ${G_SRC}/${pkg} + remove_dir ${G_SRC}/${pkg} fi end_substep @@ -631,7 +618,6 @@ if [ -x /sucks/lib/libgmp.so.10.4.1 ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://ftp.gnu.org/gnu/gmp/${pkg##lib}.tar.xz ${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg##lib} ${pkg}.tar.xz ${pkg} ( cd_or_fail ${G_SRC}/${pkg} @@ -665,12 +651,11 @@ fi end_substep begin_substep libmpfr-4.1.0 -if [ -x /sucks/lib/libmpfr.so.6 ]; then - msg info "%s exists, skipping %s" /sucks/lib/libmpfr.so.6 ${pkg} +if [ -x /sucks/lib/libmpfr.so.6.1.0 ]; then + msg info "%s exists, skipping %s" /sucks/lib/libmpfr.so.6.1.0 ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://ftp.gnu.org/gnu/mpfr/${pkg##lib}.tar.xz ${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg##lib} ${pkg}.tar.xz ${pkg} ( cd_or_fail ${G_SRC}/${pkg} @@ -711,7 +696,6 @@ if [ -x /sucks/lib/libmpc.so.3.2.1 ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://ftp.gnu.org/gnu/mpc/${pkg##lib}.tar.gz ${pkg}.tar.gz extract_pkg ${G_SRC} ${pkg##lib} ${pkg}.tar.gz ${pkg} ( cd_or_fail ${G_SRC}/${pkg} @@ -750,7 +734,6 @@ if [ -x /sucks/lib/libisl.so.23.1.0 ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://libisl.sourceforge.io/${pkg##lib}.tar.xz ${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg##lib} ${pkg}.tar.xz ${pkg} ( cd_or_fail ${G_SRC}/${pkg} @@ -768,6 +751,8 @@ mkpk_install() DESTDIR=/build export CFLAGS DESTDIR LIBS + echo '#!/bin/sh' >missing + ./configure \\ --prefix=/sucks \\ --disable-static \\ @@ -790,8 +775,6 @@ if [ -x /bin/passwd ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://github.com/shadow-maint/shadow/releases/download/\ -v4.11.1/shadow-4.11.1.tar.xz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -862,8 +845,6 @@ if [ -x /sucks/bin/gcc ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://gcc.gnu.org/pub/gcc/snapshots/11-20220101/gcc-11-\ -20220101.tar.xz ( remove_dir ${G_SRC}/${pkg} extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz @@ -975,6 +956,9 @@ LD=/sucks/bin/ld STRIP=/sucks/bin/strip export CC CXX AR AS RANLIB LD STRIP +PATH=/bin:/sucks/bin:/tools/bin +export PATH + begin_substep tinycc-20220708 if [ -x /bin/tcc ]; then msg info "%s exists, skipping %s" /bin/tcc ${pkg} @@ -992,15 +976,6 @@ mkpk_name() mkpk_install() { - CC=/sucks/bin/gcc - CXX=/sucks/bin/g++ - AR=/sucks/bin/ar - AS=/sucks/bin/as - RANLIB=/sucks/bin/ranlib - LD=/sucks/bin/ld - STRIP=/sucks/bin/strip - export CC CXX AR AS RANLIB LD STRIP - CFLAGS='-O3 -march=native -mtune=native -pipe -static --static -fcommon -fPIC' LDFLAGS='-static --static -fcommon' DESTDIR=/build @@ -1037,7 +1012,6 @@ if [ -x /bin/bzip2 ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://sourceware.org/pub/bzip2/${pkg}.tar.gz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz ( cd_or_fail ${G_SRC}/${pkg} @@ -1060,15 +1034,6 @@ mkpk_name() mkpk_install() { - CC=/sucks/bin/gcc - CXX=/sucks/bin/g++ - AR=/sucks/bin/ar - AS=/sucks/bin/as - RANLIB=/sucks/bin/ranlib - LD=/sucks/bin/ld - STRIP=/sucks/bin/strip - export CC CXX AR AS RANLIB LD STRIP - CFLAGS='-O3 -march=native -mtune=native -pipe -static --static -fcommon -fPIC' LDFLAGS='-static --static -fcommon' DESTDIR=/build @@ -1102,8 +1067,6 @@ if [ -x /sucks/bin/zstd ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://github.com/facebook/zstd/releases/download/\ -v${pkg##*-}/${pkg}.tar.gz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz ( cd_or_fail ${G_SRC}/${pkg} @@ -1116,15 +1079,6 @@ mkpk_name() mkpk_install() { - CC=/sucks/bin/gcc - CXX=/sucks/bin/g++ - AR=/sucks/bin/ar - AS=/sucks/bin/as - RANLIB=/sucks/bin/ranlib - LD=/sucks/bin/ld - STRIP=/sucks/bin/strip - export CC CXX AR AS RANLIB LD STRIP - CFLAGS='-O3 -march=native -mtune=native -pipe' DESTDIR=/build export CFLAGS DESTDIR @@ -1151,7 +1105,6 @@ if [ -e /lib/libncurses.so ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://ftp.barfooze.de/pub/sabotage/tarballs/${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -1193,8 +1146,6 @@ if [ -x /bin/attr ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://download.savannah.gnu.org/releases/${pkg%%-*}/\ -${pkg}.tar.gz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz ( cd_or_fail ${G_SRC}/${pkg} @@ -1207,15 +1158,6 @@ mkpk_name() mkpk_install() { - CC=/sucks/bin/gcc - CXX=/sucks/bin/g++ - AR=/sucks/bin/ar - AS=/sucks/bin/as - RANLIB=/sucks/bin/ranlib - LD=/sucks/bin/ld - STRIP=/sucks/bin/strip - export CC CXX AR AS RANLIB LD STRIP - CFLAGS='-O3 -march=native -mtune=native -pipe -static --static -fcommon' LDFLAGS='-static --static -fcommon' DESTDIR=/build @@ -1243,8 +1185,6 @@ if [ -x /bin/getfacl ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://download.savannah.gnu.org/releases/${pkg%%-*}/\ -${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -1257,15 +1197,6 @@ mkpk_name() mkpk_install() { - CC=/sucks/bin/gcc - CXX=/sucks/bin/g++ - AR=/sucks/bin/ar - AS=/sucks/bin/as - RANLIB=/sucks/bin/ranlib - LD=/sucks/bin/ld - STRIP=/sucks/bin/strip - export CC CXX AR AS RANLIB LD STRIP - CFLAGS='-O3 -march=native -mtune=native -pipe -static --static -fcommon' LDFLAGS='-static --static -fcommon' DESTDIR=/build @@ -1293,8 +1224,6 @@ if [ -x /sucks/bin/getcap ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://www.kernel.org/pub/linux/libs/security/linux-privs/\ -libcap2/${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -1307,15 +1236,6 @@ mkpk_name() mkpk_install() { - CC=/sucks/bin/gcc - CXX=/sucks/bin/g++ - AR=/sucks/bin/ar - AS=/sucks/bin/as - RANLIB=/sucks/bin/ranlib - LD=/sucks/bin/ld - STRIP=/sucks/bin/strip - export CC CXX AR AS RANLIB LD STRIP - CFLAGS='-O3 -march=native -mtune=native -pipe' DESTDIR=/build export CFLAGS DESTDIR @@ -1337,8 +1257,6 @@ if [ -x /bin/killall ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://sourceforge.net/projects/${pkg%%-*}/files/${pkg%%-*}/\ -${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -1351,15 +1269,6 @@ mkpk_name() mkpk_install() { - CC=/sucks/bin/gcc - CXX=/sucks/bin/g++ - AR=/sucks/bin/ar - AS=/sucks/bin/as - RANLIB=/sucks/bin/ranlib - LD=/sucks/bin/ld - STRIP=/sucks/bin/strip - export CC CXX AR AS RANLIB LD STRIP - CFLAGS='-O3 -march=native -mtune=native -pipe -static --static -fcommon' LDFLAGS='-static --static -fcommon' DESTDIR=/build @@ -1391,8 +1300,6 @@ if [ -e /etc/services ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://github.com/Mic92/iana-etc/releases/download/20210611/\ -${pkg}.tar.gz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz ( cd_or_fail ${G_SRC}/${pkg} @@ -1417,12 +1324,11 @@ fi end_substep begin_substep libtool-2.4.6 -if [ -x /bin/libtool ]; then - msg info "%s exists, skipping %s" /bin/libtool ${pkg} +if [ -x /sucks/bin/libtool ]; then + msg info "%s exists, skipping %s" /sucks/bin/libtool ${pkg} elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://ftp.gnu.org/gnu/${pkg%%-*}/${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -1435,21 +1341,16 @@ mkpk_name() mkpk_install() { - CC=/sucks/bin/gcc - CXX=/sucks/bin/g++ - AR=/sucks/bin/ar - AS=/sucks/bin/as - RANLIB=/sucks/bin/ranlib - LD=/sucks/bin/ld - STRIP=/sucks/bin/strip - export CC CXX AR AS RANLIB LD STRIP - CFLAGS='-O3 -march=native -mtune=native -pipe -static --static -fcommon' LDFLAGS='-static --static -fcommon' DESTDIR=/build export CFLAGS LDFLAGS DESTDIR - ./configure --prefix=/ + touch aclocal.m4 + touch Makefile.in + touch configure + + ./configure --prefix=/sucks make ${JN} || exit 1 make install-strip @@ -1468,7 +1369,6 @@ if [ -x /bin/scanelf ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://dev.gentoo.org/~xen0n/distfiles/${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -1481,15 +1381,6 @@ mkpk_name() mkpk_install() { - CC=/sucks/bin/gcc - CXX=/sucks/bin/g++ - AR=/sucks/bin/ar - AS=/sucks/bin/as - RANLIB=/sucks/bin/ranlib - LD=/sucks/bin/ld - STRIP=/sucks/bin/strip - export CC CXX AR AS RANLIB LD STRIP - CFLAGS='-O3 -march=native -mtune=native -pipe -static --static -fcommon' LDFLAGS='-static --static -fcommon' DESTDIR=/build @@ -1514,7 +1405,6 @@ if [ -x /bin/less ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://www.greenwoodsoftware.com/${pkg%%-*}/${pkg}.tar.gz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz ( cd_or_fail ${G_SRC}/${pkg} @@ -1527,15 +1417,6 @@ mkpk_name() mkpk_install() { - CC=/sucks/bin/gcc - CXX=/sucks/bin/g++ - AR=/sucks/bin/ar - AS=/sucks/bin/as - RANLIB=/sucks/bin/ranlib - LD=/sucks/bin/ld - STRIP=/sucks/bin/strip - export CC CXX AR AS RANLIB LD STRIP - CFLAGS='-O3 -march=native -mtune=native -pipe -static --static -fcommon' LDFLAGS='-static --static -fcommon' export CFLAGS LDFLAGS @@ -1559,7 +1440,6 @@ if [ -x /sucks/bin/gdbmtool ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://ftp.gnu.org/gnu/gdbm/${pkg}.tar.gz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz ( cd_or_fail ${G_SRC}/${pkg} @@ -1572,15 +1452,6 @@ mkpk_name() mkpk_install() { - CC=/sucks/bin/gcc - CXX=/sucks/bin/g++ - AR=/sucks/bin/ar - AS=/sucks/bin/as - RANLIB=/sucks/bin/ranlib - LD=/sucks/bin/ld - STRIP=/sucks/bin/strip - export CC CXX AR AS RANLIB LD STRIP - CFLAGS='-O3 -march=native -mtune=native -pipe' LDFLAGS= DESTDIR=/build @@ -1607,7 +1478,6 @@ if [ -x /sucks/bin/gperf ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://ftp.gnu.org/gnu/gperf/${pkg}.tar.gz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz ( cd_or_fail ${G_SRC}/${pkg} @@ -1620,15 +1490,6 @@ mkpk_name() mkpk_install() { - CC=/sucks/bin/gcc - CXX=/sucks/bin/g++ - AR=/sucks/bin/ar - AS=/sucks/bin/as - RANLIB=/sucks/bin/ranlib - LD=/sucks/bin/ld - STRIP=/sucks/bin/strip - export CC CXX AR AS RANLIB LD STRIP - CFLAGS='-O3 -march=native -mtune=native -pipe' CXXFLAGS='-O3 -march=native -mtune=native -pipe' LDFLAGS= @@ -1655,7 +1516,6 @@ if [ -x /sucks/bin/xmlwf ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://prdownloads.sourceforge.net/expat/${pkg}.tar.xz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz ( cd_or_fail ${G_SRC}/${pkg} @@ -1668,15 +1528,6 @@ mkpk_name() mkpk_install() { - CC=/sucks/bin/gcc - CXX=/sucks/bin/g++ - AR=/sucks/bin/ar - AS=/sucks/bin/as - RANLIB=/sucks/bin/ranlib - LD=/sucks/bin/ld - STRIP=/sucks/bin/strip - export CC CXX AR AS RANLIB LD STRIP - CFLAGS='-O3 -march=native -mtune=native -pipe' LDFLAGS= DESTDIR=/build @@ -1697,6 +1548,352 @@ mkpk_install() fi end_substep +begin_substep inetutils-2.1 +if [ -x /bin/telnet ]; then + msg info "%s exists, skipping %s" /bin/telnet ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz + ( + cd_or_fail ${G_SRC}/${pkg} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-O3 -march=native -mtune=native -pipe -static --static -fcommon' + LDFLAGS='-static --static -fcommon' + DESTDIR=/build + export CFLAGS LDFLAGS DESTDIR + + sed -i 's|_GL_WARN_ON_USE (gets|//_GL_WARN_ON_USE (gets|' lib/stdio.in.h + echo '#define PATH_PROCNET_DEV "/proc/net/dev"' >> ifconfig/system/linux.h + sed -i 's|port : "whois"|port : "nicname"|' whois/whois.c + + ./configure --prefix=/ \ + --localstatedir=/var \ + --disable-logger \ + --disable-whois \ + --disable-rcp \ + --disable-rexec \ + --disable-rlogin \ + --disable-rsh \ + --disable-servers + + make ${JN} || exit 1 + make install-strip +} +! + mkpk ${pkg} + unpack_pkg ${pkg} / + ) || exit 1 + remove_dir ${G_SRC}/${pkg} +fi +end_substep + +# Perl is in /sucks only because I couldn't find a straightforward way to create +# a fully static version myself, and didn't want to include something like +# https://github.com/pts/staticperl +# That, and one could argue that it overlaps with shell, awk etc. +begin_substep perl-5.32.1 +if [ -x /sucks/bin/perl ] && [ ! -L /sucks/bin/perl ]; then + msg info "%s exists, skipping %s" /sucks/bin/perl ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz + ( + cd_or_fail ${G_SRC}/${pkg} + + for patch in musl-locale musl-stack-size + do + apply_patch final-system -Np1 -i \ + ${G_PAT}/perl-alpine/${patch}.patch + done + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-DNO_POSIX_2008_LOCALE -D_GNU_SOURCE' + LDFLAGS= + DESTDIR=/build + export CFLAGS LDFLAGS DESTDIR + + BUILD_BZIP2=0 + BUILD_ZLIB=True + export BUILD_BZIP2 BUILD_ZLIB + + rm -rf cpan/Compress-Raw-Bzip2/bzip2-src + sed -i '/\(bzip2\|zzz\)-src/d' MANIFEST + + sh Configure \ + -des -Dprefix=/sucks \ + -Doptimize=-O3 \ + -Dvendorprefix=/sucks \ + -Dprivlib=/sucks/lib/perl5/5.34/core_perl \ + -Darchlib=/sucks/lib/perl5/5.34/core_perl \ + -Dsitelib=/sucks/lib/perl5/5.34/site_perl \ + -Dsitearch=/sucks/lib/perl5/5.34/site_perl \ + -Dvendorlib=/sucks/lib/perl5/5.34/vendor_perl \ + -Dvendorarch=/sucks/lib/perl5/5.34/vendor_perl \ + -Dman1dir=/sucks/share/man/man1 \ + -Dman3dir=/sucks/share/man/man3 \ + -Dpager="/bin/less -isR" \ + -Duseshrplib \ + -Dusethreads \ + -Dcccdlflags='-fPIC' -Dccdlflags='-rdynamic' + + make || exit 1 + #make ${JN} || exit 1 + make install-strip + + mkdir -p ../build/bin + ln -s /sucks/bin/perl ../build/bin/perl +} +! + mkpk ${pkg} + unpack_pkg ${pkg} / + ) || exit 1 + remove_dir ${G_SRC}/${pkg} +fi +end_substep + +begin_substep XML-Parser-2.46 +if [ -e /sucks/lib/perl5/5.34/site_perl/XML/Parser.pm ]; then + msg info "%s exists, skipping %s" /sucks/lib/perl5/5.34/site_perl/\ +XML/Parser.pm ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz + ( + cd_or_fail ${G_SRC}/${pkg} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + perl Makefile.PL + make ${JN} DESTDIR=../build || exit 1 + make DESTDIR=../build install + + find ../build -name perllocal.pod -exec rm -fv {} \; +} +! + mkpk ${pkg} + unpack_pkg ${pkg} / + ) || exit 1 + remove_dir ${G_SRC}/${pkg} +fi +end_substep + +begin_substep intltool-0.51.0 +if [ -x /bin/intltoolize ]; then + msg info "%s exists, skipping %s" /bin/intltoolize ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz + ( + cd_or_fail ${G_SRC}/${pkg} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-O3 -march=native -mtune=native -pipe -static --static -fcommon' + LDFLAGS='-static --static -fcommon' + DESTDIR=/build + export CFLAGS LDFLAGS DESTDIR + + PERL=/sucks/bin/perl + export PERL + + sed -i 's:\\\${:\\\$\\{:' intltool-update.in + + ./configure --prefix=/ + + make ${JN} || exit 1 + make install-strip +} +! + mkpk ${pkg} + unpack_pkg ${pkg} / + ) || exit 1 + remove_dir ${G_SRC}/${pkg} +fi +end_substep + +begin_substep help2man-1.49.2 +if [ -x /sucks/bin/help2man ]; then + msg info "%s exists, skipping %s" /sucks/bin/help2man ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz + ( + cd_or_fail ${G_SRC}/${pkg} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-O3 -march=native -mtune=native -pipe' + LDFLAGS= + DESTDIR=/build + export CFLAGS LDFLAGS DESTDIR + + ./configure --prefix=/sucks + + make ${JN} || exit 1 + make install +} +! + mkpk ${pkg} + #unpack_pkg ${pkg} / + ) || exit 1 + remove_dir ${G_SRC}/${pkg} +fi +end_substep + +begin_substep autoconf-2.71 +if [ -x /sucks/bin/autoconf ]; then + msg info "%s exists, skipping %s" /sucks/bin/autoconf ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz + ( + cd_or_fail ${G_SRC}/${pkg} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-O3 -march=native -mtune=native -pipe' + LDFLAGS= + DESTDIR=/build + export CFLAGS LDFLAGS DESTDIR + + ./configure --prefix=/sucks + + make ${JN} || exit 1 + make install-strip +} +! + mkpk ${pkg} + unpack_pkg ${pkg} / + ) || exit 1 + remove_dir ${G_SRC}/${pkg} +fi +end_substep + +begin_substep automake-1.16.4 +if [ -x /sucks/bin/automake ]; then + msg info "%s exists, skipping %s" /sucks/bin/automake ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.xz + ( + cd_or_fail ${G_SRC}/${pkg} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-O3 -march=native -mtune=native -pipe' + LDFLAGS= + DESTDIR=/build + export CFLAGS LDFLAGS DESTDIR + + touch configure.ac + touch Makefile.in + touch aclocal.m4 + touch configure + + ./configure --prefix=/sucks --docdir=/sucks/share/doc/${pkg} + + make ${JN} || exit 1 + make install-strip +} +! + mkpk ${pkg} + unpack_pkg ${pkg} / + ) || exit 1 + remove_dir ${G_SRC}/${pkg} +fi +end_substep + +begin_substep musl-fts-1.2.7 +if [ -x /lib/libfts.so.0.0.0 ]; then + msg info "%s exists, skipping %s" /lib/libfts.so.0.0.0 ${pkg} +elif [ -e ${G_SPKG}/${pkg}.tar.gz ]; then + unpack_pkg ${pkg} / +else + extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz + ( + cd_or_fail ${G_SRC}/${pkg} + + cat <<! >MKPK +mkpk_name() +{ + printf "%s" "${pkg}" +} + +mkpk_install() +{ + CFLAGS='-O3 -march=native -mtune=native -pipe -fPIC' + LDFLAGS= + DESTDIR=/build + export CFLAGS LDFLAGS DESTDIR + + sed -i '/pkgconfig_DATA/i pkgconfigdir=/lib/pkgconfig' Makefile.am + mkdir m4 + ./bootstrap.sh + + ./configure --prefix=/ --sysconfdir=/etc --localstatedir=/var + + make ${JN} || exit 1 + make install-strip +} +! + mkpk ${pkg} + unpack_pkg ${pkg} / + ) || exit 1 + remove_dir ${G_SRC}/${pkg} +fi +end_substep if false; then # Needs CMake (BMLFS) @@ -1718,15 +1915,6 @@ mkpk_name() mkpk_install() { - CC=/sucks/bin/gcc - CXX=/sucks/bin/g++ - AR=/sucks/bin/ar - AS=/sucks/bin/as - RANLIB=/sucks/bin/ranlib - LD=/sucks/bin/ld - STRIP=/sucks/bin/strip - export CC CXX AR AS RANLIB LD STRIP - DESTDIR=/build export CFLAGS LDFLAGS DESTDIR @@ -1761,8 +1949,6 @@ if [ -x /bin/mandoc ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://mandoc.bsd.lv/snapshots/mdocml-1.14.1.tar.gz - fetch_pkg https://mandoc.bsd.lv/snapshots/${pkg}.tar.gz extract_pkg ${G_SRC} mdocml-1.14.1 mdocml-1.14.1.tar.gz extract_pkg ${G_SRC} ${pkg} ${pkg}.tar.gz ( @@ -1820,8 +2006,6 @@ if [ -x /bin/argp ]; then elif [ -e ${G_SPKG}/${pkg}.tar.xz ]; then unpack_pkg ${pkg} / else - fetch_pkg https://github.com/ericonr/argp-standalone/archive/refs/\ -tags/1.4.1.tar.gz argp-standalone-1.4.1.tar.gz extract_pkg "${G_SRC}" "${pkg}" "${pkg}.tar.gz" ( cd_or_fail ${G_SRC}/${pkg} diff --git a/FAQ b/FAQ @@ -0,0 +1,100 @@ +FAQ +--- + +Q: What does "Galeb" mean? +A: "Seagull". + +Q: How do you pronounce it? +A: [gɑ:leb]. + +Q: Is this Linux? GNU/Linux? Something else? +A: Kernel = Linux. libc = musl-libc. coreutils = suckless core. Init system + = suckless init. The rest are GNU or other utilities which weren't covered + by the above. Thus, "suckless/musl/Linux", or "musl/Linux". It is not wrong + to throw GNU in the name as well, but this system is definitely different + than something like Debian, Fedora or Ubuntu. + +Q: What license applies here? +A: License for each individual program is its own. License for files in this + repository is GPLv3, unless otherwise noted. + + musl-libc is licensed under the Expat ("MIT") license, which doesn't restrict + statically linking non-copylefted software. + + In contrast, glibc (not used here) is mainly licensed under the LGPL v2.1+, + which requires software using it to provide means for it to be potentially + combined with modified versions of glibc (eg. have *.o files and Makefiles or + just full source code available[1]). + + Scripts used to build the binary form of Galeb are publicly available, and + they use publicly available source code for all the constituent parts, so the + requirements of GPL and LGPL are satisfied. Anyone can create modified + versions of those scripts and the software they operate on according to their + respective licenses. Furthermore, Expat license is considered compatible with + the GPL by the FSF.[2] + + Since some of the goals of Galeb are simplification and minimalism as much as + comfortably possible, musl-libc was chosen over glibc, even if glibc has a + stricter (and thus ultimately better for *all* the users) license. Refer to + [3]. + +Q: How do I install this thing? +A: By reading files in this repository and typing commands. + +Q: What if I don't want to read and/or type commands? +A: Go back to "ricing" Ubuntu. Nothing to see here. + +Q: Halp! This doesn't work! How to fix? +A: RTFM/search the Web. Apply logic. Otherwise, see above. + +Q: No thanks, I will instead go back to another distro or Windoze. But won't + that hurt your business? +A: What business? Use whatever software you like, or don't. Either way works. + +Q: Why is /usr a link to /, instead of /bin being a link to /usr/bin etc? +A: Galeb doesn't follow FHS. Instead, it builds on https://sta.li/filesystem/ + + > / - the root home + > /bin - all executables + > /sbin -> /bin # softlink pointing to /bin + > /boot - all boot files + > /etc - system configuration + > /home - user directories + > /var - spool, run, log, cache + > /share - man pages, locales, dependencies + > /include - include/headers + > /lib - static libraries for building stuff + > /mnt - mount points + > /usr -> / # softlink pointing to / + > + > Based on the Linux assumption: + > + > /dev - devices + > /proc - proc files + > /sys - sys files + > + > For crap stuff: + > + > /sucks - stuff that sucks, like ugly gnu library dependencies, or systemd + > fake handlers + + The differences in Galeb are: + + * Things in /sucks also include: + - All programs which are not designed to be linked statically, + - Programs I couldn't easily configure to be statically compiled yet + (eg. Perl) - that could change over time, + - Programs which in my opinion suck. + + * There is also /local serving the purpose of /usr/local. + + * Package sources and related files are in /src. + + * Compiled packages are in /pkg. + + * 9base is in /plan9. + + +[1]: https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynamic +[2]: https://www.gnu.org/licenses/license-list.html#Expat +[3]: https://www.etalabs.net/compare_libcs.html diff --git a/README b/README @@ -4,58 +4,10 @@ Galeb README Galeb is a meta distro with a focus on simplicity. -FAQ ---- +Questions +--------- -Q: What does "Galeb" mean? -A: "Seagull". - -Q: How do you pronounce it? -A: [gɑ:leb]. - -Q: Is this Linux? GNU/Linux? Something else? -A: Kernel = Linux. libc = musl-libc. coreutils = suckless core. Init system - = suckless init. The rest are GNU or other utilities which weren't covered - by the above. Thus, "suckless/musl/Linux", or "musl/Linux". It is not wrong - to throw GNU in the name as well, but this system is definitely different - than something like Debian, Fedora or Ubuntu. - -Q: What license applies here? -A: License for each individual program is its own. License for files in this - repository is GPLv3, unless otherwise noted. - - musl-libc is licensed under the Expat ("MIT") license, which doesn't restrict - statically linking non-copylefted software. - - In contrast, glibc (not used here) is mainly licensed under the LGPL v2.1+, - which requires software using it to provide means for it to be potentially - combined with modified versions of glibc (eg. have *.o files and Makefiles or - just full source code available[2]). - - Scripts used to build the binary form of Galeb are publicly available, and - they use publicly available source code for all the constituent parts, so the - requirements of GPL and LGPL are satisfied. Anyone can create modified - versions of those scripts and the software they operate on according to their - respective licenses. Furthermore, Expat license is considered compatible with - the GPL by the FSF.[3] - - Since some of the goals of Galeb are simplification and minimalism as much as - comfortably possible, musl-libc was chosen over glibc, even if glibc has a - stricter (and thus ultimately better for *all* the users) license. Refer to - [4]. - -Q: How do I install this thing? -A: By reading files in this repository and typing commands. - -Q: What if I don't want to read and/or type commands? -A: Go back to "ricing" Ubuntu. Nothing to see here. - -Q: Halp! This doesn't work! How to fix? -A: RTFM/search the Web. Apply logic. Otherwise, just use something else. - -Q: No thanks, I will instead go back to another distro or Windoze. But won't - that hurt your business? -A: What business? Use whatever software you like, or don't. Either way works. +See FAQ. Thanks @@ -75,6 +27,3 @@ Thanks [1]: https://github.com/dslm4515 -[2]: https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynamic -[3]: https://www.gnu.org/licenses/license-list.html#Expat -[4]: https://www.etalabs.net/compare_libcs.html diff --git a/TODO b/TODO @@ -3,6 +3,10 @@ TODO [ ] Add || exit 1 to mkpk_install scripts; revise () || exit 1 +[x] mkpk configure/make logging (to /var/log?) + [x] Also move /galeb-root/*log -> /var/log/galeb/ + [x] Restart log on 01-* + [x] Organize downloads better: TSV db, fetch all at once at the start [x] /share/legal diff --git a/splitfort b/art/splitfort diff --git a/lib/env.sh b/lib/env.sh @@ -24,19 +24,20 @@ G_ARCH_EXT_ALT=x86_64 G_FIFO=${GR}/fifo G_HOST=$(gcc -dumpmachine | sed 's/\([^-]\+-\)[^-]\+\(-.*\)/\1cross\2/g') G_LGL=${GR}/share/legal -G_LOG=${GR}/log +G_LOG=${GR}/var/log/galeb G_SRC=${GR}/src -G_SHORTLOG=${GR}/shortlog G_SPKG=${GR}/pkg G_FIL=${G_SRC}/${FLD} G_LIB=${G_SRC}/lib +G_LOGFILE=${G_LOG}/log G_PAT=${G_SRC}/${PTD} G_PKG=${G_SRC}/pkg +G_SHORTLOG=${G_LOG}/shortlog G_TARGET=x86_64-galeb-linux-musl G_VER=2.0 JN=-j$(($(grep ^processor /proc/cpuinfo | wc -l) * 3)) export CT_TRI GR_TRI GHOME GUID GGID GR CTD FLD PTD TLD CT TL G_ARCH G_ARCH_EXT -export G_ARCH_EXT_ALT G_FIFO G_LGL G_LOG G_FIL G_LIB G_PAT G_PKG G_SHORTLOG -export G_SPKG G_SRC G_TARGET G_VER JN +export G_ARCH_EXT_ALT G_FIFO G_LGL G_LOG G_FIL G_LIB G_LOGFILE G_PAT G_PKG +export G_SHORTLOG G_SPKG G_SRC G_TARGET G_VER JN diff --git a/lib/fun.sh b/lib/fun.sh @@ -126,8 +126,8 @@ end_step() msg info "${bgwhite}${black}[%d/%d]: Done %s" \ ${step} ${totalsteps} "${stepname}" step=$((step+1)) - printf "[%d/%d]: Done %s\n" ${step} ${totalsteps} "${stepname}" \ - >>${G_SHORTLOG} + #printf "[%d/%d]: Done %s\n" ${step} ${totalsteps} "${stepname}" \ + # >>${G_SHORTLOG} } end_substep() @@ -136,18 +136,18 @@ end_substep() msg info "${white}[%d/%d]-[%d/%d]: Done %s" \ ${step} ${totalsteps} \ ${substep} ${totalsubsteps} "${substepname}" - printf "[%d/%d]-[%d/%d]: Done %s\n" \ - ${step} ${totalsteps} \ - ${substep} ${totalsubsteps} "${substepname}" \ - >>${G_SHORTLOG} + #printf "[%d/%d]-[%d/%d]: Done %s\n" \ + # ${step} ${totalsteps} \ + # ${substep} ${totalsubsteps} "${substepname}" \ + # >>${G_SHORTLOG} unset substepname else msg info "${white}[%d/%d]-[%d/%d]: Done %s" \ ${step} ${totalsteps} \ ${substep} ${totalsubsteps} ${pkg} - printf "[%d/%d]-[%d/%d]: Done %s\n" \ - ${step} ${totalsteps} \ - ${substep} ${totalsubsteps} ${pkg} >>${G_SHORTLOG} + #printf "[%d/%d]-[%d/%d]: Done %s\n" \ + # ${step} ${totalsteps} \ + # ${substep} ${totalsubsteps} ${pkg} >>${G_SHORTLOG} fi substep=$((substep+1)) } @@ -156,8 +156,8 @@ exit_cleanup() { [ -p ${G_FIFO} ] && rm ${G_FIFO} unset CT_TRI GR_TRI GHOME GUID GGID GR CTD FLD PTD TLD CT TL G_ARCH - unset G_ARCH_EXT G_ARCH_EXT_ALT G_FIFO G_LGL G_LOG G_FIL G_LIB G_PAT - unset G_PKG G_SHORTLOG G_SPKG G_SRC G_TARGET G_VER JN + unset G_ARCH_EXT G_ARCH_EXT_ALT G_FIFO G_LGL G_LOG G_FIL G_LIB G_LOGFILE + unset G_PAT G_PKG G_SHORTLOG G_SPKG G_SRC G_TARGET G_VER JN } extract_pkg() @@ -188,7 +188,7 @@ extract_pkg() *) msg err "Unsupported archive format" exit 1;; esac - if ! ${prog} "${G_PKG}/${tarball}" | tar -xf -; then + if ! ${prog} "${G_PKG}/${tarball}" | tar -xmf -; then msg err "Extracting %s failed" "${tarball}" exit 1 fi @@ -217,7 +217,7 @@ fetch_pkg() if [ -n "${realpkg}" ]; then mv_or_fail "${pkg}" "${realpkg}" fi - msg info Rate limiting delay + msg info "Rate limiting delay" sleep ${delay} } @@ -238,7 +238,7 @@ git_clone() fi mv_or_fail "${repo%%.git}" "${dir}" rm ${G_FIFO} - msg info Rate limiting delay + msg info "Rate limiting delay" sleep ${delay} } @@ -309,12 +309,16 @@ mkpk() [ -e LEGAL ] && legalfiles=LEGAL [ -e LICENSE ] && legalfiles+=' LICENSE' [ -e License ] && legalfiles+=' License' + [ -e Artistic ] && legalfiles+=' Artistic' [ -e COPYING ] && legalfiles+=' COPYING' + [ -e Copying ] && legalfiles+=' Copying' [ -e COPYRIGHT ] && legalfiles+=' COPYRIGHT' [ -e doc/LEGAL ] && legalfiles+=' doc/LEGAL' [ -e doc/LICENSE ] && legalfiles+=' doc/LICENSE' [ -e doc/License ] && legalfiles+=' doc/License' + [ -e doc/Artistic ] && legalfiles+=' doc/Artistic' [ -e doc/COPYING ] && legalfiles+=' doc/COPYING' + [ -e doc/Copying ] && legalfiles+=' doc/Copying' [ -e doc/COPYRIGHT ] && legalfiles+=' doc/COPYRIGHT' if [ -n "${legalfiles}" ]; then @@ -338,11 +342,11 @@ mkpk() umount ../dev umount ../bin - if [ ${fail} -ne 1 ]; then + if [ ${fail} -eq 0 ]; then msg info "mkpk packing..." cd ../build tar -c $(find . \( -type b -o -type c -o -type f -o -type l \) \ - -newer ../timestamp | sort | uniq) | \ + -cnewer ../timestamp | sort | uniq) | \ xz -9 > ${G_SPKG}/$(mkpk_name).tar.xz && \ cd ${G_SPKG} && \ md5sum $(mkpk_name).tar.xz >$(mkpk_name).md5 && \ @@ -401,7 +405,7 @@ msg() *) ;; esac printf "%s %s " "${icon}" ${tstamp} - printf "%s %s " "${icon_plain}" ${tstamp} >>${G_LOG} + printf "%s %s " "${icon_plain}" ${tstamp} >>${G_LOGFILE} printf "${fmt}${norm}" "$@" if [ ${newline} -eq 1 ]; then echo @@ -411,7 +415,7 @@ msg() [ ${log} -eq 1 ] && \ printf "$(echo "${fmt}" | \ sed 's/'$(printf '\033')'\[[0-9]\+m//g')\n" \ - "$@" >>${G_LOG} + "$@" >>${G_LOGFILE} } mv_or_fail() @@ -477,7 +481,7 @@ run_make() setup_fifo() { mkfifo ${G_FIFO} - tee -a ${G_LOG} < ${G_FIFO} & + tee -a ${G_LOGFILE} < ${G_FIFO} & } unpack_pkg() diff --git a/lib/pkgs.tsv b/lib/pkgs.tsv @@ -6,6 +6,7 @@ git://git.suckless.org/sbase sbase-20220709 git://git.suckless.org/ubase ubase-20220709 git://repo.or.cz/tinycc.git tinycc-20220708 https://astron.com/pub/file/file-5.41.tar.gz +https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.46.tar.gz https://dev.alpinelinux.org/archive/posixtz/posixtz-0.5.tar.xz https://dev.gentoo.org/~xen0n/distfiles/pax-utils-1.3.4.tar.xz https://distfiles.dereferenced.org/pkgconf/pkgconf-1.8.0.tar.xz @@ -13,6 +14,8 @@ https://download.savannah.gnu.org/releases/acl/acl-2.3.1.tar.xz https://download.savannah.gnu.org/releases/attr/attr-2.5.1.tar.gz https://ftp.barfooze.de/pub/sabotage/tarballs/gettext-tiny-0.3.2.tar.xz https://ftp.barfooze.de/pub/sabotage/tarballs/netbsd-curses-0.3.2.tar.xz +https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz +https://ftp.gnu.org/gnu/automake/automake-1.16.4.tar.xz https://ftp.gnu.org/gnu/bash/bash-5.1.tar.gz https://ftp.gnu.org/gnu/binutils/binutils-2.38.tar.xz https://ftp.gnu.org/gnu/coreutils/coreutils-9.1.tar.xz @@ -23,6 +26,8 @@ https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz libgmp-6.2.1.tar.xz https://ftp.gnu.org/gnu/gperf/gperf-3.1.tar.gz https://ftp.gnu.org/gnu/grep/grep-3.7.tar.xz https://ftp.gnu.org/gnu/gzip/gzip-1.12.tar.xz +https://ftp.gnu.org/gnu/help2man/help2man-1.49.2.tar.xz +https://ftp.gnu.org/gnu/inetutils/inetutils-2.1.tar.xz https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz https://ftp.gnu.org/gnu/m4/m4-1.4.19.tar.xz https://ftp.gnu.org/gnu/make/make-4.3.tar.gz @@ -39,10 +44,13 @@ https://github.com/Mic92/iana-etc/releases/download/20210611/iana-etc-20210611.t https://github.com/arsv/perl-cross/releases/download/1.4/perl-cross-1.4.tar.gz https://github.com/ericonr/argp-standalone/archive/refs/tags/1.4.1.tar.gz argp-standalone-1.4.1.tar.gz https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz +https://github.com/pullmoll/musl-fts/archive/v1.2.7.tar.gz musl-fts-1.2.7.tar.gz +https://github.com/pullmoll/musl-obstack/archive/v1.1.tar.gz musl-obstack-1.1.tar.gz https://github.com/shadow-maint/shadow/releases/download/v4.11.1/shadow-4.11.1.tar.xz https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.6.tar.gz zlib-ng-2.0.6.tar.gz https://invisible-island.net/archives/byacc/byacc-20220128.tgz https://invisible-island.net/archives/reflex/reflex-20210808.tgz +https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz https://libisl.sourceforge.io/isl-0.24.tar.xz libisl-0.24.tar.xz https://mandoc.bsd.lv/snapshots/mandoc-1.14.6.tar.gz https://mandoc.bsd.lv/snapshots/mdocml-1.14.1.tar.gz diff --git a/pat-11.2.1/perl-alpine/musl-locale.patch b/pat-11.2.1/perl-alpine/musl-locale.patch @@ -0,0 +1,37 @@ +diff --git a/locale.c b/locale.c +index 7653340..7243cb1 100644 +--- a/locale.c ++++ b/locale.c +@@ -581,6 +581,10 @@ S_emulate_setlocale(const int category, + + return (char *) querylocale(mask, cur_obj); + ++# elif defined(_NL_LOCALE_NAME) ++ ++ return (char *) nl_langinfo_l(_NL_LOCALE_NAME(category), cur_obj); ++ + # else + + /* If this assert fails, adjust the size of curlocales in intrpvar.h */ +@@ -737,7 +741,7 @@ S_emulate_setlocale(const int category, + + /* Here, we are switching locales. */ + +-# ifndef HAS_QUERYLOCALE ++# if !defined(HAS_QUERYLOCALE) && !defined(_NL_LOCALE_NAME) + + if (strEQ(locale, "")) { + +@@ -1094,6 +1098,12 @@ S_emulate_setlocale(const int category, + locale = querylocale(mask, new_obj); + } + ++# elif defined(_NL_LOCALE_NAME) ++ ++ if (strEQ(locale, "")) { ++ locale = nl_langinfo_l(_NL_LOCALE_NAME(category), new_obj); ++ } ++ + # else + + /* Here, 'locale' is the return value */ diff --git a/pat-11.2.1/perl-alpine/musl-stack-size.patch b/pat-11.2.1/perl-alpine/musl-stack-size.patch @@ -0,0 +1,16 @@ +Tests fails on s390x due to low thread stack size +upstream report: https://github.com/Perl/perl5/issues/18160 + +diff --git a/t/thread_it.pl b/t/thread_it.pl +index f38a580..e8c450a 100644 +--- a/t/thread_it.pl ++++ b/t/thread_it.pl +@@ -36,7 +36,7 @@ my $curr = threads->create({ + stack_size => $^O eq 'hpux' ? 524288 : + $^O eq 'darwin' ? 2000000: + $^O eq 'VMS' ? 150000 : +- $^O eq 'aix' ? 1500000 : 0, ++ $^O eq 'aix' ? 1500000 : 256*1024, + }, sub { + run_tests(); + return defined &curr_test ? curr_test() : ()