Merge ~maxgmr/ubuntu/+source/ubertooth:ubertooth-deprecated-distutils into ubuntu/+source/ubertooth:ubuntu/devel

Proposed by Max Gilmour
Status: Merged
Merge reported by: Max Gilmour
Merged at revision: d125be0635634c3e3e808aaf475890c7b74b8c63
Proposed branch: ~maxgmr/ubuntu/+source/ubertooth:ubertooth-deprecated-distutils
Merge into: ubuntu/+source/ubertooth:ubuntu/devel
Diff against target: 94 lines (+43/-2)
5 files modified
debian/changelog (+8/-0)
debian/control (+3/-1)
debian/patches/0009-Replace-deprecated-distutils.patch (+29/-0)
debian/patches/series (+1/-0)
debian/rules (+2/-1)
Reviewer Review Type Date Requested Status
Zixing Liu (community) Approve
Review via email: mp+483090@code.launchpad.net

Description of the change

ubertooth fails to build from source due to the deprecation of the `distutils` module in Python 3.12. To fix this, the `setuptools` module, which provides `distutils`, has been added instead. The package now builds successfully on all Ubuntu targets.

To post a comment you must log in.
Revision history for this message
Max Gilmour (maxgmr) wrote :

This is my first MP- any criticism or feedback is welcomed and appreciated.

Revision history for this message
Zixing Liu (liushuyu-011) wrote :

Changes look good to me.

> ubertooth fails to build from source due to the deprecation of the `distutils` module in Python 3.12.

If this is an FTBFS, please open a tracking LP bug describing how the package fails to build and then reference this bug in your changelog (like "(LP: #XXXXXX)").

d125be0... by Max Gilmour

Remove NMU and reference LP bug in changelog

Revision history for this message
Max Gilmour (maxgmr) wrote :

I have removed the NMU message and opened an LP bug (LP: #2104175) in accordance with your suggestions.

Revision history for this message
Zixing Liu (liushuyu-011) wrote :

Looking good. Sponsoring.

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ubertooth_2018.12.R1-5.2ubuntu1.dsc: done.
  Uploading ubertooth_2018.12.R1.orig.tar.gz: done.
  Uploading ubertooth_2018.12.R1-5.2ubuntu1.debian.tar.xz: done.
  Uploading ubertooth_2018.12.R1-5.2ubuntu1_source.buildinfo: done.
  Uploading ubertooth_2018.12.R1-5.2ubuntu1_source.changes: done.
Successfully uploaded packages.

review: Approve

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 2d85e48..4ea83ee 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+ubertooth (2018.12.R1-5.2ubuntu1) plucky; urgency=medium
7+
8+ * Replace deprecated distutils Python module with setuptools. (LP: #2104175)
9+ * debian/control: Add setuptools to Build-Depends.
10+ * debian/rules: Pass upstream package version to specan_ui CMakeLists.
11+
12+ -- Max Gilmour <max.gilmour@canonical.com> Wed, 19 Mar 2025 10:03:14 -0700
13+
14 ubertooth (2018.12.R1-5.2) unstable; urgency=medium
15
16 * Non-maintainer upload.
17diff --git a/debian/control b/debian/control
18index 206baa0..64156be 100644
19--- a/debian/control
20+++ b/debian/control
21@@ -1,5 +1,6 @@
22 Source: ubertooth
23-Maintainer: Ruben Undheim <ruben.undheim@gmail.com>
24+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
25+XSBC-Original-Maintainer: Ruben Undheim <ruben.undheim@gmail.com>
26 Section: science
27 Priority: optional
28 Build-Depends: debhelper-compat (= 12),
29@@ -9,6 +10,7 @@ Build-Depends: debhelper-compat (= 12),
30 pkg-config,
31 libbluetooth-dev,
32 python3-all:any,
33+ python3-setuptools,
34 libbtbb-dev (>= 2018.12.R1),
35 txt2man
36 Build-Depends-Indep: gcc-arm-none-eabi,
37diff --git a/debian/patches/0009-Replace-deprecated-distutils.patch b/debian/patches/0009-Replace-deprecated-distutils.patch
38new file mode 100644
39index 0000000..5a373c0
40--- /dev/null
41+++ b/debian/patches/0009-Replace-deprecated-distutils.patch
42@@ -0,0 +1,29 @@
43+Description: Replace the deprecated distutils Python module.
44+ The "distutils" Python module was removed in Python 3.12 after being
45+ deprecated in 3.10. This patch uses the "setuptools" module which
46+ provides distutils.
47+Author: Max Gilmour <max.gilmour@canonical.com>
48+---
49+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
50+--- a/host/python/specan_ui/setup.py
51++++ b/host/python/specan_ui/setup.py
52+@@ -10,7 +10,7 @@
53+ Copyright 2012 Dominic Spill
54+ """
55+
56+-from distutils.core import setup
57++from setuptools import setup
58+
59+ setup(
60+ name = "specan",
61+--- a/host/python/specan_ui/setup.py.in
62++++ b/host/python/specan_ui/setup.py.in
63+@@ -10,7 +10,7 @@
64+ Copyright 2012 Dominic Spill
65+ """
66+
67+-from distutils.core import setup
68++from setuptools import setup
69+
70+ setup(
71+ name = "specan",
72diff --git a/debian/patches/series b/debian/patches/series
73index 708935d..e30d7db 100644
74--- a/debian/patches/series
75+++ b/debian/patches/series
76@@ -7,3 +7,4 @@
77 0007-Patch-to-run-in-Python-3.patch
78 0008-Remove-unused-extra-definition-of-variable.patch
79 0001-firmware-fix-update-for-newer-gcc-versions.patch
80+0009-Replace-deprecated-distutils.patch
81diff --git a/debian/rules b/debian/rules
82index cef31bc..fd0bdb5 100755
83--- a/debian/rules
84+++ b/debian/rules
85@@ -42,7 +42,8 @@ override_dh_auto_configure:
86 #
87
88 dh_auto_configure --sourcedirectory=host -- -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) \
89- -DUBERTOOTH_GROUP=plugdev -DUDEV_RULES_PATH=/usr/lib/udev/rules.d
90+ -DUBERTOOTH_GROUP=plugdev -DUDEV_RULES_PATH=/usr/lib/udev/rules.d \
91+ -DPACKAGE_VERSION=$(UPSTREAM_PACKAGE_VERSION)
92 ifneq ($(filter ubertooth-firmware,$(DOPACKAGES)),)
93 dh_auto_configure --sourcedirectory=firmware
94 endif

Subscribers

People subscribed via source and target branches

to all changes: