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