You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
234 lines
8.3 KiB
234 lines
8.3 KiB
%if 0%{?rhel} && 0%{?rhel} <= 7
|
|
%bcond_with python3
|
|
%else
|
|
%bcond_without python3
|
|
%endif
|
|
|
|
%global pypi_name rsa
|
|
|
|
Name: python-%{pypi_name}
|
|
Version: 3.4.2
|
|
Release: 8%{?dist}
|
|
Summary: Pure-Python RSA implementation
|
|
|
|
License: ASL 2.0
|
|
URL: http://stuvel.eu/rsa
|
|
Source0: https://pypi.python.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
Python-RSA is a pure-Python RSA implementation. It supports encryption
|
|
and decryption, signing and verifying signatures, and key generation
|
|
according to PKCS#1 version 1.5. It can be used as a Python library as
|
|
well as on the command-line.
|
|
|
|
%package -n python2-%{pypi_name}
|
|
Summary: Pure-Python RSA implementation
|
|
%{?python_provide:%python_provide python2-%{pypi_name}}
|
|
%{?el6:Provides: python-%{pypi_name}}
|
|
%{?el6:Obsoletes: python-%{pypi_name} < 3.3}
|
|
|
|
BuildRequires: python2-devel
|
|
BuildRequires: python2-setuptools
|
|
BuildRequires: python2-pyasn1%{!?el6: >= 0.1.3}
|
|
Requires: python2-pyasn1%{!?el6: >= 0.1.3}
|
|
Requires: python2-setuptools
|
|
|
|
%description -n python2-%{pypi_name}
|
|
Python-RSA is a pure-Python RSA implementation. It supports encryption
|
|
and decryption, signing and verifying signatures, and key generation
|
|
according to PKCS#1 version 1.5. It can be used as a Python library as
|
|
well as on the command-line.
|
|
|
|
%if %{with python3}
|
|
%package -n python3-%{pypi_name}
|
|
Summary: Pure-Python RSA implementation
|
|
%{?python_provide:%python_provide python3-%{pypi_name}}
|
|
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python3-setuptools
|
|
BuildRequires: python3-pyasn1 >= 0.1.3
|
|
BuildRequires: python3-unittest2
|
|
Requires: python3-pyasn1 >= 0.1.3
|
|
Requires: python3-setuptools
|
|
|
|
%description -n python3-%{pypi_name}
|
|
Python-RSA is a pure-Python RSA implementation. It supports encryption
|
|
and decryption, signing and verifying signatures, and key generation
|
|
according to PKCS#1 version 1.5. It can be used as a Python library as
|
|
well as on the command-line.
|
|
%endif # with python3
|
|
|
|
%prep
|
|
%setup -q -n %{pypi_name}-%{version}
|
|
# This is a dirty workaround for EL6
|
|
%{?el6:rm -rf %{pypi_name}.egg-info}
|
|
%{?el6:sed -i "s/pyasn1 >= 0.1.3/pyasn1 >= 0/" setup.py}
|
|
|
|
%build
|
|
%py2_build
|
|
%if %{with python3}
|
|
%py3_build
|
|
%endif # with python3
|
|
|
|
%install
|
|
%py2_install
|
|
cp %{buildroot}%{_bindir}/pyrsa-priv2pub %{buildroot}%{_bindir}/pyrsa-priv2pub-2
|
|
cp %{buildroot}%{_bindir}/pyrsa-keygen %{buildroot}%{_bindir}/pyrsa-keygen-2
|
|
cp %{buildroot}%{_bindir}/pyrsa-encrypt %{buildroot}%{_bindir}/pyrsa-encrypt-2
|
|
cp %{buildroot}%{_bindir}/pyrsa-decrypt %{buildroot}%{_bindir}/pyrsa-decrypt-2
|
|
cp %{buildroot}%{_bindir}/pyrsa-sign %{buildroot}%{_bindir}/pyrsa-sign-2
|
|
cp %{buildroot}%{_bindir}/pyrsa-verify %{buildroot}%{_bindir}/pyrsa-verify-2
|
|
cp %{buildroot}%{_bindir}/pyrsa-encrypt-bigfile %{buildroot}%{_bindir}/pyrsa-encrypt-bigfile-2
|
|
cp %{buildroot}%{_bindir}/pyrsa-decrypt-bigfile %{buildroot}%{_bindir}/pyrsa-decrypt-bigfile-2
|
|
|
|
%if %{with python3}
|
|
%py3_install
|
|
cp %{buildroot}%{_bindir}/pyrsa-priv2pub %{buildroot}%{_bindir}/pyrsa-priv2pub-3
|
|
cp %{buildroot}%{_bindir}/pyrsa-keygen %{buildroot}%{_bindir}/pyrsa-keygen-3
|
|
cp %{buildroot}%{_bindir}/pyrsa-encrypt %{buildroot}%{_bindir}/pyrsa-encrypt-3
|
|
cp %{buildroot}%{_bindir}/pyrsa-decrypt %{buildroot}%{_bindir}/pyrsa-decrypt-3
|
|
cp %{buildroot}%{_bindir}/pyrsa-sign %{buildroot}%{_bindir}/pyrsa-sign-3
|
|
cp %{buildroot}%{_bindir}/pyrsa-verify %{buildroot}%{_bindir}/pyrsa-verify-3
|
|
cp %{buildroot}%{_bindir}/pyrsa-encrypt-bigfile %{buildroot}%{_bindir}/pyrsa-encrypt-bigfile-3
|
|
cp %{buildroot}%{_bindir}/pyrsa-decrypt-bigfile %{buildroot}%{_bindir}/pyrsa-decrypt-bigfile-3
|
|
%endif # with python3
|
|
|
|
%files -n python2-%{pypi_name}
|
|
%{!?_licensedir:%global license %doc}
|
|
%doc README.md
|
|
%license LICENSE
|
|
%if 0%{?with_python3} == 0
|
|
%{_bindir}/pyrsa-priv2pub
|
|
%{_bindir}/pyrsa-keygen
|
|
%{_bindir}/pyrsa-encrypt
|
|
%{_bindir}/pyrsa-decrypt
|
|
%{_bindir}/pyrsa-sign
|
|
%{_bindir}/pyrsa-verify
|
|
%{_bindir}/pyrsa-encrypt-bigfile
|
|
%{_bindir}/pyrsa-decrypt-bigfile
|
|
%endif # with_python3
|
|
%{_bindir}/pyrsa-priv2pub-2
|
|
%{_bindir}/pyrsa-keygen-2
|
|
%{_bindir}/pyrsa-encrypt-2
|
|
%{_bindir}/pyrsa-decrypt-2
|
|
%{_bindir}/pyrsa-sign-2
|
|
%{_bindir}/pyrsa-verify-2
|
|
%{_bindir}/pyrsa-encrypt-bigfile-2
|
|
%{_bindir}/pyrsa-decrypt-bigfile-2
|
|
%{python2_sitelib}/%{pypi_name}
|
|
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
|
|
%if %{with python3}
|
|
%files -n python3-%{pypi_name}
|
|
%doc README.md
|
|
%license LICENSE
|
|
%{_bindir}/pyrsa-priv2pub
|
|
%{_bindir}/pyrsa-keygen
|
|
%{_bindir}/pyrsa-encrypt
|
|
%{_bindir}/pyrsa-decrypt
|
|
%{_bindir}/pyrsa-sign
|
|
%{_bindir}/pyrsa-verify
|
|
%{_bindir}/pyrsa-encrypt-bigfile
|
|
%{_bindir}/pyrsa-decrypt-bigfile
|
|
%{_bindir}/pyrsa-priv2pub-3
|
|
%{_bindir}/pyrsa-keygen-3
|
|
%{_bindir}/pyrsa-encrypt-3
|
|
%{_bindir}/pyrsa-decrypt-3
|
|
%{_bindir}/pyrsa-sign-3
|
|
%{_bindir}/pyrsa-verify-3
|
|
%{_bindir}/pyrsa-encrypt-bigfile-3
|
|
%{_bindir}/pyrsa-decrypt-bigfile-3
|
|
%{python3_sitelib}/%{pypi_name}
|
|
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
%endif # with python3
|
|
|
|
%check
|
|
%{__python2} setup.py test
|
|
%if %{with python3}
|
|
%{__python3} setup.py test
|
|
%endif # with python3
|
|
|
|
%changelog
|
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-8
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.4.2-7
|
|
- Rebuilt for Python 3.7
|
|
|
|
* Tue Mar 13 2018 Iryna Shcherbina <ishcherb@redhat.com> - 3.4.2-6
|
|
- Update Python 2 dependency declarations to new packaging standards
|
|
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
|
|
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-5
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.2-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 3.4.2-2
|
|
- Rebuild for Python 3.6
|
|
|
|
* Sat Oct 29 2016 Fabio Alessnadro Locati <fale@fedoraproject.org> - 3.4.2-1
|
|
- Update to 3.4.2
|
|
|
|
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.1-2
|
|
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
|
* Sat Mar 26 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 3.4.1-1
|
|
- Update to 3.4.1
|
|
|
|
* Fri Mar 18 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 3.4-1
|
|
- Bump to 3.4
|
|
- Remove the patch that is no longer needed since it has been merged upstream
|
|
|
|
* Tue Feb 09 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 3.3-5
|
|
- Fix bug #1305644
|
|
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
* Tue Feb 02 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 3.3-3
|
|
- Fix bug #1303660
|
|
|
|
* Wed Jan 13 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 3.3-2
|
|
- Fix for EL6 and EPEL7
|
|
|
|
* Wed Jan 13 2016 Fabio Alessandro Locati <fale@fedoraproject.org> - 3.3-1
|
|
- Update to current upstream
|
|
- Fix CVE-2016-1494
|
|
- Bring spec compliant with current policy
|
|
|
|
* Tue Dec 8 2015 Paul Howarth <paul@city-fan.org> - 3.1.4-3
|
|
- Fix FTBFS (Debian Bug #804430)
|
|
- Run the tests for both python2 and python3
|
|
|
|
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.4-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
|
* Tue Oct 13 2015 Paul Howarth <paul@city-fan.org> - 3.1.4-1
|
|
- Update to 3.1.4 (#1226667)
|
|
|
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-7
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
|
* Fri Jul 25 2014 Lubomir Rintel <lkundrak@v3.sk> - 3.1.1-6
|
|
- Add Python 3 subpackage
|
|
|
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-5
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
|
* Mon Aug 05 2013 Yohan Graterol <yohangraterol92@gmail.com> - 3.1.1-4
|
|
- Fix build in F20
|
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
* Sun May 26 2013 Yohan Graterol <yohangraterol92@gmail.com> - 3.1.1-2
|
|
- Change license name, remove MANIFEST.in
|
|
|
|
* Sun May 19 2013 Yohan Graterol <yohangraterol92@gmail.com> - 3.1.1-1
|
|
- Initial packaging
|