|
|
|
@ -1,14 +1,8 @@
|
|
|
|
|
%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: 11%{?dist}
|
|
|
|
|
Release: 12%{?dist}
|
|
|
|
|
Summary: Pure-Python RSA implementation
|
|
|
|
|
|
|
|
|
|
License: ASL 2.0
|
|
|
|
@ -22,25 +16,6 @@ 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}}
|
|
|
|
@ -57,32 +32,14 @@ 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
|
|
|
|
@ -92,34 +49,7 @@ 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
|
|
|
|
@ -139,17 +69,17 @@ cp %{buildroot}%{_bindir}/pyrsa-decrypt-bigfile %{buildroot}%{_bindir}/pyrsa-dec
|
|
|
|
|
%{_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
|
|
|
|
|
%{python3_sitelib}/%{pypi_name}/
|
|
|
|
|
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%{__python2} setup.py test
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
%{__python3} setup.py test
|
|
|
|
|
%endif # with python3
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Fri Sep 20 2019 Miro Hrončok <mhroncok@redhat.com> - 3.4.2-12
|
|
|
|
|
- Subpackage python2-rsa has been removed
|
|
|
|
|
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
|
|
|
|
|
|
|
|
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.4.2-11
|
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
|
|
|
|
|