curl: update to 8.12.1

This commit is contained in:
fosslinux 2025-02-14 11:49:03 +11:00
parent c00fa39838
commit 02ed0da3d2
12 changed files with 134 additions and 187 deletions

View file

@ -0,0 +1,8 @@
# 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;
}

54
steps/curl-8.12.1/pass1.sh Executable file
View file

@ -0,0 +1,54 @@
# SPDX-FileCopyrightText: 2022,2025 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_prepare() {
default
# Regnerate src/tool_cb_prg.c
sed '/sinus/q' src/tool_cb_prg.c > src/tool_cb_prg.c.new
perl sinus.pl | sed "s/, $//" >> src/tool_cb_prg.c.new
sed '1,/^[0-9, ]*[0-9]$/d' src/tool_cb_prg.c >> src/tool_cb_prg.c.new
mv src/tool_cb_prg.c.new src/tool_cb_prg.c
rm src/tool_listhelp.c src/tool_hugehelp.c
# Make scripts work with our perl
sed -i "s/:crlf//" scripts/managen scripts/cd2nroff
# sed rewrites permissions?!
chmod 755 scripts/managen scripts/cd2nroff
# This one doesn't compile properly
touch docs/libcurl/libcurl-symbols.md docs/libcurl/libcurl-symbols.md
AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi
}
src_configure() {
LDFLAGS="-static" ./configure \
--prefix="${PREFIX}" \
--libdir="${LIBDIR}" \
--build=i386-unknown-linux-gnu \
--enable-ipv6 \
--without-ssl \
--without-libpsl \
--disable-hsts
}
src_compile() {
# Recreate tool_help.h
sed '/bitmask output/{n; n; n; n; q}' src/tool_help.h > src/tool_help.h.new
make -s -C docs/cmdline-opts listcats >> src/tool_help.h.new
sed '1,/CURLHELP_VERBOSE/d' src/tool_help.h >> src/tool_help.h.new
mv src/tool_help.h.new src/tool_help.h
# tool_listhelp.c
make -C src listhelp
default
}
src_install() {
default
install -m 755 scripts/mk-ca-bundle.pl "${DESTDIR}/usr/bin/mk-ca-bundle"
}

44
steps/curl-8.12.1/pass2.sh Executable file
View file

@ -0,0 +1,44 @@
# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
#
# SPDX-License-Identifier: GPL-3.0-or-later
src_prepare() {
default
# Regnerate src/tool_cb_prg.c
sed '/sinus/q' src/tool_cb_prg.c > src/tool_cb_prg.c.new
perl sinus.pl | sed "s/, $//" >> src/tool_cb_prg.c.new
sed '1,/^[0-9, ]*[0-9]$/d' src/tool_cb_prg.c >> src/tool_cb_prg.c.new
mv src/tool_cb_prg.c.new src/tool_cb_prg.c
rm src/tool_listhelp.c src/tool_hugehelp.c
# This one doesn't compile properly
touch docs/libcurl/libcurl-symbols.md docs/libcurl/libcurl-symbols.md
AUTOMAKE=automake-1.15 ACLOCAL=aclocal-1.15 autoreconf-2.69 -fi
}
src_configure() {
LDFLAGS="-static" ./configure \
--prefix="${PREFIX}" \
--libdir="${LIBDIR}" \
--build=i386-unknown-linux-musl \
--enable-ipv6 \
--with-openssl \
--without-libpsl \
--with-ca-bundle=/etc/ssl/certs.pem
}
src_compile() {
# Recreate tool_help.h
sed '/bitmask output/{n; n; n; n; q}' src/tool_help.h > src/tool_help.h.new
make -s -C docs/cmdline-opts listcats >> src/tool_help.h.new
sed '1,/CURLHELP_VERBOSE/d' src/tool_help.h >> src/tool_help.h.new
mv src/tool_help.h.new src/tool_help.h
# tool_listhelp.c
make -C src listhelp
default
}

View file

@ -0,0 +1,31 @@
# SPDX-FileCopyrightText: 2023 Eduardo Sánchez Muñoz <eduardosm-dev@e64.io>
#
# SPDX-License-Identifier: curl
Disables checking current date in mk-ca-bundle script, so it produces
reproducible bundles.
diff -ru scripts/mk-ca-bundle.pl scripts/mk-ca-bundle.pl
--- curl-8.12.1/scripts/mk-ca-bundle.pl
+++ curl-8.12.1/scripts/mk-ca-bundle.pl
@@ -499,19 +499,7 @@
if($main_block) {
push @precert, $_ if not /^#$/;
if(/^# Not Valid After : (.*)/) {
- my $stamp = $1;
- use Time::Piece;
- # Not Valid After : Thu Sep 30 14:01:15 2021
- my $t = Time::Piece->strptime($stamp, "%a %b %d %H:%M:%S %Y");
- my $delta = ($t->epoch - time()); # negative means no longer valid
- if($delta < 0) {
- $skipnum++;
- report "Skipping: $main_block_name is not valid anymore" if ($opt_v);
- $valid = 0;
- }
- else {
- $valid = 1;
- }
+ $valid = 1;
}
}
next;

View file

@ -0,0 +1 @@
https://curl.se/download/curl-8.12.1.tar.xz 0341f1ed97a26c811abaebd37d62b833956792b7607ea3f15d001613c76de202