Control: tags 1123133 + patch
Control: tags 1123133 + pending

Dear maintainer,

I've prepared an NMU for esptool (versioned as 4.7.0+dfsg-0.2) and 
uploaded it to DELAYED/14. Please feel free to tell me if I should 
cancel it.

cu
Adrian
diffstat for esptool-4.7.0+dfsg esptool-4.7.0+dfsg

 changelog                                                          |    7 +
 patches/0001-fix-espsecure-Add-support-for-python-pkcs11-9.0.patch |   39 ++++++++++
 patches/series                                                     |    1 
 3 files changed, 47 insertions(+)

diff -Nru esptool-4.7.0+dfsg/debian/changelog esptool-4.7.0+dfsg/debian/changelog
--- esptool-4.7.0+dfsg/debian/changelog	2024-01-26 14:31:42.000000000 +0200
+++ esptool-4.7.0+dfsg/debian/changelog	2026-01-14 23:25:32.000000000 +0200
@@ -1,3 +1,10 @@
+esptool (4.7.0+dfsg-0.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Backport upstream fix for python-pkcs11 9. (Closes: #1123133)
+
+ -- Adrian Bunk <[email protected]>  Wed, 14 Jan 2026 23:25:32 +0200
+
 esptool (4.7.0+dfsg-0.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru esptool-4.7.0+dfsg/debian/patches/0001-fix-espsecure-Add-support-for-python-pkcs11-9.0.patch esptool-4.7.0+dfsg/debian/patches/0001-fix-espsecure-Add-support-for-python-pkcs11-9.0.patch
--- esptool-4.7.0+dfsg/debian/patches/0001-fix-espsecure-Add-support-for-python-pkcs11-9.0.patch	1970-01-01 02:00:00.000000000 +0200
+++ esptool-4.7.0+dfsg/debian/patches/0001-fix-espsecure-Add-support-for-python-pkcs11-9.0.patch	2026-01-14 23:25:04.000000000 +0200
@@ -0,0 +1,39 @@
+From ad969e16ee070a0bf78ad2508af432b8b2a23a5e Mon Sep 17 00:00:00 2001
+From: Peter Dragun <[email protected]>
+Date: Wed, 6 Aug 2025 09:09:12 +0200
+Subject: fix(espsecure): Add support for python-pkcs11 9.0+
+
+---
+ espsecure/esp_hsm_sign/exceptions.py | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/espsecure/esp_hsm_sign/exceptions.py b/espsecure/esp_hsm_sign/exceptions.py
+index 47ba8e3..3b0592c 100644
+--- a/espsecure/esp_hsm_sign/exceptions.py
++++ b/espsecure/esp_hsm_sign/exceptions.py
+@@ -3,7 +3,6 @@
+ # SPDX-License-Identifier: GPL-2.0-or-later
+ 
+ from pkcs11.exceptions import (
+-    AlreadyInitialized,
+     AnotherUserAlreadyLoggedIn,
+     ArgumentsBad,
+     DeviceRemoved,
+@@ -17,6 +16,14 @@ from pkcs11.exceptions import (
+ )
+ 
+ 
++try:
++    # AlreadyInitialized is not available since python-pkcs11 9.0, as multiple
++    # initializations are now supported.
++    from pkcs11.exceptions import AlreadyInitialized
++except ImportError:
++    AlreadyInitialized = None
++
++
+ def handle_exceptions(e, info=""):
+     exception_type = e.__class__
+     if exception_type == MechanismInvalid:
+-- 
+2.47.3
+
diff -Nru esptool-4.7.0+dfsg/debian/patches/series esptool-4.7.0+dfsg/debian/patches/series
--- esptool-4.7.0+dfsg/debian/patches/series	1970-01-01 02:00:00.000000000 +0200
+++ esptool-4.7.0+dfsg/debian/patches/series	2026-01-14 23:25:30.000000000 +0200
@@ -0,0 +1 @@
+0001-fix-espsecure-Add-support-for-python-pkcs11-9.0.patch

Reply via email to