Compare commits
No commits in common. "c8" and "c9s" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/pycurl-7.43.0.2.tar.gz
|
/pycurl-7.*.*.tar.gz
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
cd617ed4e40a3b8f5ca5bf54aba7f35ed25afa46 SOURCES/pycurl-7.43.0.2.tar.gz
|
|
||||||
56
0001-python-pycurl-7.43.0.6-python-3.10.patch
Normal file
56
0001-python-pycurl-7.43.0.6-python-3.10.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
From b3a1ff559c28f71702248cae317fa83baaa086a0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
Date: Mon, 26 Oct 2020 17:26:23 +0100
|
||||||
|
Subject: [PATCH] src/module.c: make the code compile against python-3.10.0a1
|
||||||
|
|
||||||
|
src/module.c:353:25: error: lvalue required as left operand of assignment
|
||||||
|
353 | Py_TYPE(&Curl_Type) = &PyType_Type;
|
||||||
|
| ^
|
||||||
|
src/module.c:354:30: error: lvalue required as left operand of assignment
|
||||||
|
354 | Py_TYPE(&CurlMulti_Type) = &PyType_Type;
|
||||||
|
| ^
|
||||||
|
src/module.c:355:30: error: lvalue required as left operand of assignment
|
||||||
|
355 | Py_TYPE(&CurlShare_Type) = &PyType_Type;
|
||||||
|
| ^
|
||||||
|
|
||||||
|
Bug: https://bugzilla.redhat.com/1890442
|
||||||
|
|
||||||
|
Upstream-commit: c4036bdcb5dd01420a451cf02efac7c3fdf9e41f
|
||||||
|
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
---
|
||||||
|
src/module.c | 12 +++++++++---
|
||||||
|
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/module.c b/src/module.c
|
||||||
|
index 65e8c3a..9204ee0 100644
|
||||||
|
--- a/src/module.c
|
||||||
|
+++ b/src/module.c
|
||||||
|
@@ -11,6 +11,12 @@
|
||||||
|
|
||||||
|
#define PYCURL_VERSION_PREFIX "PycURL/" PYCURL_VERSION_STRING
|
||||||
|
|
||||||
|
+/* needed for compatibility with python < 3.10, as suggested at:
|
||||||
|
+ * https://docs.python.org/3.10/whatsnew/3.10.html#id2 */
|
||||||
|
+#if PY_VERSION_HEX < 0x030900A4
|
||||||
|
+# define Py_SET_TYPE(obj, type) ((Py_TYPE(obj) = (type)), (void)0)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
PYCURL_INTERNAL char *empty_keywords[] = { NULL };
|
||||||
|
|
||||||
|
PYCURL_INTERNAL PyObject *bytesio = NULL;
|
||||||
|
@@ -412,9 +418,9 @@ initpycurl(void)
|
||||||
|
p_Curl_Type = &Curl_Type;
|
||||||
|
p_CurlMulti_Type = &CurlMulti_Type;
|
||||||
|
p_CurlShare_Type = &CurlShare_Type;
|
||||||
|
- Py_TYPE(&Curl_Type) = &PyType_Type;
|
||||||
|
- Py_TYPE(&CurlMulti_Type) = &PyType_Type;
|
||||||
|
- Py_TYPE(&CurlShare_Type) = &PyType_Type;
|
||||||
|
+ Py_SET_TYPE(&Curl_Type, &PyType_Type);
|
||||||
|
+ Py_SET_TYPE(&CurlMulti_Type, &PyType_Type);
|
||||||
|
+ Py_SET_TYPE(&CurlShare_Type, &PyType_Type);
|
||||||
|
|
||||||
|
/* Create the module and add the functions */
|
||||||
|
if (PyType_Ready(&Curl_Type) < 0)
|
||||||
|
--
|
||||||
|
2.25.4
|
||||||
|
|
||||||
96
0002-python-pycurl-7.43.0-tls-backend.patch
Normal file
96
0002-python-pycurl-7.43.0-tls-backend.patch
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
From 36dcccb94bef72a7c4cf6acf7479f18568e545bb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
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 | 62 ----------------------------------------------------
|
||||||
|
1 file changed, 62 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/module.c b/src/module.c
|
||||||
|
index a7108a0..af79875 100644
|
||||||
|
--- a/src/module.c
|
||||||
|
+++ b/src/module.c
|
||||||
|
@@ -328,15 +328,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);
|
||||||
|
@@ -354,59 +345,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_MBEDTLS:
|
||||||
|
- 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 {
|
||||||
|
- 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.10.2
|
||||||
|
|
||||||
@ -1,93 +0,0 @@
|
|||||||
From 047bd00ee53a722eaf46e58e330888cf628d5a7c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
Date: Mon, 14 Jan 2019 16:54:19 +0100
|
|
||||||
Subject: [PATCH 1/2] do_curl_setopt_httppost: do not use uninitialized stack
|
|
||||||
variable
|
|
||||||
|
|
||||||
Detected by Coverity Analysis and Clang:
|
|
||||||
|
|
||||||
Error: UNINIT (CWE-457):
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:493: var_decl: Declaring variable "res" without initializer.
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:524: uninit_use_in_call: Using uninitialized value "(int)res" when calling "create_and_set_error_object".
|
|
||||||
522| if (PyText_AsStringAndSize(httppost_option, &cstr, &clen, &cencoded_obj)) {
|
|
||||||
523| PyText_EncodedDecref(nencoded_obj);
|
|
||||||
524|-> CURLERROR_SET_RETVAL();
|
|
||||||
525| goto error;
|
|
||||||
526| }
|
|
||||||
|
|
||||||
Error: CLANG_WARNING:
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:524:17: warning: 2nd function call argument is an uninitialized value
|
|
||||||
pycurl-7.43.0.2/src/pycurl.h:286:5: note: expanded from macro 'CURLERROR_SET_RETVAL'
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:493:5: note: 'res' declared without an initial value
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:496:9: note: Assuming 'len' is not equal to 0
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:496:5: note: Taking false branch
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:499:17: note: Assuming 'i' is < 'len'
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:499:5: note: Loop condition is true. Entering loop body
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:505:13: note: Assuming 'which_httppost_item' is not equal to 0
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:505:9: note: Taking false branch
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:509:13: note: Assuming the condition is false
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:509:9: note: Taking false branch
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:513:13: note: Assuming the condition is false
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:513:9: note: Taking false branch
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:519:13: note: Assuming the condition is true
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:519:9: note: Taking true branch
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:522:17: note: Assuming the condition is true
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:522:13: note: Taking true branch
|
|
||||||
pycurl-7.43.0.2/src/easyopt.c:524:17: note: 2nd function call argument is an uninitialized value
|
|
||||||
pycurl-7.43.0.2/src/pycurl.h:286:5: note: expanded from macro 'CURLERROR_SET_RETVAL'
|
|
||||||
---
|
|
||||||
src/easyopt.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/easyopt.c b/src/easyopt.c
|
|
||||||
index 015fa93..471400c 100644
|
|
||||||
--- a/src/easyopt.c
|
|
||||||
+++ b/src/easyopt.c
|
|
||||||
@@ -521,7 +521,7 @@ do_curl_setopt_httppost(CurlObject *self, int option, int which, PyObject *obj)
|
|
||||||
|
|
||||||
if (PyText_AsStringAndSize(httppost_option, &cstr, &clen, &cencoded_obj)) {
|
|
||||||
PyText_EncodedDecref(nencoded_obj);
|
|
||||||
- CURLERROR_SET_RETVAL();
|
|
||||||
+ create_and_set_error_object(self, CURLE_BAD_FUNCTION_ARGUMENT);
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
/* INFO: curl_formadd() internally does memdup() the data, so
|
|
||||||
--
|
|
||||||
2.17.2
|
|
||||||
|
|
||||||
|
|
||||||
From 6f0f7896412c107c390f4967dcdf94fd14d52047 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
Date: Mon, 14 Jan 2019 16:57:14 +0100
|
|
||||||
Subject: [PATCH 2/2] do_multi_add_handle: execute clean-up code before return
|
|
||||||
|
|
||||||
Detected by Coverity Analysis:
|
|
||||||
|
|
||||||
Error: UNREACHABLE (CWE-561):
|
|
||||||
pycurl-7.43.0.2/src/multi.c:631: unreachable: This code cannot be reached: "PyDict_DelItem(self->easy_o...".
|
|
||||||
629| if (res != CURLM_OK) {
|
|
||||||
630| CURLERROR_MSG("curl_multi_add_handle() failed due to internal errors");
|
|
||||||
631|-> PyDict_DelItem(self->easy_object_dict, (PyObject *) obj);
|
|
||||||
632| }
|
|
||||||
633| obj->multi_stack = self;
|
|
||||||
---
|
|
||||||
src/multi.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/multi.c b/src/multi.c
|
|
||||||
index 7ecedbf..3407423 100644
|
|
||||||
--- a/src/multi.c
|
|
||||||
+++ b/src/multi.c
|
|
||||||
@@ -627,8 +627,8 @@ do_multi_add_handle(CurlMultiObject *self, PyObject *args)
|
|
||||||
assert(obj->multi_stack == NULL);
|
|
||||||
res = curl_multi_add_handle(self->multi_handle, obj->handle);
|
|
||||||
if (res != CURLM_OK) {
|
|
||||||
- CURLERROR_MSG("curl_multi_add_handle() failed due to internal errors");
|
|
||||||
PyDict_DelItem(self->easy_object_dict, (PyObject *) obj);
|
|
||||||
+ CURLERROR_MSG("curl_multi_add_handle() failed due to internal errors");
|
|
||||||
}
|
|
||||||
obj->multi_stack = self;
|
|
||||||
Py_INCREF(self);
|
|
||||||
--
|
|
||||||
2.17.2
|
|
||||||
|
|
||||||
@ -1,54 +0,0 @@
|
|||||||
From 36dcccb94bef72a7c4cf6acf7479f18568e545bb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
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 | 20 +-------------------
|
|
||||||
1 file changed, 1 insertion(+), 19 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/module.c b/src/module.c
|
|
||||||
index a7108a0..af79875 100644
|
|
||||||
--- a/src/module.c
|
|
||||||
+++ b/src/module.c
|
|
||||||
@@ -322,7 +322,7 @@ initpycurl(void)
|
|
||||||
{
|
|
||||||
PyObject *m, *d;
|
|
||||||
const curl_version_info_data *vi;
|
|
||||||
- const char *libcurl_version, *runtime_ssl_lib;
|
|
||||||
+ const char *libcurl_version;
|
|
||||||
size_t libcurl_version_len, pycurl_version_len;
|
|
||||||
PyObject *xio_module = NULL;
|
|
||||||
PyObject *collections_module = NULL;
|
|
||||||
@@ -345,24 +345,6 @@ initpycurl(void)
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* Our compiled crypto locks should correspond to runtime ssl library. */
|
|
||||||
- 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, "GnuTLS/", 7)) {
|
|
||||||
- runtime_ssl_lib = "gnutls";
|
|
||||||
- } else if (!strncmp(vi->ssl_version, "NSS/", 4)) {
|
|
||||||
- runtime_ssl_lib = "nss";
|
|
||||||
- } 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;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
/* 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.10.2
|
|
||||||
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
From f5141d34f54ec2ae3309324a99f0f5887f0a8201 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Dmitriy Taychenachev <dmitriy.taychenachev@skypicker.com>
|
|
||||||
Date: Tue, 9 Apr 2019 11:23:58 +0200
|
|
||||||
Subject: [PATCH] decode_string_list: fix populating list of decoded strings
|
|
||||||
|
|
||||||
Under Python3 the call curl.getinfo(pycurl.INFO_COOKIELIST) returns
|
|
||||||
invalid list (for example [<NULL>]), which cases segmentation fault.
|
|
||||||
The cause is in function decode_string_list() (Python3 only) which
|
|
||||||
creates new list without populating it with elements. This commit
|
|
||||||
adds the setting of elements fixing the behaviour.
|
|
||||||
|
|
||||||
Upstream-commit: 5df7a0e5bb38a3db5f04721add571cd32c5e3eb8
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
src/easyinfo.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/easyinfo.c b/src/easyinfo.c
|
|
||||||
index b3d731b..3712646 100644
|
|
||||||
--- a/src/easyinfo.c
|
|
||||||
+++ b/src/easyinfo.c
|
|
||||||
@@ -277,6 +277,7 @@ decode_string_list(PyObject *list)
|
|
||||||
if (decoded_item == NULL) {
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
+ PyList_SetItem(decoded_list, i, decoded_item);
|
|
||||||
}
|
|
||||||
|
|
||||||
return decoded_list;
|
|
||||||
--
|
|
||||||
2.21.1
|
|
||||||
|
|
||||||
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-9
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
||||||
@ -5,37 +5,43 @@
|
|||||||
%bcond_with python3
|
%bcond_with python3
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# python2 is not available on RHEL > 7 and not needed on Fedora > 29
|
# python2 is not available on Fedora and el8+
|
||||||
%if 0%{?rhel} > 7 || 0%{?fedora} > 29
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
%bcond_with python2
|
%bcond_with python2
|
||||||
%else
|
%else
|
||||||
%bcond_without python2
|
%bcond_without python2
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# test dependencies are not available on el9+
|
||||||
|
%if 0%{?fedora}
|
||||||
|
%bcond_without tests
|
||||||
|
%else
|
||||||
|
%bcond_with tests
|
||||||
|
%endif
|
||||||
|
|
||||||
%global modname pycurl
|
%global modname pycurl
|
||||||
|
|
||||||
Name: python-%{modname}
|
Name: python-%{modname}
|
||||||
Version: 7.43.0.2
|
Version: 7.43.0.6
|
||||||
Release: 4%{?dist}
|
Release: 8%{?dist}
|
||||||
Summary: A Python interface to libcurl
|
Summary: A Python interface to libcurl
|
||||||
|
|
||||||
License: LGPLv2+ or MIT
|
License: LGPLv2+ or MIT
|
||||||
URL: http://pycurl.sourceforge.net/
|
URL: http://pycurl.sourceforge.net/
|
||||||
Source0: https://dl.bintray.com/pycurl/pycurl/pycurl-%{version}.tar.gz
|
# reported as unavailable: https://github.com/pycurl/pycurl/issues/651
|
||||||
|
# Source0: https://dl.bintray.com/pycurl/pycurl/pycurl-%%{version}.tar.gz
|
||||||
|
Source0: https://github.com/pycurl/pycurl/archive/REL_7_43_0_6.tar.gz#/pycurl-%{version}.tar.gz
|
||||||
|
|
||||||
# fix programming mistakes detected by static analyzers
|
# make the code compile against python-3.10.0a1 (#1890442)
|
||||||
# upstream pull request: https://github.com/pycurl/pycurl/pull/550
|
Patch1: 0001-python-pycurl-7.43.0.6-python-3.10.patch
|
||||||
Patch1: 0001-python-pycurl-7.43.0.2-static-analysis.patch
|
|
||||||
|
|
||||||
# drop link-time vs. run-time TLS backend check (#1446850)
|
# drop link-time vs. run-time TLS backend check (#1446850)
|
||||||
Patch2: 0002-python-pycurl-7.43.0-tls-backend.patch
|
Patch2: 0002-python-pycurl-7.43.0-tls-backend.patch
|
||||||
|
|
||||||
# fix populating list of decoded strings (#1792213)
|
|
||||||
Patch3: 0003-python-pycurl-7.43.0.2-decode-cookie-info.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: libcurl-devel
|
BuildRequires: libcurl-devel
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
|
BuildRequires: make
|
||||||
BuildRequires: vsftpd
|
BuildRequires: vsftpd
|
||||||
|
|
||||||
# During its initialization, PycURL checks that the actual libcurl version
|
# During its initialization, PycURL checks that the actual libcurl version
|
||||||
@ -58,8 +64,6 @@ of features.
|
|||||||
Summary: Python interface to libcurl for Python 2
|
Summary: Python interface to libcurl for Python 2
|
||||||
%{?python_provide:%python_provide python2-%{modname}}
|
%{?python_provide:%python_provide python2-%{modname}}
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python2-bottle
|
|
||||||
BuildRequires: python2-nose
|
|
||||||
Requires: libcurl%{?_isa} >= %{libcurl_ver}
|
Requires: libcurl%{?_isa} >= %{libcurl_ver}
|
||||||
|
|
||||||
Provides: %{modname} = %{version}-%{release}
|
Provides: %{modname} = %{version}-%{release}
|
||||||
@ -78,8 +82,14 @@ Python 2 version.
|
|||||||
Summary: Python interface to libcurl for Python 3
|
Summary: Python interface to libcurl for Python 3
|
||||||
%{?python_provide:%python_provide python3-%{modname}}
|
%{?python_provide:%python_provide python3-%{modname}}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
%if %{with tests}
|
||||||
BuildRequires: python3-bottle
|
BuildRequires: python3-bottle
|
||||||
BuildRequires: python3-nose
|
BuildRequires: python3-nose
|
||||||
|
%global nosetests nosetests-%{python3_version} -v
|
||||||
|
%else
|
||||||
|
%global nosetests true
|
||||||
|
%endif
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
Requires: libcurl%{?_isa} >= %{libcurl_ver}
|
Requires: libcurl%{?_isa} >= %{libcurl_ver}
|
||||||
|
|
||||||
%description -n python3-%{modname}
|
%description -n python3-%{modname}
|
||||||
@ -92,11 +102,19 @@ Python 3 version.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{modname}-%{version} -p1
|
%autosetup -n %{modname}-REL_7_43_0_6 -p1
|
||||||
|
|
||||||
|
# remove windows-specific build script
|
||||||
|
rm -f winbuild.py
|
||||||
|
sed -e 's| winbuild.py||' -i Makefile
|
||||||
|
|
||||||
# remove binaries packaged by upstream
|
# remove binaries packaged by upstream
|
||||||
rm -f tests/fake-curl/libcurl/*.so
|
rm -f tests/fake-curl/libcurl/*.so
|
||||||
|
|
||||||
|
# temporarily remove a failing test-case (#1927655)
|
||||||
|
# upstream issue: https://github.com/curl/curl/issues/6615
|
||||||
|
rm -f tests/failonerror_test.py
|
||||||
|
|
||||||
# remove a test-case that relies on sftp://web.sourceforge.net being available
|
# remove a test-case that relies on sftp://web.sourceforge.net being available
|
||||||
rm -f tests/ssh_key_cb_test.py
|
rm -f tests/ssh_key_cb_test.py
|
||||||
|
|
||||||
@ -111,11 +129,18 @@ sed -e 's/ --show-skipped//' \
|
|||||||
-e 's/ --with-flaky//' \
|
-e 's/ --with-flaky//' \
|
||||||
-i tests/run.sh
|
-i tests/run.sh
|
||||||
|
|
||||||
|
# use %%{python3} instead of python to invoke tests, to make them work on f34
|
||||||
|
sed -e 's|python |%{python3} |' -i tests/ext/test-suite.sh
|
||||||
|
sed -e 's|^#! */usr/bin/env python$|#! /usr/bin/env %{python3}|' \
|
||||||
|
-i tests/*.py tests/bin/* setup.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
|
%{python2} setup.py docstrings
|
||||||
%py2_build -- --with-openssl
|
%py2_build -- --with-openssl
|
||||||
%endif
|
%endif
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
|
%{python3} setup.py docstrings
|
||||||
%py3_build -- --with-openssl
|
%py3_build -- --with-openssl
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -131,15 +156,14 @@ rm -rf %{buildroot}%{_datadir}/doc/pycurl
|
|||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
%check
|
%check
|
||||||
export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
# relax crypto policy for the test-suite to make it pass again (#1863711)
|
||||||
export PYCURL_SSL_LIBRARY=openssl
|
|
||||||
export PYCURL_VSFTPD_PATH=vsftpd
|
|
||||||
|
|
||||||
# relax crypto policy for the test-suite to make it pass again (#1611739)
|
|
||||||
export OPENSSL_SYSTEM_CIPHERS_OVERRIDE=XXX
|
export OPENSSL_SYSTEM_CIPHERS_OVERRIDE=XXX
|
||||||
export OPENSSL_CONF=
|
export OPENSSL_CONF=
|
||||||
|
|
||||||
make test PYTHON=%{__python3} NOSETESTS="nosetests-%{python3_version} -v" PYFLAKES=:
|
export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
||||||
|
export PYCURL_SSL_LIBRARY=openssl
|
||||||
|
export PYCURL_VSFTPD_PATH=vsftpd
|
||||||
|
make test PYTHON=%{__python3} NOSETESTS="%{nosetests}" PYFLAKES=true
|
||||||
rm -fv tests/fake-curl/libcurl/*.so
|
rm -fv tests/fake-curl/libcurl/*.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -162,15 +186,81 @@ rm -fv tests/fake-curl/libcurl/*.so
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jan 22 2020 Kamil Dudka <kdudka@redhat.com> - 7.43.0.2-4
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 7.43.0.6-8
|
||||||
- fix populating list of decoded strings (#1792213)
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
- fix programming mistakes detected by static analyzers (#1666003)
|
Related: rhbz#1991688
|
||||||
|
|
||||||
* Thu Dec 20 2018 Kamil Dudka <kdudka@redhat.com> - 7.43.0.2-3
|
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 7.43.0.6-7
|
||||||
- drop build-time (%%check-only) dependency on pyflakes (#1661168)
|
- Rebuilt for RHEL 9 BETA for openssl 3.0
|
||||||
|
Related: rhbz#1971065
|
||||||
|
|
||||||
* Tue Aug 07 2018 Kamil Dudka <kdudka@redhat.com> - 7.43.0.2-2
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 7.43.0.6-6
|
||||||
- relax crypto policy for the test-suite to make it pass again (#1611739)
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
* Wed Feb 17 2021 Kamil Dudka <kdudka@redhat.com> - 7.43.0.6-5
|
||||||
|
- temporarily remove a failing test-case (#1927655)
|
||||||
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.43.0.6-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 18 2021 Kamil Dudka <kdudka@redhat.com> - 7.43.0.6-3
|
||||||
|
- make build dependencies for upstream tests optional
|
||||||
|
|
||||||
|
* Tue Oct 27 2020 Kamil Dudka <kdudka@redhat.com> - 7.43.0.6-2
|
||||||
|
- make the code compile against python-3.10.0a1 (#1890442)
|
||||||
|
|
||||||
|
* Thu Sep 03 2020 Kamil Dudka <kdudka@redhat.com> - 7.43.0.6-1
|
||||||
|
- update to 7.43.0.6
|
||||||
|
|
||||||
|
* Tue Aug 04 2020 Kamil Dudka <kdudka@redhat.com> - 7.43.0.5-6
|
||||||
|
- relax crypto policy for the test-suite to make it pass again (#1863711)
|
||||||
|
|
||||||
|
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.43.0.5-5
|
||||||
|
- Second attempt - Rebuilt for
|
||||||
|
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.43.0.5-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jun 23 2020 Kamil Dudka <kdudka@redhat.com> - 7.43.0.5-3
|
||||||
|
- do not use discontinued %%_python_bytecompile_extra macro
|
||||||
|
- explicitly require python3-setuptools for build
|
||||||
|
|
||||||
|
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 7.43.0.5-2
|
||||||
|
- Rebuilt for Python 3.9
|
||||||
|
|
||||||
|
* Thu Jan 30 2020 Kamil Dudka <kdudka@redhat.com> - 7.43.0.5-1
|
||||||
|
- update to 7.43.0.5
|
||||||
|
|
||||||
|
* Wed Jan 15 2020 Kamil Dudka <kdudka@redhat.com> - 7.43.0.4-1
|
||||||
|
- update to 7.43.0.4
|
||||||
|
|
||||||
|
* Fri Nov 15 2019 Kamil Dudka <kdudka@redhat.com> - 7.43.0.2-10
|
||||||
|
- do not build python2-pycurl on f32+
|
||||||
|
|
||||||
|
* Tue Sep 24 2019 Miro Hrončok <mhroncok@redhat.com> - 7.43.0.2-9
|
||||||
|
- Drop unused Python 2 BuildRequires
|
||||||
|
|
||||||
|
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 7.43.0.2-8
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.43.0.2-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Feb 03 2019 Kamil Dudka <kdudka@redhat.com> - 7.43.0.2-6
|
||||||
|
- reintroduce the python2-pycurl subpackage on Fedora (#1672061)
|
||||||
|
|
||||||
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.43.0.2-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jan 29 2019 Kamil Dudka <kdudka@redhat.com> - 7.43.0.2-4
|
||||||
|
- fix programming mistakes detected by static analyzers
|
||||||
|
|
||||||
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 7.43.0.2-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 7.43.0.2-2
|
||||||
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
* Mon Jun 04 2018 Kamil Dudka <kdudka@redhat.com> - 7.43.0.2-1
|
* Mon Jun 04 2018 Kamil Dudka <kdudka@redhat.com> - 7.43.0.2-1
|
||||||
- update to 7.43.0.2
|
- update to 7.43.0.2
|
||||||
Loading…
Reference in New Issue
Block a user