forked from pool/python-pycurl
Accepting request 632305 from devel:languages:python
- Add patch to match up Fedora on how we detect tls backend on runtime * python-pycurl-7.43.0-tls-backend.patch - Make sure we build on Leap 42.3 OBS-URL: https://build.opensuse.org/request/show/632305 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pycurl?expand=0&rev=23
This commit is contained in:
54
python-pycurl-7.43.0-tls-backend.patch
Normal file
54
python-pycurl-7.43.0-tls-backend.patch
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
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,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 30 12:36:12 UTC 2018 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Add patch to match up Fedora on how we detect tls backend on runtime
|
||||||
|
* python-pycurl-7.43.0-tls-backend.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 29 08:33:02 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Make sure we build on Leap 42.3
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 9 11:15:17 UTC 2018 - tchvatal@suse.com
|
Thu Aug 9 11:15:17 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
@@ -30,6 +30,8 @@ Source: https://files.pythonhosted.org/packages/source/p/pycurl/pycurl-%
|
|||||||
Patch0: increase_test_timeout.diff
|
Patch0: increase_test_timeout.diff
|
||||||
# PATCH-FIX-UPSTREAM handle difference between libssh and libssh2
|
# PATCH-FIX-UPSTREAM handle difference between libssh and libssh2
|
||||||
Patch1: pycurl-libssh.patch
|
Patch1: pycurl-libssh.patch
|
||||||
|
# PATCH-FIX-OPENSUSE python-pycurl-7.43.0-tls-backend.patch -- do not run runtime tests to compare linked libs
|
||||||
|
Patch2: python-pycurl-7.43.0-tls-backend.patch
|
||||||
BuildRequires: %{python_module bottle}
|
BuildRequires: %{python_module bottle}
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module flaky}
|
BuildRequires: %{python_module flaky}
|
||||||
@@ -61,8 +63,7 @@ This package contains documentation and examples.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pycurl-%{version}
|
%setup -q -n pycurl-%{version}
|
||||||
%patch0 -p1
|
%autopatch -p1
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||||
@@ -72,7 +73,9 @@ export PYCURL_SSL_LIBRARY=openssl
|
|||||||
%install
|
%install
|
||||||
export PYCURL_SSL_LIBRARY=openssl
|
export PYCURL_SSL_LIBRARY=openssl
|
||||||
%python_install --with-openssl
|
%python_install --with-openssl
|
||||||
|
|
||||||
rm -rf %{buildroot}%{_datadir}/doc # Remove wrongly installed junk
|
rm -rf %{buildroot}%{_datadir}/doc # Remove wrongly installed junk
|
||||||
|
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@@ -92,7 +95,7 @@ if ! pkg-config --variable=supported_protocols libcurl|grep -qw SCP; then
|
|||||||
test_flags="$test_flags,\!ssh"
|
test_flags="$test_flags,\!ssh"
|
||||||
fi
|
fi
|
||||||
%{python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} \
|
%{python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} \
|
||||||
nosetests-%$python_bin_suffix -v --with-flaky -a "$test_flags" -e test_writefunction_collection
|
nosetests-%$python_bin_suffix -v --with-flaky -a "$test_flags"
|
||||||
}
|
}
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
|
Reference in New Issue
Block a user