From c1a8a0c2b5fa99303d8f63a4bba97e65e4238b7051b6bc510a4d28e43ff68908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 30 Jan 2018 17:25:48 +0000 Subject: [PATCH] Accepting request 571151 from home:vitezslav_cizek:branches:devel:languages:python - Since version 7.58.0, curl may be compiled with libssh instead of libssh2 which differ in supported functionality (bsc#1078329) * add pycurl-libssh.patch - update license OBS-URL: https://build.opensuse.org/request/show/571151 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=34 --- pycurl-libssh.patch | 63 +++++++++++++++++++++++++++++++++++++++++++ python-pycurl.changes | 8 ++++++ python-pycurl.spec | 7 +++-- 3 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 pycurl-libssh.patch diff --git a/pycurl-libssh.patch b/pycurl-libssh.patch new file mode 100644 index 0000000..aff9266 --- /dev/null +++ b/pycurl-libssh.patch @@ -0,0 +1,63 @@ +Index: pycurl-7.43.0.1/tests/ssh_key_cb_test.py +=================================================================== +--- pycurl-7.43.0.1.orig/tests/ssh_key_cb_test.py 2017-12-03 20:03:17.000000000 +0100 ++++ pycurl-7.43.0.1/tests/ssh_key_cb_test.py 2018-01-30 16:56:42.499858079 +0100 +@@ -30,8 +30,11 @@ class SshKeyCbTest(unittest.TestCase): + def keyfunction(known_key, found_key, match): + return pycurl.KHSTAT_FINE + +- self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts') +- self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction) ++ try: ++ self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts') ++ self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction) ++ except pycurl.error as e: ++ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0]) + + try: + self.curl.perform() +@@ -44,8 +47,11 @@ class SshKeyCbTest(unittest.TestCase): + def keyfunction(known_key, found_key, match): + return pycurl.KHSTAT_REJECT + +- self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts') +- self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction) ++ try: ++ self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts') ++ self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction) ++ except pycurl.error as e: ++ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0]) + + try: + self.curl.perform() +@@ -58,8 +64,11 @@ class SshKeyCbTest(unittest.TestCase): + def keyfunction(known_key, found_key, match): + return 'bogus' + +- self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts') +- self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction) ++ try: ++ self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts') ++ self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction) ++ except pycurl.error as e: ++ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0]) + + try: + self.curl.perform() +@@ -77,8 +86,14 @@ class SshKeyCbUnsetTest(unittest.TestCas + + @util.min_libcurl(7, 19, 6) + def test_keyfunction_none(self): +- self.curl.setopt(pycurl.SSH_KEYFUNCTION, None) ++ try: ++ self.curl.setopt(pycurl.SSH_KEYFUNCTION, None) ++ except pycurl.error as e: ++ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0]) + + @util.min_libcurl(7, 19, 6) + def test_keyfunction_unset(self): +- self.curl.unsetopt(pycurl.SSH_KEYFUNCTION) ++ try: ++ self.curl.unsetopt(pycurl.SSH_KEYFUNCTION) ++ except pycurl.error as e: ++ self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0]) diff --git a/python-pycurl.changes b/python-pycurl.changes index 40a1652..316dcf2 100644 --- a/python-pycurl.changes +++ b/python-pycurl.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jan 30 16:01:27 UTC 2018 - vcizek@suse.com + +- Since version 7.58.0, curl may be compiled with libssh instead of + libssh2 which differ in supported functionality (bsc#1078329) + * add pycurl-libssh.patch +- update license + ------------------------------------------------------------------- Fri Dec 8 18:06:28 UTC 2017 - arun@gmx.de diff --git a/python-pycurl.spec b/python-pycurl.spec index d32975b..2fd23b0 100644 --- a/python-pycurl.spec +++ b/python-pycurl.spec @@ -1,7 +1,7 @@ # # spec file for package python-pycurl # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,12 +22,14 @@ Name: python-pycurl Version: 7.43.0.1 Release: 0 Summary: PycURL -- cURL library module -License: LGPL-2.1+ and MIT +License: LGPL-2.1+ AND MIT Group: Development/Languages/Python Url: http://pycurl.sourceforge.net/ Source: https://files.pythonhosted.org/packages/source/p/pycurl/pycurl-%{version}.tar.gz # PATCH-FIX-OPENSUSE increase_test_timeout.diff -- Increase the timeout in a test so it doesn't fail when obs is overloaded Patch0: increase_test_timeout.diff +# PATCH-FIX-UPSTREAM handle difference between libssh and libssh2 +Patch1: pycurl-libssh.patch BuildRequires: %{python_module bottle} BuildRequires: %{python_module devel} BuildRequires: %{python_module flaky} @@ -61,6 +63,7 @@ This package contains documentation and examples. %prep %setup -q -n pycurl-%{version} %patch0 -p1 +%patch1 -p1 %build export CFLAGS="%{optflags}"