summaryrefslogtreecommitdiff
path: root/system/curl
diff options
context:
space:
mode:
Diffstat (limited to 'system/curl')
-rw-r--r--system/curl/APKBUILD17
-rw-r--r--system/curl/errorcodes.pl99
-rw-r--r--system/curl/fix-fseek-type-mismatch.patch130
3 files changed, 106 insertions, 140 deletions
diff --git a/system/curl/APKBUILD b/system/curl/APKBUILD
index aedaa6e7b..e719f008a 100644
--- a/system/curl/APKBUILD
+++ b/system/curl/APKBUILD
@@ -3,19 +3,18 @@
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Zach van Rijn <me@zv.io>
pkgname=curl
-pkgver=8.3.0
-pkgrel=1
+pkgver=8.9.1
+pkgrel=0
pkgdesc="A URL retrival utility and library"
url="https://curl.haxx.se"
arch="all"
license="MIT"
depends="ca-certificates"
makedepends_build="perl"
-makedepends_host="libssh2-dev nghttp2-dev openssl-dev zlib-dev zstd-dev
- autoconf automake libtool"
+makedepends_host="libssh2-dev nghttp2-dev openssl-dev zlib-dev zstd-dev"
makedepends="$makedepends_build $makedepends_host"
source="https://curl.haxx.se/download/$pkgname-$pkgver.tar.xz
- fix-fseek-type-mismatch.patch
+ errorcodes.pl
"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev libcurl"
@@ -103,12 +102,10 @@ subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev libcurl"
# - CVE-2014-0138
# - CVE-2014-0139
-# remove after the upstream release includes
-# https://github.com/curl/curl/pull/11918
prepare() {
default_prepare
- autoreconf -vif
+ cp "$srcdir"/errorcodes.pl "$builddir"/tests/errorcodes.pl
}
build() {
@@ -143,5 +140,5 @@ libcurl() {
mv "$pkgdir"/usr/lib "$subpkgdir"/usr
}
-sha512sums="6404b4c74fe1185cb482631ca3a143996cb7298d0d8a76bfafd7696e7729c00559999a069bdba782dee3f3eb273fb678a4438cb27d3deca54022878cdff83a51 curl-8.3.0.tar.xz
-c89178b8be2f48ba0a25072087d5430ec25293f3b5d5a7eef916656b356609624f679a143f90d28459cc6e669ad028526663934a22ea4c777e86ce154d6c5516 fix-fseek-type-mismatch.patch"
+sha512sums="a0fe234402875db194aad4e4208b7e67e7ffc1562622eea90948d4b9b0122c95c3dde8bbe2f7445a687cb3de7cb09f20e5819d424570442d976aa4c913227fc7 curl-8.9.1.tar.xz
+7848b1271e0bfe3be40221fb0582712d4af3ce1e1bdf16b5f0cac731d81bda145efc039f945a311af70caff279a44435a8ead6bb6e1db7570a4bd22df0a77fdb errorcodes.pl"
diff --git a/system/curl/errorcodes.pl b/system/curl/errorcodes.pl
new file mode 100644
index 000000000..9c8f9e882
--- /dev/null
+++ b/system/curl/errorcodes.pl
@@ -0,0 +1,99 @@
+#!/usr/bin/env perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+# SPDX-License-Identifier: curl
+#
+###########################################################################
+
+# Check that libcurl-errors.3 and the public header files have the same set of
+# error codes.
+
+use strict;
+use warnings;
+
+# we may get the dir roots pointed out
+my $root=$ARGV[0] || ".";
+my $manpge = "$root/docs/libcurl/libcurl-errors.3";
+my $curlh = "$root/include/curl";
+my $errors=0;
+
+my @hnames;
+my %wherefrom;
+my @mnames;
+my %manfrom;
+
+sub scanheader {
+ my ($file)=@_;
+ open H, "<$file";
+ my $line = 0;
+ while(<H>) {
+ $line++;
+ if($_ =~ /^ (CURL(E|UE|SHE|HE|M)_[A-Z0-9_]*)/) {
+ my ($name)=($1);
+ if(($name !~ /OBSOLETE/) && ($name !~ /_LAST\z/)) {
+ push @hnames, $name;
+ if($wherefrom{$name}) {
+ print STDERR "double: $name\n";
+ }
+ $wherefrom{$name}="$file:$line";
+ }
+ }
+ }
+ close(H);
+}
+
+sub scanmanpage {
+ my ($file)=@_;
+ open H, "<$file";
+ my $line = 0;
+ while(<H>) {
+ $line++;
+ if($_ =~ /^\.IP \"(CURL(E|UE|SHE|HE|M)_[A-Z0-9_]*)/) {
+ my ($name)=($1);
+ push @mnames, $name;
+ $manfrom{$name}="$file:$line";
+ }
+ }
+ close(H);
+}
+
+
+opendir(my $dh, $curlh) || die "Can't opendir $curlh: $!";
+my @hfiles = grep { /\.h$/ } readdir($dh);
+closedir $dh;
+
+for(sort @hfiles) {
+ scanheader("$curlh/$_");
+}
+scanmanpage($manpge);
+
+print "Result\n";
+for my $h (sort @hnames) {
+ if(!$manfrom{$h}) {
+ printf "$h from %s, not in man page\n", $wherefrom{$h};
+ }
+}
+
+for my $m (sort @mnames) {
+ if(!$wherefrom{$m}) {
+ printf "$m from %s, not in any header\n", $manfrom{$m};
+ }
+}
diff --git a/system/curl/fix-fseek-type-mismatch.patch b/system/curl/fix-fseek-type-mismatch.patch
deleted file mode 100644
index ec83efb41..000000000
--- a/system/curl/fix-fseek-type-mismatch.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 40ee445b3b05be4e215be8b5b0f87f7080ceaf26 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Mon, 25 Sep 2023 13:03:26 +0200
-Subject: [PATCH] configure: sort AC_CHECK_FUNCS
-
-No functional changes.
----
- configure.ac | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 2fc9f2f01783c..a6f9066a133a4 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -3583,8 +3583,10 @@ AC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Se
- #include <sys/types.h>]])
-
-
--AC_CHECK_FUNCS([fnmatch \
-+AC_CHECK_FUNCS([\
-+ arc4random \
- fchmod \
-+ fnmatch \
- fork \
- geteuid \
- getpass_r \
-@@ -3604,7 +3606,6 @@ AC_CHECK_FUNCS([fnmatch \
- snprintf \
- utime \
- utimes \
-- arc4random
- ],[
- ],[
- func="$ac_func"
-From 60d047b6b238427a7dda916bb00d0a48238e7a27 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Fri, 22 Sep 2023 13:58:49 +0000
-Subject: [PATCH] lib: use wrapper for curl_mime_data fseek callback
-
-fseek uses long offset which does not match with curl_off_t. This leads
-to undefined behavior when calling the callback and caused failure on
-arm 32 bit.
-
-Use a wrapper to solve this and use fseeko which uses off_t instead of
-long.
-
-Thanks to the nice people at Libera IRC #musl for helping finding this
-out.
-
-Closes #11882
-Closes #11900
----
- CMakeLists.txt | 3 +++
- configure.ac | 2 ++
- lib/formdata.c | 17 +++++++++++++++--
- 3 files changed, 20 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0b3aed90627b1..84774dc1db043 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1037,6 +1037,7 @@ check_include_file_concat("signal.h" HAVE_SIGNAL_H)
- check_include_file_concat("stdatomic.h" HAVE_STDATOMIC_H)
- check_include_file_concat("stdbool.h" HAVE_STDBOOL_H)
- check_include_file_concat("stdint.h" HAVE_STDINT_H)
-+check_include_file_concat("stdio.h" HAVE_STDIO_H)
- check_include_file_concat("stdlib.h" HAVE_STDLIB_H)
- check_include_file_concat("string.h" HAVE_STRING_H)
- check_include_file_concat("strings.h" HAVE_STRINGS_H)
-@@ -1122,6 +1123,8 @@ endif()
- check_symbol_exists(freeaddrinfo "${CURL_INCLUDES}" HAVE_FREEADDRINFO)
- check_symbol_exists(pipe "${CURL_INCLUDES}" HAVE_PIPE)
- check_symbol_exists(ftruncate "${CURL_INCLUDES}" HAVE_FTRUNCATE)
-+check_symbol_exists(fseeko "${CURL_INCLUDES}" HAVE_FSEEKO)
-+check_symbol_exists(_fseeki64 "${CURL_INCLUDES}" HAVE__FSEEKI64)
- check_symbol_exists(getpeername "${CURL_INCLUDES}" HAVE_GETPEERNAME)
- check_symbol_exists(getsockname "${CURL_INCLUDES}" HAVE_GETSOCKNAME)
- check_symbol_exists(if_nametoindex "${CURL_INCLUDES}" HAVE_IF_NAMETOINDEX)
-diff --git a/configure.ac b/configure.ac
-index a6f9066a133a4..5fa7c45c47430 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -3584,10 +3584,12 @@ AC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Se
-
-
- AC_CHECK_FUNCS([\
-+ _fseeki64 \
- arc4random \
- fchmod \
- fnmatch \
- fork \
-+ fseeko \
- geteuid \
- getpass_r \
- getppid \
-diff --git a/lib/formdata.c b/lib/formdata.c
-index 8984b63223cc0..f370ce6854b5f 100644
---- a/lib/formdata.c
-+++ b/lib/formdata.c
-@@ -789,6 +789,20 @@ static CURLcode setname(curl_mimepart *part, const char *name, size_t len)
- return res;
- }
-
-+/* wrap call to fseeko so it matches the calling convetion of callback */
-+static int fseeko_wrapper(void *stream, curl_off_t offset, int whence)
-+{
-+#if defined(HAVE_FSEEKO)
-+ return fseeko(stream, (off_t)offset, whence);
-+#elif defined(HAVE__FSEEKI64)
-+ return _fseeki64(stream, (__int64)offset, whence);
-+#else
-+ if(offset > LONG_MAX)
-+ return -1;
-+ return fseek(stream, (long)offset, whence);
-+#endif
-+}
-+
- /*
- * Curl_getformdata() converts a linked list of "meta data" into a mime
- * structure. The input list is in 'post', while the output is stored in
-@@ -874,8 +888,7 @@ CURLcode Curl_getformdata(struct Curl_easy *data,
- compatibility: use of "-" pseudo file name should be avoided. */
- result = curl_mime_data_cb(part, (curl_off_t) -1,
- (curl_read_callback) fread,
-- CURLX_FUNCTION_CAST(curl_seek_callback,
-- fseek),
-+ fseeko_wrapper,
- NULL, (void *) stdin);
- }
- else