git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 09/13] git-curl-compat: remove check for curl 7.56.0

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 11, 2024, 06:48 UTC
Message-ID
<ZwjKTJye2OmQClSW@pks.im>
In-Reply-To
<20241010235621.738239-10-sandals@crustytoothpaste.net>
On Thu, Oct 10, 2024 at 11:56:17PM +0000, brian m. carlson wrote:
Show 55 quoted lines
> libcurl 7.56.0 was released in September 2017, which is over seven years
> ago, and no major operating system vendor is still providing security
> support for it.  Debian 10, which is out of mainstream security support,
> has supported a newer version, and Ubuntu 20.04 and RHEL 8, which are
> still in support, also have a newer version.
> 
> Remove the check for this version and use this functionality
> unconditionally.
> 
> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
> ---
>  git-curl-compat.h | 8 --------
>  http.c            | 2 --
>  2 files changed, 10 deletions(-)
> 
> diff --git a/git-curl-compat.h b/git-curl-compat.h
> index 65ba1ee0f8..703756ba85 100644
> --- a/git-curl-compat.h
> +++ b/git-curl-compat.h
> @@ -28,14 +28,6 @@
>   * introduced, oldest first, in the official version of cURL library.
>   */
>  
> -/**
> - * CURLSSLSET_{NO_BACKENDS,OK,TOO_LATE,UNKNOWN_BACKEND} were added in
> - * 7.56.0, released in September 2017.
> - */
> -#if LIBCURL_VERSION_NUM >= 0x073800
> -#define GIT_CURL_HAVE_CURLSSLSET_NO_BACKENDS
> -#endif
> -
>  /**
>   * Versions before curl 7.66.0 (September 2019) required manually setting the
>   * transfer-encoding for a streaming POST; after that this is handled
> diff --git a/http.c b/http.c
> index c5fdf1cd4c..4d59f11ad2 100644
> --- a/http.c
> +++ b/http.c
> @@ -1275,7 +1275,6 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
>  	free(normalized_url);
>  	string_list_clear(&config.vars, 1);
>  
> -#ifdef GIT_CURL_HAVE_CURLSSLSET_NO_BACKENDS
>  	if (http_ssl_backend) {
>  		const curl_ssl_backend **backends;
>  		struct strbuf buf = STRBUF_INIT;
> @@ -1300,7 +1299,6 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
>  			break; /* Okay! */
>  		}
>  	}
> -#endif
>  
>  	if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK)
>  		die("curl_global_init failed");
> 

I wonder whether we want to have something like the below patch to give people a better error message in case they have a version that is too old now.

Other than that I agree with the sentiment of this patch series. Supporting ancient dependency versions that aren't used by any still-supported and available distro doesn't feel sensible to me, and scenarios like this are why we have introduced the platform support policy in the first place.

Patrick
diff --git a/git-curl-compat.h b/git-curl-compat.h
index e1d0bdd2735..d65b5f55126 100644
--- a/git-curl-compat.h
+++ b/git-curl-compat.h
@@ -143,4 +143,8 @@
 #define GIT_CURL_HAVE_CURLOPT_PROTOCOLS_STR 1
 #endif
 
+#if LIBCURL_VERSION_NUM < 0x073d00
+# error "Your version of curl is too old. You need to have at least curl 7.61.0"
+#endif
+
 #endif
