diff --git a/0001-python-pycurl-7.45.1-tls-backend.patch b/0001-python-pycurl-7.45.1-tls-backend.patch new file mode 100644 index 0000000000000000000000000000000000000000..04eb575552fbb02bd66fd2a30dea06b63fa587c0 --- /dev/null +++ b/0001-python-pycurl-7.45.1-tls-backend.patch @@ -0,0 +1,106 @@ +From 9a5bfbe011be8d79e4bde1f8db2369beb063eb3a Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Tue, 2 May 2017 17:19:20 +0200 +Subject: [PATCH] module: drop link-time vs. run-time TLS backend check + +This effectively reverts the following commit: +8891398a31119ce7c872509ed60328926c51cdfb + +Bug: https://bugzilla.redhat.com/1446850 +--- + src/module.c | 69 ---------------------------------------------------- + 1 file changed, 69 deletions(-) + +diff --git a/src/module.c b/src/module.c +index a81391f..b87d1d5 100644 +--- a/src/module.c ++++ b/src/module.c +@@ -336,15 +336,6 @@ initpycurl(void) + PyObject *collections_module = NULL; + PyObject *named_tuple = NULL; + PyObject *arglist = NULL; +-#ifdef HAVE_CURL_GLOBAL_SSLSET +- const curl_ssl_backend **ssllist = NULL; +- CURLsslset sslset; +- int i, runtime_supported_backend_found = 0; +- char backends[200]; +- size_t backends_len = 0; +-#else +- const char *runtime_ssl_lib; +-#endif + + assert(Curl_Type.tp_weaklistoffset > 0); + assert(CurlMulti_Type.tp_weaklistoffset > 0); +@@ -362,69 +353,6 @@ initpycurl(void) + goto error; + } + +- /* Our compiled crypto locks should correspond to runtime ssl library. */ +-#ifdef HAVE_CURL_GLOBAL_SSLSET +- sslset = curl_global_sslset(-1, COMPILE_SSL_LIB, &ssllist); +- if (sslset != CURLSSLSET_OK) { +- if (sslset == CURLSSLSET_NO_BACKENDS) { +- strcpy(backends, "none"); +- } else { +- for (i = 0; ssllist[i] != NULL; i++) { +- switch (ssllist[i]->id) { +- case CURLSSLBACKEND_OPENSSL: +- case CURLSSLBACKEND_GNUTLS: +- case CURLSSLBACKEND_NSS: +- case CURLSSLBACKEND_WOLFSSL: +- case CURLSSLBACKEND_SCHANNEL: +- case CURLSSLBACKEND_MBEDTLS: +-#if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 64, 1) +- case CURLSSLBACKEND_SECURETRANSPORT: +-#else +- case CURLSSLBACKEND_DARWINSSL: +-#endif +- runtime_supported_backend_found = 1; +- break; +- default: +- break; +- } +- if (backends_len < sizeof(backends)) { +- backends_len += snprintf(backends + backends_len, sizeof(backends) - backends_len, "%s%s", (i > 0) ? ", " : "", ssllist[i]->name); +- } +- } +- } +- /* Don't error if both the curl library and pycurl itself is compiled without SSL */ +- if (runtime_supported_backend_found || COMPILE_SUPPORTED_SSL_BACKEND_FOUND) { +- PyErr_Format(PyExc_ImportError, "pycurl: libcurl link-time ssl backends (%s) do not include compile-time ssl backend (%s)", backends, COMPILE_SSL_LIB); +- goto error; +- } +- } +-#else +- if (vi->ssl_version == NULL) { +- runtime_ssl_lib = "none/other"; +- } else if (!strncmp(vi->ssl_version, "OpenSSL/", 8) || !strncmp(vi->ssl_version, "LibreSSL/", 9) || +- !strncmp(vi->ssl_version, "BoringSSL", 9)) { +- runtime_ssl_lib = "openssl"; +- } else if (!strncmp(vi->ssl_version, "wolfSSL/", 8)) { +- runtime_ssl_lib = "wolfssl"; +- } else if (!strncmp(vi->ssl_version, "GnuTLS/", 7)) { +- runtime_ssl_lib = "gnutls"; +- } else if (!strncmp(vi->ssl_version, "NSS/", 4)) { +- runtime_ssl_lib = "nss"; +- } else if (!strncmp(vi->ssl_version, "mbedTLS/", 8)) { +- runtime_ssl_lib = "mbedtls"; +- } else if (!strncmp(vi->ssl_version, "Secure Transport", 16)) { +- runtime_ssl_lib = "secure-transport"; +- } else if (!strncmp(vi->ssl_version, "Schannel", 8)) { +- runtime_ssl_lib = "schannel"; +- } else { +- runtime_ssl_lib = "none/other"; +- } +- if (strcmp(runtime_ssl_lib, COMPILE_SSL_LIB)) { +- PyErr_Format(PyExc_ImportError, "pycurl: libcurl link-time ssl backend (%s) is different from compile-time ssl backend (%s)", runtime_ssl_lib, COMPILE_SSL_LIB); +- goto error; +- } +-#endif +- + /* Initialize the type of the new type objects here; doing it here + * is required for portability to Windows without requiring C++. */ + p_Curl_Type = &Curl_Type; +-- +2.35.1 + diff --git a/0002-python-pycurl-7.45.2-disable-test_http_version_3.patch b/0002-python-pycurl-7.45.2-disable-test_http_version_3.patch deleted file mode 100644 index 388e48fe2a1264a4a6e6f32ddbd3d052df1c856c..0000000000000000000000000000000000000000 --- a/0002-python-pycurl-7.45.2-disable-test_http_version_3.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 6c55e6822a064edb8dd6dfe1ee21080f4f30b5cf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= -Date: Tue, 7 Mar 2023 16:32:19 +0100 -Subject: [PATCH] tests: temporarily disable test_http_version_3 - -HTTP3 support in curl is only experimental at the moment and is disabled -in the corresponding Fedora package. ---- - tests/option_constants_test.py | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/tests/option_constants_test.py b/tests/option_constants_test.py -index 7b94164..04dc3da 100644 ---- a/tests/option_constants_test.py -+++ b/tests/option_constants_test.py -@@ -508,10 +508,6 @@ class OptionConstantsSettingTest(unittest.TestCase): - def test_http_version_2prior_knowledge(self): - self.curl.setopt(self.curl.HTTP_VERSION, self.curl.CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE) - -- @util.min_libcurl(7, 66, 0) -- def test_http_version_3(self): -- self.curl.setopt(self.curl.HTTP_VERSION, self.curl.CURL_HTTP_VERSION_3) -- - @util.min_libcurl(7, 21, 5) - def test_sockopt_constants(self): - assert self.curl.SOCKOPT_OK is not None --- -2.39.2 - diff --git a/pycurl-7.45.2.tar.gz b/pycurl-7.45.2.tar.gz deleted file mode 100644 index 7b06679d87cb82be8c66441d2f16a83e4ee2b5d5..0000000000000000000000000000000000000000 Binary files a/pycurl-7.45.2.tar.gz and /dev/null differ diff --git a/pycurl-7.45.3.tar.gz b/pycurl-7.45.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f49a7af757595895864bac1f8e7b2d3bc1b9271c Binary files /dev/null and b/pycurl-7.45.3.tar.gz differ diff --git a/python-pycurl.spec b/python-pycurl.spec index 9e38225c4fe3ce6355e4a4b0f6ebcfbeb255f4e7..e0fbcc8fc6cbbea411555275b257b08848ece4ae 100644 --- a/python-pycurl.spec +++ b/python-pycurl.spec @@ -6,15 +6,14 @@ %global srcname pycurl Name: python-%{srcname} -Version: 7.45.2 -Release: 3 +Version: 7.45.3 +Release: 1 Summary: A Python interface to libcurl License: LGPL-2.0+ or MIT URL: http://pycurl.sourceforge.net/ Source0: %{pypi_source} # drop link-time vs. run-time TLS backend check (#1446850) - -Patch1: 0002-python-pycurl-7.45.2-disable-test_http_version_3.patch +Patch1: 0001-python-pycurl-7.45.1-tls-backend.patch BuildRequires: gcc libcurl-devel openssl-devel vsftpd @@ -101,6 +100,9 @@ rm -fv tests/fake-curl/libcurl/*.so %{python3_sitearch}/pycurl-%{version}-*.egg-info %changelog +* Tue Sep 3 2024 dillon chen - 7.45.3-1 +- update version to 7.45.3 + * Fri Apr 12 2024 zhuofeng - 7.45.2-3 - Type:bugfix - CVE:NA