[Buildroot] [PATCH 1/1] package/python-rsa: new package.

Thomas Petazzoni thomas.petazzoni at bootlin.com
Wed Aug 4 22:01:56 UTC 2021


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 at 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 at imgtec.com>
>  F:	package/uhttpd/
>  F:	package/ustream-ssl/
>  
> +N:  Raphaël Mélotte <raphael.melotte at 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


More information about the buildroot mailing list