Merge ~mateus-morais/ubuntu/+source/python-duniterpy:fix-python-duniterpy-ftbfs into ubuntu/+source/python-duniterpy:ubuntu/devel

Proposed by Mateus Rodrigues de Morais
Status: Merged
Merged at revision: 97e02808cdea8b3bfcbdd9f6ee8e61918c3d7fc2
Proposed branch: ~mateus-morais/ubuntu/+source/python-duniterpy:fix-python-duniterpy-ftbfs
Merge into: ubuntu/+source/python-duniterpy:ubuntu/devel
Diff against target: 79 lines (+47/-1)
4 files modified
debian/changelog (+8/-0)
debian/control (+2/-1)
debian/patches/0002-duniterpy-key-ascii_armor.py-fix-FTBFS-by-removing-r.patch (+36/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Lucas Kanashiro (community) Needs Fixing
Ubuntu Sponsors Pending
Review via email: mp+452378@code.launchpad.net

Description of the change

This aims to fix python-duniterpy FTBFS when building against python-libnacl 2.1.0-1, which is stuck in -proposed due to the introduction of this regression.

Upstream python-duniterpy 1.1.1 includes this fix but hasn't been packaged in Debian yet.

PPA python-duniterpy build with python-libnacl 2.1.0-1 from -proposed: https://launchpad.net/~mateus-morais/+archive/ubuntu/python-duniterpy-ftbfs

To post a comment you must log in.
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for this MP Mateus! I have a minor comment inline for you.

review: Needs Fixing
Revision history for this message
Mateus Rodrigues de Morais (mateus-morais) wrote :

lucaskanashiro: replaced 'upstream' with 'backport' in the patch Origin field. Thanks for your review!

Revision history for this message
Dan Bungert (dbungert) wrote :

Uploading, since the original feedback was been addressed and the rest looks fine.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 143a836..c7d4e6b 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+python-duniterpy (1.1.0-3ubuntu1) mantic; urgency=medium
7+
8+ * duniterpy/key/ascii_armor.py: fix FTBFS by removing reference to
9+ non-existent libnacl.version module on newer versions of python-libnacl.
10+ (LP: #2037646)
11+
12+ -- Mateus Rodrigues de Morais <mateus.morais@canonical.com> Thu, 28 Sep 2023 10:51:38 -0300
13+
14 python-duniterpy (1.1.0-3) unstable; urgency=medium
15
16 * add patch cherry-picked upstream
17diff --git a/debian/control b/debian/control
18index b2e3fcc..84cf17f 100644
19--- a/debian/control
20+++ b/debian/control
21@@ -1,7 +1,8 @@
22 Source: python-duniterpy
23 Section: python
24 Priority: optional
25-Maintainer: Debian Cryptocoin Team <team+cryptocoin@tracker.debian.org>
26+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
27+XSBC-Original-Maintainer: Debian Cryptocoin Team <team+cryptocoin@tracker.debian.org>
28 Uploaders:
29 Jonas Smedegaard <dr@jones.dk>,
30 Build-Depends:
31diff --git a/debian/patches/0002-duniterpy-key-ascii_armor.py-fix-FTBFS-by-removing-r.patch b/debian/patches/0002-duniterpy-key-ascii_armor.py-fix-FTBFS-by-removing-r.patch
32new file mode 100644
33index 0000000..b7a49dc
34--- /dev/null
35+++ b/debian/patches/0002-duniterpy-key-ascii_armor.py-fix-FTBFS-by-removing-r.patch
36@@ -0,0 +1,36 @@
37+From: Mateus Rodrigues de Morais <mateus.morais@canonical.com>
38+Date: Thu, 28 Sep 2023 10:46:45 -0300
39+Subject: duniterpy/key/ascii_armor.py: fix FTBFS by removing reference to
40+ non-existent libnacl.version module on newer versions of python-libnacl.
41+ (LP: #2037646)
42+
43+Origin: backport, https://git.duniter.org/clients/python/duniterpy/-/commit/ad8f6a26e9e70670712d9ecdfce296e0984254b2
44+---
45+ duniterpy/key/ascii_armor.py | 3 ++-
46+ 1 file changed, 2 insertions(+), 1 deletion(-)
47+
48+diff --git a/duniterpy/key/ascii_armor.py b/duniterpy/key/ascii_armor.py
49+index 882f23f..fd3302c 100644
50+--- a/duniterpy/key/ascii_armor.py
51++++ b/duniterpy/key/ascii_armor.py
52+@@ -14,11 +14,11 @@
53+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
54+
55+ import base64
56++import importlib.metadata
57+ import re
58+ from typing import Any, Dict, List, Optional
59+
60+ import libnacl
61+-from libnacl.version import version as libnacl_version
62+
63+ from .encryption_key import PublicKey
64+ from .signing_key import SigningKey
65+@@ -33,6 +33,7 @@ HEADER_PREFIX = "-----"
66+ DASH_ESCAPE_PREFIX = "\x2D\x20"
67+
68+ # Version field value
69++libnacl_version = importlib.metadata.version("libnacl")
70+ VERSION_FIELD_VALUE = f"Python Libnacl {libnacl_version}"
71+
72+ # Parser cursor status
73diff --git a/debian/patches/series b/debian/patches/series
74index 01fc2df..3426a84 100644
75--- a/debian/patches/series
76+++ b/debian/patches/series
77@@ -1 +1,2 @@
78 020221026~4dd1a52.patch
79+0002-duniterpy-key-ascii_armor.py-fix-FTBFS-by-removing-r.patch

Subscribers

People subscribed via source and target branches