From f233132e7bc808050c90d42f182944b42f5900f9 Mon Sep 17 00:00:00 2001 From: Raphael Groner Date: Sep 03 2020 09:30:03 +0000 Subject: try to bundle ssh2-python 0.17.0 (WIP) to fix API compatibility --- diff --git a/.gitignore b/.gitignore index 5067761..d4e6f22 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /parallel-ssh-0.80.3.tar.gz /parallel-ssh-0.91.2.tar.gz /parallel-ssh-1.9.1.tar.gz +/ssh2-python-0.17.0.tar.gz diff --git a/python-parallel-ssh.spec b/python-parallel-ssh.spec old mode 100644 new mode 100744 index 4606151..f6d2871 --- a/python-parallel-ssh.spec +++ b/python-parallel-ssh.spec @@ -1,14 +1,16 @@ %global srcname parallel-ssh +%global ssh2ver 0.17.0 Name: python-%{srcname} Version: 1.9.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Asynchronous parallel SSH library # https://github.com/ParallelSSH/parallel-ssh/pull/179 -License: LGPLv2 +License: LGPLv2+ URL: https://parallel-ssh.readthedocs.io/ -Source: %{pypi_source} +Source0: %{pypi_source %{srcname} %{version}} +Source1: %{pypi_source ssh2-python %{ssh2ver}} BuildRequires: gcc @@ -27,32 +29,72 @@ multi-threading/processing. %package -n python3-%{srcname} Summary: %{summary} + BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3dist(cython) %{?python_provide:%python_provide python3-%{srcname}} +# compatibility layer to have correct API version mentioned in setup.py +Requires: python3-%{srcname}-ssh2 >= 0.17 %description -n python3-%{srcname} %{_description} -Python 3 version. +%package -n python3-%{srcname}-ssh2 +Summary: Super fast SSH library - bindings for libssh2 +Conflicts: python3-ssh2-python +BuildRequires: cmake +BuildRequires: libssh2-devel + +%description -n python3-%{srcname}-ssh2 +%{summary}. + +This is the bundled alternative to work around a compatibility bug +with parallel-ssh and older but incompatible versions of ssh2-python. + %prep %autosetup -n %{srcname}-%{version} rm -vr *.egg-info/ find -type f -name '*.c' -print -delete +tar -xf %{SOURCE1} +mv ssh2-python-%{ssh2ver} ssh2 +find ssh2 -name \*.c -print -delete +# No bundled libs +#rm -vrf ssh2/libssh2 +# Remove pre-generated sources +#rm $(grep -rl '/\* Generated by Cython') + + %build %py3_build +pushd ssh2 +export HAVE_AGENT_FWD=0 +%py3_build + %install %py3_install +pushd ssh2 +%py3_build + %files -n python3-%{srcname} %doc README.rst %{python3_sitearch}/pssh/ %{python3_sitearch}/parallel_ssh-*.egg-info/ +%files -n python3-%{srcname}-ssh2 +%license ssh2/COPYING ssh2/LICENSE +%doc ssh2/README.rst ssh2/Changelog.rst +%{python3_sitearch}/ssh2_python-*.egg-info/ +%{python3_sitearch}/ssh2/ + + %changelog +* Wed Sep 02 2020 Raphael Groner - 1.9.1-7 +- bundle ssh2-python as a subpackage with version 0.17.0 to fix FTI, rhbz#1830680 + * Wed Jul 29 2020 Fedora Release Engineering - 1.9.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild @@ -68,7 +110,7 @@ find -type f -name '*.c' -print -delete * Mon Aug 19 2019 Miro HronĨok - 1.9.1-2 - Rebuilt for Python 3.8 -* Sun Jul 28 19:53:28 CEST 2019 Igor Gnatenko - 1.9.1-1 +* Sun Jul 28 2019 Igor Gnatenko - 1.9.1-1 - Update to 1.9.1 * Fri Jul 26 2019 Fedora Release Engineering - 0.91.2-11 diff --git a/sources b/sources index 90fab64..7846a94 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (parallel-ssh-1.9.1.tar.gz) = 8c14c1766a49c4d96907c43b773c33fb386786bb8646f63bfda454e266dc340cf7688b5f18d57500c0819044b0da92eb3776a98a682b4546c1d9a50959eab460 +SHA512 (ssh2-python-0.17.0.tar.gz) = cb2f3221eeea5c2c87ed6e8214120fa0bedec12a29e427228d90540fa87e5633c9e6e61fddc2ae2ed81ab1a240fe6b93929b36427debcd94373da882a18a43b6