Skip to content
Snippets Groups Projects
Commit e4c0cf96 authored by Rocky Automation's avatar Rocky Automation :tv:
Browse files

import curl-8.6.0-6.el10

parents
No related branches found
Tags imports/r10s/curl-8.6.0-6.el10
No related merge requests found
Direct Git Import
3ccd55d91af9516539df80625f818c734dc6f2ecf9bada33c76765e99121db15 SOURCES/curl-8.6.0.tar.xz
64619d3c1a2b68da837014b2ab02a049ed2c69aaebfa10a20a4f29dab003ecb8 SOURCES/mykey.asc
From 960cf3ceb40cf875b146d4d1065d9267ccb83da1 Mon Sep 17 00:00:00 2001
From: Jan Macku <jamacku@redhat.com>
Date: Thu, 1 Feb 2024 12:56:31 +0100
Subject: [PATCH 1/2] doc: remove duplicate content from curl-config.1
This will be resolved in next release by:
https://github.com/curl/curl/pull/12818
see also: https://github.com/curl/curl/issues/12840
Signed-off-by: Jan Macku <jamacku@redhat.com>
---
docs/curl-config.1 | 82 ----------------------------------------------
1 file changed, 82 deletions(-)
diff --git a/docs/curl-config.1 b/docs/curl-config.1
index 186ba3a..c142cb9 100644
--- a/docs/curl-config.1
+++ b/docs/curl-config.1
@@ -80,85 +80,3 @@ How do I build a single file with a one\-line command?
.fi
.SH SEE ALSO
.BR curl (1)
-.\" generated by cd2nroff 0.1 from curl-config.md
-.TH curl-config 1 "January 26 2024" curl-config
-.SH NAME
-curl\-config \- Get information about a libcurl installation
-.SH SYNOPSIS
-\fBcurl\-config [options]\fP
-.SH DESCRIPTION
-\fBcurl\-config\fP
-displays information about the curl and libcurl installation.
-.SH OPTIONS
-.IP --ca
-Displays the built\-in path to the CA cert bundle this libcurl uses.
-.IP --cc
-Displays the compiler used to build libcurl.
-.IP --cflags
-Set of compiler options (CFLAGS) to use when compiling files that use
-libcurl. Currently that is only the include path to the curl include files.
-.IP "--checkfor [version]"
-Specify the oldest possible libcurl version string you want, and this
-script will return 0 if the current installation is new enough or it
-returns 1 and outputs a text saying that the current version is not new
-enough. (Added in 7.15.4)
-.IP --configure
-Displays the arguments given to configure when building curl.
-.IP --feature
-Lists what particular main features the installed libcurl was built with. At
-the time of writing, this list may include SSL, KRB4 or IPv6. Do not assume
-any particular order. The keywords will be separated by newlines. There may be
-none, one, or several keywords in the list.
-.IP --help
-Displays the available options.
-.IP --libs
-Shows the complete set of libs and other linker options you will need in order
-to link your application with libcurl.
-.IP --prefix
-This is the prefix used when libcurl was installed. Libcurl is then installed
-in $prefix/lib and its header files are installed in $prefix/include and so
-on. The prefix is set with "configure \--prefix".
-.IP --protocols
-Lists what particular protocols the installed libcurl was built to support. At
-the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE,
-TELNET, LDAP, DICT and many more. Do not assume any particular order. The
-protocols will be listed using uppercase and are separated by newlines. There
-may be none, one, or several protocols in the list. (Added in 7.13.0)
-.IP --ssl-backends
-Lists the SSL backends that were enabled when libcurl was built. It might be
-no, one or several names. If more than one name, they will appear
-comma\-separated. (Added in 7.58.0)
-.IP --static-libs
-Shows the complete set of libs and other linker options you will need in order
-to link your application with libcurl statically. (Added in 7.17.1)
-.IP --version
-Outputs version information about the installed libcurl.
-.IP --vernum
-Outputs version information about the installed libcurl, in numerical mode.
-This shows the version number, in hexadecimal, using 8 bits for each part:
-major, minor, and patch numbers. This makes libcurl 7.7.4 appear as 070704 and
-libcurl 12.13.14 appear as 0c0d0e... Note that the initial zero might be
-omitted. (This option was broken in the 7.15.0 release.)
-.SH EXAMPLES
-What linker options do I need when I link with libcurl?
-.nf
- $ curl-config --libs
-.fi
-What compiler options do I need when I compile using libcurl functions?
-.nf
- $ curl-config --cflags
-.fi
-How do I know if libcurl was built with SSL support?
-.nf
- $ curl-config --feature | grep SSL
-.fi
-What\(aqs the installed libcurl version?
-.nf
- $ curl-config --version
-.fi
-How do I build a single file with a one\-line command?
-.nf
- $ `curl-config --cc --cflags` -o example source.c `curl-config --libs`
-.fi
-.SH SEE ALSO
-.BR curl (1)
--
2.43.0
From e61ea3ba7054afedafe1eb473226e842ac17b8ff Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Thu, 1 Feb 2024 13:23:12 +0100
Subject: [PATCH] sendf: ignore response body to HEAD
and mark the stream for close, but return OK since the response this far
was ok - if headers were received. Partly because this is what curl has
done traditionally.
Test 499 verifies. Updates test 689.
Reported-by: Sergey Bronnikov
Bug: https://curl.se/mail/lib-2024-02/0000.html
Closes #12842
(cherry picked from commit b8c003832d730bb2f4b9de4204675ca5d9f7a903)
Signed-off-by: Jan Macku <jamacku@redhat.com>
---
lib/sendf.c | 3 ++
tests/data/Makefile.inc | 44 ++++++++++++++--------------
tests/data/test499 | 65 +++++++++++++++++++++++++++++++++++++++++
tests/data/test689 | 4 +--
4 files changed, 92 insertions(+), 24 deletions(-)
create mode 100644 tests/data/test499
diff --git a/lib/sendf.c b/lib/sendf.c
index db3189a29..60ac0742c 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -575,6 +575,9 @@ static CURLcode cw_download_write(struct Curl_easy *data,
DEBUGF(infof(data, "did not want a BODY, but seeing %zu bytes",
nbytes));
data->req.download_done = TRUE;
+ if(data->info.header_size)
+ /* if headers have been received, this is fine */
+ return CURLE_OK;
return CURLE_WEIRD_SERVER_REPLY;
}
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
index c3d496f64..cd393da75 100644
--- a/tests/data/Makefile.inc
+++ b/tests/data/Makefile.inc
@@ -75,28 +75,28 @@ test444 test445 test446 test447 test448 test449 test450 test451 test452 \
test453 test454 test455 test456 test457 test458 test459 test460 test461 \
\
test490 test491 test492 test493 test494 test495 test496 test497 test498 \
-\
-test500 test501 test502 test503 test504 test505 test506 test507 test508 \
-test509 test510 test511 test512 test513 test514 test515 test516 test517 \
-test518 test519 test520 test521 test522 test523 test524 test525 test526 \
-test527 test528 test529 test530 test531 test532 test533 test534 test535 \
- test537 test538 test539 test540 test541 test542 test543 test544 \
-test545 test546 test547 test548 test549 test550 test551 test552 test553 \
-test554 test555 test556 test557 test558 test559 test560 test561 test562 \
-test563 test564 test565 test566 test567 test568 test569 test570 test571 \
-test572 test573 test574 test575 test576 test577 test578 test579 test580 \
-test581 test582 test583 test584 test585 test586 test587 test588 test589 \
-test590 test591 test592 test593 test594 test595 test596 test597 test598 \
-test599 test600 test601 test602 test603 test604 test605 test606 test607 \
-test608 test609 test610 test611 test612 test613 test614 test615 test616 \
-test617 test618 test619 test620 test621 test622 test623 test624 test625 \
-test626 test627 test628 test629 test630 test631 test632 test633 test634 \
-test635 test636 test637 test638 test639 test640 test641 test642 test643 \
-test644 test645 test646 test647 test648 test649 test650 test651 test652 \
-test653 test654 test655 test656 test658 test659 test660 test661 test662 \
-test663 test664 test665 test666 test667 test668 test669 test670 test671 \
-test672 test673 test674 test675 test676 test677 test678 test679 test680 \
-test681 test682 test683 test684 test685 test686 test687 test688 test689 \
+test499 test500 test501 test502 test503 test504 test505 test506 test507 \
+test508 test509 test510 test511 test512 test513 test514 test515 test516 \
+test517 test518 test519 test520 test521 test522 test523 test524 test525 \
+test526 test527 test528 test529 test530 test531 test532 test533 test534 \
+test535 test537 test538 test539 test540 test541 test542 test543 \
+test544 test545 test546 test547 test548 test549 test550 test551 test552 \
+test553 test554 test555 test556 test557 test558 test559 test560 test561 \
+test562 test563 test564 test565 test566 test567 test568 test569 test570 \
+test571 test572 test573 test574 test575 test576 test577 test578 test579 \
+test580 test581 test582 test583 test584 test585 test586 test587 test588 \
+test589 test590 test591 test592 test593 test594 test595 test596 test597 \
+test598 test599 test600 test601 test602 test603 test604 test605 test606 \
+test607 test608 test609 test610 test611 test612 test613 test614 test615 \
+test616 test617 test618 test619 test620 test621 test622 test623 test624 \
+test625 test626 test627 test628 test629 test630 test631 test632 test633 \
+test634 test635 test636 test637 test638 test639 test640 test641 test642 \
+test643 test644 test645 test646 test647 test648 test649 test650 test651 \
+test652 test653 test654 test655 test656 test658 test659 test660 test661 \
+test662 test663 test664 test665 test666 test667 test668 test669 test670 \
+test671 test672 test673 test674 test675 test676 test677 test678 test679 \
+test680 test681 test682 test683 test684 test685 test686 test687 test688 \
+test689 \
\
test700 test701 test702 test703 test704 test705 test706 test707 test708 \
test709 test710 test711 test712 test713 test714 test715 test716 test717 \
diff --git a/tests/data/test499 b/tests/data/test499
new file mode 100644
index 000000000..d4040b07c
--- /dev/null
+++ b/tests/data/test499
@@ -0,0 +1,65 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data crlf="yes" nocheck="yes">
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+<datacheck crlf="yes">
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+</datacheck>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<name>
+HTTP HEAD to server still sending a body
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -I
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol crlf="yes">
+HEAD /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test689 b/tests/data/test689
index 821556dec..381ae225a 100644
--- a/tests/data/test689
+++ b/tests/data/test689
@@ -44,9 +44,9 @@ User-Agent: test567
Test-Number: 567
</protocol>
-# 8 == CURLE_WEIRD_SERVER_REPLY
+# 85 == CURLE_RTSP_CSEQ_ERROR
<errorcode>
-8
+85
</errorcode>
</verify>
--
2.43.0
From 0f65eaab19624ca018d7bd5ca404618f9bfe267f Mon Sep 17 00:00:00 2001
From: Stefan Eissing <stefan@eissing.org>
Date: Thu, 1 Feb 2024 18:15:50 +0100
Subject: [PATCH] vtls: revert "receive max buffer" + add test case
- add test_05_04 for requests using http/1.0, http/1.1 and h2 against an
Apache resource that does an unclean TLS shutdown.
- revert special workarund in openssl.c for suppressing shutdown errors
on multiplexed connections
- vlts.c restore to its state before 9a90c9dd64d2f03601833a70786d485851bd1b53
Fixes #12885
Fixes #12844
Closes #12848
(cherry picked from commit ed09a99af57200643d5ae001e815eeab9ffe3f84)
Signed-off-by: Jan Macku <jamacku@redhat.com>
---
lib/vtls/vtls.c | 27 ++++++---------------------
1 file changed, 6 insertions(+), 21 deletions(-)
diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
index e928ba5d0..f654a9749 100644
--- a/lib/vtls/vtls.c
+++ b/lib/vtls/vtls.c
@@ -1715,32 +1715,17 @@ static ssize_t ssl_cf_recv(struct Curl_cfilter *cf,
{
struct cf_call_data save;
ssize_t nread;
- size_t ntotal = 0;
CF_DATA_SAVE(save, cf, data);
*err = CURLE_OK;
- /* Do receive until we fill the buffer somehwhat or EGAIN, error or EOF */
- while(!ntotal || (len - ntotal) > (4*1024)) {
+ nread = Curl_ssl->recv_plain(cf, data, buf, len, err);
+ if(nread > 0) {
+ DEBUGASSERT((size_t)nread <= len);
+ }
+ else if(nread == 0) {
+ /* eof */
*err = CURLE_OK;
- nread = Curl_ssl->recv_plain(cf, data, buf + ntotal, len - ntotal, err);
- if(nread < 0) {
- if(*err == CURLE_AGAIN && ntotal > 0) {
- /* we EAGAINed after having reed data, return the success amount */
- *err = CURLE_OK;
- break;
- }
- /* we have a an error to report */
- goto out;
- }
- else if(nread == 0) {
- /* eof */
- break;
- }
- ntotal += (size_t)nread;
- DEBUGASSERT((size_t)ntotal <= len);
}
- nread = (ssize_t)ntotal;
-out:
CURL_TRC_CF(data, cf, "cf_recv(len=%zu) -> %zd, %d", len,
nread, *err);
CF_DATA_RESTORE(cf, save);
--
2.43.0
From 84b7e1cf486761e99361f5dcf5879cd7baf51b58 Mon Sep 17 00:00:00 2001
From: Jan Macku <jamacku@redhat.com>
Date: Thu, 1 Feb 2024 13:01:23 +0100
Subject: [PATCH 2/2] prevent multilib conflicts on the curl-config script
---
curl-config.in | 23 +++++------------------
docs/curl-config.1 | 4 +++-
libcurl.pc.in | 1 +
3 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/curl-config.in b/curl-config.in
index 54f92d9..15a60da 100644
--- a/curl-config.in
+++ b/curl-config.in
@@ -78,7 +78,7 @@ while test $# -gt 0; do
;;
--cc)
- echo "@CC@"
+ echo "gcc"
;;
--prefix)
@@ -157,32 +157,19 @@ while test $# -gt 0; do
;;
--libs)
- if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
- CURLLIBDIR="-L@libdir@ "
- else
- CURLLIBDIR=""
- fi
- if test "X@ENABLE_SHARED@" = "Xno"; then
- echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@
- else
- echo ${CURLLIBDIR}-lcurl
- fi
+ echo -lcurl
;;
--ssl-backends)
echo "@SSL_BACKENDS@"
;;
--static-libs)
- if test "X@ENABLE_STATIC@" != "Xno" ; then
- echo "@libdir@/libcurl.@libext@" @LDFLAGS@ @LIBCURL_LIBS@
- else
- echo "curl was built with static libraries disabled" >&2
- exit 1
- fi
+ echo "curl was built with static libraries disabled" >&2
+ exit 1
;;
--configure)
- echo @CONFIGURE_OPTIONS@
+ pkg-config libcurl --variable=configure_options | sed 's/^"//;s/"$//'
;;
*)
diff --git a/docs/curl-config.1 b/docs/curl-config.1
index c142cb9..0e189b4 100644
--- a/docs/curl-config.1
+++ b/docs/curl-config.1
@@ -48,7 +48,9 @@ no, one or several names. If more than one name, they will appear
comma\-separated. (Added in 7.58.0)
.IP --static-libs
Shows the complete set of libs and other linker options you will need in order
-to link your application with libcurl statically. (Added in 7.17.1)
+to link your application with libcurl statically. Note that Fedora/RHEL libcurl
+packages do not provide any static libraries, thus cannot be linked statically.
+(Added in 7.17.1)
.IP --version
Outputs version information about the installed libcurl.
.IP --vernum
diff --git a/libcurl.pc.in b/libcurl.pc.in
index 9db6b0f..dcac692 100644
--- a/libcurl.pc.in
+++ b/libcurl.pc.in
@@ -31,6 +31,7 @@ libdir=@libdir@
includedir=@includedir@
supported_protocols="@SUPPORT_PROTOCOLS@"
supported_features="@SUPPORT_FEATURES@"
+configure_options=@CONFIGURE_OPTIONS@
Name: libcurl
URL: https://curl.se/
--
2.43.0
From 279b990727a1fd3e2828fbbd80581777e4200b67 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 27 Jun 2022 16:50:57 +0200
Subject: [PATCH] test3026: disable valgrind
It fails on x86_64 with:
```
Use --max-threads=INT to specify a larger number of threads
and rerun valgrind
valgrind: the 'impossible' happened:
Max number of threads is too low
host stacktrace:
==174357== at 0x58042F5A: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)
==174357== by 0x58043087: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)
==174357== by 0x580432EF: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)
==174357== by 0x58043310: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)
==174357== by 0x58099E77: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)
==174357== by 0x580E67E9: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)
==174357== by 0x5809D59D: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)
==174357== by 0x5809901A: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)
==174357== by 0x5809B0B6: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)
==174357== by 0x580E4050: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)
sched status:
running_tid=1
Thread 1: status = VgTs_Runnable syscall 56 (lwpid 174357)
==174357== at 0x4A07816: clone (in /usr/lib64/libc.so.6)
==174357== by 0x4A08720: __clone_internal (in /usr/lib64/libc.so.6)
==174357== by 0x4987ACF: create_thread (in /usr/lib64/libc.so.6)
==174357== by 0x49885F6: pthread_create@@GLIBC_2.34 (in /usr/lib64/libc.so.6)
==174357== by 0x1093B5: test.part.0 (lib3026.c:64)
==174357== by 0x492454F: (below main) (in /usr/lib64/libc.so.6)
client stack range: [0x1FFEFFC000 0x1FFF000FFF] client SP: 0x1FFEFFC998
valgrind stack range: [0x1002BAA000 0x1002CA9FFF] top usage: 11728 of 1048576
[...]
```
---
tests/data/test3026 | 3 +++
tests/libtest/lib3026.c | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/data/test3026 b/tests/data/test3026
index fb80cc8..01f2ba5 100644
--- a/tests/data/test3026
+++ b/tests/data/test3026
@@ -41,5 +41,8 @@ none
<errorcode>
0
</errorcode>
+<valgrind>
+disable
+</valgrind>
</verify>
</testcase>
diff --git a/tests/libtest/lib3026.c b/tests/libtest/lib3026.c
index 43fe335..70cd7a4 100644
--- a/tests/libtest/lib3026.c
+++ b/tests/libtest/lib3026.c
@@ -147,8 +147,8 @@ int test(char *URL)
results[i] = CURL_LAST; /* initialize with invalid value */
res = pthread_create(&tids[i], NULL, run_thread, &results[i]);
if(res) {
- fprintf(stderr, "%s:%d Couldn't create thread, errno %d\n",
- __FILE__, __LINE__, res);
+ fprintf(stderr, "%s:%d Couldn't create thread, i=%u, errno %d\n",
+ __FILE__, __LINE__, i, res);
tid_count = i;
test_failure = -1;
goto cleanup;
--
2.37.1
From d506d885aa16b4a87acbac082eea41dccdc7b69f Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Wed, 15 Feb 2023 10:42:38 +0100
Subject: [PATCH] Revert "runtests: consider warnings fatal and error on them"
While it might be useful for upstream developers, it is not so useful
for downstream consumers.
This reverts upstream commit 22f795c834cfdbacbb1b55426028a581e3cf67a8.
---
tests/runtests.pl | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 71644ad18..0cf85c3fe 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -55,8 +55,7 @@
# given, this won't be a problem.
use strict;
-# Promote all warnings to fatal
-use warnings FATAL => 'all';
+use warnings;
use 5.006;
# These should be the only variables that might be needed to get edited:
--
2.39.1
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAmW58RcACgkQXMkI/bce
EsKLvgf9Em0etBEnbJzkhmCiKUOfn3sTKhIHA4y1/O+anaNfEx0E89VUQuFZRcUz
i4ENOVjTXxVy4zZUobOOWz7RXrvv6XnX9A++RYkBoEk4mmNB3A6ShsTeCR2mS4yi
dL5UfH2YEu7B6x/ONROKKuGawsqw0D6wzVgrD+J1e8Bu+1P8YOUqsQWVJmJFlYMN
2A8NP4GZHnmP3rnupx1RY3/MgJU0FjlQ428BOA7PIiYKEVto0dp6cqd4AQsLgQPy
J1RBcge1Uwqe+k/IenUx7bUaQfr+NY34ryrMxbLPghPimfeyjjsDxyr+OwoQM1aw
64WqLXBgQmhluT0STyHdD0Tc/JHYrw==
=GboB
-----END PGP SIGNATURE-----
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment