forked from pool/python-rsa
Accepting request 203019 from devel:languages:python
Update and update-alternatives implementation (forwarded request 203018 from posophe) OBS-URL: https://build.opensuse.org/request/show/203019 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-rsa?expand=0&rev=7
This commit is contained in:
commit
a0ac465ec4
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 11 23:06:55 UTC 2013 - p.drouand@gmail.com
|
||||||
|
|
||||||
|
- Update to version 3.1.2
|
||||||
|
+ No changelog available
|
||||||
|
- Replace python-distribute with python-setuptools BuildRequires
|
||||||
|
- Remove rsa-use-system-setuptools.patch; merged upstream
|
||||||
|
- Implement update-alternatives
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Aug 12 15:26:44 UTC 2013 - speilicke@suse.com
|
Mon Aug 12 15:26:44 UTC 2013 - speilicke@suse.com
|
||||||
|
|
||||||
|
@ -17,19 +17,20 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: python-rsa
|
Name: python-rsa
|
||||||
Version: 3.1.1
|
Version: 3.1.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Url: http://stuvel.eu/rsa
|
Url: http://stuvel.eu/rsa
|
||||||
Summary: Pure-Python RSA Implementation
|
Summary: Pure-Python RSA Implementation
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Source: http://pypi.python.org/packages/source/r/rsa/rsa-%{version}.tar.gz
|
Source: http://pypi.python.org/packages/source/r/rsa/rsa-%{version}.tar.gz
|
||||||
Patch0: rsa-use-system-setuptools.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-distribute
|
BuildRequires: python-setuptools
|
||||||
BuildRequires: python-pyasn1
|
BuildRequires: python-pyasn1
|
||||||
Requires: python-pyasn1
|
Requires: python-pyasn1
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||||
%else
|
%else
|
||||||
@ -43,21 +44,80 @@ PKCS#1 version 1.5.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n rsa-%{version}
|
%setup -q -n rsa-%{version}
|
||||||
%patch0 -p1
|
sed -i "s/pyrsa-priv2pub/pyrsa-priv2pub-%{py_ver}/" setup.py
|
||||||
|
sed -i "s/pyrsa-keygen/pyrsa-keygen-%{py_ver}/" setup.py
|
||||||
|
sed -i "s/pyrsa-encrypt =/pyrsa-encrypt-%{py_ver} =/" setup.py
|
||||||
|
sed -i "s/pyrsa-decrypt =/pyrsa-decrypt-%{py_ver} =/" setup.py
|
||||||
|
sed -i "s/pyrsa-sign/pyrsa-sign-%{py_ver}/" setup.py
|
||||||
|
sed -i "s/pyrsa-verify/pyrsa-verify-%{py_ver}/" setup.py
|
||||||
|
sed -i "s/pyrsa-encrypt-bigfile =/pyrsa-encrypt-bigfile-%{py_ver} =/" setup.py
|
||||||
|
sed -i "s/pyrsa-decrypt-bigfile =/pyrsa-decrypt-bigfile-%{py_ver} =/" setup.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
python setup.py build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
|
ln -s %{_bindir}/pyrsa-priv2pub-%{py_ver} %{buildroot}%{_bindir}/pyrsa-priv2pub
|
||||||
|
ln -s %{_bindir}/pyrsa-keygen-%{py_ver} %{buildroot}%{_bindir}/pyrsa-keygen
|
||||||
|
ln -s %{_bindir}/pyrsa-encrypt-%{py_ver} %{buildroot}%{_bindir}/pyrsa-encrypt
|
||||||
|
ln -s %{_bindir}/pyrsa-decrypt-%{py_ver} %{buildroot}%{_bindir}/pyrsa-decrypt
|
||||||
|
ln -s %{_bindir}/pyrsa-sign-%{py_ver} %{buildroot}%{_bindir}/pyrsa-sign
|
||||||
|
ln -s %{_bindir}/pyrsa-verify-%{py_ver} %{buildroot}%{_bindir}/pyrsa-verify
|
||||||
|
ln -s %{_bindir}/pyrsa-encrypt-bigfile-%{py_ver} %{buildroot}%{_bindir}/pyrsa-encrypt-bigfile
|
||||||
|
ln -s %{_bindir}/pyrsa-decrypt-bigfile-%{py_ver} %{buildroot}%{_bindir}/pyrsa-decrypt-bigfile
|
||||||
|
|
||||||
%check
|
%check
|
||||||
python setup.py test
|
python setup.py test
|
||||||
|
|
||||||
|
%pre
|
||||||
|
# Since binaries became ghosted to be used with update-alternatives, we have to get rid
|
||||||
|
# of the old binary resulting from the non-update-alternativies-ified package:
|
||||||
|
[[ ! -L %{_bindir}/pyrsa-priv2pub ]] && rm -f %{_bindir}/pyrsa-priv2pub
|
||||||
|
[[ ! -L %{_bindir}/pyrsa-keygen ]] && rm -f %{_bindir}/pyrsa-keygen
|
||||||
|
[[ ! -L %{_bindir}/pyrsa-encrypt ]] && rm -f %{_bindir}/pyrsa-encrypt
|
||||||
|
[[ ! -L %{_bindir}/pyrsa-decrypt ]] && rm -f %{_bindir}/pyrsa-decrypt
|
||||||
|
[[ ! -L %{_bindir}/pyrsa-sign ]] && rm -f %{_bindir}/pyrsa-sign
|
||||||
|
[[ ! -L %{_bindir}/pyrsa-verify ]] && rm -f %{_bindir}/pyrsa-verify
|
||||||
|
[[ ! -L %{_bindir}/pyrsa-encrypt-bigfile ]] && rm -f %{_bindir}/pyrsa-encrypt-bigfile
|
||||||
|
[[ ! -L %{_bindir}/pyrsa-decrypt-bigfile ]] && rm -f %{_bindir}/pyrsa-decrypt-bigfile
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%post
|
||||||
|
update-alternatives \
|
||||||
|
--install %{_bindir}/pyrsa-priv2pub pyrsa-priv2pub %{_bindir}/pyrsa-priv2pub-%{py_ver} 30 \
|
||||||
|
--slave %{_bindir}/pyrsa-keygen pyrsa-keygen %{_bindir}/pyrsa-keygen-%{py_ver} \
|
||||||
|
--slave %{_bindir}/pyrsa-encrypt pyrsa-encrypt %{_bindir}/pyrsa-encrypt-%{py_ver} \
|
||||||
|
--slave %{_bindir}/pyrsa-decrypt pyrsa-decrypt %{_bindir}/pyrsa-decrypt-%{py_ver} \
|
||||||
|
--slave %{_bindir}/pyrsa-sign pyrsa-sign %{_bindir}/pyrsa-sign-%{py_ver} \
|
||||||
|
--slave %{_bindir}/pyrsa-verify pyrsa-verify %{_bindir}/pyrsa-verify-%{py_ver} \
|
||||||
|
--slave %{_bindir}/pyrsa-encrypt-bigfile pyrsa-encrypt-bigfile %{_bindir}/pyrsa-encrypt-bigfile-%{py_ver} \
|
||||||
|
--slave %{_bindir}/pyrsa-decrypt-bigfile pyrsa-decrypt-bigfile %{_bindir}/pyrsa-decrypt-bigfile-%{py_ver} \
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 -eq 0 ] ; then
|
||||||
|
update-alternatives --remove pyrsa-priv2pub %{_bindir}/pyrsa-priv2pub-%{py_ver}
|
||||||
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
%{_bindir}/pyrsa-*
|
%ghost %{_bindir}/pyrsa-priv2pub
|
||||||
|
%{_bindir}/pyrsa-priv2pub-%{py_ver}
|
||||||
|
%ghost %{_bindir}/pyrsa-keygen
|
||||||
|
%{_bindir}/pyrsa-keygen-%{py_ver}
|
||||||
|
%ghost %{_bindir}/pyrsa-encrypt
|
||||||
|
%{_bindir}/pyrsa-encrypt-%{py_ver}
|
||||||
|
%ghost %{_bindir}/pyrsa-decrypt
|
||||||
|
%{_bindir}/pyrsa-decrypt-%{py_ver}
|
||||||
|
%ghost %{_bindir}/pyrsa-sign
|
||||||
|
%{_bindir}/pyrsa-sign-%{py_ver}
|
||||||
|
%ghost %{_bindir}/pyrsa-verify
|
||||||
|
%{_bindir}/pyrsa-verify-%{py_ver}
|
||||||
|
%ghost %{_bindir}/pyrsa-encrypt-bigfile
|
||||||
|
%{_bindir}/pyrsa-encrypt-bigfile-%{py_ver}
|
||||||
|
%ghost %{_bindir}/pyrsa-decrypt-bigfile
|
||||||
|
%{_bindir}/pyrsa-decrypt-bigfile-%{py_ver}
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ed83fe80602077bcbf91d14e41558c751d76527c7b88d44394e1e2900fddb7ba
|
|
||||||
size 37584
|
|
3
rsa-3.1.2.tar.gz
Normal file
3
rsa-3.1.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:66eb8752a1de9b92d7679ea0e1556cf2e4a155161d0024e97e06999041e35f58
|
||||||
|
size 35237
|
@ -1,13 +0,0 @@
|
|||||||
diff -ruN a/setup.py b/setup.py
|
|
||||||
--- a/setup.py 2012-06-18 16:14:17.000000000 +0200
|
|
||||||
+++ b/setup.py 2013-08-12 17:25:36.196839624 +0200
|
|
||||||
@@ -1,9 +1,5 @@
|
|
||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
-# Ensure that a reasonably recent version of 'distribute' is installed.
|
|
||||||
-from distribute_setup import use_setuptools
|
|
||||||
-use_setuptools('0.6.10')
|
|
||||||
-
|
|
||||||
from setuptools import setup
|
|
||||||
|
|
||||||
import rsa
|
|
Loading…
Reference in New Issue
Block a user