* [Buildroot] [PATCH 1/1] package/python-rsa: new package.
@ 2020-02-07 14:16 Raphaël Mélotte
2021-08-04 22:01 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Raphaël Mélotte @ 2020-02-07 14:16 UTC (permalink / raw)
To: buildroot
Python-RSA is a pure-Python RSA implementation.
Signed-off-by: Rapha?l M?lotte <raphael.melotte@essensium.com>
---
DEVELOPERS | 3 +++
package/Config.in | 1 +
package/python-rsa/Config.in | 10 ++++++++++
package/python-rsa/python-rsa.hash | 6 ++++++
package/python-rsa/python-rsa.mk | 15 +++++++++++++++
5 files changed, 35 insertions(+)
create mode 100644 package/python-rsa/Config.in
create mode 100644 package/python-rsa/python-rsa.hash
create mode 100644 package/python-rsa/python-rsa.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index d8ea23e0b3..b470e34cc5 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2076,6 +2076,9 @@ N: Rahul Jain <rahul.jain@imgtec.com>
F: package/uhttpd/
F: package/ustream-ssl/
+N: Rapha?l M?lotte <raphael.melotte@essensium.com>
+F: package/python-rsa/
+
N: Refik Tuzakli <tuzakli.refik@gmail.com>
F: package/paho-mqtt-cpp/
diff --git a/package/Config.in b/package/Config.in
index bad4f9cba6..d190d18874 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1106,6 +1106,7 @@ menu "External python modules"
source "package/python-requests-toolbelt/Config.in"
source "package/python-rpi-gpio/Config.in"
source "package/python-rpi-ws281x/Config.in"
+ source "package/python-rsa/Config.in"
source "package/python-rtslib-fb/Config.in"
source "package/python-scandir/Config.in"
source "package/python-scapy/Config.in"
diff --git a/package/python-rsa/Config.in b/package/python-rsa/Config.in
new file mode 100644
index 0000000000..c02601105b
--- /dev/null
+++ b/package/python-rsa/Config.in
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_PYTHON_RSA
+ bool "python-rsa"
+ select BR2_PACKAGE_PYTHON_PYASN1
+ help
+ 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.
+
+ https://stuvel.eu/rsa
diff --git a/package/python-rsa/python-rsa.hash b/package/python-rsa/python-rsa.hash
new file mode 100644
index 0000000000..c93c2243fb
--- /dev/null
+++ b/package/python-rsa/python-rsa.hash
@@ -0,0 +1,6 @@
+# md5, sha256 from https://pypi.org/rsa/json:
+md5 9f9af433a16868b616fc609215e91ddb rsa-4.0.tar.gz
+sha256 1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487 rsa-4.0.tar.gz
+
+# Locally computed checksums:
+sha256 073f28b7d389c8fe74f607e17c27f81eaa5ace69edc43a884f23f41b41c5c726 LICENSE
diff --git a/package/python-rsa/python-rsa.mk b/package/python-rsa/python-rsa.mk
new file mode 100644
index 0000000000..e847eaffb1
--- /dev/null
+++ b/package/python-rsa/python-rsa.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# python-rsa
+#
+################################################################################
+
+PYTHON_RSA_VERSION = 4.0
+PYTHON_RSA_SOURCE = rsa-$(PYTHON_RSA_VERSION).tar.gz
+PYTHON_RSA_SITE = https://files.pythonhosted.org/packages/cb/d0/8f99b91432a60ca4b1cd478fd0bdf28c1901c58e3a9f14f4ba3dba86b57f
+PYTHON_RSA_SETUP_TYPE = setuptools
+PYTHON_RSA_LICENSE = APACHE
+PYTHON_RSA_LICENSE_FILES = LICENSE
+PYTHON_RSA_DEPENDENCIES = python-pyasn1
+
+$(eval $(python-package))
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/python-rsa: new package.
2020-02-07 14:16 [Buildroot] [PATCH 1/1] package/python-rsa: new package Raphaël Mélotte
@ 2021-08-04 22:01 ` Thomas Petazzoni
2021-08-10 19:11 ` Raphaël Mélotte
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2021-08-04 22:01 UTC (permalink / raw)
To: Raphaël Mélotte; +Cc: Asaf Kahlon, buildroot
Hello Raphaël,
About 1.5 years after your patch was sent, I finally applied it to our
next branch. I did a number of changes, see below.
On Fri, 7 Feb 2020 15:16:28 +0100
Raphaël Mélotte <raphael.melotte@essensium.com> wrote:
> diff --git a/DEVELOPERS b/DEVELOPERS
> index d8ea23e0b3..b470e34cc5 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2076,6 +2076,9 @@ N: Rahul Jain <rahul.jain@imgtec.com>
> F: package/uhttpd/
> F: package/ustream-ssl/
>
> +N: Raphaël Mélotte <raphael.melotte@essensium.com>
> +F: package/python-rsa/
The indentation was not correct here, and anyway you've had several
packages added since then, so it did not apply as-is, but that's not a
big deal.
> diff --git a/package/python-rsa/Config.in b/package/python-rsa/Config.in
> new file mode 100644
> index 0000000000..c02601105b
> --- /dev/null
> +++ b/package/python-rsa/Config.in
> @@ -0,0 +1,10 @@
> +config BR2_PACKAGE_PYTHON_RSA
> + bool "python-rsa"
As I've updated to a newer release of python-rsa, which is Python 3.x
only, I've added a dependency on BR2_PACKAGE_PYTHON3.
> + select BR2_PACKAGE_PYTHON_PYASN1
This should have had the annotation "# runtime".
> diff --git a/package/python-rsa/python-rsa.hash b/package/python-rsa/python-rsa.hash
> new file mode 100644
> index 0000000000..c93c2243fb
> --- /dev/null
> +++ b/package/python-rsa/python-rsa.hash
> @@ -0,0 +1,6 @@
> +# md5, sha256 from https://pypi.org/rsa/json:
> +md5 9f9af433a16868b616fc609215e91ddb rsa-4.0.tar.gz
> +sha256 1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487 rsa-4.0.tar.gz
Having the md5 hash is not needed when we have the sha256, so I kept
only the sha265.
> +PYTHON_RSA_VERSION = 4.0
I updated to 4.7.2
> +PYTHON_RSA_SOURCE = rsa-$(PYTHON_RSA_VERSION).tar.gz
> +PYTHON_RSA_SITE = https://files.pythonhosted.org/packages/cb/d0/8f99b91432a60ca4b1cd478fd0bdf28c1901c58e3a9f14f4ba3dba86b57f
> +PYTHON_RSA_SETUP_TYPE = setuptools
> +PYTHON_RSA_LICENSE = APACHE
This is not a valid SPDX code. The valid code is Apache-2.0.
> +PYTHON_RSA_LICENSE_FILES = LICENSE
> +PYTHON_RSA_DEPENDENCIES = python-pyasn1
This is not a build-time dependency, only a runtime one, so I dropped
this line. Having the "select" in the Config.in file is enough for
runtime dependencies.
Also, I've added a test case in support/testing/ so that python-rsa
gets runtime tested in our infrastructure. Feel free to have a look at
the final commit at
https://git.buildroot.org/buildroot/commit/?h=next&id=58c99c957b002a9d6fa7de8df24c87df379c9faf
to see how the test case is implemented, it could be useful for your
future contributions.
Thanks a lot,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/python-rsa: new package.
2021-08-04 22:01 ` Thomas Petazzoni
@ 2021-08-10 19:11 ` Raphaël Mélotte
0 siblings, 0 replies; 3+ messages in thread
From: Raphaël Mélotte @ 2021-08-10 19:11 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Asaf Kahlon, buildroot
Hello,
On 8/5/21 12:01 AM, Thomas Petazzoni wrote:
> About 1.5 years after your patch was sent, I finally applied it to our
> next branch. I did a number of changes, see below.
Thanks for the useful comments, I'll take them into account for any future
contribution.
> Also, I've added a test case in support/testing/ so that python-rsa
> gets runtime tested in our infrastructure. Feel free to have a look at
> the final commit at
> https://git.buildroot.org/buildroot/commit/?h=next&id=58c99c957b002a9d6fa7de8df24c87df379c9faf
> to see how the test case is implemented, it could be useful for your
> future contributions.
Interesting! I'm curious to try it locally as well.
Thanks,
Raphaël
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-10 19:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07 14:16 [Buildroot] [PATCH 1/1] package/python-rsa: new package Raphaël Mélotte
2021-08-04 22:01 ` Thomas Petazzoni
2021-08-10 19:11 ` Raphaël Mélotte
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.