Previous: brian m. carlsonNext: Jeff King
Message 10 of 56 in “Update versions of libcurl and Perl”
  1. 00/13 Update versions of libcurl and Perlbrian m. carlson, Oct 10, 2024
  2. 01/13 git-curl-compat: remove check for curl 7.21.5brian m. carlson, Oct 10, 2024
  3. 02/13 git-curl-compat: remove check for curl 7.25.0brian m. carlson, Oct 10, 2024
  4. 03/13 git-curl-compat: remove check for curl 7.34.0brian m. carlson, Oct 10, 2024
  5. 04/13 git-curl-compat: remove check for curl 7.39.0brian m. carlson, Oct 10, 2024
  6. 05/13 git-curl-compat: remove check for curl 7.43.0brian m. carlson, Oct 10, 2024
  7. 06/13 git-curl-compat: remove check for curl 7.44.0brian m. carlson, Oct 10, 2024
  8. 07/13 git-curl-compat: remove check for curl 7.52.0brian m. carlson, Oct 10, 2024
  9. 09/13 git-curl-compat: remove check for curl 7.56.0brian m. carlson, Oct 10, 2024
  10. Patrick SteinhardtOct 11, 2024
  11. Jeff KingOct 11, 2024
  12. Patrick SteinhardtOct 11, 2024
  13. Junio C HamanoOct 11, 2024
  14. 10/13 INSTALL: document requirement for libcurl 7.61.0brian m. carlson, Oct 10, 2024
  15. 12/13 INSTALL: require Perl 5.26.0brian m. carlson, Oct 10, 2024
  16. Oswald BuddenhagenOct 11, 2024
  17. brian m. carlsonOct 15, 2024
  18. 11/13 Require Perl 5.26.0brian m. carlson, Oct 10, 2024
  19. 08/13 git-curl-compat: remove check for curl 7.53.0brian m. carlson, Oct 10, 2024
  20. 13/13 gitweb: make use of s///rbrian m. carlson, Oct 10, 2024
  21. Jeff KingOct 11, 2024
  22. Junio C HamanoOct 11, 2024
  23. Eric SunshineOct 11, 2024
  24. Junio C HamanoOct 11, 2024
  25. Alejandro R. SedeñoOct 11, 2024
  26. Eric SunshineOct 11, 2024
  27. brian m. carlsonOct 11, 2024
  28. Eric SunshineOct 15, 2024
  29. Taylor BlauOct 15, 2024
  30. brian m. carlsonOct 15, 2024
  31. Alejandro R. SedeñoOct 16, 2024
  32. Eli SchwartzOct 22, 2024
  33. brian m. carlsonOct 22, 2024
  34. Alejandro R. SedeñoOct 11, 2024
  35. Junio C HamanoOct 11, 2024
  36. Alejandro R. SedeñoOct 14, 2024
  37. Patrick SteinhardtOct 17, 2024
  38. 00/12 Update versions of libcurl and Perlbrian m. carlson, Oct 23, 2024
  39. 04/12 git-curl-compat: remove check for curl 7.39.0brian m. carlson, Oct 23, 2024
  40. 03/12 git-curl-compat: remove check for curl 7.34.0brian m. carlson, Oct 23, 2024
  41. 01/12 git-curl-compat: remove check for curl 7.21.5brian m. carlson, Oct 23, 2024
  42. 02/12 git-curl-compat: remove check for curl 7.25.0brian m. carlson, Oct 23, 2024
  43. 05/12 git-curl-compat: remove check for curl 7.43.0brian m. carlson, Oct 23, 2024
  44. 06/12 git-curl-compat: remove check for curl 7.44.0brian m. carlson, Oct 23, 2024
  45. 08/12 git-curl-compat: remove check for curl 7.53.0brian m. carlson, Oct 23, 2024
  46. 09/12 git-curl-compat: remove check for curl 7.56.0brian m. carlson, Oct 23, 2024
  47. 12/12 gitweb: make use of s///rbrian m. carlson, Oct 23, 2024
  48. Oswald BuddenhagenOct 23, 2024
  49. brian m. carlsonOct 24, 2024
  50. 10/12 INSTALL: document requirement for libcurl 7.61.0brian m. carlson, Oct 23, 2024
  51. 11/12 Require Perl 5.26.0brian m. carlson, Oct 23, 2024
  52. rsbecker@nexbridge.comOct 23, 2024
  53. 07/12 git-curl-compat: remove check for curl 7.52.0brian m. carlson, Oct 23, 2024
  54. Taylor BlauOct 23, 2024
  55. Patrick SteinhardtOct 24, 2024
  56. brian m. carlsonOct 24, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.