diff options
| author | Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> | 2022-04-12 13:11:18 +0200 |
|---|---|---|
| committer | Trevor Gamblin <tvgamblin@gmail.com> | 2022-04-17 16:46:15 +0000 |
| commit | e1036f24a329584d55380cc331274b230e15a186 (patch) | |
| tree | 1a4399372d4607d927866666a86362fbb4fbec2e | |
| parent | 8e1986e95ad30a31c8eaa3cfe2e045b335ef7555 (diff) | |
| download | meta-openembedded-e1036f24a329584d55380cc331274b230e15a186.tar.gz | |
python3-imgtool: update to 1.9.0
Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Trevor Gamblin <tvgamblin@gmail.com>
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-imgtool/cbor2.patch | 67 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-imgtool_1.9.0.bb (renamed from meta-python/recipes-devtools/python/python3-imgtool_1.8.0.bb) | 4 |
2 files changed, 1 insertions, 70 deletions
diff --git a/meta-python/recipes-devtools/python/python3-imgtool/cbor2.patch b/meta-python/recipes-devtools/python/python3-imgtool/cbor2.patch deleted file mode 100644 index 3e8c202bce..0000000000 --- a/meta-python/recipes-devtools/python/python3-imgtool/cbor2.patch +++ /dev/null | |||
| @@ -1,67 +0,0 @@ | |||
| 1 | Upstream-Status: Submitted [https://github.com/mcu-tools/mcuboot/pull/1190] | ||
| 2 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 3 | |||
| 4 | From f9c6f31b936d34df9a6551609cb16ed9c348be88 Mon Sep 17 00:00:00 2001 | ||
| 5 | From: Ross Burton <ross.burton@arm.com> | ||
| 6 | Date: Tue, 2 Nov 2021 11:12:04 +0000 | ||
| 7 | Subject: [PATCH] imgtool: prefer cbor2 over cbor | ||
| 8 | |||
| 9 | The cbor module is unmaintained, with the last release in 2016[1]. The | ||
| 10 | cbor2 module however is under active development and was last released | ||
| 11 | just last month[2]. | ||
| 12 | |||
| 13 | As the APIs are identical, we can import cbor2 and if that fails fall | ||
| 14 | back to cbor. | ||
| 15 | |||
| 16 | [1] https://pypi.org/project/cbor/#history | ||
| 17 | [2] https://pypi.org/project/cbor2/#history | ||
| 18 | |||
| 19 | Closes #1189 | ||
| 20 | |||
| 21 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 22 | --- | ||
| 23 | scripts/imgtool.nix | 2 +- | ||
| 24 | scripts/imgtool/boot_record.py | 7 +++++-- | ||
| 25 | scripts/requirements.txt | 2 +- | ||
| 26 | scripts/setup.py | 2 +- | ||
| 27 | 4 files changed, 8 insertions(+), 5 deletions(-) | ||
| 28 | |||
| 29 | diff --git a/scripts/imgtool/boot_record.py b/scripts/imgtool/boot_record.py | ||
| 30 | index ac433aa..6f0045e 100644 | ||
| 31 | --- a/scripts/imgtool/boot_record.py | ||
| 32 | +++ b/scripts/imgtool/boot_record.py | ||
| 33 | @@ -16,8 +16,11 @@ | ||
| 34 | # limitations under the License. | ||
| 35 | |||
| 36 | from enum import Enum | ||
| 37 | -import cbor | ||
| 38 | |||
| 39 | +try: | ||
| 40 | + from cbor2 import dumps | ||
| 41 | +except ImportError: | ||
| 42 | + from cbor import dumps | ||
| 43 | |||
| 44 | class SwComponent(int, Enum): | ||
| 45 | """ | ||
| 46 | @@ -46,4 +49,4 @@ def create_sw_component_data(sw_type, sw_version, sw_measurement_description, | ||
| 47 | # list because later it will be modified by the bootloader. | ||
| 48 | properties[SwComponent.MEASUREMENT_VALUE] = sw_measurement_value | ||
| 49 | |||
| 50 | - return cbor.dumps(properties) | ||
| 51 | + return dumps(properties) | ||
| 52 | diff --git a/scripts/setup.py b/scripts/setup.py | ||
| 53 | index a228ea3..692cfb7 100644 | ||
| 54 | --- a/scripts/setup.py | ||
| 55 | +++ b/scripts/setup.py | ||
| 56 | @@ -17,7 +17,7 @@ setuptools.setup( | ||
| 57 | 'cryptography>=2.4.2', | ||
| 58 | 'intelhex>=2.2.1', | ||
| 59 | 'click', | ||
| 60 | - 'cbor>=1.0.0', | ||
| 61 | + 'cbor2', | ||
| 62 | ], | ||
| 63 | entry_points={ | ||
| 64 | "console_scripts": ["imgtool=imgtool.main:imgtool"] | ||
| 65 | -- | ||
| 66 | 2.25.1 | ||
| 67 | |||
diff --git a/meta-python/recipes-devtools/python/python3-imgtool_1.8.0.bb b/meta-python/recipes-devtools/python/python3-imgtool_1.9.0.bb index c957fce3ac..1e5efbe187 100644 --- a/meta-python/recipes-devtools/python/python3-imgtool_1.8.0.bb +++ b/meta-python/recipes-devtools/python/python3-imgtool_1.9.0.bb | |||
| @@ -3,9 +3,7 @@ SUMMARY = "MCUboot's image signing and key management tool" | |||
| 3 | LICENSE = "Apache-2.0" | 3 | LICENSE = "Apache-2.0" |
| 4 | LIC_FILES_CHKSUM = "file://imgtool/main.py;beginline=3;endline=18;md5=9965f09ae52c04886a1f04e13ccdce57" | 4 | LIC_FILES_CHKSUM = "file://imgtool/main.py;beginline=3;endline=18;md5=9965f09ae52c04886a1f04e13ccdce57" |
| 5 | 5 | ||
| 6 | SRC_URI += "file://cbor2.patch;striplevel=2" | 6 | SRC_URI[sha256sum] = "7fa7f6bd6bf069b5ffa07ea47478e16b6206bd2fc5b7607def999de0e9134a43" |
| 7 | |||
| 8 | SRC_URI[sha256sum] = "4858f5c5f48cfa4a0bb99e60d00aa291172a7ecc2afe4fb77ed96121f59b6e2f" | ||
| 9 | 7 | ||
| 10 | inherit pypi setuptools3 | 8 | inherit pypi setuptools3 |
| 11 | 9 | ||
