Gentoo Archives: gentoo-commits

From: "Jakov Smolić" <jsmolic@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/curl/, net-misc/curl/files/
Date: Thu, 05 May 2022 13:46:36
Message-Id: 1651758376.3a94588919324503c7103b12b0417cb8741179aa.jsmolic@gentoo
1 commit: 3a94588919324503c7103b12b0417cb8741179aa
2 Author: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 5 13:46:02 2022 +0000
4 Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
5 CommitDate: Thu May 5 13:46:16 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a945889
7
8 net-misc/curl: Fix compilation with USE=mbedtls,http2
9
10 Closes: https://bugs.gentoo.org/842780
11 Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>
12
13 net-misc/curl/curl-7.83.0.ebuild | 2 ++
14 net-misc/curl/files/curl-7.83.0-http2.patch | 30 +++++++++++++++++++++++++++++
15 2 files changed, 32 insertions(+)
16
17 diff --git a/net-misc/curl/curl-7.83.0.ebuild b/net-misc/curl/curl-7.83.0.ebuild
18 index 150319f8e7d6..041b6cd5a2e4 100644
19 --- a/net-misc/curl/curl-7.83.0.ebuild
20 +++ b/net-misc/curl/curl-7.83.0.ebuild
21 @@ -96,6 +96,8 @@ MULTILIB_CHOST_TOOLS=(
22 PATCHES=(
23 "${FILESDIR}"/${PN}-7.30.0-prefix.patch
24 "${FILESDIR}"/${PN}-respect-cflags-3.patch
25 + # Bug 842780, fixed upstream, drop on next version bump
26 + "${FILESDIR}"/${P}-http2.patch
27 )
28
29 src_prepare() {
30
31 diff --git a/net-misc/curl/files/curl-7.83.0-http2.patch b/net-misc/curl/files/curl-7.83.0-http2.patch
32 new file mode 100644
33 index 000000000000..ede69a177b98
34 --- /dev/null
35 +++ b/net-misc/curl/files/curl-7.83.0-http2.patch
36 @@ -0,0 +1,30 @@
37 +Bug: https://bugs.gentoo.org/842780, https://github.com/curl/curl/pull/8768
38 +https://github.com/curl/curl/commit/6eb7fb37d901ed1e4ce07cbd628ee11bf02db1f3
39 +
40 +From 6eb7fb37d901ed1e4ce07cbd628ee11bf02db1f3 Mon Sep 17 00:00:00 2001
41 +From: Daniel Stenberg <daniel@××××.se>
42 +Date: Thu, 28 Apr 2022 17:11:50 +0200
43 +Subject: [PATCH] mbedtls: fix compile when h2-enabled
44 +
45 +Fixes #8766
46 +Reported-by: LigH-de on github
47 +Closes #8768
48 +---
49 + lib/vtls/mbedtls.c | 4 ++--
50 + 1 file changed, 2 insertions(+), 2 deletions(-)
51 +
52 +diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c
53 +index 64f57c5d8321..5f9b87e6b75b 100644
54 +--- a/lib/vtls/mbedtls.c
55 ++++ b/lib/vtls/mbedtls.c
56 +@@ -815,8 +815,8 @@ mbed_connect_step2(struct Curl_easy *data, struct connectdata *conn,
57 + if(next_protocol) {
58 + infof(data, VTLS_INFOF_ALPN_ACCEPTED_1STR, next_protocol);
59 + #ifdef USE_HTTP2
60 +- if(!strncmp(next_protocol, ALPN_H2, ALPN_H2_LEN) &&
61 +- !next_protocol[ALPN_H2_LEN]) {
62 ++ if(!strncmp(next_protocol, ALPN_H2, ALPN_H2_LENGTH) &&
63 ++ !next_protocol[ALPN_H2_LENGTH]) {
64 + conn->negnpn = CURL_HTTP_VERSION_2;
65 + }
66 + else