commit: 995b0f6f39c541000eaa9f9d6d93647760e41050
parent 1284bf3099b8cade7767608fc9bb13252ec705c7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 3 May 2024 17:21:42 +0200
Grab sed from sbase instead of minised
Diffstat:
5 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
@@ -55,12 +55,13 @@ Meanwhile:
- GNU coreutils: Autoconf, therefore needs the utilities it's building plus some extras to already be available
- Busybox and Toybox: Heavy dependency on GNU Make, bash, …, which can only come much later on in the bootstrapping process
-### minised
-Incomplete implementation of `sed(1)` (notably missing `-i`), but has minimal dependencies.
-Likely to be replaced with a `sed(1)` from a \*BSD.
+## sed from suck(less) sbase
+Simple `sed` implementation which uses `regex.h` instead of some broken regex engine.
+Lack of support of `-i` flag is a bit annoying, might patch this.
Meanwhile:
-- GNU sed: autoconf, which requires `sed` among other things…
+- minised: Broken regex engine which is too limited to pass `./configure` checks like the one in GNU make
+- GNU sed: `./configure` script requires an existing sed (*why*), doesn't seems like there's a workaround.
### (One True) awk
Reference implementation and AFAIK the one used in BSDs, can be built with only a Yacc implementation and a C Compiler.
diff --git a/distfiles.SHA512SUM b/distfiles.SHA512SUM
@@ -10,7 +10,6 @@ e84cd5bc6acdd4d16fc4f16b83e85737aa46d9f332b8f8b0aad75a07fc6c3216fc800538038edcb2
d9f20f35468d979fc29ef5ccc6e77d263e942222b8475940608a234b15e8cff84ef2163514b7b03669008c1fecac88fc9ab097a0f29b4b80a478b1fb09298bee distfiles/linux-headers-6.6-r0.apk.x86_64
3e23929f6ead271a8918224e7979d4168214d47603ef22d9b3391686b4de72a48b261632924a2b9f0c8c58da790401309dd5304c100d8bcbe4ec8c0a434b7d95 distfiles/loksh-7.3.tar.gz
5e812dcbfb5a1be294a3717ed54c5758c9836bd133e56ee59600f47531f1d8536c613b1548637620a4f4cc2761ba507fa541273d1f03108b60cb0c883c601891 distfiles/lolibc-f6e9da7.tar.gz
-9d81ba58f5460e341d9de7c4b2af38c7bf39ae40fdcfac1652e7ad64bd903d58222128880daeb30ef5c1726a244d815ab9c7b22b9cb92c7aeaaa7728f29c4116 distfiles/minised-1.16.tar.gz
6acd3ee911442934082f4f877d795b07c5e23022eaa9c0874799d97e92a2f5a663cb45f94b7f9745c49cbbce6b7e755a29e381ccfb9e68a0be1eedbd22fd5d3b distfiles/mk-20210330.tar.gz
dddd12728842e84bf7d532901d9b9e26e2c8c86e25a3625329586c9088ec9b3825ce3e512c56b7e875b923905308b89494d31d7ca05ebda5485bd00de3954236 distfiles/musl-1.2.5-r0.apk.aarch64
4d76f479017b6f666c36782183f3bdb3e58a48f7400cd125c129e380a8654cf99f685f8d3e97b51cb0199b59720a320e251dd9b89fe55ef8f542a043ab3e7355 distfiles/musl-1.2.5-r0.apk.armhf
@@ -32,6 +31,7 @@ d74d86400cb5a772f8652d3c08fd041ae7999475eeef500aa8bca6c11109389d6604764184136a4b
dacee8ce46c236fcc09ae767bd2f1bc1dfcba026a49134cb8f915d2d4ad31eb089fc8edeb8b1027276a9450ca14be56043747c93acbcbab334efa1bd20069084 distfiles/musl-libintl-1.2.5-r0.apk.x86_64
3d5626b0d6033a9eb8f3d81acbe0b30842e99f4c40563ca3f906ecfebdb72d754de18cd180345131868ad325fead4a6e66bfb765af45267180e256f46a76f316 distfiles/nawk-20240422.tar.gz
ae3d9d593e1645d65f9ab77aa828600c9af4bb30d0a073da7ae3dd805e65b87efaf6a0efb980f2d0168e475ae506eba194547d6479956dabb9d88293a9078a7f distfiles/pigz-2.8.tar.gz
+b050d22a0446e3e2439f59762f3b40104bc1c8361c6ac17a410c0d13c06af497470d468ba50de97b50181a959ae3189b2dba089162dbade536803c8ff96b2d83 distfiles/sbase-b30fb568.tar.gz
991f742ead7dcfd063b7e9bdc5d604353da76038729b599a597e6dd55ba7c9f4dd1df5f508f8b42a1c8b41e711301d772a69f015917c4c4ec678717784efc714 distfiles/tcc-0.9.27_git20240117-r0.apk.aarch64
41c4bfcd5b68a236ead6910cc28edcc47775f0221f032bae33f67239342c08a12405da8c32e5f3fb25c4d57af4005a359526d0854284787331fd1f2183d30d75 distfiles/tcc-0.9.27_git20240117-r0.apk.armhf
13f5b9d5f40e8ae27c66f4d5d4499f1f4d17ae27a04981a1aa4542a08630ebe3d8ad0f58521a951b1ffe9f236a4e2ae2dbe29aafbd2c19f8a6c576b667cdf4ff distfiles/tcc-0.9.27_git20240117-r0.apk.armv7
diff --git a/fetch.sh b/fetch.sh
@@ -3,7 +3,6 @@ URLS="
https://hacktivis.me/releases/utils-std/utils-std-a7693cf.tar.gz
http://void.crufty.net/ftp/pub/sjg/bmake-20230909.tar.gz
http://void.crufty.net/ftp/pub/sjg/mk-20210330.tar.gz
- http://dl.exactcode.de/oss/minised/minised-1.16.tar.gz
https://distfiles.gentoo.org/distfiles/ec/yacc-1.9.1.tar.Z
https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz
https://zlib.net/zlib-1.3.1.tar.gz
@@ -49,6 +48,9 @@ test -e nawk-20240422.tar.gz || curl ${CURL_OPTS} -o nawk-20240422.tar.gz https:
test -e loksh-7.3.tar.gz || curl ${CURL_OPTS} -o loksh-7.3.tar.gz https://github.com/dimkr/loksh/archive/refs/tags/7.3.tar.gz
test -e lolibc-f6e9da7.tar.gz || curl ${CURL_OPTS} -o lolibc-f6e9da7.tar.gz https://github.com/dimkr/lolibc/archive/f6e9da7.tar.gz
+# suckless.org doesn't provides snapshots of sbase (yet?)
+test -e sbase-b30fb568.tar.gz || curl ${CURL_OPTS} -o sbase-b30fb568.tar.gz https://git.sr.ht/~mcf/sbase/archive/b30fb56804bfed69b45ef0e944d2e029e4d26258.tar.gz
+
cd -
sha512sum -c --ignore-missing distfiles.SHA512SUM
diff --git a/init.sh b/init.sh
@@ -98,6 +98,11 @@ build_hierloom() {
done
}
+build_sbase_sed() {
+ cd /sbase-*/
+ $CC -D_DEFAULT_SOURCE -D_NETBSD_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_FILE_OFFSET_BITS=64 -Os -o /bin/sed sed.c libutil/*.c libutf/*.c
+}
+
set -ex -o pipefail
export CC=tcc
@@ -121,8 +126,7 @@ profile_export CFLAGS="$CFLAGS"
export SHELL="/bin/loksh"
ln -s loksh /bin/sh || die "Failed creating /bin/sh symlink"
-cd /minised-1.16
-$CC $CFLAGS sedcomp.c sedexec.c -o /bin/sed
+build_sbase_sed || die
build_awk || die
diff --git a/make-root.sh b/make-root.sh
@@ -9,7 +9,6 @@ tarballs="
utils-std-a7693cf.tar.gz
mk-20210330.tar.gz
bmake-20230909.tar.gz
- minised-1.16.tar.gz
yacc-1.9.1.tar.Z
nawk-20240422.tar.gz
bzip2-1.0.8.tar.gz
@@ -17,6 +16,7 @@ tarballs="
pigz-2.8.tar.gz
heirloom-070715.tar.bz2
heirloom-devtools-070527.tar.bz2
+ sbase-b30fb568.tar.gz
"
WORKDIR="$(dirname "$0")"
WORKDIR="$(realpath "$WORKDIR")"