summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-rsa.spec304
-rw-r--r--sources1
3 files changed, 306 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..75fdf49 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/rsa-4.9.tar.gz
diff --git a/python-rsa.spec b/python-rsa.spec
new file mode 100644
index 0000000..ae513c0
--- /dev/null
+++ b/python-rsa.spec
@@ -0,0 +1,304 @@
+%global _empty_manifest_terminate_build 0
+Name: python-rsa
+Version: 4.9
+Release: 1
+Summary: Pure-Python RSA implementation
+License: Apache-2.0
+URL: https://stuvel.eu/rsa
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/aa/65/7d973b89c4d2351d7fb232c2e452547ddfa243e93131e7cfa766da627b52/rsa-4.9.tar.gz
+BuildArch: noarch
+
+Requires: python3-pyasn1
+
+%description
+# Pure Python RSA implementation
+
+[![PyPI](https://img.shields.io/pypi/v/rsa.svg)](https://pypi.org/project/rsa/)
+[![Build Status](https://travis-ci.org/sybrenstuvel/python-rsa.svg?branch=master)](https://travis-ci.org/sybrenstuvel/python-rsa)
+[![Coverage Status](https://coveralls.io/repos/github/sybrenstuvel/python-rsa/badge.svg?branch=master)](https://coveralls.io/github/sybrenstuvel/python-rsa?branch=master)
+[![Code Climate](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/maintainability)](https://codeclimate.com/github/codeclimate/codeclimate/maintainability)
+
+[Python-RSA](https://stuvel.eu/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 commandline. The code was mostly written by
+Sybren A. Stüvel.
+
+Documentation can be found at the [Python-RSA homepage](https://stuvel.eu/rsa). For all changes, check [the changelog](https://github.com/sybrenstuvel/python-rsa/blob/master/CHANGELOG.md).
+
+Download and install using:
+
+ pip install rsa
+
+or download it from the [Python Package Index](https://pypi.org/project/rsa/).
+
+The source code is maintained at [GitHub](https://github.com/sybrenstuvel/python-rsa/) and is
+licensed under the [Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
+
+## Security
+
+Because of how Python internally stores numbers, it is very hard (if not impossible) to make a pure-Python program secure against timing attacks. This library is no exception, so use it with care. See https://securitypitfalls.wordpress.com/2018/08/03/constant-time-compare-in-python/ for more info.
+
+## Setup of Development Environment
+
+```
+python3 -m venv .venv
+. ./.venv/bin/activate
+pip install poetry
+poetry install
+```
+
+## Publishing a New Release
+
+Since this project is considered critical on the Python Package Index,
+two-factor authentication is required. For uploading packages to PyPi, an API
+key is required; username+password will not work.
+
+First, generate an API token at https://pypi.org/manage/account/token/. Then,
+use this token when publishing instead of your username and password.
+
+As username, use `__token__`.
+As password, use the token itself, including the `pypi-` prefix.
+
+See https://pypi.org/help/#apitoken for help using API tokens to publish. This
+is what I have in `~/.pypirc`:
+
+```
+[distutils]
+index-servers =
+ rsa
+
+# Use `twine upload -r rsa` to upload with this token.
+[rsa]
+ repository = https://upload.pypi.org/legacy/
+ username = __token__
+ password = pypi-token
+```
+
+```
+. ./.venv/bin/activate
+pip install twine
+
+poetry build
+twine check dist/rsa-4.9.tar.gz dist/rsa-4.9-*.whl
+twine upload -r rsa dist/rsa-4.9.tar.gz dist/rsa-4.9-*.whl
+```
+
+The `pip install twine` is necessary as Python-RSA requires Python >= 3.6, and
+Twine requires at least version 3.7. This means Poetry refuses to add it as
+dependency.
+
+
+
+%package -n python3-rsa
+Summary: Pure-Python RSA implementation
+Provides: python-rsa
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-rsa
+# Pure Python RSA implementation
+
+[![PyPI](https://img.shields.io/pypi/v/rsa.svg)](https://pypi.org/project/rsa/)
+[![Build Status](https://travis-ci.org/sybrenstuvel/python-rsa.svg?branch=master)](https://travis-ci.org/sybrenstuvel/python-rsa)
+[![Coverage Status](https://coveralls.io/repos/github/sybrenstuvel/python-rsa/badge.svg?branch=master)](https://coveralls.io/github/sybrenstuvel/python-rsa?branch=master)
+[![Code Climate](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/maintainability)](https://codeclimate.com/github/codeclimate/codeclimate/maintainability)
+
+[Python-RSA](https://stuvel.eu/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 commandline. The code was mostly written by
+Sybren A. Stüvel.
+
+Documentation can be found at the [Python-RSA homepage](https://stuvel.eu/rsa). For all changes, check [the changelog](https://github.com/sybrenstuvel/python-rsa/blob/master/CHANGELOG.md).
+
+Download and install using:
+
+ pip install rsa
+
+or download it from the [Python Package Index](https://pypi.org/project/rsa/).
+
+The source code is maintained at [GitHub](https://github.com/sybrenstuvel/python-rsa/) and is
+licensed under the [Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
+
+## Security
+
+Because of how Python internally stores numbers, it is very hard (if not impossible) to make a pure-Python program secure against timing attacks. This library is no exception, so use it with care. See https://securitypitfalls.wordpress.com/2018/08/03/constant-time-compare-in-python/ for more info.
+
+## Setup of Development Environment
+
+```
+python3 -m venv .venv
+. ./.venv/bin/activate
+pip install poetry
+poetry install
+```
+
+## Publishing a New Release
+
+Since this project is considered critical on the Python Package Index,
+two-factor authentication is required. For uploading packages to PyPi, an API
+key is required; username+password will not work.
+
+First, generate an API token at https://pypi.org/manage/account/token/. Then,
+use this token when publishing instead of your username and password.
+
+As username, use `__token__`.
+As password, use the token itself, including the `pypi-` prefix.
+
+See https://pypi.org/help/#apitoken for help using API tokens to publish. This
+is what I have in `~/.pypirc`:
+
+```
+[distutils]
+index-servers =
+ rsa
+
+# Use `twine upload -r rsa` to upload with this token.
+[rsa]
+ repository = https://upload.pypi.org/legacy/
+ username = __token__
+ password = pypi-token
+```
+
+```
+. ./.venv/bin/activate
+pip install twine
+
+poetry build
+twine check dist/rsa-4.9.tar.gz dist/rsa-4.9-*.whl
+twine upload -r rsa dist/rsa-4.9.tar.gz dist/rsa-4.9-*.whl
+```
+
+The `pip install twine` is necessary as Python-RSA requires Python >= 3.6, and
+Twine requires at least version 3.7. This means Poetry refuses to add it as
+dependency.
+
+
+
+%package help
+Summary: Development documents and examples for rsa
+Provides: python3-rsa-doc
+%description help
+# Pure Python RSA implementation
+
+[![PyPI](https://img.shields.io/pypi/v/rsa.svg)](https://pypi.org/project/rsa/)
+[![Build Status](https://travis-ci.org/sybrenstuvel/python-rsa.svg?branch=master)](https://travis-ci.org/sybrenstuvel/python-rsa)
+[![Coverage Status](https://coveralls.io/repos/github/sybrenstuvel/python-rsa/badge.svg?branch=master)](https://coveralls.io/github/sybrenstuvel/python-rsa?branch=master)
+[![Code Climate](https://api.codeclimate.com/v1/badges/a99a88d28ad37a79dbf6/maintainability)](https://codeclimate.com/github/codeclimate/codeclimate/maintainability)
+
+[Python-RSA](https://stuvel.eu/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 commandline. The code was mostly written by
+Sybren A. Stüvel.
+
+Documentation can be found at the [Python-RSA homepage](https://stuvel.eu/rsa). For all changes, check [the changelog](https://github.com/sybrenstuvel/python-rsa/blob/master/CHANGELOG.md).
+
+Download and install using:
+
+ pip install rsa
+
+or download it from the [Python Package Index](https://pypi.org/project/rsa/).
+
+The source code is maintained at [GitHub](https://github.com/sybrenstuvel/python-rsa/) and is
+licensed under the [Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
+
+## Security
+
+Because of how Python internally stores numbers, it is very hard (if not impossible) to make a pure-Python program secure against timing attacks. This library is no exception, so use it with care. See https://securitypitfalls.wordpress.com/2018/08/03/constant-time-compare-in-python/ for more info.
+
+## Setup of Development Environment
+
+```
+python3 -m venv .venv
+. ./.venv/bin/activate
+pip install poetry
+poetry install
+```
+
+## Publishing a New Release
+
+Since this project is considered critical on the Python Package Index,
+two-factor authentication is required. For uploading packages to PyPi, an API
+key is required; username+password will not work.
+
+First, generate an API token at https://pypi.org/manage/account/token/. Then,
+use this token when publishing instead of your username and password.
+
+As username, use `__token__`.
+As password, use the token itself, including the `pypi-` prefix.
+
+See https://pypi.org/help/#apitoken for help using API tokens to publish. This
+is what I have in `~/.pypirc`:
+
+```
+[distutils]
+index-servers =
+ rsa
+
+# Use `twine upload -r rsa` to upload with this token.
+[rsa]
+ repository = https://upload.pypi.org/legacy/
+ username = __token__
+ password = pypi-token
+```
+
+```
+. ./.venv/bin/activate
+pip install twine
+
+poetry build
+twine check dist/rsa-4.9.tar.gz dist/rsa-4.9-*.whl
+twine upload -r rsa dist/rsa-4.9.tar.gz dist/rsa-4.9-*.whl
+```
+
+The `pip install twine` is necessary as Python-RSA requires Python >= 3.6, and
+Twine requires at least version 3.7. This means Poetry refuses to add it as
+dependency.
+
+
+
+%prep
+%autosetup -n rsa-4.9
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-rsa -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 4.9-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..d42f267
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+26a1efb79164a95c363e550c3eefe683 rsa-4.9.tar.gz