* [Buildroot] [PATCH v2] package/libcurl: fix build with GnuTLS and no verbose
@ 2023-12-22 5:46 Baruch Siach via buildroot
2023-12-23 10:29 ` Yann E. MORIN
2024-01-07 22:27 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Baruch Siach via buildroot @ 2023-12-22 5:46 UTC (permalink / raw)
To: buildroot
A change of data logging introduced in version 8.5.0 broke the build.
Add a patch to fix that.
Fixes:
http://autobuild.buildroot.net/results/c5b996696333c4ff1392dbb8e6b0edc9c5322ee4/
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
v2: Take upstream patch
---
...nutls-fix-build-with-disable-verbose.patch | 60 +++++++++++++++++++
1 file changed, 60 insertions(+)
create mode 100644 package/libcurl/0001-gnutls-fix-build-with-disable-verbose.patch
diff --git a/package/libcurl/0001-gnutls-fix-build-with-disable-verbose.patch b/package/libcurl/0001-gnutls-fix-build-with-disable-verbose.patch
new file mode 100644
index 000000000000..25e389c9724e
--- /dev/null
+++ b/package/libcurl/0001-gnutls-fix-build-with-disable-verbose.patch
@@ -0,0 +1,60 @@
+From 0d9f9c5ea8c15c70eb420242b60179d9083c70b7 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Mon, 11 Dec 2023 20:45:01 +0200
+Subject: [PATCH] gnutls: fix build with --disable-verbose
+
+infof() parameters must be defined event with --disable-verbose since
+commit dac293cfb702 ("lib: apache style infof and trace
+macros/functions").
+
+Move also 'ptr' definition under !CURL_DISABLE_VERBOSE_STRINGS.
+
+Fixes the following build failure:
+
+In file included from ../lib/sendf.h:29,
+ from vtls/gtls.c:44:
+vtls/gtls.c: In function 'Curl_gtls_verifyserver':
+vtls/gtls.c:841:34: error: 'version' undeclared (first use in this function); did you mean 'session'?
+ 841 | gnutls_protocol_get_name(version), ptr);
+ | ^~~~~~~
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+Upstream: https://github.com/curl/curl/commit/af520ac9fec7d88e942f05fdcd90704adb9fa566
+---
+ lib/vtls/gtls.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c
+index f42b6d6691de..b95c5be3c5e5 100644
+--- a/lib/vtls/gtls.c
++++ b/lib/vtls/gtls.c
+@@ -818,16 +818,17 @@ Curl_gtls_verifyserver(struct Curl_easy *data,
+ char certname[65] = ""; /* limited to 64 chars by ASN.1 */
+ size_t size;
+ time_t certclock;
+- const char *ptr;
+ int rc;
+ CURLcode result = CURLE_OK;
+ #ifndef CURL_DISABLE_VERBOSE_STRINGS
++ const char *ptr;
+ unsigned int algo;
+ unsigned int bits;
+ gnutls_protocol_t version = gnutls_protocol_get_version(session);
+ #endif
+ long * const certverifyresult = &ssl_config->certverifyresult;
+
++#ifndef CURL_DISABLE_VERBOSE_STRINGS
+ /* the name of the cipher suite used, e.g. ECDHE_RSA_AES_256_GCM_SHA384. */
+ ptr = gnutls_cipher_suite_get_name(gnutls_kx_get(session),
+ gnutls_cipher_get(session),
+@@ -835,6 +836,7 @@ Curl_gtls_verifyserver(struct Curl_easy *data,
+
+ infof(data, "SSL connection using %s / %s",
+ gnutls_protocol_get_name(version), ptr);
++#endif
+
+ /* This function will return the peer's raw certificate (chain) as sent by
+ the peer. These certificates are in raw format (DER encoded for
+--
+2.43.0
+
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Buildroot] [PATCH v2] package/libcurl: fix build with GnuTLS and no verbose
2023-12-22 5:46 [Buildroot] [PATCH v2] package/libcurl: fix build with GnuTLS and no verbose Baruch Siach via buildroot
@ 2023-12-23 10:29 ` Yann E. MORIN
2024-01-07 22:27 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2023-12-23 10:29 UTC (permalink / raw)
To: Baruch Siach; +Cc: buildroot
Bruch, All,
On 2023-12-22 07:46 +0200, Baruch Siach via buildroot spake thusly:
> A change of data logging introduced in version 8.5.0 broke the build.
> Add a patch to fix that.
>
> Fixes:
> http://autobuild.buildroot.net/results/c5b996696333c4ff1392dbb8e6b0edc9c5322ee4/
>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> v2: Take upstream patch
> ---
> ...nutls-fix-build-with-disable-verbose.patch | 60 +++++++++++++++++++
> 1 file changed, 60 insertions(+)
> create mode 100644 package/libcurl/0001-gnutls-fix-build-with-disable-verbose.patch
>
> diff --git a/package/libcurl/0001-gnutls-fix-build-with-disable-verbose.patch b/package/libcurl/0001-gnutls-fix-build-with-disable-verbose.patch
> new file mode 100644
> index 000000000000..25e389c9724e
> --- /dev/null
> +++ b/package/libcurl/0001-gnutls-fix-build-with-disable-verbose.patch
> @@ -0,0 +1,60 @@
> +From 0d9f9c5ea8c15c70eb420242b60179d9083c70b7 Mon Sep 17 00:00:00 2001
> +From: Baruch Siach <baruch@tkos.co.il>
> +Date: Mon, 11 Dec 2023 20:45:01 +0200
> +Subject: [PATCH] gnutls: fix build with --disable-verbose
> +
> +infof() parameters must be defined event with --disable-verbose since
> +commit dac293cfb702 ("lib: apache style infof and trace
> +macros/functions").
> +
> +Move also 'ptr' definition under !CURL_DISABLE_VERBOSE_STRINGS.
> +
> +Fixes the following build failure:
> +
> +In file included from ../lib/sendf.h:29,
> + from vtls/gtls.c:44:
> +vtls/gtls.c: In function 'Curl_gtls_verifyserver':
> +vtls/gtls.c:841:34: error: 'version' undeclared (first use in this function); did you mean 'session'?
> + 841 | gnutls_protocol_get_name(version), ptr);
> + | ^~~~~~~
> +
> +Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> +Upstream: https://github.com/curl/curl/commit/af520ac9fec7d88e942f05fdcd90704adb9fa566
> +---
> + lib/vtls/gtls.c | 4 +++-
> + 1 file changed, 3 insertions(+), 1 deletion(-)
> +
> +diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c
> +index f42b6d6691de..b95c5be3c5e5 100644
> +--- a/lib/vtls/gtls.c
> ++++ b/lib/vtls/gtls.c
> +@@ -818,16 +818,17 @@ Curl_gtls_verifyserver(struct Curl_easy *data,
> + char certname[65] = ""; /* limited to 64 chars by ASN.1 */
> + size_t size;
> + time_t certclock;
> +- const char *ptr;
> + int rc;
> + CURLcode result = CURLE_OK;
> + #ifndef CURL_DISABLE_VERBOSE_STRINGS
> ++ const char *ptr;
> + unsigned int algo;
> + unsigned int bits;
> + gnutls_protocol_t version = gnutls_protocol_get_version(session);
> + #endif
> + long * const certverifyresult = &ssl_config->certverifyresult;
> +
> ++#ifndef CURL_DISABLE_VERBOSE_STRINGS
> + /* the name of the cipher suite used, e.g. ECDHE_RSA_AES_256_GCM_SHA384. */
> + ptr = gnutls_cipher_suite_get_name(gnutls_kx_get(session),
> + gnutls_cipher_get(session),
> +@@ -835,6 +836,7 @@ Curl_gtls_verifyserver(struct Curl_easy *data,
> +
> + infof(data, "SSL connection using %s / %s",
> + gnutls_protocol_get_name(version), ptr);
> ++#endif
> +
> + /* This function will return the peer's raw certificate (chain) as sent by
> + the peer. These certificates are in raw format (DER encoded for
> +--
> +2.43.0
> +
> --
> 2.43.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Buildroot] [PATCH v2] package/libcurl: fix build with GnuTLS and no verbose
2023-12-22 5:46 [Buildroot] [PATCH v2] package/libcurl: fix build with GnuTLS and no verbose Baruch Siach via buildroot
2023-12-23 10:29 ` Yann E. MORIN
@ 2024-01-07 22:27 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-01-07 22:27 UTC (permalink / raw)
To: Baruch Siach via buildroot; +Cc: buildroot
>>>>> "Baruch" == Baruch Siach via buildroot <buildroot@buildroot.org> writes:
> A change of data logging introduced in version 8.5.0 broke the build.
> Add a patch to fix that.
> Fixes:
> http://autobuild.buildroot.net/results/c5b996696333c4ff1392dbb8e6b0edc9c5322ee4/
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> v2: Take upstream patch
Committed to 2023.02.x and 2023.11.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-07 22:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-22 5:46 [Buildroot] [PATCH v2] package/libcurl: fix build with GnuTLS and no verbose Baruch Siach via buildroot
2023-12-23 10:29 ` Yann E. MORIN
2024-01-07 22:27 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox