Build both stages of curl in sysc

The source tarball is provided as part of sysa distfiles and copied to sysc, which resolves the issue of finding a reliable plain HTTP mirror for curl.

Splitted from https://github.com/fosslinux/live-bootstrap/pull/253.
This commit is contained in:
Eduardo Sánchez Muñoz 2023-03-23 18:35:38 +01:00
parent bc4ecd9ed4
commit dcd43599a7
12 changed files with 23 additions and 96 deletions

View File

@ -625,12 +625,6 @@ make 3.82
GNU ``make`` is now rebuilt properly using the build system and GCC, which means that
it does not randomly segfault while building the Linux kernel.
curl 7.88.1
===========
``curl`` is used to download files using various protocols including HTTP and HTTPS.
However, this first build does not support encrypted HTTPS yet.
ed 1.4
======
@ -694,6 +688,12 @@ sysb is purely a transition to sysc, allowing binaries from sysa to get onto a
disk (as sysa does not necessarily have hard disk support in the kernel).
It populates device nodes, mounts sysc, copies over data, and executes sysc.
curl 7.88.1
===========
``curl`` is used to download files using various protocols including HTTP and HTTPS.
However, this first build does not support encrypted HTTPS yet.
bash 5.2.15
===========

View File

@ -36,7 +36,7 @@ c511d571d24675a141258e0e198c5ed1bcfd4889ddd736ff8e25c0d97b44e2cf ca-certificate
27d0d3e84794f080f01c7c22547a308d1d781d8ce85d5b3f682c379f17bbeb47 coreutils-6.10_0.tar.bz2
e41aba2caa7514704731d3b7a49f63ff8ffb2d22a64f14afdbaadbd0b24073f0 coreutils-8.32_0.tar.bz2
8df7fe3124243028cc9fd9a00fe8ab55c2143a9b7551426447867d2e1de436b6 curl-7.88.1_0.tar.bz2
8f8442bc11c2c70028da083a42f5bf819bb57a452c8f41e988d980e6b561dca2 curl-7.88.1_1.tar.bz2
d7d0a5fc9117f9b3ebd287851a48716c96a3c11991365edb8890f0e203d3b810 curl-7.88.1_1.tar.bz2
0b832d3efef962c10b61559052373267e9c85bbff37572b736a6996823e2d5b2 dhcpcd-9.4.1_0.tar.bz2
f1a17f3d1c65140a6d3043ecb710e5fffe9c019cb3d2eaa982be03706876e534 diffutils-2.7_0.tar.bz2
bda6afcd3a390a34a57443269a4857ccc470129f7a557981778c145fd841cbd1 dist-3.5-236_0.tar.bz2

View File

@ -1,8 +0,0 @@
# SPDX-FileCopyrightText: 1998-2021 Daniel Stenberg <daniel@haxx.se>
#
# SPDX-License-Identifier: curl
my $pi = 3.1415;
foreach my $i (1 .. 200) {
printf "%d, ", sin($i/200 * 2 * $pi) * 500000 + 500000;
}

View File

