From patchwork Wed Oct 23 00:45:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "brian m. carlson" X-Patchwork-Id: 13846285 Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42DC412B71 for ; Wed, 23 Oct 2024 00:46:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.105.7.114 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644367; cv=none; b=a1JmQJY+ZE+HI8/nqqCtZEIw/QIFLGvDcs37/Mu3Xqv+IZhKlabEMIHxhacV+PInKIXci1tuAB3MlsGRFEiwxvhtq2w6883gEXxxqZgmkMyCQYdotQHow9CTOxSUKLArOcIWKS20AiRn+Sje8Oc2P0xaQkFZ1gneBX6MK1PrD9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644367; c=relaxed/simple; bh=rm5bBDWTTSSWTi4eZzplkX+H7XnajPSwm+siZAe9Kns=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sY6CMIgUmRsfNK6t3oPNeoJ1vF1GRs11EA8uGArcSGsUbS2v34tTcvXVb0mQNP2ftErYG23bn96SsuvdvJ+UJ37YFDZZ5Avkg5157nVNl35QXf7vZDrit+iu4r7pC85xVOf9dR5oikiqtRdCpVWJgrzTCUNaFVKuJKFECb6HDbw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net; spf=pass smtp.mailfrom=crustytoothpaste.net; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b=mU4jCKPN; arc=none smtp.client-ip=172.105.7.114 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b="mU4jCKPN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1729644364; bh=rm5bBDWTTSSWTi4eZzplkX+H7XnajPSwm+siZAe9Kns=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Reply-To: Subject:Date:To:CC:Resent-Date:Resent-From:Resent-To:Resent-Cc: In-Reply-To:References:Content-Type:Content-Disposition; b=mU4jCKPNqmS+1zXr7DYlKcXtq01ALT2TVGebx4Rl1nLA1jG60A5ifObWRSSHHMZjX AcjyHOghF3YRGqVECGjgwxYIPGGuOcqMp3Bbj41moJdRT7ksz8jGEupT0EQlh6ZZWr jyrtCxOp4NBT3PosVZXDv3zmRAtgaN7b6DNMnIylLGwlTPMfX944iKUL1jfKr5CQlj Bo2bgGmelZq0l8JyGXHQ+LNGWrdvbOwbcndbxXuExZZTnG0eniDTYgWwtSibiUo64O GcbHw0zUyorcEV2r+tco5l9OMEN98nQI19l+gJBdHuBnIplO8QuVEqzsDur7L1Wol+ nOFgKcZmvdhxGzmx95SpJ3UpKTpR8JhdZh84EulXkXQ2VOV+inG49nTcz0Yk0wJM/Q ooYVR45aHpWg2rVp8llF0HKsa2K4OMaEkGs/Os5Kq4C9OKeMayB8GXfkvEJzGTGuO1 CpGWqfA5pHli1pcLR0KK9dYvO9M+D5OB6/iFd2AbvHlyFaLgYTL Received: from tapette.crustytoothpaste.net (unknown [IPv6:2001:470:b056:101:e59a:3ed0:5f5c:31f3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by complex.crustytoothpaste.net (Postfix) with ESMTPSA id 28A73200BB; Wed, 23 Oct 2024 00:46:04 +0000 (UTC) From: "brian m. carlson" To: Cc: Junio C Hamano , Taylor Blau Subject: [PATCH v2 01/12] git-curl-compat: remove check for curl 7.21.5 Date: Wed, 23 Oct 2024 00:45:49 +0000 Message-ID: <20241023004600.1645313-2-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b In-Reply-To: <20241023004600.1645313-1-sandals@crustytoothpaste.net> References: <20241010235621.738239-1-sandals@crustytoothpaste.net> <20241023004600.1645313-1-sandals@crustytoothpaste.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 libcurl 7.21.5 was released in April 2011, which is well over ten years ago, and no major operating system vendor is still providing security support for it. Debian 7, RHEL 7, and Ubuntu 12.04, all of which are out of mainstream security support, have all supported a newer version. Remove the check for this version and use this functionality unconditionally. Signed-off-by: brian m. carlson --- git-curl-compat.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/git-curl-compat.h b/git-curl-compat.h index e1d0bdd273..c24ed686c1 100644 --- a/git-curl-compat.h +++ b/git-curl-compat.h @@ -28,13 +28,6 @@ * introduced, oldest first, in the official version of cURL library. */ -/** - * CURL_SOCKOPT_OK was added in 7.21.5, released in April 2011. - */ -#if LIBCURL_VERSION_NUM < 0x071505 -#define CURL_SOCKOPT_OK 0 -#endif - /** * CURLOPT_TCP_KEEPALIVE was added in 7.25.0, released in March 2012. */ From patchwork Wed Oct 23 00:45:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "brian m. carlson" X-Patchwork-Id: 13846286 Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42D83A935 for ; Wed, 23 Oct 2024 00:46:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.105.7.114 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644367; cv=none; b=P6Ai1568GPfzav47lGEWQbZPWUyBsu2uABX1/Ep3XO19I43BHg+YRunisUgWTt38QpNHLdAXOwbDwrLiedERy89MGCt9k3dlenZn2c6uZpD7+BWBs2aAmY9sNobyvoJWJW9N7cvpOKZ7m9F3oypVD+zi706pALeUZv9AgjgiWZI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644367; c=relaxed/simple; bh=BQa8EISFWbwCF6AOQjRJNUTzXNdQVdIfGLAt8WXpLaM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qElqVEL26oFr7lK2eirsIGUUqa8y15+5AeLfQprXJhAvcVY/zX8Jl+zt41SNRchTivp5diU8MDoRicOqSCgtl7M/TBUI/mMwNfVUJC+HbPy68b2wWNy9NDliaoRW6rpgpewuZ506IJHuxBg40gp28LWk33z4iJWmQ7uBWUFjLy4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net; spf=pass smtp.mailfrom=crustytoothpaste.net; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b=g9l25Nha; arc=none smtp.client-ip=172.105.7.114 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b="g9l25Nha" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1729644364; bh=BQa8EISFWbwCF6AOQjRJNUTzXNdQVdIfGLAt8WXpLaM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Reply-To: Subject:Date:To:CC:Resent-Date:Resent-From:Resent-To:Resent-Cc: In-Reply-To:References:Content-Type:Content-Disposition; b=g9l25Nha/qsLHr0Iye5q6PK6vuNwP4tpCaZvYXUakpS/oadlnF/O2oj87I94X/qXW SHGGKkwW2J3FabqWknZdQnmBjvoVtjGXPnGaZIPm5FAFiS7hIgAcReYZlik7NfwXv+ Ehq79UU8TBgsj1KgO1JVC+7BbzTT6A756p+dBWhbSOMy9UGQuJ1Q3GEbSZ6qvMj5fi GFfIKGMT5ycIc8inDdM5DIHSI0H3wjTXyZ/i4PaoYsNXAPCIECaKExfpttrqj+RC4S WrbzMtttIKGpNU396cjMxx0wpQ4FdaSI0xo7yfdyGbbln1x9bpZ7XU6EXQM5YB06YO /nadtK6eHn8DJVjTGfnJBEBOKrRpqHN+WWNtGz2JTkktNKi2bFFdgI+9YE0J3qP49y y6qjEM7VmwiWYvvlF+bjoL1lYUi2J62VgbwyUwsWf8ecSM7rBA69smLNfRHxBZZnF+ ltZyKQKkgMdZdJI92ia1c0Xl93zDUzkfb0FBN8Zz5KnbZKcxjIu Received: from tapette.crustytoothpaste.net (unknown [IPv6:2001:470:b056:101:e59a:3ed0:5f5c:31f3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by complex.crustytoothpaste.net (Postfix) with ESMTPSA id 32E6C200BC; Wed, 23 Oct 2024 00:46:04 +0000 (UTC) From: "brian m. carlson" To: Cc: Junio C Hamano , Taylor Blau Subject: [PATCH v2 02/12] git-curl-compat: remove check for curl 7.25.0 Date: Wed, 23 Oct 2024 00:45:50 +0000 Message-ID: <20241023004600.1645313-3-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b In-Reply-To: <20241023004600.1645313-1-sandals@crustytoothpaste.net> References: <20241010235621.738239-1-sandals@crustytoothpaste.net> <20241023004600.1645313-1-sandals@crustytoothpaste.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 libcurl 7.25.0 was released in March 2012, which is well over ten years ago, and no major operating system vendor is still providing security support for it. Debian 8, RHEL 7, and Ubuntu 12.10, all of which are out of mainstream security support, have all supported a newer version. Remove the check for this version and use this functionality unconditionally. Signed-off-by: brian m. carlson --- git-curl-compat.h | 8 -------- http.c | 24 ------------------------ 2 files changed, 32 deletions(-) diff --git a/git-curl-compat.h b/git-curl-compat.h index c24ed686c1..9100af027f 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. */ -/** - * CURLOPT_TCP_KEEPALIVE was added in 7.25.0, released in March 2012. - */ -#if LIBCURL_VERSION_NUM >= 0x071900 -#define GITCURL_HAVE_CURLOPT_TCP_KEEPALIVE 1 -#endif - - /** * CURLOPT_LOGIN_OPTIONS was added in 7.34.0, released in December * 2013. diff --git a/http.c b/http.c index d59e59f66b..633bbf74ee 100644 --- a/http.c +++ b/http.c @@ -716,35 +716,11 @@ static int has_proxy_cert_password(void) } #endif -#ifdef GITCURL_HAVE_CURLOPT_TCP_KEEPALIVE static void set_curl_keepalive(CURL *c) { curl_easy_setopt(c, CURLOPT_TCP_KEEPALIVE, 1); } -#else -static int sockopt_callback(void *client, curl_socket_t fd, curlsocktype type) -{ - int ka = 1; - int rc; - socklen_t len = (socklen_t)sizeof(ka); - - if (type != CURLSOCKTYPE_IPCXN) - return 0; - - rc = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&ka, len); - if (rc < 0) - warning_errno("unable to set SO_KEEPALIVE on socket"); - - return CURL_SOCKOPT_OK; -} - -static void set_curl_keepalive(CURL *c) -{ - curl_easy_setopt(c, CURLOPT_SOCKOPTFUNCTION, sockopt_callback); -} -#endif - /* Return 1 if redactions have been made, 0 otherwise. */ static int redact_sensitive_header(struct strbuf *header, size_t offset) { From patchwork Wed Oct 23 00:45:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "brian m. carlson" X-Patchwork-Id: 13846283 Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42E2717BCE for ; Wed, 23 Oct 2024 00:46:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.105.7.114 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644367; cv=none; b=JtbMbjgeqy1A2NZwi6jChlFb6uoG7w+J1KAyI/NE4J+c/PFcyK5rKUypjHkq4DG/Ncf+mhUVy72PXJVTrQpJ1ObOP4ZiFqX9dA/FSlm4leFz8cHBcgf3x6IDD2WMnFjb8gHcOw6n4cPubuvsCpGlzHfNWxBNRo5NuKU96sv2F44= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644367; c=relaxed/simple; bh=yAqcvlaKyIMF7BH0xkxVj5SI8sM+mq1ekp/FwBpmvzk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZXzD1Z22OQwZ3u2ij1gYoOz+rTbhIrRr962TwW6Rx/tOdKHHbivOFp7gNwVFmhomQs+JhhvqmN+dplh1GgVwDn4zx0FLKKttq8SbjMSVYHWBVW4MyVDO5wUU/dTOKKGi8k9oagMjDs5+KtOAABHe4UCpQ9dwjoaku6/p0NWUX14= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net; spf=pass smtp.mailfrom=crustytoothpaste.net; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b=ycn9wZwG; arc=none smtp.client-ip=172.105.7.114 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b="ycn9wZwG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1729644364; bh=yAqcvlaKyIMF7BH0xkxVj5SI8sM+mq1ekp/FwBpmvzk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Reply-To: Subject:Date:To:CC:Resent-Date:Resent-From:Resent-To:Resent-Cc: In-Reply-To:References:Content-Type:Content-Disposition; b=ycn9wZwGCagw6Vm8yz29UBqUyjdKEgNMnLtELcR+NrJJaqQAUFKyUs82Bk1U57Mzx 39Kw6SFKxJalvD6ukxhVR7QGWJMlMNCYSVQ2gz6I/yE8OD55Xaw6PXE5Zo/ni/l5zY ieZUiBj1CUSdqVDRZzhkyBbPBcOTUfRP16OHADlhJWuGx8jAKCCCsnQwMS67UCOJV4 do0Zz4ZRojBkJ+leqcnhPnFaeYORaNdg8Ehhe+WUS3rRFG/fLteUyPiVi2Nq7Hw0xQ ajTqDhbZA6x+USajM8OyNY8Qbd/xt/pDWgPTN5Q64+gHmlmOJQ3v/LXXbZ/+9P4huH rhEyd51Q6iE62GkxZtd1D+T7Jt1urha6cIfFFymmDybHjUhX/vX9iDn3IOpEHJ3W// mFrhi3wubhdpVtIxTy26JJ7wcpxbAEeEPP8dpUDe07nJDkIFDcVOtp9NqAIa209jVd gGIOjF4KbOGB9ZNWo71WETQOqlcCe8+5OK5KYctbCaQ9CI24knT Received: from tapette.crustytoothpaste.net (unknown [IPv6:2001:470:b056:101:e59a:3ed0:5f5c:31f3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by complex.crustytoothpaste.net (Postfix) with ESMTPSA id 3CDE5200BD; Wed, 23 Oct 2024 00:46:04 +0000 (UTC) From: "brian m. carlson" To: Cc: Junio C Hamano , Taylor Blau Subject: [PATCH v2 03/12] git-curl-compat: remove check for curl 7.34.0 Date: Wed, 23 Oct 2024 00:45:51 +0000 Message-ID: <20241023004600.1645313-4-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b In-Reply-To: <20241023004600.1645313-1-sandals@crustytoothpaste.net> References: <20241010235621.738239-1-sandals@crustytoothpaste.net> <20241023004600.1645313-1-sandals@crustytoothpaste.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 libcurl 7.34.0 was released in December 2013, which is well over ten years ago, and no major operating system vendor is still providing security support for it. Debian 8 and Ubuntu 14.04, both of which are out of mainstream security support, have supported a newer version, and RHEL 8, which is still in support, also has a newer version. Remove the check for this version and use this functionality unconditionally. Signed-off-by: brian m. carlson --- git-curl-compat.h | 22 ---------------------- http.c | 2 -- imap-send.c | 4 ---- 3 files changed, 28 deletions(-) diff --git a/git-curl-compat.h b/git-curl-compat.h index 9100af027f..21306fa88f 100644 --- a/git-curl-compat.h +++ b/git-curl-compat.h @@ -28,28 +28,6 @@ * introduced, oldest first, in the official version of cURL library. */ -/** - * CURLOPT_LOGIN_OPTIONS was added in 7.34.0, released in December - * 2013. - * - * If we start requiring 7.34.0 we might also be able to remove the - * code conditional on USE_CURL_FOR_IMAP_SEND in imap-send.c, see - * 1e16b255b95 (git-imap-send: use libcurl for implementation, - * 2014-11-09) and the check it added for "072200" in the Makefile. - - */ -#if LIBCURL_VERSION_NUM >= 0x072200 -#define GIT_CURL_HAVE_CURLOPT_LOGIN_OPTIONS 1 -#endif - -/** - * CURL_SSLVERSION_TLSv1_[012] was added in 7.34.0, released in - * December 2013. - */ -#if LIBCURL_VERSION_NUM >= 0x072200 -#define GIT_CURL_HAVE_CURL_SSLVERSION_TLSv1_0 -#endif - /** * CURLOPT_PINNEDPUBLICKEY was added in 7.39.0, released in November * 2014. CURLE_SSL_PINNEDPUBKEYNOTMATCH was added in that same version. diff --git a/http.c b/http.c index 633bbf74ee..ac4b98baa0 100644 --- a/http.c +++ b/http.c @@ -52,11 +52,9 @@ static struct { { "sslv2", CURL_SSLVERSION_SSLv2 }, { "sslv3", CURL_SSLVERSION_SSLv3 }, { "tlsv1", CURL_SSLVERSION_TLSv1 }, -#ifdef GIT_CURL_HAVE_CURL_SSLVERSION_TLSv1_0 { "tlsv1.0", CURL_SSLVERSION_TLSv1_0 }, { "tlsv1.1", CURL_SSLVERSION_TLSv1_1 }, { "tlsv1.2", CURL_SSLVERSION_TLSv1_2 }, -#endif #ifdef GIT_CURL_HAVE_CURL_SSLVERSION_TLSv1_3 { "tlsv1.3", CURL_SSLVERSION_TLSv1_3 }, #endif diff --git a/imap-send.c b/imap-send.c index ec68a06687..954cc9be65 100644 --- a/imap-send.c +++ b/imap-send.c @@ -1417,15 +1417,11 @@ static CURL *setup_curl(struct imap_server_conf *srvc, struct credential *cred) curl_easy_setopt(curl, CURLOPT_PORT, srvc->port); if (srvc->auth_method) { -#ifndef GIT_CURL_HAVE_CURLOPT_LOGIN_OPTIONS - warning("No LOGIN_OPTIONS support in this cURL version"); -#else struct strbuf auth = STRBUF_INIT; strbuf_addstr(&auth, "AUTH="); strbuf_addstr(&auth, srvc->auth_method); curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, auth.buf); strbuf_release(&auth); -#endif } if (!srvc->use_ssl) From patchwork Wed Oct 23 00:45:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "brian m. carlson" X-Patchwork-Id: 13846282 Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42DF5168DA for ; Wed, 23 Oct 2024 00:46:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.105.7.114 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644367; cv=none; b=VTPI/KV5SJHXktt/plQCFAO0VzYej/ACYS56fIbzVhCLjb7HW0nFJ0UFCkYtN/ZU5GOCJ1Sdhpfe4uX/pWEAFFvPth0acWwDEzWfseLH7X+EIGOC2xjiKqR8+9+TuUZzKKoMxACXNUcUKeFzODJzVePOQexiXey/ddO9HVGHdjQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644367; c=relaxed/simple; bh=2yteCggdA6LXgbOa72SHjQ2rtzToPOp6SaBetTTikRA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BsmIaEfywtDD1jLSiCNF4KrgECiwlHfZ0ILqc7hpj6G+CUasiwvkmQSR83YB0YIhJu5t+4XiaQpppgAbxmBR3227C9bPzz1uqss/Bovvs3rnZQUnV/0f3DVY938Ycr9RL4Q86sTbKciV8EonvuzdUTrqU2CDKJordiix3g7AErg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net; spf=pass smtp.mailfrom=crustytoothpaste.net; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b=x0z3hxfN; arc=none smtp.client-ip=172.105.7.114 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b="x0z3hxfN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1729644364; bh=2yteCggdA6LXgbOa72SHjQ2rtzToPOp6SaBetTTikRA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Reply-To: Subject:Date:To:CC:Resent-Date:Resent-From:Resent-To:Resent-Cc: In-Reply-To:References:Content-Type:Content-Disposition; b=x0z3hxfNaZaQjGuIxTeoOebI3PHliG08zZv0eIvTD2q6DNUumCL2GNU6p+oZAf/AY GDMYt7nDO9r2y6SqkSMCFdHZ3CN/0M3HcMYTMkZdM1oJ12kVuDOWa+kHR//wgEGEgw Bogm8LKUjIQSXBC8NJrstNgs4Vo/1s18Fob8vM89aydQR8Bl/ciUQSEwfEdIBZ46LU diLlCPsePXxUsloDSIFarfHjdroy9+cHvnSfgsjBpOQFig7thUhH/KYSqgS17r9Vcd 5iZRztQ47CUK1TqbXk4uXU6A+oJYNxk9SNcJ8O1Yo2IagzrS8dZ8OkVx9rFhcCuqr7 9YwcQ5Yz+Tl1VKNAV+Ul9pDwlt2z8xWpdyqoJhbjX7RUd8abJwm4IL2Q+5cHz8+fld RWWBC6q41EpWWnI+FJuoPv1mcZD6GRxCVIWF4UXKf+R7TkQ8SI6WBzpzjso1LT2Wys kEYf6/BEsiIhEeXnbx1n8+mgOgfF2G2TGQCIrmYUdjPyXeUj03Q Received: from tapette.crustytoothpaste.net (unknown [IPv6:2001:470:b056:101:e59a:3ed0:5f5c:31f3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by complex.crustytoothpaste.net (Postfix) with ESMTPSA id 47277200BE; Wed, 23 Oct 2024 00:46:04 +0000 (UTC) From: "brian m. carlson" To: Cc: Junio C Hamano , Taylor Blau Subject: [PATCH v2 04/12] git-curl-compat: remove check for curl 7.39.0 Date: Wed, 23 Oct 2024 00:45:52 +0000 Message-ID: <20241023004600.1645313-5-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b In-Reply-To: <20241023004600.1645313-1-sandals@crustytoothpaste.net> References: <20241010235621.738239-1-sandals@crustytoothpaste.net> <20241023004600.1645313-1-sandals@crustytoothpaste.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 libcurl 7.39.0 was released in November 2014, which is almost ten years ago, and no major operating system vendor is still providing security support for it. Debian 9 and Ubuntu 16.04, both of which are out of mainstream security support, have supported a newer version, and RHEL 8, which is still in support, also has a newer version. Remove the check for this version and use this functionality unconditionally. Signed-off-by: brian m. carlson --- git-curl-compat.h | 9 --------- http.c | 11 ----------- 2 files changed, 20 deletions(-) diff --git a/git-curl-compat.h b/git-curl-compat.h index 21306fa88f..b301ef154c 100644 --- a/git-curl-compat.h +++ b/git-curl-compat.h @@ -28,15 +28,6 @@ * introduced, oldest first, in the official version of cURL library. */ -/** - * CURLOPT_PINNEDPUBLICKEY was added in 7.39.0, released in November - * 2014. CURLE_SSL_PINNEDPUBKEYNOTMATCH was added in that same version. - */ -#if LIBCURL_VERSION_NUM >= 0x072c00 -#define GIT_CURL_HAVE_CURLOPT_PINNEDPUBLICKEY 1 -#define GIT_CURL_HAVE_CURLE_SSL_PINNEDPUBKEYNOTMATCH 1 -#endif - /** * CURL_HTTP_VERSION_2 was added in 7.43.0, released in June 2015. * diff --git a/http.c b/http.c index ac4b98baa0..cdef059090 100644 --- a/http.c +++ b/http.c @@ -63,9 +63,7 @@ static char *ssl_key; static char *ssl_key_type; static char *ssl_capath; static char *curl_no_proxy; -#ifdef GIT_CURL_HAVE_CURLOPT_PINNEDPUBLICKEY static char *ssl_pinnedkey; -#endif static char *ssl_cainfo; static long curl_low_speed_limit = -1; static long curl_low_speed_time = -1; @@ -509,12 +507,7 @@ static int http_options(const char *var, const char *value, } if (!strcmp("http.pinnedpubkey", var)) { -#ifdef GIT_CURL_HAVE_CURLOPT_PINNEDPUBLICKEY return git_config_pathname(&ssl_pinnedkey, var, value); -#else - warning(_("Public key pinning not supported with cURL < 7.39.0")); - return 0; -#endif } if (!strcmp("http.extraheader", var)) { @@ -1104,10 +1097,8 @@ static CURL *get_curl_handle(void) curl_easy_setopt(result, CURLOPT_SSLKEYTYPE, ssl_key_type); if (ssl_capath) curl_easy_setopt(result, CURLOPT_CAPATH, ssl_capath); -#ifdef GIT_CURL_HAVE_CURLOPT_PINNEDPUBLICKEY if (ssl_pinnedkey) curl_easy_setopt(result, CURLOPT_PINNEDPUBLICKEY, ssl_pinnedkey); -#endif if (http_ssl_backend && !strcmp("schannel", http_ssl_backend) && !http_schannel_use_ssl_cainfo) { curl_easy_setopt(result, CURLOPT_CAINFO, NULL); @@ -1825,10 +1816,8 @@ static int handle_curl_result(struct slot_results *results) */ credential_reject(&cert_auth); return HTTP_NOAUTH; -#ifdef GIT_CURL_HAVE_CURLE_SSL_PINNEDPUBKEYNOTMATCH } else if (results->curl_result == CURLE_SSL_PINNEDPUBKEYNOTMATCH) { return HTTP_NOMATCHPUBLICKEY; -#endif } else if (missing_target(results)) return HTTP_MISSING_TARGET; else if (results->http_code == 401) { From patchwork Wed Oct 23 00:45:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "brian m. carlson" X-Patchwork-Id: 13846287 Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF6F41BDCF for ; Wed, 23 Oct 2024 00:46:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.105.7.114 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644369; cv=none; b=G+kCV7n8fHFimdToAf4hEy5FxHPPKmYEI9t5aj3CuZ+23WQ3doZlT0s4O3rh76z0AYoOhNSksmmLBEoK6/9VdYZISzmHkmld9J+n3sp26hnX3HqbLJar1gUCiJ2PUbP4+IV4Ic560lZ2wyLbVW1EGTRdrSuYtIzxKkgUbeoC/wg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644369; c=relaxed/simple; bh=/eZ0oHRZKK+QdeosQHMaDtMJ5DTkT1eLqH/CW8IIE3I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jmZuK4ABmYG/SDaDtvy5//RNFzT9JADDpZv031y3wJtKMXbIg9fZ99J9M3LHfIzunR8qxqGJR7u3q5Fb8ceUFduSoDX3mSAyx58+NPh4VZt71cGmwUv2Zhv+QO4xXVTsDeO4/ibwcxux60M2yJCP0DvSaF73o19FvH7V5aHJ7CY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net; spf=pass smtp.mailfrom=crustytoothpaste.net; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b=yPM/oPk3; arc=none smtp.client-ip=172.105.7.114 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b="yPM/oPk3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1729644364; bh=/eZ0oHRZKK+QdeosQHMaDtMJ5DTkT1eLqH/CW8IIE3I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Reply-To: Subject:Date:To:CC:Resent-Date:Resent-From:Resent-To:Resent-Cc: In-Reply-To:References:Content-Type:Content-Disposition; b=yPM/oPk3zoH1V1AUwfBjAW/+4YU8qZgzfAp5UfLboquzuVSwFIZQv9vecAdD8ScRa 9DVUo1KZucS5ZYeIpSoiQ/yMcA0KD73K101776CsV61lOPvBX9toH/1uw/Wfgxlq/l 68iYIr0aZ1f6dnUoelXxHf5vq5ImONskmDF6luFKsIV+wrfPQ6M5jXxhkVUp/ffahU jnvb0UR+QuWRvmg0vusP2+I0I07hmMooAMF6eZ3umNoaeLt+Q7f+5My31D8L6XJi3m fXB9wT8QmZHo9H77tI0JbBfUpsThy6DM5uviVRmwrB5remIVucSjl26IVfjLdH5q73 hQ0dRCm3rgfMynfW1+x8DyZSkZomY+kwRts8jZ4wmsIITFXwpFbCL31Q/BZPvEmFvy VKMCva0bk96rTzf5nrDwNkELNsPHYb/PjJuoMzaRSamUiFn+jiRaHpz8hXGEIuenWU 3tWuuR9jqh7wjfaRpTBUZnOaHF7VGdqzwP50tMBbNMavl4/w7nG Received: from tapette.crustytoothpaste.net (unknown [IPv6:2001:470:b056:101:e59a:3ed0:5f5c:31f3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by complex.crustytoothpaste.net (Postfix) with ESMTPSA id 510EE200BF; Wed, 23 Oct 2024 00:46:04 +0000 (UTC) From: "brian m. carlson" To: Cc: Junio C Hamano , Taylor Blau Subject: [PATCH v2 05/12] git-curl-compat: remove check for curl 7.43.0 Date: Wed, 23 Oct 2024 00:45:53 +0000 Message-ID: <20241023004600.1645313-6-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b In-Reply-To: <20241023004600.1645313-1-sandals@crustytoothpaste.net> References: <20241010235621.738239-1-sandals@crustytoothpaste.net> <20241023004600.1645313-1-sandals@crustytoothpaste.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 libcurl 7.43.0 was released in June 2015, which is over nine years ago, and no major operating system vendor is still providing security support for it. Debian 9 and Ubuntu 16.04, both of which are out of mainstream security support, have supported a newer version, and RHEL 8, which is still in support, also has a newer version. Remove the check for this version and use this functionality unconditionally. Signed-off-by: brian m. carlson --- git-curl-compat.h | 11 ----------- http.c | 5 ----- 2 files changed, 16 deletions(-) diff --git a/git-curl-compat.h b/git-curl-compat.h index b301ef154c..cd970e34d6 100644 --- a/git-curl-compat.h +++ b/git-curl-compat.h @@ -28,17 +28,6 @@ * introduced, oldest first, in the official version of cURL library. */ -/** - * CURL_HTTP_VERSION_2 was added in 7.43.0, released in June 2015. - * - * The CURL_HTTP_VERSION_2 alias (but not CURL_HTTP_VERSION_2_0) has - * always been a macro, not an enum field (checked on curl version - * 7.78.0) - */ -#if LIBCURL_VERSION_NUM >= 0x072b00 -#define GIT_CURL_HAVE_CURL_HTTP_VERSION_2 1 -#endif - /** * CURLSSLOPT_NO_REVOKE was added in 7.44.0, released in August 2015. * diff --git a/http.c b/http.c index cdef059090..945df9a628 100644 --- a/http.c +++ b/http.c @@ -980,7 +980,6 @@ static long get_curl_allowed_protocols(int from_user, struct strbuf *list) return bits; } -#ifdef GIT_CURL_HAVE_CURL_HTTP_VERSION_2 static int get_curl_http_version_opt(const char *version_string, long *opt) { int i; @@ -1003,8 +1002,6 @@ static int get_curl_http_version_opt(const char *version_string, long *opt) return -1; /* not found */ } -#endif - static CURL *get_curl_handle(void) { CURL *result = curl_easy_init(); @@ -1022,7 +1019,6 @@ static CURL *get_curl_handle(void) curl_easy_setopt(result, CURLOPT_SSL_VERIFYHOST, 2); } -#ifdef GIT_CURL_HAVE_CURL_HTTP_VERSION_2 if (curl_http_version) { long opt; if (!get_curl_http_version_opt(curl_http_version, &opt)) { @@ -1030,7 +1026,6 @@ static CURL *get_curl_handle(void) curl_easy_setopt(result, CURLOPT_HTTP_VERSION, opt); } } -#endif curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL); curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY); From patchwork Wed Oct 23 00:45:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "brian m. carlson" X-Patchwork-Id: 13846294 Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 548C7224FD for ; Wed, 23 Oct 2024 00:46:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.105.7.114 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644371; cv=none; b=ihJBKoVKdjttPSfBVE77AsfWQhHgB16ae11hywsMQnORXxc7OI9blgkl+KbGHDQcNLi8db+QkCUgCqWqQFYqZIwLlnc0LUy3BQJClGauZkNj17qsNe30RL5TR6PzSIXbjW8kICTTOj/EPDOftsYzrdbzn/VYq+wN/iTP+JSbNUI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644371; c=relaxed/simple; bh=dtfw2xRbiDHcM4T1nUorlbwVxN0N9b9G/mFEo9WO2M4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pbWFdJaFHdcXojeZ+ZZrBsREjKnAM0XreFLpIlTgZSCBGcPpMkDCVgrW0u4AvYaFbHp8034Ei6i/OS21os/bDy1WJftewq4VH+C33brILpKHFg7/Iccd5EvgnWzwXDd2S0ozIcc7hTeLYzkbueMSRQjVXKjvELV3JX7s/7DwzIc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net; spf=pass smtp.mailfrom=crustytoothpaste.net; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b=YZIDRwnl; arc=none smtp.client-ip=172.105.7.114 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b="YZIDRwnl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1729644364; bh=dtfw2xRbiDHcM4T1nUorlbwVxN0N9b9G/mFEo9WO2M4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Reply-To: Subject:Date:To:CC:Resent-Date:Resent-From:Resent-To:Resent-Cc: In-Reply-To:References:Content-Type:Content-Disposition; b=YZIDRwnlO5283UFxBIBOxnU6Mzf9uChBovLl3ZRXyMi1Noe2mM2QbsxYT0QnDHyMd NzgyPOCr7PG3BlTO0IVHE77GkMp7L1p7/PMVnMCzb8N9p3B0IAbmvMhp1cfjnV9OM1 ZFYV8RNejS4wzs+IAlrlNv3uQ7iQVPiYhCqHp0Qu3OvYI1RheGL2DU8/mXu8ICLlfU uB4oPE4JB5xTAl5MvP3wFjc3Z1MS9oXTKkRhBViI+4NwcG5psi/5qaq//+Sxp595GL j+hnxAA55VuEh5WOclCnedXS7JiRYLv6PprBQ6S/uYdF+QkHmRIRT46yAWOOfTrc0z +SJlMWy4c8VQSsdsGz2pkiIncq8WHcRztPiNYAZTiVUZ5y5jYz5fcBJ2U1OccAFe15 lGLteqSwSJRsSxgF7rjncwRdEj0azyG+l7X0n78ZKk1K06iopUPNOgunDoZFNoyirt 6zpcJiWEtiQKVolYlTc/UJkLI+YIrXSxvSGprVe8QtuUCmSLo8W Received: from tapette.crustytoothpaste.net (unknown [IPv6:2001:470:b056:101:e59a:3ed0:5f5c:31f3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by complex.crustytoothpaste.net (Postfix) with ESMTPSA id 5C83C200C0; Wed, 23 Oct 2024 00:46:04 +0000 (UTC) From: "brian m. carlson" To: Cc: Junio C Hamano , Taylor Blau Subject: [PATCH v2 06/12] git-curl-compat: remove check for curl 7.44.0 Date: Wed, 23 Oct 2024 00:45:54 +0000 Message-ID: <20241023004600.1645313-7-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b In-Reply-To: <20241023004600.1645313-1-sandals@crustytoothpaste.net> References: <20241010235621.738239-1-sandals@crustytoothpaste.net> <20241023004600.1645313-1-sandals@crustytoothpaste.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 libcurl 7.44.0 was released in August 2015, which is over nine years ago, and no major operating system vendor is still providing security support for it. Debian 9 and Ubuntu 16.04, both of which are out of mainstream security support, have supported a newer version, and RHEL 8, which is still in support, also has a newer version. Remove the check for this version and use this functionality unconditionally. Signed-off-by: brian m. carlson --- git-curl-compat.h | 10 ---------- http.c | 4 ---- 2 files changed, 14 deletions(-) diff --git a/git-curl-compat.h b/git-curl-compat.h index cd970e34d6..6b05d70d42 100644 --- a/git-curl-compat.h +++ b/git-curl-compat.h @@ -28,16 +28,6 @@ * introduced, oldest first, in the official version of cURL library. */ -/** - * CURLSSLOPT_NO_REVOKE was added in 7.44.0, released in August 2015. - * - * The CURLSSLOPT_NO_REVOKE is, has always been a macro, not an enum - * field (checked on curl version 7.78.0) - */ -#if LIBCURL_VERSION_NUM >= 0x072c00 -#define GIT_CURL_HAVE_CURLSSLOPT_NO_REVOKE 1 -#endif - /** * CURLOPT_PROXY_CAINFO was added in 7.52.0, released in August 2017. */ diff --git a/http.c b/http.c index 945df9a628..bdf8bf7b59 100644 --- a/http.c +++ b/http.c @@ -1048,11 +1048,7 @@ static CURL *get_curl_handle(void) if (http_ssl_backend && !strcmp("schannel", http_ssl_backend) && !http_schannel_check_revoke) { -#ifdef GIT_CURL_HAVE_CURLSSLOPT_NO_REVOKE curl_easy_setopt(result, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NO_REVOKE); -#else - warning(_("CURLSSLOPT_NO_REVOKE not supported with cURL < 7.44.0")); -#endif } if (http_proactive_auth != PROACTIVE_AUTH_NONE) From patchwork Wed Oct 23 00:45:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "brian m. carlson" X-Patchwork-Id: 13846293 Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 530E8224D6 for ; Wed, 23 Oct 2024 00:46:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.105.7.114 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644371; cv=none; b=d8Nn1nK+AtZrjHJXEgHtfHH6pNcfqLR4PbhsHh7IWibY1HUV1+OYFOAX/s0Kj/q/efqyfSVhdSXyHnTiHot3WJ5rnn/X0h/C6/o11umxujPTl9OllZa0udk7TrjUxjRlsOhnsqdttm0swHobrLjcKeJltKU9bFTPyAloym/SWrk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644371; c=relaxed/simple; bh=H9yfEMCXOdKkCyMy4ehXK57MDNa4HiytfYISS7UhBLU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cgXvSYlU+VdG3jZAt/IvSXD8SdaVyKAK/yJzP0+9YEosMGhACP8K5l4cW3xwXVH9OyfStErR6/VJNYVO4haLfPlOIq2yrwEKVS0p4CtSVcF85BaunDhPUxlm0h4Bpj7HBh+yIGkqonvmi38GAfGkKmaszSSitWAQiX1NOjkC0jE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net; spf=pass smtp.mailfrom=crustytoothpaste.net; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b=Vb15/4Kn; arc=none smtp.client-ip=172.105.7.114 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b="Vb15/4Kn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1729644364; bh=H9yfEMCXOdKkCyMy4ehXK57MDNa4HiytfYISS7UhBLU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Reply-To: Subject:Date:To:CC:Resent-Date:Resent-From:Resent-To:Resent-Cc: In-Reply-To:References:Content-Type:Content-Disposition; b=Vb15/4KnGBxJ585oBKOWhq0hWIsvEQExJaDPg63Uleu8F0HAkjyM70kSW06dMZfAo wL7xPpS6C82pLKxl9L7l/b5XKEXHVEIUBMoXwfLDWYZ3ucvzvNkQrbCuaoz1hkXajD hKOvqydwX/Qi9OWR5LgGjI1ZEgZ2/lD479bvVvcJbaLn+SpAyYM0y0T0Jpmiqk1xFG hJwDk7wKqMFoQeNLJotWGoBd4OlUiUufhNX2HUblXpAPD4x4ctPtdekox9vYmspc2u wdx0Kimxq1QZ8ZKcgRz+Iep524PExOTim0VhOh5VjzLcVZipQeEYO/gL0jGu+obToE tMkF26kDOrcEEvrJhNExp3Z5/06nuytTuRRgBvSmiYwiXFQ/bNMF9bSJ/UoRNB7wuS g7x1PSlr+vPNG7eBw+RPuLS3R9Ezt+eXiBJ3yPREXIZl6MS9XJ4v1HhNSyoIQMD4iL W5zm0wxEclDvO+VXNSsFetKr2QyxL44Cl7Pz5bMMAxTiZT43dDK Received: from tapette.crustytoothpaste.net (unknown [IPv6:2001:470:b056:101:e59a:3ed0:5f5c:31f3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by complex.crustytoothpaste.net (Postfix) with ESMTPSA id 66285200C1; Wed, 23 Oct 2024 00:46:04 +0000 (UTC) From: "brian m. carlson" To: Cc: Junio C Hamano , Taylor Blau Subject: [PATCH v2 07/12] git-curl-compat: remove check for curl 7.52.0 Date: Wed, 23 Oct 2024 00:45:55 +0000 Message-ID: <20241023004600.1645313-8-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b In-Reply-To: <20241023004600.1645313-1-sandals@crustytoothpaste.net> References: <20241010235621.738239-1-sandals@crustytoothpaste.net> <20241023004600.1645313-1-sandals@crustytoothpaste.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 libcurl 7.52.0 was released in August 2017, which is over seven years ago, and no major operating system vendor is still providing security support for it. Debian 9 and Ubuntu 18.04, both of which are out of mainstream security support, have supported a newer version, and RHEL 8, which is still in support, also has a newer version. Remove the check for this version and use this functionality unconditionally. Signed-off-by: brian m. carlson --- git-curl-compat.h | 15 --------------- http.c | 8 -------- 2 files changed, 23 deletions(-) diff --git a/git-curl-compat.h b/git-curl-compat.h index 6b05d70d42..edee8f2ba0 100644 --- a/git-curl-compat.h +++ b/git-curl-compat.h @@ -28,21 +28,6 @@ * introduced, oldest first, in the official version of cURL library. */ -/** - * CURLOPT_PROXY_CAINFO was added in 7.52.0, released in August 2017. - */ -#if LIBCURL_VERSION_NUM >= 0x073400 -#define GIT_CURL_HAVE_CURLOPT_PROXY_CAINFO 1 -#endif - -/** - * CURLOPT_PROXY_{KEYPASSWD,SSLCERT,SSLKEY} was added in 7.52.0, - * released in August 2017. - */ -#if LIBCURL_VERSION_NUM >= 0x073400 -#define GIT_CURL_HAVE_CURLOPT_PROXY_KEYPASSWD 1 -#endif - /** * CURL_SSLVERSION_TLSv1_3 was added in 7.53.0, released in February * 2017. diff --git a/http.c b/http.c index bdf8bf7b59..24764f1272 100644 --- a/http.c +++ b/http.c @@ -691,7 +691,6 @@ static int has_cert_password(void) return 1; } -#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_KEYPASSWD static int has_proxy_cert_password(void) { if (http_proxy_ssl_cert == NULL || proxy_ssl_cert_password_required != 1) @@ -705,7 +704,6 @@ static int has_proxy_cert_password(void) } return 1; } -#endif static void set_curl_keepalive(CURL *c) { @@ -1093,16 +1091,12 @@ static CURL *get_curl_handle(void) if (http_ssl_backend && !strcmp("schannel", http_ssl_backend) && !http_schannel_use_ssl_cainfo) { curl_easy_setopt(result, CURLOPT_CAINFO, NULL); -#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_CAINFO curl_easy_setopt(result, CURLOPT_PROXY_CAINFO, NULL); -#endif } else if (ssl_cainfo != NULL || http_proxy_ssl_ca_info != NULL) { if (ssl_cainfo) curl_easy_setopt(result, CURLOPT_CAINFO, ssl_cainfo); -#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_CAINFO if (http_proxy_ssl_ca_info) curl_easy_setopt(result, CURLOPT_PROXY_CAINFO, http_proxy_ssl_ca_info); -#endif } if (curl_low_speed_limit > 0 && curl_low_speed_time > 0) { @@ -1198,7 +1192,6 @@ static CURL *get_curl_handle(void) else if (starts_with(curl_http_proxy, "socks")) curl_easy_setopt(result, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4); -#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_KEYPASSWD else if (starts_with(curl_http_proxy, "https")) { curl_easy_setopt(result, CURLOPT_PROXYTYPE, CURLPROXY_HTTPS); @@ -1211,7 +1204,6 @@ static CURL *get_curl_handle(void) if (has_proxy_cert_password()) curl_easy_setopt(result, CURLOPT_PROXY_KEYPASSWD, proxy_cert_auth.password); } -#endif if (strstr(curl_http_proxy, "://")) credential_from_url(&proxy_auth, curl_http_proxy); else { From patchwork Wed Oct 23 00:45:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "brian m. carlson" X-Patchwork-Id: 13846288 Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34374208A5 for ; Wed, 23 Oct 2024 00:46:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.105.7.114 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644369; cv=none; b=qYLEENYJv/gttIzDKub1E9lADyJeV6M0dQAIE3+z7MY9/gNkMevoSozl19hME9TkcUgcWLAq8Qk4B3SYjY9O/u3PjFCO7ulg8CU6qoWvj6xW0IF4Z8CYiSSLKG4DFoVqQxh1W6k6NB5qcHwvEcDAb+oC7yokLaxGvTccMcrgEA4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644369; c=relaxed/simple; bh=Yyx1/9ezc1jQ37JvF0zD81szsoSHY4VK/1sVGZmQ6ew=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=u30yZX/a6VI/t0k8w4nYznh9lh+bdZb67/y5KCYQEERJIuL3CyWFp943QaGs8pLFEwQICqj7NtARngHT1saI3QPaF3cLDcATllwLLWionOJqXbkLOvq09Axbg4v6DQvN774WuC/V0mRd20YJizHC4c/bsF+IeOktPS9oh+T7Hks= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net; spf=pass smtp.mailfrom=crustytoothpaste.net; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b=FCqxu+vs; arc=none smtp.client-ip=172.105.7.114 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b="FCqxu+vs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1729644364; bh=Yyx1/9ezc1jQ37JvF0zD81szsoSHY4VK/1sVGZmQ6ew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Reply-To: Subject:Date:To:CC:Resent-Date:Resent-From:Resent-To:Resent-Cc: In-Reply-To:References:Content-Type:Content-Disposition; b=FCqxu+vsRoFvpGZg1SAB89670WC+hO7v1D4uGdUJAJ6riKz+i3u8boM0B42vQ+XDX 40jkKUlzKOf9uzrfx1VlpGXmN1zsFu6SYRFScLTym3zX5piB35vnhsO1ERgv7bUwLt 0Zm/TwwWsvRiCIZXexUaDMBB9AhNlpi7e+roX9mI//C9eWVd2pkKo+PG//VWztKoSs 1FahZ7ZMz7nSZ3ZH0q+TW/Wc3rksbHXFKwK/fs0hpKmXBT9GjqdsbYWTvrP/abtWo8 3ypYZVEUC0jHJL/X1lor+eeJ3OAmB6lIvLvpKh4PeCoYgK1BIlCN6gy1pnrf0KAtgi 3pAJvLm3sm0EGHKlwkDJiQ2Ug8IhshSpKzS6eUbysm20M4hYkG4z25vZYCYZSQoVdo +r3pMmS6z7vrete+S157sGRCspemOLOcyaYifUyw7DzzO4SWY4x/2eNPkihcvxLEER //kjnC4T93ikPaoTnTTrI98yC/oJb+pCMD3eIgCBhfPtyfthxlC Received: from tapette.crustytoothpaste.net (unknown [IPv6:2001:470:b056:101:e59a:3ed0:5f5c:31f3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by complex.crustytoothpaste.net (Postfix) with ESMTPSA id 708BA200C2; Wed, 23 Oct 2024 00:46:04 +0000 (UTC) From: "brian m. carlson" To: Cc: Junio C Hamano , Taylor Blau Subject: [PATCH v2 08/12] git-curl-compat: remove check for curl 7.53.0 Date: Wed, 23 Oct 2024 00:45:56 +0000 Message-ID: <20241023004600.1645313-9-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b In-Reply-To: <20241023004600.1645313-1-sandals@crustytoothpaste.net> References: <20241010235621.738239-1-sandals@crustytoothpaste.net> <20241023004600.1645313-1-sandals@crustytoothpaste.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 libcurl 7.53.0 was released in February 2017, which is over seven years ago, and no major operating system vendor is still providing security support for it. Debian 10 and Ubuntu 18.04, both of which are out of mainstream security support, have supported a newer version, and RHEL 8, which is still in support, also has a newer version. Remove the check for this version and use this functionality unconditionally. Signed-off-by: brian m. carlson --- 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 edee8f2ba0..65ba1ee0f8 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. */ -/** - * CURL_SSLVERSION_TLSv1_3 was added in 7.53.0, released in February - * 2017. - */ -#if LIBCURL_VERSION_NUM >= 0x073400 -#define GIT_CURL_HAVE_CURL_SSLVERSION_TLSv1_3 1 -#endif - /** * CURLSSLSET_{NO_BACKENDS,OK,TOO_LATE,UNKNOWN_BACKEND} were added in * 7.56.0, released in September 2017. diff --git a/http.c b/http.c index 24764f1272..c5fdf1cd4c 100644 --- a/http.c +++ b/http.c @@ -55,9 +55,7 @@ static struct { { "tlsv1.0", CURL_SSLVERSION_TLSv1_0 }, { "tlsv1.1", CURL_SSLVERSION_TLSv1_1 }, { "tlsv1.2", CURL_SSLVERSION_TLSv1_2 }, -#ifdef GIT_CURL_HAVE_CURL_SSLVERSION_TLSv1_3 { "tlsv1.3", CURL_SSLVERSION_TLSv1_3 }, -#endif }; static char *ssl_key; static char *ssl_key_type; From patchwork Wed Oct 23 00:45:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "brian m. carlson" X-Patchwork-Id: 13846289 Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5648224B34 for ; Wed, 23 Oct 2024 00:46:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.105.7.114 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644370; cv=none; b=PfF1Uf73THkNGcSjyMRov/7iqbiFWMlvgJlRyNjNC8+z/QCx9x4hSqbfqgyImVqNy4vz005OL2gYDTtZW3GHGOtc447/YNT8VnOHXPdVbDl+3CVJFlUNF8T39ftyv0lLofsZeoofsMyLvdLsaeRjBZOFqZAbaAZ+Fnv7r1vuP44= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644370; c=relaxed/simple; bh=8w0UuLbT1GF7DW2uvm6+8bk6iPrUfl/xm0kSoWBbMtQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OJr3VLpQ6168Jdk6Y8GtQPpebA5lzKsXdER4EVL7hlyfOExIuswuLT6jV6EjzxMubrFOrlLPjKCAj7i+RMqefF3fl2jZuC1oCnlCBvUOCKLCCM9LcB2XcmjjZKNTHCEIdLEy8ctBM95nU0CQIdbrt4mPFSAaO/zyOWSwl8SG7HU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net; spf=pass smtp.mailfrom=crustytoothpaste.net; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b=acTiVAmg; arc=none smtp.client-ip=172.105.7.114 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b="acTiVAmg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1729644364; bh=8w0UuLbT1GF7DW2uvm6+8bk6iPrUfl/xm0kSoWBbMtQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Reply-To: Subject:Date:To:CC:Resent-Date:Resent-From:Resent-To:Resent-Cc: In-Reply-To:References:Content-Type:Content-Disposition; b=acTiVAmgr6GnK0VOOAhmn2kqOkT2c86v6OD/RYTefx24nW74kpiDyBW+tXv04FtS4 QQ4kWhySmZpDED4h6V36dS53LZlVHwFMBFNUFlGljOEY+cnHpW6Av3zWWk79bTuhqP nquaCeUdYe+Ro/h+nosbnulKwav/DluKfregRaquwraxxZmqpc783V00T7RLwU1ajP gdTZkTe3xyrVDMjGGJruHCK5HSDTw9rHK6+JsS7u+o4CsXRWje8IkaTAfX+SfxWva0 ie/0iqYe3ihcJ3gVRysIS6JNNZ2cQg6sXooUJxZOGrrwe6SpXxLhQssksX/Mq/aE54 /qzaCv74+BQqpEk8/sZXLDp7/t6WGbMu4/m2HuadOKYMDwHokZ//ElI06oxvtINxXX iEB8HmGt39myNmQ6KKpvEEz175E0/CJCFLzfhWBujFfEaThLNEY5A+PnU0yf/FZcfZ Fjy2M+4fr9Nlf/wds2jCzcLpQNE7p0cjtS93a2CYwIlfT5cr71E Received: from tapette.crustytoothpaste.net (unknown [IPv6:2001:470:b056:101:e59a:3ed0:5f5c:31f3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by complex.crustytoothpaste.net (Postfix) with ESMTPSA id 79D60200C3; Wed, 23 Oct 2024 00:46:04 +0000 (UTC) From: "brian m. carlson" To: Cc: Junio C Hamano , Taylor Blau Subject: [PATCH v2 09/12] git-curl-compat: remove check for curl 7.56.0 Date: Wed, 23 Oct 2024 00:45:57 +0000 Message-ID: <20241023004600.1645313-10-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b In-Reply-To: <20241023004600.1645313-1-sandals@crustytoothpaste.net> References: <20241010235621.738239-1-sandals@crustytoothpaste.net> <20241023004600.1645313-1-sandals@crustytoothpaste.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- 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"); From patchwork Wed Oct 23 00:45:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "brian m. carlson" X-Patchwork-Id: 13846291 Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5755A25634 for ; Wed, 23 Oct 2024 00:46:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.105.7.114 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644370; cv=none; b=AmV0v9EW5xcsIT25SKxr0nbGcQRtN/Ajy4WakvFdsm7QgVwJ/YVLG7RNmL1lcqWvkCDUWMQmIpRoL23S11DSJFIZTkbA3EVA8x9NXMalfxc5eupz4LYINiWhPwCAMpQlzyPkfPx1GNDvRFYHBi3Oz9VX3gNEhdWlfjhgUcZQFEA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644370; c=relaxed/simple; bh=u9igHWBuSr2c88DQ0ItXsvOXaMorSxMBiSW3OfzCajQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qHBnZ9YLv9f7XUriYrUyvBrq4D2IhZciAvXUlEmbVlJaryhXSPBdeUXsYAHy0zsbAcigNAKUrXuOVN5DD6tQ0TKC8CndL91UCSF5JZC2WVGIk0wFN/ezT2xNW0tmZ9k2uekqBBwA5dHgwICmsPDXnkhmzGzMmIbeNqKmbEtYFN8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net; spf=pass smtp.mailfrom=crustytoothpaste.net; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b=uDXMa1Vm; arc=none smtp.client-ip=172.105.7.114 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b="uDXMa1Vm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1729644364; bh=u9igHWBuSr2c88DQ0ItXsvOXaMorSxMBiSW3OfzCajQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Reply-To: Subject:Date:To:CC:Resent-Date:Resent-From:Resent-To:Resent-Cc: In-Reply-To:References:Content-Type:Content-Disposition; b=uDXMa1VmKSxRwYd40u0Uo5lHZ1vXR4CPVvR/8qozQhOvp30nD5SOy6mPX0WOH3eis Kj0pbnLhoelfT+WGEAfqmebxVlUwa+9UxhNs4o96aNyG0xpAFUJivfHtuBLyKe6ohC iUFHCNPLlLKeDozUSvr9miVZsPuPyoOPG3HIvLzj+WwJfE3vzsuo1IDgYr64GKnnIq eGG7myKTz8bjjkJCR6Us/Sa1xTLFt5GIHQRPngw6p7++ZfStuJXx9CITca7kkyR0vs 5/10pn1PCGhf14vLkX9RoMDCTvJsKQk9CHebqB19tlrt2p+YMsuEFWmOg/Dz+hYGJy Ii61f22h9/7TQvu/MqPwnCfQn/GBprXTkvUTRdcrs3uVWiNiqgLBjmepvsAx3t33N9 NmpTcOIcsG8a6UiCasKwx1y+olcQn9lOg7z42bcByQuWQRXZLkf3sBmaSXUjBg25os K8zceIUhXwI8tbAbnvfCbqJGmVRysz/Afub3XTe8/6HkcVty9zw Received: from tapette.crustytoothpaste.net (unknown [IPv6:2001:470:b056:101:e59a:3ed0:5f5c:31f3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by complex.crustytoothpaste.net (Postfix) with ESMTPSA id 8348C200C4; Wed, 23 Oct 2024 00:46:04 +0000 (UTC) From: "brian m. carlson" To: Cc: Junio C Hamano , Taylor Blau Subject: [PATCH v2 10/12] INSTALL: document requirement for libcurl 7.61.0 Date: Wed, 23 Oct 2024 00:45:58 +0000 Message-ID: <20241023004600.1645313-11-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b In-Reply-To: <20241023004600.1645313-1-sandals@crustytoothpaste.net> References: <20241010235621.738239-1-sandals@crustytoothpaste.net> <20241023004600.1645313-1-sandals@crustytoothpaste.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Our platform support policy states that we require "versions of dependencies which are generally accepted as stable and supportable, e.g., in line with the version used by other long-term-support distributions". Of Debian, Ubuntu, and RHEL, the three most common distributions that provide LTS versions, the version with mainstream long-term security support with the oldest libcurl is 7.61.0 in RHEL 8. Update the documentation to state that this is the new base version for libcurl. Remove text that is no longer applicable to older versions. Signed-off-by: brian m. carlson --- INSTALL | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/INSTALL b/INSTALL index 2a46d04592..6e0321ff0e 100644 --- a/INSTALL +++ b/INSTALL @@ -129,17 +129,12 @@ Issues of note: itself, e.g. Digest::MD5, File::Spec, File::Temp, Net::Domain, Net::SMTP, and Time::HiRes. - - git-imap-send needs the OpenSSL library to talk IMAP over SSL if - you are using libcurl older than 7.34.0. Otherwise you can use - NO_OPENSSL without losing git-imap-send. - - "libcurl" library is used for fetching and pushing repositories over http:// or https://, as well as by - git-imap-send if the curl version is >= 7.34.0. If you do - not need that functionality, use NO_CURL to build without - it. + git-imap-send. If you do not need that functionality, + use NO_CURL to build without it. - Git requires version "7.21.3" or later of "libcurl" to build + Git requires version "7.61.0" or later of "libcurl" to build without NO_CURL. This version requirement may be bumped in the future. From patchwork Wed Oct 23 00:45:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "brian m. carlson" X-Patchwork-Id: 13846292 Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A539329422 for ; Wed, 23 Oct 2024 00:46:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.105.7.114 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644370; cv=none; b=Utz61B4jRcHQ1d/aroVjhOzEFGDRXU1iiEOL/Le77TeS6oTZ0oA5k4h0E4E2ASdv7Vjrr6UYC8ht98hwKcV1z8IcndQVxYodmyPM1VK+s45+eTTqTKgPZjip2QaJg2XiCaa/3shzXVujYImg6kNzOCiJId2zwN8/B+g1vEOrDEA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644370; c=relaxed/simple; bh=vEru1jUYFu1BXHk0qNQWAhhTN3WP3uHXYKLM4fLMz+g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g+GwxY1gX73mDcLsQgCTiBwmFvKPGm9uZokCw/BYq7YiObir57cUOE0hd8E2blQ4MKbxXiycr/lS1+gVWs/q4RZTf71Qoo7btlO63hyaaokrmve4CixINoUtDNYcq6Dd/9UN/FGZAfJIpaLfQk7dSyYsPDgyfgw0tX1bIJV3pXw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net; spf=pass smtp.mailfrom=crustytoothpaste.net; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b=i3qZQBh7; arc=none smtp.client-ip=172.105.7.114 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b="i3qZQBh7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1729644364; bh=vEru1jUYFu1BXHk0qNQWAhhTN3WP3uHXYKLM4fLMz+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Reply-To: Subject:Date:To:CC:Resent-Date:Resent-From:Resent-To:Resent-Cc: In-Reply-To:References:Content-Type:Content-Disposition; b=i3qZQBh75Y2AItwj1EDahIxQ4zV7AnwX9TavNCsn0KyDHZ4CPl2Oy+mBTD+7z2VES 0AI7ocGxBFlhbnfc+Uas/VgYNqgV2apMeRX6yYoH4aAL8YevmDI7KxMHkf/m2FheX8 xaJErrEh1ko2ivGCZ7J7RTzpNO5GkNDWGtLcvwTGYW0YdZJzfbfDiSbDEMk7sH4oNy IP3D9tyiBFZxULbY4M7gj6ARBFGyBUnCgqKbmKEntTFzD7FzYIkB5YXhvU81dciV+x PnLfNCUOI6TEtvtohxHLtSO0bzLSOdZdLaO9FqNY+O7pHd6tZO8UHBBv0ZDt5Pxana oCgvz0Qej32WPUzhSajViLt/Rso9zDa/nr/vVKkYCKVWTlXGNE21sq51pv43gVQUNl 0mIy+IK/AAFDzI+qGeDHmC5I3EcbtPusLGPOQFy2fxCqDhKYM4ODuWoaPGgUqhaVix Vla9mpGFE4pTZt4ygfV3gI/6RjSWnFFdsKlKHEiJ3D5Xjc3rj1S Received: from tapette.crustytoothpaste.net (unknown [IPv6:2001:470:b056:101:e59a:3ed0:5f5c:31f3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by complex.crustytoothpaste.net (Postfix) with ESMTPSA id 8D355200C5; Wed, 23 Oct 2024 00:46:04 +0000 (UTC) From: "brian m. carlson" To: Cc: Junio C Hamano , Taylor Blau Subject: [PATCH v2 11/12] Require Perl 5.26.0 Date: Wed, 23 Oct 2024 00:45:59 +0000 Message-ID: <20241023004600.1645313-12-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b In-Reply-To: <20241023004600.1645313-1-sandals@crustytoothpaste.net> References: <20241010235621.738239-1-sandals@crustytoothpaste.net> <20241023004600.1645313-1-sandals@crustytoothpaste.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Our platform support policy states that we require "versions of dependencies which are generally accepted as stable and supportable, e.g., in line with the version used by other long-term-support distributions". Of Debian, Ubuntu, RHEL, and SLES, the four most common distributions that provide LTS versions, the version with mainstream long-term security support with the oldest Perl is 5.26.0 in SLES 15.6. This is a major upgrade, since Perl 5.8.1, according to the Perl documentation, was released in September of 2003. It brings a lot of new features that we can choose to use, such as s///r to return the modified string, the postderef functionality, and subroutine signatures, although the latter was still considered experimental until 5.36. This change was made with the following one-liner, which intentionally excludes modifying the vendored modules we include to avoid conflicts: git grep -l 'use 5.008001' | grep -v 'LoadCPAN/' | xargs perl -pi -e 's/use 5.008001/require v5.26/' Use require instead of use to avoid changing the behavior as the latter enables features and the former does not. Signed-off-by: brian m. carlson --- INSTALL | 2 +- contrib/diff-highlight/DiffHighlight.pm | 2 +- contrib/mw-to-git/Git/Mediawiki.pm | 2 +- git-archimport.perl | 2 +- git-cvsexportcommit.perl | 2 +- git-cvsimport.perl | 2 +- git-cvsserver.perl | 2 +- git-send-email.perl | 2 +- git-svn.perl | 2 +- gitweb/gitweb.perl | 2 +- perl/Git.pm | 2 +- perl/Git/I18N.pm | 2 +- perl/Git/LoadCPAN.pm | 2 +- perl/Git/Packet.pm | 2 +- t/t0202/test.pl | 2 +- t/t5562/invoke-with-content-length.pl | 2 +- t/t9700/test.pl | 2 +- t/test-terminal.perl | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/INSTALL b/INSTALL index 6e0321ff0e..54d7528f9e 100644 --- a/INSTALL +++ b/INSTALL @@ -119,7 +119,7 @@ Issues of note: - A POSIX-compliant shell is required to run some scripts needed for everyday use (e.g. "bisect", "request-pull"). - - "Perl" version 5.8.1 or later is needed to use some of the + - "Perl" version 5.26.0 or later is needed to use some of the features (e.g. sending patches using "git send-email", interacting with svn repositories with "git svn"). If you can live without these, use NO_PERL. Note that recent releases of diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm index 636add6968..3d061bc0b7 100644 --- a/contrib/diff-highlight/DiffHighlight.pm +++ b/contrib/diff-highlight/DiffHighlight.pm @@ -1,6 +1,6 @@ package DiffHighlight; -use 5.008001; +require v5.26; use warnings FATAL => 'all'; use strict; diff --git a/contrib/mw-to-git/Git/Mediawiki.pm b/contrib/mw-to-git/Git/Mediawiki.pm index ff7811225e..629c0cea44 100644 --- a/contrib/mw-to-git/Git/Mediawiki.pm +++ b/contrib/mw-to-git/Git/Mediawiki.pm @@ -1,6 +1,6 @@ package Git::Mediawiki; -use 5.008001; +require v5.26; use strict; use POSIX; use Git; diff --git a/git-archimport.perl b/git-archimport.perl index f5a317b899..6d0169cb6a 100755 --- a/git-archimport.perl +++ b/git-archimport.perl @@ -54,7 +54,7 @@ =head1 Devel Notes =cut -use 5.008001; +require v5.26; use strict; use warnings; use Getopt::Std; diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl index 1e03ba94d1..edf02f9964 100755 --- a/git-cvsexportcommit.perl +++ b/git-cvsexportcommit.perl @@ -1,6 +1,6 @@ #!/usr/bin/perl -use 5.008001; +require v5.26; use strict; use warnings; use Getopt::Std; diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 211ec8459a..e10ad5334e 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -13,7 +13,7 @@ # The head revision is on branch "origin" by default. # You can change that with the '-o' option. -use 5.008001; +require v5.26; use strict; use warnings; use Getopt::Long; diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 124f598bdc..a4ad9a5d2d 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -15,7 +15,7 @@ #### #### -use 5.008001; +require v5.26; use strict; use warnings; use bytes; diff --git a/git-send-email.perl b/git-send-email.perl index c835d4c11a..c4d12bebc8 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -16,7 +16,7 @@ # and second line is the subject of the message. # -use 5.008001; +require v5.26; use strict; use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); use Getopt::Long; diff --git a/git-svn.perl b/git-svn.perl index 01e7a70de1..9c7c629932 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -1,7 +1,7 @@ #!/usr/bin/perl # Copyright (C) 2006, Eric Wong # License: GPL v2 or later -use 5.008001; +require v5.26; use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); use strict; use vars qw/ $AUTHOR $VERSION diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index b09a8d0523..da1486cab2 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -7,7 +7,7 @@ # # This program is licensed under the GPLv2 -use 5.008001; +require v5.26; use strict; use warnings; # handle ACL in file access tests diff --git a/perl/Git.pm b/perl/Git.pm index 667152c6c6..6f47d653ab 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -7,7 +7,7 @@ =head1 NAME package Git; -use 5.008001; +require v5.26; use strict; use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); diff --git a/perl/Git/I18N.pm b/perl/Git/I18N.pm index 475e90a6df..ab46edb608 100644 --- a/perl/Git/I18N.pm +++ b/perl/Git/I18N.pm @@ -1,5 +1,5 @@ package Git::I18N; -use 5.008001; +require v5.26; use strict; use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); BEGIN { diff --git a/perl/Git/LoadCPAN.pm b/perl/Git/LoadCPAN.pm index 8c7fa805f9..61254fddbb 100644 --- a/perl/Git/LoadCPAN.pm +++ b/perl/Git/LoadCPAN.pm @@ -1,5 +1,5 @@ package Git::LoadCPAN; -use 5.008001; +require v5.26; use strict; use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); diff --git a/perl/Git/Packet.pm b/perl/Git/Packet.pm index d896e69523..00fd9c484a 100644 --- a/perl/Git/Packet.pm +++ b/perl/Git/Packet.pm @@ -1,5 +1,5 @@ package Git::Packet; -use 5.008001; +require v5.26; use strict; use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); BEGIN { diff --git a/t/t0202/test.pl b/t/t0202/test.pl index 47d96a2a13..5085a0eda5 100755 --- a/t/t0202/test.pl +++ b/t/t0202/test.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -use 5.008001; +require v5.26; use lib (split(/:/, $ENV{GITPERLLIB})); use strict; use warnings; diff --git a/t/t5562/invoke-with-content-length.pl b/t/t5562/invoke-with-content-length.pl index 9babb9a375..211e29fade 100644 --- a/t/t5562/invoke-with-content-length.pl +++ b/t/t5562/invoke-with-content-length.pl @@ -1,4 +1,4 @@ -use 5.008001; +require v5.26; use strict; use warnings; diff --git a/t/t9700/test.pl b/t/t9700/test.pl index 2e1d50d4d1..58a9b328d5 100755 --- a/t/t9700/test.pl +++ b/t/t9700/test.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl use lib (split(/:/, $ENV{GITPERLLIB})); -use 5.008001; +require v5.26; use warnings; use strict; diff --git a/t/test-terminal.perl b/t/test-terminal.perl index b8fd6a4f13..862bb8f395 100755 --- a/t/test-terminal.perl +++ b/t/test-terminal.perl @@ -1,5 +1,5 @@ #!/usr/bin/perl -use 5.008001; +require v5.26; use strict; use warnings; use IO::Pty; From patchwork Wed Oct 23 00:46:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "brian m. carlson" X-Patchwork-Id: 13846290 Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 637C82747B for ; Wed, 23 Oct 2024 00:46:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.105.7.114 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644370; cv=none; b=mlQUNeXlOg4iKShInL/9H7JzzTQTWaOWmGDYqyr2b3TBkwFNNe/G2nO8sOnz/Kk1qp1D3xoQtmBMvx3jUW42WMQqXE0AepsU0u/8JlP2w8H/WClUx6Wo5sHh8Q5kP6QRdhe7BbU3pp/Yd+9u9lOeRZVOzVbK7zt6V9UPp4nI7ak= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729644370; c=relaxed/simple; bh=WJyRjGsgdCNryK2Q/58Y+LPKhj2ZIP3K64IaoWZQ+zA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iC3TgbB2HEHmOHFKZF7vGMQLqegc2JlD8qWjW/DAQpZJInq2RiEi4LL/Thec3+x3qPUcRRWgTLhCHxCBGHOWcTZpeCGksKb618eQxwyAfm5CEQ72ga90U4nWskZpTmAnyZXRjIDgbE6VH2OoPn3gay7F7QKlM7jVfuDET2JsAaI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net; spf=pass smtp.mailfrom=crustytoothpaste.net; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b=sqnK6G2X; arc=none smtp.client-ip=172.105.7.114 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.b="sqnK6G2X" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net; s=default; t=1729644364; bh=WJyRjGsgdCNryK2Q/58Y+LPKhj2ZIP3K64IaoWZQ+zA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Reply-To: Subject:Date:To:CC:Resent-Date:Resent-From:Resent-To:Resent-Cc: In-Reply-To:References:Content-Type:Content-Disposition; b=sqnK6G2XSt53Oq+X2cdlaWU0KRrx0Vm+PdsaO52sca9IbVtyX2V0Lmtvw4UinlK97 FEdrNSRwIxU+7ZDDfkJzi6SI5wDFP2YJdBeDqHS8Yy67kb7rsKzO3K8gMdDcBjTAfP SnOOKhGc4F4eN4ywJUZl2CHLfryyocmpksWKGJyWsLbaYfNoKVR+3rNkPcYBH23bQw k9bHfOFcykaFwXK+MnZq+SsXtX+Idh5mP4/KlehbznEH4wItDJS3at8Ypn7GhBAK05 E4FCIVE0WFItQunpqPCdT9ii7nLr7Xv9uLYr6j/kUdZPAMRMeBShNm2Gs+b6355z2Z WyVZsE1XOZnkUIOmbdM5ccAsNJ4An92cCQsHVu52fTGVjjuRSGMCzOHASoKEcTgnao iAO+7oJR4oWMkjGO783Hig5E4VSLGU4jjOmgwbt/LcZAtxpt/AhSFb4DTE/auIflDe XDxGZTyc6BFRW9M+gPPNWvMhc79Kv7IFzdp01I48AuXBlhJJab6 Received: from tapette.crustytoothpaste.net (unknown [IPv6:2001:470:b056:101:e59a:3ed0:5f5c:31f3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by complex.crustytoothpaste.net (Postfix) with ESMTPSA id 976EB200C6; Wed, 23 Oct 2024 00:46:04 +0000 (UTC) From: "brian m. carlson" To: Cc: Junio C Hamano , Taylor Blau Subject: [PATCH v2 12/12] gitweb: make use of s///r Date: Wed, 23 Oct 2024 00:46:00 +0000 Message-ID: <20241023004600.1645313-13-sandals@crustytoothpaste.net> X-Mailer: git-send-email 2.45.2.753.g447d99e1c3b In-Reply-To: <20241023004600.1645313-1-sandals@crustytoothpaste.net> References: <20241010235621.738239-1-sandals@crustytoothpaste.net> <20241023004600.1645313-1-sandals@crustytoothpaste.net> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In Perl 5.14, released in May 2011, the r modifier was added to the s/// operator to allow it to return the modified string instead of modifying the string in place. This allows to write nicer, more succinct code in several cases, so let's do that here. Signed-off-by: brian m. carlson --- gitweb/gitweb.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index da1486cab2..c4e0008d59 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1188,7 +1188,7 @@ sub evaluate_and_validate_params { if ($search_use_regexp) { $search_regexp = $searchtext; if (!eval { qr/$search_regexp/; 1; }) { - (my $error = $@) =~ s/ at \S+ line \d+.*\n?//; + my $error = $@ =~ s/ at \S+ line \d+.*\n?//r; die_error(400, "Invalid search regexp '$search_regexp'", esc_html($error)); } @@ -2700,7 +2700,7 @@ sub git_cmd { # Try to avoid using this function wherever possible. sub quote_command { return join(' ', - map { my $a = $_; $a =~ s/(['!])/'\\$1'/g; "'$a'" } @_ ); + map { my $a = $_ =~ s/(['!])/'\\$1'/gr; "'$a'" } @_ ); } # get HEAD ref of given project as hash