Thread (1 message) 1 message, 1 author, 2022-07-01

Re: [PATCH] http: support building on RHEL6

From: Junio C Hamano <hidden>
Date: 2022-07-01 21:32:55

"brian m. carlson" [off-list ref] writes:
On 2022-07-01 at 16:24:06, Johannes Schindelin via GitGitGadget wrote:
quoted
From: Johannes Schindelin <redacted>

There was a bug report attached to the copy of 511cfd3bffa (http: add
custom hostname to IP address resolutions, 2022-05-16) in the `git/git`
repository on GitHub, claiming that that commit broke the build on
RedHat Enterprise Linux 6. The most likely explanation is that the
available cURL version does not support the `CURLOPT_RESOLVE` feature.

Let's work around this by warning the user if they configure
`http.curloptResolve` if compiled against a too-old cURL version.
I don't think it's a good idea to continue to support RHEL 6.  It lost
regular security support in 2020 and I think it's fine and even
preferable to force people to upgrade their OS once every decade.  10
years is, in my view, well beyond the reasonable life span of an OS.

There's no possible way that any Git developer can be expected to
support RHEL 6 because it has no publicly available security support[0] and
we can't expect developers to run or use insecure OSes at all.  It's
also irresponsible of us to enable people to use such an OS considering
the likelihood of compromise is substantial and the risk compromised
systems pose to the Internet, so I think we should drop this patch.
I agree with you that justifying the change to support RHEL6 is a
bad idea, because it is a bad idea to encourage the continued use of
platform that is unsupported by the publisher.

But I do not think the patch text, what the patch does, is that bad.
We advertise in INSTALL that you need 7.19.4 to build without NO_CURL;
IOW, you should be able to build Git with 7.21.3 or later.
[0] Yes, there is _extended_ security support until 2024, but that's not
available to people who aren't already RHEL 6 users and it doesn't cover
dependencies such as libcurl or Perl that are required to effectively
use Git.
It is a different problem if RHEL6 has cURL 7.19.4 or later.  I do
not know the answer to that question.

Taking all of the above into account, I would say that the patch
text is OK and we should mention that the original complaint came
from a user who tried to build Git with RHEL6, but we should make
this change not because we want to keep Git working on that
platform.  Instead, justify the change because we should follow the
promise we made in INSTALL to support libCURL version 7.19.4 or
later

By the way, I do not see anything to notice an attempt to use
libCURL that is too old.  I wonder if the attached patch is worth
considering.

Thanks.

----- >8 --------- >8 --------- >8 --------- >8 --------- >8 -----
Subject: libcurl: document and enforce the lowest supported version

In INSTALL, we promise that certain version of libCURL is usable to
build git with, but there was nothing that ensures we are not built
with a version that is too old.  We may be lucky and the compiler
may choke on a missing function, global variable, or preprocessor
constant in such a case, but it may be more helpful to the users to
give an explicit error message that says the lowest version we
support.

Signed-off-by: Junio C Hamano <redacted>
---
 INSTALL           |  2 +-
 git-curl-compat.h | 11 ++++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)
diff --git c/INSTALL w/INSTALL
index 4140a3f5c8..d9c83f30c5 100644
--- c/INSTALL
+++ w/INSTALL
@@ -146,7 +146,7 @@ Issues of note:
 
 	  Git requires version "7.19.4" or later of "libcurl" to build
 	  without NO_CURL. This version requirement may be bumped in
-	  the future.
+	  the future in the <git-curl-compat.h> file.
 
 	- "expat" library; git-http-push uses it for remote lock
 	  management over DAV.  Similar to "curl" above, this is optional
diff --git c/git-curl-compat.h w/git-curl-compat.h
index 56a83b6bbd..6eda37ea5a 100644
--- c/git-curl-compat.h
+++ w/git-curl-compat.h
@@ -8,9 +8,6 @@
  * inform decisions about removing support for older libcurl in the
  * future.
  *
- * The oldest supported version of curl is documented in the "INSTALL"
- * document.
- *
  * The source of truth for what versions have which symbols is
  * https://github.com/curl/curl/blob/master/docs/libcurl/symbols-in-versions;
  * the release dates are taken from curl.git (at
@@ -28,6 +25,14 @@
  * introduced, oldest first, in the official version of cURL library.
  */
 
+/*
+ * The oldest supported version of curl is documented in the "INSTALL"
+ * document.
+ */
+#if LIBCURL_VERSION_NUM < 0x071304
+#error "libCURL older than 7.19.4 is not supported"
+#endif
+
 /**
  * CURL_SOCKOPT_OK was added in 7.21.5, released in April 2011.
  */
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help