@ -1,62 +0,0 @@
# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: curl
Regenerating help is not trivial. Help is unnecessary.
Disable help.
diff -ru src/Makefile.inc src/Makefile.inc
--- src/Makefile.inc
+++ src/Makefile.inc
@@ -70,11 +70,9 @@
tool_formparse.c \
tool_getparam.c \
tool_getpass.c \
- tool_help.c \
tool_helpers.c \
tool_hugehelp.c \
tool_libinfo.c \
- tool_listhelp.c \
tool_main.c \
tool_msgs.c \
tool_operate.c \
@@ -111,7 +109,6 @@
tool_formparse.h \
tool_getparam.h \
tool_getpass.h \
- tool_help.h \
tool_helpers.h \
tool_hugehelp.h \
tool_libinfo.h \
diff -ru src/tool_operate.c src/tool_operate.c
--- src/tool_operate.c
+++ src/tool_operate.c
@@ -80,7 +80,6 @@
#include "tool_writeout.h"
#include "tool_xattr.h"
#include "tool_vms.h"
-#include "tool_help.h"
#include "tool_hugehelp.h"
#include "tool_progress.h"
#include "dynbuf.h"
@@ -2703,19 +2702,7 @@
if(res) {
result = CURLE_OK;
- /* Check if we were asked for the help */
- if(res == PARAM_HELP_REQUESTED)
- tool_help(global->help_category);
- /* Check if we were asked for the manual */
- else if(res == PARAM_MANUAL_REQUESTED)
- hugehelp();
- /* Check if we were asked for the version information */
- else if(res == PARAM_VERSION_INFO_REQUESTED)
- tool_version_info();
- /* Check if we were asked to list the SSL engines */
- else if(res == PARAM_ENGINES_REQUESTED)
- tool_list_engines();
- else if(res == PARAM_LIBCURL_UNSUPPORTED_PROTOCOL)
+ if(res == PARAM_LIBCURL_UNSUPPORTED_PROTOCOL)
result = CURLE_UNSUPPORTED_PROTOCOL;
else if(res == PARAM_READ_ERROR)
result = CURLE_READ_ERROR;

View File

@ -69,12 +69,13 @@ build kbd-1.15
build make-3.82
build curl-7.88.1
build ed-1.4
build bc-1.07.1
mkdir -p /sysc/distfiles
cp "${DISTFILES}"/curl-7.88.1.tar.bz2 /sysc/distfiles
# Clear up some RAM space
grep --no-filename '^build' "${SOURCES}"/run*.sh | sed "s/build //" | sed "s/ .*$//" | while read -r p ; do
rm -rf "${SOURCES:?}/${p:?}"

View File

@ -11,16 +11,11 @@ src_prepare() {
rm src/tool_help.c src/tool_help.h src/tool_listhelp.c src/tool_hugehelp.c
# configure.ac uses the AM_COND_IF macro, which is not supported
# by automake 1.10. The place where it is used is only relevant
# for windows builds, so we can simply patch it away.
sed -i "659,662d" configure.ac
# Rebuild libtool files
rm config.guess config.sub ltmain.sh
libtoolize
AUTOMAKE=automake-1.10 ACLOCAL=aclocal-1.10 AUTOM4TE=autom4te-2.64 AUTOCONF=autoconf-2.64 autoreconf-2.64 -fi
AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi
}
src_configure() {

View File

@ -22,8 +22,8 @@ src_configure() {
LDFLAGS="-static" ./configure \
--prefix="${PREFIX}" \
--libdir="${LIBDIR}" \
--build=i386-unknown-linux-musl \
--enable-ipv6 \
--with-openssl \
--with-ca-bundle=/etc/ssl/certs.pem \
--build=i386-unknown-linux-musl
--with-ca-bundle=/etc/ssl/certs.pem
}

View File

@ -1 +1 @@
http://curl.se/download/curl-7.88.1.tar.xz 1dae31b2a7c1fe269de99c0c31bb488346aab3459b5ffca909d6938249ae415f
https://curl.se/download/curl-7.88.1.tar.bz2 8224b45cce12abde039c12dc0711b7ea85b104b9ad534d6e4c5b4e188a61c907

View File

@ -43,7 +43,6 @@ install_tar binutils-2.30 0
install_tar bzip2-1.0.8 0
install_tar bison-3.4.1 2
install_tar coreutils-6.10 0
install_tar curl-7.88.1 0
install_tar dhcpcd-9.4.1 0
install_tar diffutils-2.7 0
install_tar findutils-4.2.33 0

View File

@ -36,6 +36,14 @@ create_fhs
populate_device_nodes
if [ -e "${SOURCES}/distfiles" ]; then
mv "${SOURCES}/distfiles" /
else
mkdir -p "${DISTFILES}"
fi
build curl-7.88.1 pass1.sh
# Obtain network connection
if [ "${CHROOT}" = "False" ]; then
dhcpcd --waitip=4
@ -52,12 +60,6 @@ if [ "${CHROOT}" = "False" ]; then
done
fi
if [ -e "${SOURCES}/distfiles" ]; then
mv "${SOURCES}/distfiles" /
else
mkdir -p "${DISTFILES}"
fi
build bash-5.2.15
exec env -i PATH="${PATH}" HOME="${HOME}" SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH}" bash run2.sh

View File

@ -58,7 +58,7 @@ build openssl-1.1.1l
build ca-certificates-3.88.1
build curl-7.88.1
build curl-7.88.1 pass2.sh
build zlib-1.2.13