8985c7
%global srcname paramiko
8985c7
8985c7
%if 0%{?rhel} && 0%{?rhel} <= 7
8985c7
%bcond_with weak_deps
8985c7
%bcond_with python3
8985c7
%else
8985c7
%bcond_without weak_deps
8985c7
%bcond_without python3
8985c7
%endif
8985c7
8985c7
Name:          python-%{srcname}
8985c7
Version:       2.1.1
8985c7
Release:       5%{?dist}
8985c7
Provides:       python2-paramiko = %{version}-%{release}
8985c7
Summary:       SSH2 protocol library for python
8985c7
8985c7
# No version specified.
8985c7
License:       LGPLv2+
8985c7
URL:           https://github.com/paramiko/paramiko
8985c7
Source0:       %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
8985c7
8985c7
Patch0:        CVE-2018-7750.diff
8985c7
8985c7
BuildArch:     noarch
8985c7
8985c7
Requires:      python-cryptography
8985c7
Requires:      python2-pyasn1
8985c7
BuildRequires: python2-devel
8985c7
BuildRequires: python-setuptools
8985c7
BuildRequires: python-cryptography
8985c7
BuildRequires: python2-pyasn1
8985c7
%global paramiko_desc \
8985c7
Paramiko (a combination of the esperanto words for "paranoid" and "friend") is\
8985c7
a module for python 2.3 or greater that implements the SSH2 protocol for secure\
8985c7
(encrypted and authenticated) connections to remote machines. Unlike SSL (aka\
8985c7
TLS), the SSH2 protocol does not require heirarchical certificates signed by a\
8985c7
powerful central authority. You may know SSH2 as the protocol that replaced\
8985c7
telnet and rsh for secure access to remote shells, but the protocol also\
8985c7
includes the ability to open arbitrary channels to remote services across an\
8985c7
encrypted tunnel. (This is how sftp works, for example.)\
8985c7
8985c7
%description
8985c7
%{paramiko_desc}
8985c7
8985c7
%if %{with weak_deps}
8985c7
Recommends:    python-gssapi
8985c7
%endif
8985c7
8985c7
%if %{with python3}
8985c7
%package -n python%{python3_pkgversion}-%{srcname}
8985c7
Summary:       SSH2 protocol library for python
8985c7
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
8985c7
BuildRequires: python%{python3_pkgversion}-devel
8985c7
BuildRequires: python%{python3_pkgversion}-setuptools
8985c7
BuildRequires: python%{python3_pkgversion}-cryptography
8985c7
Requires:      python%{python3_pkgversion}-cryptography
8985c7
%if %{with weak_deps}
8985c7
Recommends:    python%{python3_pkgversion}-gssapi
8985c7
%endif
8985c7
8985c7
%description -n python%{python3_pkgversion}-%{srcname}
8985c7
%{paramiko_desc}
8985c7
8985c7
Python 3 version.
8985c7
%endif
8985c7
8985c7
%package doc
8985c7
Summary:       Docs and demo for SSH2 protocol library for python
8985c7
BuildRequires: /usr/bin/sphinx-build
8985c7
BuildRequires: python2-sphinx-theme-alabaster
8985c7
Requires:      %{name} = %{version}-%{release}
8985c7
8985c7
%description doc
8985c7
%{paramiko_desc}
8985c7
8985c7
This is the documentation and demos.
8985c7
8985c7
%prep
8985c7
%autosetup -n %{srcname}-%{version} -p1
8985c7
8985c7
chmod a-x demos/*
8985c7
sed -i -e '/^#!/,1d' demos/*
8985c7
8985c7
%build
8985c7
CFLAGS="%{optflags}" %{__python} setup.py %{?py_setup_args} build --executable="%{__python2} -s"
8985c7
%if %{with python3}
8985c7
%py3_build
8985c7
%endif
8985c7
8985c7
%install
8985c7
CFLAGS="%{optflags}" %{__python} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}
8985c7
%if %{with python3}
8985c7
%py3_install
8985c7
%endif
8985c7
8985c7
sphinx-build -b html sites/docs/ html/
8985c7
rm -f html/.buildinfo
8985c7
8985c7
%check
8985c7
%{__python2} ./test.py --no-sftp --no-big-file
8985c7
%if %{with python3}
8985c7
%{__python3} ./test.py --no-sftp --no-big-file
8985c7
%endif
8985c7
8985c7
%files -n python-%{srcname}
8985c7
%license LICENSE
8985c7
%doc NEWS README.rst
8985c7
%{python2_sitelib}/%{srcname}-*.egg-info/
8985c7
%{python2_sitelib}/%{srcname}/
8985c7
8985c7
%if %{with python3}
8985c7
%files -n python%{python3_pkgversion}-%{srcname}
8985c7
%license LICENSE
8985c7
%doc NEWS README.rst
8985c7
%{python3_sitelib}/%{srcname}-*.egg-info/
8985c7
%{python3_sitelib}/%{srcname}/
8985c7
%endif
8985c7
8985c7
%files doc
8985c7
%doc html/ demos/
8985c7
8985c7
%changelog
8985c7
* Fri Jul 20 2018 Jake Hunsaker <jhunsake@redhat.com> - 2.1.1-5
8985c7
- Rebuild for move from Extras to Base for 7.6
8985c7
8985c7
* Thu Mar 22 2018 Pavel Cahyna <pcahyna@redhat.com> - 2.1.1-4
8985c7
- Add a dependency on python2-pyasn1. It used to be a dependency
8985c7
  of python2-cryptography, but it is not the case with newer versions.
8985c7
  (RHBZ #1559133)
8985c7
8985c7
* Wed Mar 21 2018 Pavel Cahyna <pcahyna@redhat.com> - 2.1.1-3
8985c7
- Fix a security flaw (CVE-2018-7750) in Paramiko's server
8985c7
  mode (emphasis on **server** mode; this does **not** impact *client* use!)
8985c7
  Backported from 2.1.5.
8985c7
  Resolves #1557142
8985c7
8985c7
* Fri May 12 2017 Pavel Cahyna <pcahyna@redhat.com> - 2.1.1-2
8985c7
- Rebuild for RHEL 7.4 Extras
8985c7
8985c7
* Thu Jan 05 2017 Troy Dawson <tdawson@redhat.com> 2.1.1-1
8985c7
- Update to 2.1.1
8985c7
8985c7
* Fri Jul 08 2016 Jon Schlueter <jschluet@redhat.com> 2.0.0-1.0
8985c7
- Rebuild
8985c7
8985c7
* Fri Apr 29 2016 Igor Gnatenko <ignatenko@redhat.com> - 2.0.0-1
8985c7
- Update to 2.0.0 (RHBZ #1331737)
8985c7
8985c7
* Sun Mar 27 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.16.0-1
8985c7
- Update to 1.16.0
8985c7
- Adopt to new packaging guidelines
8985c7
8985c7
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.2-5
8985c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8985c7
8985c7
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15.2-4
8985c7
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
8985c7
8985c7
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15.2-3
8985c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
8985c7
8985c7
* Sun Mar 22 2015 Peter Robinson <pbrobinson@fedoraproject.org> 1.15.2-2
8985c7
- Use %%license
8985c7
- Move duplicated docs to single doc sub package
8985c7
- Remove old F-15 conditionals
8985c7
8985c7
* Tue Dec 23 2014 Athmane Madjoudj <athmane@fedoraproject.org> 1.15.2-1
8985c7
- Update to 1.15.2
8985c7
8985c7
* Mon Nov 24 2014 Athmane Madjoudj <athmane@fedoraproject.org> 1.15.1-5
8985c7
- Add conditional to exclude EL since does not have py3
8985c7
8985c7
* Sat Nov 15 2014 Athmane Madjoudj <athmane@fedoraproject.org> 1.15.1-4
8985c7
- py3dir creation should be in prep section
8985c7
8985c7
* Fri Nov 14 2014 Athmane Madjoudj <athmane@fedoraproject.org> 1.15.1-3
8985c7
- Build each pkg in a clean dir
8985c7
8985c7
* Fri Nov 14 2014 Athmane Madjoudj <athmane@fedoraproject.org> 1.15.1-2
8985c7
- Add support for python3
8985c7
- Add BR -devel for python macros.
8985c7
8985c7
* Fri Oct 17 2014 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.15.1-1
8985c7
- Update to 1.15.1
8985c7
8985c7
* Fri Jun 13 2014 Orion Poplawski <orion@cora.nwra.com> - 1.12.4-1
8985c7
- Update to 1.12.4
8985c7
8985c7
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12.2-2
8985c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8985c7
8985c7
* Tue Feb 25 2014 Orion Poplawski <orion@cora.nwra.com> - 1.12.2-1
8985c7
- Update to 1.12.2
8985c7
8985c7
* Wed Jan 22 2014 Orion Poplawski <orion@cora.nwra.com> - 1.11.3-1
8985c7
- Update to 1.11.3
8985c7
8985c7
* Mon Oct 21 2013 Orion Poplawski <orion@cora.nwra.com> - 1.11.0-1
8985c7
- Update to 1.11.0
8985c7
8985c7
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10.1-2
8985c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
8985c7
8985c7
* Thu May  9 2013 Jeffrey Ollie <jeff@ocjtech.us> - 1.10.1-1
8985c7
- Update to 1.10.1
8985c7
8985c7
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.0-2
8985c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
8985c7
8985c7
* Wed Jan  2 2013 Jeffrey Ollie <jeff@ocjtech.us> - 1.9.0-1
8985c7
- Update to 1.9.0
8985c7
8985c7
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.7.1-3
8985c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8985c7
8985c7
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.7.1-2
8985c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
8985c7
8985c7
* Wed Jul  6 2011 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.7.1-1
8985c7
- v1.7.7.1 (George) 21may11
8985c7
- -------------------------
8985c7
-   * Make the verification phase of SFTP.put optional (Larry Wright)
8985c7
-   * Patches to fix AIX support (anonymous)
8985c7
-   * Patch from Michele Bertoldi to allow compression to be turned on in the
8985c7
-     client constructor.
8985c7
-   * Patch from Shad Sharma to raise an exception if the transport isn't active
8985c7
-     when you try to open a new channel.
8985c7
-   * Stop leaking file descriptors in the SSH agent (John Adams)
8985c7
-   * More fixes for Windows address family support (Andrew Bennetts)
8985c7
-   * Use Crypto.Random rather than Crypto.Util.RandomPool
8985c7
-     (Gary van der Merwe, #271791)
8985c7
-   * Support for openssl keys (tehfink)
8985c7
-   * Fix multi-process support by calling Random.atfork (sugarc0de)
8985c7
8985c7
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.6-4
8985c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8985c7
8985c7
* Tue Jan 4 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.7.6-3
8985c7
- Patch to address deprecation warning from pycrypto
8985c7
- Simplify build as shown in new python guidelines
8985c7
- Enable test suite
8985c7
8985c7
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.7.6-2
8985c7
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
8985c7
8985c7
* Mon Nov  2 2009 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.6-1
8985c7
- v1.7.6 (Fanny) 1nov09
8985c7
- ---------------------
8985c7
-  * fixed bugs 411099 (sftp chdir isn't unicode-safe), 363163 & 411910 (more
8985c7
-    IPv6 problems on windows), 413850 (race when server closes the channel),
8985c7
-    426925 (support port numbers in host keys)
8985c7
8985c7
* Tue Oct 13 2009 Jeremy Katz <katzj@fedoraproject.org> - 1.7.5-2
8985c7
- Fix race condition (#526341)
8985c7
8985c7
* Thu Jul 23 2009 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.5-1
8985c7
- v1.7.5 (Ernest) 19jul09
8985c7
- -----------------------
8985c7
-  * added support for ARC4 cipher and CTR block chaining (Denis Bernard)
8985c7
-  * made transport threads daemonize, to fix python 2.6 atexit behavior
8985c7
-  * support unicode hostnames, and IP6 addresses (Maxime Ripard, Shikhar
8985c7
-    Bhushan)
8985c7
-  * various small bug fixes
8985c7
8985c7
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.4-5
8985c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
8985c7
8985c7
* Mon Feb 16 2009 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.4-4
8985c7
- Add demos as documentation. BZ#485742
8985c7
8985c7
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.7.4-3
8985c7
- Rebuild for Python 2.6
8985c7
8985c7
* Wed Sep  3 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.7.4-2
8985c7
- fix license tag
8985c7
8985c7
* Sun Jul  6 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.4-1
8985c7
- Update to 1.7.4
8985c7
8985c7
* Mon Mar 24 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.3-1
8985c7
- Update to 1.7.3.
8985c7
8985c7
* Tue Jan 22 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.2-1
8985c7
- Update to 1.7.2.
8985c7
- Remove upstreamed patch.
8985c7
8985c7
* Mon Jan 14 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.1-3
8985c7
- Update to latest Python packaging guidelines.
8985c7
- Apply patch that fixes insecure use of RandomPool.
8985c7
8985c7
* Thu Jul 19 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.1-2
8985c7
- Bump rev
8985c7
8985c7
* Thu Jul 19 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.7.1-1
8985c7
- Update to 1.7.1
8985c7
8985c7
* Sat Dec 09 2006 Toshio Kuratomi <toshio@tiki-lounge.com> - 1.6.4-1
8985c7
- Update to 1.6.4
8985c7
- Upstream is now shipping tarballs
8985c7
- Bump for python 2.5 in devel
8985c7
8985c7
* Mon Oct  9 2006 Jeffrey C. Ollie <jeff@ocjtech.us> - 1.6.2-1
8985c7
- Update to 1.6.2
8985c7
8985c7
* Sat Sep 16 2006 Shahms E. King <shahms@shahms.com> 1.6.1-3
8985c7
- Rebuild for FC6
8985c7
8985c7
* Fri Aug 11 2006 Shahms E. King <shahms@shahms.com> 1.6.1-2
8985c7
- Include, don't ghost .pyo files per new guidelines
8985c7
8985c7
* Tue Aug 08 2006 Shahms E. King <shahms@shahms.com> 1.6.1-1
8985c7
- Update to new upstream version
8985c7
8985c7
* Fri Jun 02 2006 Shahms E. King <shahms@shahms.com> 1.6-1
8985c7
- Update to new upstream version
8985c7
- ghost the .pyo files
8985c7
8985c7
* Fri May 05 2006 Shahms E. King <shahms@shahms.com> 1.5.4-2
8985c7
- Fix source line and rebuild
8985c7
8985c7
* Fri May 05 2006 Shahms E. King <shahms@shahms.com> 1.5.4-1
8985c7
- Update to new upstream version
8985c7
8985c7
* Wed Apr 12 2006 Shahms E. King <shahms@shahms.com> 1.5.3-1
8985c7
  - Initial package