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

@ -35,8 +35,8 @@ e8271c1213b6cc7c9ae2ddb018cd093cbbd5f6e842548c0747ce95b13b6b9447 bzip2-1.0.8_0.
982a3496ce3277c562acc896ba796939fe55a37432b2c76ab16b76e051a045a2 coreutils-5.0_0.tar.bz2
27f283c42e2728d0d0682d56ada44b11ff11d07843e595c133a43f4c6aef53d0 coreutils-6.10_0.tar.bz2
22d4dcf97bc9caf36f2abc4fbfc2f40d13a0be2db2efce913b09a00461db7a06 coreutils-9.4_0.tar.bz2
aef1f09e2abd39cca760f186569a0e71bc11a20a79f06ee5802f788dd6a3ff58 curl-8.5.0_0.tar.bz2
6e0d69e6bfbaf9520036b9ee362764ab791a0526df7a6639d9cc9de32d0becea curl-8.5.0_1.tar.bz2
455ed6ce610873241cb3ebe827d1965d2a4a6319424604ce6390205d16abdf48 curl-8.12.1_0.tar.bz2
ea841c92382860d3618368b86510514ed7d717c64625740e70baba2508e182c4 curl-8.12.1_1.tar.bz2
fedf6ffbd37b14e9a0c94cd3063c6ac5d38f13be8a3399093ec112f9cd9d0816 dhcpcd-10.0.1_0.tar.bz2
0462b6a04899a98d60c33f9d16fa00e2e6b7c21cc80ccebc8358fc08105467a2 diffutils-2.7_0.tar.bz2
fc850c6f141717ccece106592f6a8edc0cae0d5e9f0968f111455d00072541b6 diffutils-3.10_0.tar.bz2

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

View file

@ -1,34 +0,0 @@
# 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 -i "57,78d" src/tool_cb_prg.c
sed -i "57 s/^/$(perl sinus.pl | sed "s/, $//")\n/" src/tool_cb_prg.c
rm src/tool_help.c src/tool_help.h src/tool_listhelp.c src/tool_hugehelp.c
# Rebuild libtool files
rm config.guess config.sub ltmain.sh
libtoolize
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 \
--disable-hsts
}
src_install() {
default
install -m 755 scripts/mk-ca-bundle.pl "${DESTDIR}/usr/bin/mk-ca-bundle"
}

View file

@ -1,29 +0,0 @@
# 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 -i "57,78d" src/tool_cb_prg.c
sed -i "57 s/^/$(perl sinus.pl | sed "s/, $//")\n/" src/tool_cb_prg.c
rm src/tool_help.c src/tool_help.h src/tool_listhelp.c src/tool_hugehelp.c
# Rebuild libtool files
rm config.guess config.sub ltmain.sh
libtoolize
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 \
--with-ca-bundle=/etc/ssl/certs.pem
}

View file

@ -1,63 +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
--- curl-8.5.0/src/Makefile.inc
+++ curl-8.5.0/src/Makefile.inc
@@ -76,12 +76,10 @@
tool_formparse.c \
tool_getparam.c \
tool_getpass.c \
- tool_help.c \
tool_helpers.c \
tool_hugehelp.c \
tool_ipfs.c \
tool_libinfo.c \
- tool_listhelp.c \
tool_main.c \
tool_msgs.c \
tool_operate.c \
@@ -120,7 +118,6 @@
tool_formparse.h \
tool_getparam.h \
tool_getpass.h \
- tool_help.h \
tool_helpers.h \
tool_hugehelp.h \
tool_ipfs.h \
diff -ru src/tool_operate.c src/tool_operate.c
--- curl-8.5.0/src/tool_operate.c
+++ curl-8.5.0/src/tool_operate.c
@@ -78,7 +78,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 "tool_ipfs.h"
@@ -2746,19 +2745,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

@ -1,56 +0,0 @@
# 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.5.0/scripts/mk-ca-bundle.pl
+++ curl-8.5.0/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;
@@ -573,24 +561,6 @@
if($timestamp[12] ne "Z") {
report "distrust date stamp is not using UTC";
}
- # Example date: 200617000000Z
- # Means 2020-06-17 00:00:00 UTC
- my $distrustat =
- timegm($timestamp[10] . $timestamp[11], # second
- $timestamp[8] . $timestamp[9], # minute
- $timestamp[6] . $timestamp[7], # hour
- $timestamp[4] . $timestamp[5], # day
- ($timestamp[2] . $timestamp[3]) - 1, # month
- "20" . $timestamp[0] . $timestamp[1]); # year
- if(time >= $distrustat) {
- # not trusted anymore
- $skipnum++;
- report "Skipping: $main_block_name is not trusted anymore" if ($opt_v);
- $valid = 0;
- }
- else {
- # still trusted
- }
}
next;
}

View file

@ -1 +0,0 @@
https://curl.se/download/curl-8.5.0.tar.xz 42ab8db9e20d8290a3b633e7fbb3cec15db34df65fd1015ef8ac1e4723750eeb

View file

@ -137,7 +137,7 @@ improve: finalize_fhs
improve: open_console ( CONSOLES == True )
improve: swap ( SWAP_SIZE != 0 )
build: musl-1.2.5
build: curl-8.5.0
build: curl-8.12.1
improve: get_network ( CHROOT == False )
build: bash-5.2.15
improve: open_console ( CONSOLES == True )
@ -162,7 +162,7 @@ uninstall: perl-5.6.2 perl-5.10.1
build: libarchive-3.5.2
build: openssl-3.0.13
build: ca-certificates-3.99
build: curl-8.5.0
build: curl-8.12.1
build: zlib-1.2.13
build: automake-1.16.3
build: autoconf-2.71