git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] http: support building on RHEL6
Date: Fri, 01 Jul 2022 14:32:45 -0700	[thread overview]
Message-ID: <xmqqpmio7c3m.fsf@gitster.g> (raw)
In-Reply-To: <Yr8kfCqKHwO1QqS6@tapette.crustytoothpaste.net> (brian m. carlson's message of "Fri, 1 Jul 2022 16:44:44 +0000")

"brian m. carlson" <sandals@crustytoothpaste.net> writes:

> On 2022-07-01 at 16:24:06, Johannes Schindelin via GitGitGadget wrote:
>> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>> 
>> 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 <gitster@pobox.com>
---
 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.
  */

  reply	other threads:[~2022-07-01 21:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01 16:24 [PATCH] http: support building on RHEL6 Johannes Schindelin via GitGitGadget
2022-07-01 16:44 ` brian m. carlson
2022-07-01 21:32   ` Junio C Hamano [this message]
2022-07-01 21:48     ` Junio C Hamano
2022-07-04  7:38       ` Ævar Arnfjörð Bjarmason
2022-07-05 17:46         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqpmio7c3m.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).