From d36ad8b2a0e7a7b05853d9e397c93b6f42cc7f03 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 12 Aug 2022 21:53:50 +0300 Subject: Upgrade to 7.84.0 --- README-DEV | 44 +++++++++++++++++++++-------------- curl/curl/tool_hugehelp.c | 27 +++++++++++++++++++++- curl/curl/tool_main.c | 18 +++++++++------ curl/manifest | 5 ++-- libcurl/build/bootstrap.build | 4 ++-- libcurl/libcurl/buildfile | 38 ++++++++++++++++++++++++++++++- libcurl/libcurl/curl_config.h | 53 ++++++++++++++++++++++--------------------- libcurl/manifest | 5 ++-- upstream | 2 +- 9 files changed, 137 insertions(+), 59 deletions(-) diff --git a/README-DEV b/README-DEV index bf242fe..7e21294 100644 --- a/README-DEV +++ b/README-DEV @@ -28,14 +28,11 @@ Debian and Fedora distributions. The configuration options defining these sets are specified in the Debian's rules and Fedora's RPM .spec files. These files can be obtained as follows: -$ wget http://deb.debian.org/debian/pool/main/c/curl/curl_7.74.0-1.1.debian.tar.xz -$ tar xf curl_7.74.0-1.1.debian.tar.xz debian/rules +$ wget http://deb.debian.org/debian/pool/main/c/curl/curl_7.84.0-2.debian.tar.xz +$ tar xf curl_7.84.0-2.debian.tar.xz debian/rules -Note that at the time of upgrade curl 7.76.0 is not available for the Debian -distribution, so we take the latest available version. - -$ wget https://kojipkgs.fedoraproject.org/packages/curl/7.76.0/1.fc35/src/curl-7.76.0-1.fc35.src.rpm -$ rpm2cpio curl-7.76.0-1.fc35.src.rpm | cpio -civ '*.spec' +$ wget https://kojipkgs.fedoraproject.org/packages/curl/7.84.0/2.fc37/src/curl-7.84.0-2.fc37.src.rpm +$ rpm2cpio curl-7.84.0-2.fc37.src.rpm | cpio -civ '*.spec' As a side note, on Debian and Fedora the source, library, headers, and tools are packaged as follows: @@ -55,6 +52,7 @@ Debian: --enable-threaded-resolver --with-lber-lib=lber --with-gssapi=/usr --with-libssh2 --with-nghttp2 --with-zsh-functions-dir=/usr/share/zsh/vendor-completions + --with-openssl --with-ca-path=/etc/ssl/certs --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt @@ -64,30 +62,38 @@ Fedora: --enable-threaded-resolver --with-gssapi --with-nghttp2 --with-ssl --with-ca-bundle=/etc/pki/tls/certs/ca-bundle.crt --enable-ldap --enable-ldaps --enable-manual --with-brotli --with-libidn2 - --with-libmetalink --with-libpsl --with-libssh + --with-libpsl --with-libssh + --enable-hsts --without-zstd --enable-dict --enable-gopher --enable-imap + --enable-mqtt --enable-ntlm --enable-ntlm-wb --enable-pop3 --enable-rtsp + --enable-smb --enable-smtp --enable-telnet --enable-tftp --enable-tls-srp The union of these feature sets translates into the following options: --enable-symbol-hiding --enable-versioned-symbols --enable-threaded-resolver --with-lber-lib=lber --with-gssapi --with-libssh2 --with-nghttp2 --with-zsh-functions-dir= --with-ca-path= - --with-ca-bundle= --enable-ipv6 --with-ssl --enable-ldap + --with-ca-bundle= --enable-ipv6 --with-openssl --enable-ldap --enable-ldaps --enable-manual --with-brotli --with-libidn2 - --with-libmetalink --with-libpsl --with-libssh + --with-libpsl --with-libssh + --enable-hsts --enable-dict --enable-gopher --enable-imap + --enable-mqtt --enable-ntlm --enable-ntlm-wb --enable-pop3 --enable-rtsp + --enable-smb --enable-smtp --enable-telnet --enable-tftp --enable-tls-srp We, however, drop the external dependencies that are not packaged for build2, disable default CA bundle/directory and use --with-ca-fallback instead, explicitly request to use zlib and end up with the following options: --enable-symbol-hiding --enable-versioned-symbols --enable-threaded-resolve - --enable-ipv6 --with-ssl --with-zlib --disable-ldap --disable-ldaps + --enable-ipv6 --with-openssl --with-zlib --disable-ldap --disable-ldaps --disable-ares --disable-esni --disable-manual --without-lber-lib --without-gssapi --without-libssh --without-libssh2 --without-nghttp2 --without-zsh-functions-dir --without-brotli --without-libidn2 - --without-libmetalink --without-libpsl - --without-bearssl --without-libgsasl --disable-hsts --without-hyper + --without-libpsl --without-bearssl --without-libgsasl --without-hyper --without-rustls --without-wolfssh --without-ca-bundle --without-ca-path --with-ca-fallback + --enable-hsts --enable-dict --enable-gopher --enable-imap + --enable-mqtt --enable-ntlm --enable-ntlm-wb --enable-pop3 --enable-rtsp + --enable-smb --enable-smtp --enable-telnet --enable-tftp --enable-tls-srp See the configuration options description at the "Install from source" page (https://curl.se/docs/install.html). @@ -134,14 +140,18 @@ $ autoreconf -fi $ mkdir build $ cd build $ ../configure --enable-symbol-hiding --enable-versioned-symbols \ - --enable-threaded-resolve --enable-ipv6 --with-ssl --with-zlib \ + --enable-threaded-resolve --enable-ipv6 --with-openssl --with-zlib \ --disable-ldap --disable-ldaps --disable-ares --disable-esni \ --disable-manual --without-lber-lib --without-gssapi --without-libssh \ --without-libssh2 --without-nghttp2 --without-zsh-functions-dir \ - --without-brotli --without-libidn2 --without-libmetalink --without-libpsl \ - --without-bearssl --without-libgsasl --disable-hsts --without-hyper \ + --without-brotli --without-libidn2 --without-libpsl \ + --without-bearssl --without-libgsasl --without-hyper \ --without-rustls --without-wolfssh \ - --without-ca-bundle --without-ca-path --with-ca-fallback >build.log 2>&1 + --without-ca-bundle --without-ca-path --with-ca-fallback \ + --enable-hsts --enable-dict --enable-gopher --enable-imap \ + --enable-mqtt --enable-ntlm --enable-ntlm-wb --enable-pop3 --enable-rtsp \ + --enable-smb --enable-smtp --enable-telnet --enable-tftp --enable-tls-srp \ + >build.log 2>&1 $ make V=1 >>build.log 2>&1 For MSVC: diff --git a/curl/curl/tool_hugehelp.c b/curl/curl/tool_hugehelp.c index bc33e2f..8d741f6 100644 --- a/curl/curl/tool_hugehelp.c +++ b/curl/curl/tool_hugehelp.c @@ -1,3 +1,28 @@ -/* built-in manual is disabled, blank function */ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2022, Daniel Stenberg, , 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 + * + ***************************************************************************/ + +#include "tool_setup.h" #include "tool_hugehelp.h" + void hugehelp(void) {} diff --git a/curl/curl/tool_main.c b/curl/curl/tool_main.c index 913f8d6..15caf3c 100644 --- a/curl/curl/tool_main.c +++ b/curl/curl/tool_main.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2021, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2022, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -18,6 +18,8 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * + * SPDX-License-Identifier: curl + * ***************************************************************************/ #include "tool_setup.h" @@ -45,7 +47,6 @@ #include "curlx.h" #include "tool_cfgable.h" -#include "tool_convert.h" #include "tool_doswin.h" #include "tool_msgs.h" #include "tool_operate.h" @@ -122,7 +123,7 @@ static void memory_tracking_init(void) curl_free(env); curl_dbg_memdebug(fname); /* this weird stuff here is to make curl_free() get called before - curl_gdb_memdebug() as otherwise memory tracking will log a free() + curl_dbg_memdebug() as otherwise memory tracking will log a free() without an alloc! */ } /* if CURL_MEMLIMIT is set, this enables fail-on-alloc-number-N feature */ @@ -250,11 +251,9 @@ static void main_free(struct GlobalConfig *config) /* Cleanup the easy handle */ /* Main cleanup */ curl_global_cleanup(); - convert_cleanup(); - metalink_cleanup(); #ifdef USE_NSS if(PR_Initialized()) { - /* prevent valgrind from reporting still reachable mem from NSRP arenas */ + /* prevent valgrind from reporting still reachable mem from NSPR arenas */ PL_ArenaFinish(); /* prevent valgrind from reporting possibly lost memory (fd cache, ...) */ PR_Cleanup(); @@ -319,8 +318,13 @@ int main(int argc, char *argv[]) main_free(&global); } +#ifdef WIN32 + /* Flush buffers of all streams opened in write or update mode */ + fflush(NULL); +#endif + #ifdef __NOVELL_LIBC__ - if(getenv("_IN_NETWARE_BASH_") == NULL) + if(!getenv("_IN_NETWARE_BASH_")) tool_pressanykey(); #endif diff --git a/curl/manifest b/curl/manifest index 5bbce4a..118667a 100644 --- a/curl/manifest +++ b/curl/manifest @@ -1,6 +1,7 @@ : 1 name: curl -version: 7.76.0 +version: 7.84.0-a.0.z +priority: security summary: Command line tool for transferring data with URLs license: curl ; MIT/X derivate license. topics: HTTP, FTP, URL, data transfer @@ -9,7 +10,7 @@ url: https://curl.se/ doc-url: https://curl.se/docs/manpage.html src-url: https://git.build2.org/cgit/packaging/curl/curl/tree/curl/ package-url: https://git.build2.org/cgit/packaging/curl/ -email: curl-users@cool.haxx.se ; Mailing list. +email: curl-users@lists.haxx.se ; Mailing list. package-email: packaging@build2.org ; Mailing list. build-warning-email: builds@build2.org builds: all diff --git a/libcurl/build/bootstrap.build b/libcurl/build/bootstrap.build index a84b3e7..0675c6c 100644 --- a/libcurl/build/bootstrap.build +++ b/libcurl/build/bootstrap.build @@ -24,10 +24,10 @@ using dist # # https://curl.se/libcurl/abi.html # -if ($version.major == 7 && $version.minor == 76 && $version.patch == 0) +if ($version.major == 7 && $version.minor == 84 && $version.patch == 0) { abi_version_major = 4 - abi_version = "$abi_version_major.7.0" # .. + abi_version = "$abi_version_major.8.0" # .. } else fail 'increment the ABI version?' diff --git a/libcurl/libcurl/buildfile b/libcurl/libcurl/buildfile index d44293f..58f7bb2 100644 --- a/libcurl/libcurl/buildfile +++ b/libcurl/libcurl/buildfile @@ -29,6 +29,40 @@ vsc{libcurl}: lib/in{libcurl} CURL_LT_SHLIB_VERSIONED_FLAVOUR = 'OPENSSL_' } +# It seems that for earlier versions of clang the __has_include_next() macro +# is broken in the -frewrite-includes mode. So, in particular, the following +# fragment of llvm-6.0's stdatomic.h: +# +# #if __STDC_HOSTED__ && __has_include_next() +# # include_next +# #else +# ... +# typedef _Atomic(_Bool) atomic_bool; +# ... +# #endif +# +# expands into: +# +# #if __STDC_HOSTED__ && (1)/*__has_include_next()*/ +# #if 0 /* expanded by -frewrite-includes */ +# # include_next +# #endif /* expanded by -frewrite-includes */ +# # 31 "/usr/lib/llvm-6.0/lib/clang/6.0.0/include/stdatomic.h" 3 +# # 32 "/usr/lib/llvm-6.0/lib/clang/6.0.0/include/stdatomic.h" 3 +# #else +# ... +# typedef _Atomic(_Bool) atomic_bool; +# ... +# #endif +# +# This ends up with no atomic_* types defined, etc. +# +# Thus, we enable reprocessing for the source files which (indirectly) include +# for Clang versions prior to 7.0. +# +if ($c.id == 'clang' && $c.version.major < 7) + lib/obj{easy version}: cc.reprocess = true + # Build options. # c.poptions += -DBUILDING_LIBCURL -DHAVE_CONFIG_H \ @@ -95,7 +129,9 @@ switch $tclass, $tsys # used for the API function declarations. Thus, we don't bother # generating/passing the exported symbol list file. # - c.libs += -framework CoreFoundation -framework Security + c.libs += -framework CoreFoundation \ + -framework SystemConfiguration \ + -framework Security } case 'windows', 'mingw32' { diff --git a/libcurl/libcurl/curl_config.h b/libcurl/libcurl/curl_config.h index 3bebb85..868a327 100644 --- a/libcurl/libcurl/curl_config.h +++ b/libcurl/libcurl/curl_config.h @@ -84,6 +84,9 @@ #undef CURL_DISABLE_GETOPTIONS #undef CURL_DISABLE_MQTT #undef CURL_DISABLE_SOCKETPAIR +#undef CURL_DISABLE_HEADERS_API +#undef CURL_DISABLE_HSTS +#undef CURL_DISABLE_NTLM /* Diabled features. */ @@ -104,8 +107,6 @@ #undef USE_LIBPSL #undef USE_MANUAL #undef USE_MBEDTLS -#undef USE_MESALINK -#undef USE_METALINK #undef USE_NGHTTP2 #undef USE_NGHTTP3 #undef USE_NGTCP2 @@ -115,10 +116,10 @@ #undef USE_QUICHE #undef USE_BEARSSL #undef USE_GSASL -#undef USE_HSTS #undef USE_HYPER #undef USE_RUSTLS #undef USE_WOLFSSH +#undef USE_MSH3 /* Specific for (non-) Linux. */ @@ -202,6 +203,9 @@ # define HAVE_TERMIOS_H 1 # define HAVE_UTIMES 1 # define HAVE_SUSECONDS_T 1 +# define HAVE_FCHMOD 1 +# define HAVE_NETINET_UDP_H 1 +# define HAVE_SENDMSG 1 # define CURL_SA_FAMILY_T sa_family_t # define GETHOSTNAME_TYPE_ARG2 size_t @@ -230,7 +234,6 @@ # define HAVE_SYS_UTIME_H 1 # define HAVE_WINDOWS_H 1 # define HAVE_WINSOCK2_H 1 -# define HAVE_WINSOCK_H 1 # undef _UNICODE # undef UNICODE @@ -290,6 +293,7 @@ # define HAVE_VARIADIC_MACROS_GCC 1 # define HAVE_OPENSSL_SRP 1 # define HAVE_FTRUNCATE 1 +# define HAVE_SCHED_YIELD 1 # define TIME_WITH_SYS_TIME 1 #else @@ -318,10 +322,8 @@ #define HAVE_GETPEERNAME 1 #define HAVE_GETSOCKNAME 1 #define HAVE_LONGLONG 1 -#define HAVE_OPENSSL_VERSION 1 #define HAVE_SOCKET 1 #define HAVE_SELECT 1 -#define HAVE_SIG_ATOMIC_T 1 #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 #define HAVE_STRDUP 1 #define HAVE_STRTOLL 1 @@ -332,8 +334,25 @@ #define HAVE_TIME_H 1 #define HAVE_UTIME 1 #define HAVE_VARIADIC_MACROS_C99 1 +#define HAVE_STRICMP 1 -#define STDC_HEADERS 1 +/* , _Atomic, atomic_*, etc + * + * @@ TMP Note that upstream's package version 7.84.0 fails to compile with + * older versions of Clang with the 'unknown builtin' error (trying to + * use __builtin_ia32_pause()). At the time of this writing this issue + * is fixed but the fixed version is not released yet. When it is + * released, drop the check and define HAVE_ATOMIC + * unconditionally. Until then the curl_global_*() functions will be + * thread-unsafe for Clang versions prior to 6.0 (as they are for + * libcurl versions prior to 7.84.0). + */ +#if !defined(__STDC_NO_ATOMICS__) && \ + (!defined(__clang__) || __clang_major__ >= 6) +# define HAVE_ATOMIC 1 +#endif + +#define STDC_HEADERS 1 #undef _ALL_SOURCE #undef _LARGE_FILES @@ -357,13 +376,10 @@ #undef HAVE_PROTO_BSDSOCKET_H #undef HAVE_RAND_EGD #undef HAVE_SETSOCKOPT_SO_NONBLOCK -#undef HAVE_SIG_ATOMIC_T_VOLATILE -#undef HAVE_SSLV2_CLIENT_METHOD #undef HAVE_STRCMPI #undef HAVE_STROPTS_H #undef HAVE_TERMIO_H #undef HAVE_TIME_T_UNSIGNED -#undef HAVE_WOLFSSLV3_CLIENT_METHOD #undef HAVE_WOLFSSL_GET_PEER_CERTIFICATE #undef HAVE_WOLFSSL_USEALPN #undef HAVE_WRITABLE_ARGV @@ -376,18 +392,9 @@ #undef HAVE_CLOSE_S #undef HAVE_EXTRA_STRDUP_H #undef HAVE_EXTRA_STRICMP_H -#undef HAVE_LIBSSH2_VERSION #undef HAVE_SSL_GET_SHUTDOWN -#undef HAVE_VXWORKS_STRERROR_R #undef RECVFROM_TYPE_ARG6_IS_VOID -#undef HAVE_GETNAMEINFO -#undef GETNAMEINFO_QUAL_ARG1 -#undef GETNAMEINFO_TYPE_ARG1 -#undef GETNAMEINFO_TYPE_ARG2 -#undef GETNAMEINFO_TYPE_ARG46 -#undef GETNAMEINFO_TYPE_ARG7 - #undef HAVE_RECVFROM #undef RECVFROM_TYPE_ARG1 #undef RECVFROM_TYPE_ARG2 @@ -397,9 +404,6 @@ #undef RECVFROM_TYPE_ARG6 #undef RECVFROM_TYPE_RETV -#undef HAVE_ICONV -#undef CURL_ICONV_CODESET_OF_HOST - #undef NEED_MEMORY_H #undef NEED_REENTRANT #undef NEED_THREAD_SAFE @@ -412,8 +416,6 @@ #undef CURLDEBUG #undef DEBUGBUILD #undef ENABLE_QUIC -#undef OPEN_NEEDS_ARG3 -#undef CURL_DOES_CONVERSIONS /* While upstream defines the macro for Clang, it fails to build for older * version of Clang on Mac OS. Thus, we never define it. @@ -501,7 +503,6 @@ */ #define SIZEOF_CURL_OFF_T 8 -#define RETSIGTYPE void #define SEND_QUAL_ARG2 const /* We can probably assume that on platforms we build for, these keywords, @@ -522,6 +523,6 @@ #undef LONG_MAX #undef LONG_MIN -*/ + */ #endif /* LIBCURL_CURL_CONFIG_H */ diff --git a/libcurl/manifest b/libcurl/manifest index 34e6ca5..790b3d7 100644 --- a/libcurl/manifest +++ b/libcurl/manifest @@ -1,7 +1,8 @@ : 1 name: libcurl -version: 7.76.0 +version: 7.84.0-a.0.z project: curl +priority: security summary: C library for transferring data with URLs license: curl ; MIT/X derivate license. topics: C, HTTP, FTP, URL, data transfer @@ -10,7 +11,7 @@ url: https://curl.se/ doc-url: https://curl.se/libcurl/c/ src-url: https://git.build2.org/cgit/packaging/curl/curl/tree/libcurl/ package-url: https://git.build2.org/cgit/packaging/curl/ -email: curl-library@cool.haxx.se ; Mailing list. +email: curl-library@lists.haxx.se ; Mailing list. package-email: packaging@build2.org ; Mailing list. build-warning-email: builds@build2.org builds: all diff --git a/upstream b/upstream index 3266b35..45ac4d0 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit 3266b35bbe21c68dea0dc7ccd991eb028e6d360c +Subproject commit 45ac4d019475df03562fe0ac54eb67e1d1de0ca7 -- cgit v1.1