Skip to content

debian: packaging improvements from the Debian package - #25

Merged
clefebvre merged 10 commits into
linuxmint:masterfrom
Fantu:packaging-improvements
Nov 9, 2026
Merged

clefebvre merged 10 commits into
linuxmint:masterfrom
Fantu:packaging-improvements

Conversation

@Fantu

@Fantu Fantu commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

This PR brings to the upstream debian/ the fixes and cleanups already done in the Debian package of python-xapp, keeping compatibility with Mint 22 / Ubuntu 24.04 (noble) as the oldest supported base. Each change is a separate commit:

  • Drop the gir dh addon and the gobject-introspection build-dep: dh_girepository only computes ${gir:Depends} for packages shipping .gir/.typelib files, python3-xapp ships none and does not use that substvar (the build-dep had been added only to provide the addon, build failing for with dpkg-buildpackage #21)
  • Switch to dh-sequence-python3
  • Add gettext to Build-Depends (needed by i18n.gettext() in po/meson.build, until now pulled in only indirectly through debhelper)
  • Add missing runtime dependencies: gir1.2-glib-2.0, gir1.2-gtk-3.0, gir1.2-pango-1.0, gir1.2-xapp-1.0 and python3-gi
  • Drop the obsolete X-Python-Version / X-Python3-Version fields
  • Bump debhelper compat level to 13
  • Update debian/copyright to the DEP-5 machine-readable format
  • Update Standards-Version to 4.7.0 (the debian-policy version in noble)
  • Add the Homepage field
  • Drop debian/python3-xapp.docs: AUTHORS, README and TODO are empty, so dh_installdocs skips them and the file installs nothing

Why the runtime dependencies matter

The currently published package (3.0.2 in zena) depends only on python3:any and python3-psutil. On a system without PyGObject already installed, the module cannot even be imported:

$ python3 -c "import xapp.SettingsWidgets"
ModuleNotFoundError: No module named 'gi'

Testing

All done in a Linux Mint 22.3 (zena) chroot:

  • the package builds at every step
  • the debhelper compat 12 to 13 bump leaves the .deb unchanged (file list and control files identical)
  • compared to the .deb built from current master, the installed files are the same except usr/share/doc/python3-xapp/copyright; in the control data, besides the new Depends and Homepage, dropping X-Python3-Version only removes the no-op (>= 3.0~) from python3:any and -V 3.0- from the py3compile/pypy3compile calls in postinst
  • on a clean chroot, installing the built .deb pulls in everything needed and all modules import fine (xapp, xapp.os, xapp.threading, xapp.util, xapp.SettingsWidgets, xapp.GSettingsWidgets, xapp.widgets.ListEditor, xapp.widgets.Dialog)

Notes outside the packaging (not changed in this PR)

  • xapp/SettingsWidgets.py is committed with the executable bit (mode 100755) although it is only an imported module, so lintian reports executable-in-usr-lib. It also has a #!/usr/bin/python3 shebang, like the other modules that are not executable.
  • meson.build declares meson_version : '>=0.47.0', but meson warns that the / operator on strings (used for podir) needs 0.49.0. The Build-Depends keep meson (>= 0.47.0) as declared by the project; the minimum in meson.build should probably be raised.

dh_girepository only computes ${gir:Depends} for packages shipping
GObject introspection data (.gir/.typelib files). python3-xapp ships
only Python modules and does not use ${gir:Depends}, so the addon is a
no-op.

gobject-introspection was added to Build-Depends only to provide the gir
dh sequence (linuxmint#21), so it can go together with the addon.

Assisted-by: Claude Code:claude-opus-5-5
Build-depend on dh-sequence-python3 instead of dh-python and drop
--with=python3 from debian/rules.

Assisted-by: Claude Code:claude-opus-5-5
po/meson.build uses i18n.gettext(), which needs msgfmt to build the
translations. It was pulled in only indirectly through debhelper.

Assisted-by: Claude Code:claude-opus-5-5
The modules import Gio, GLib and GObject (gir1.2-glib-2.0), Gtk and Gdk
(gir1.2-gtk-3.0), Pango (gir1.2-pango-1.0) and XApp (gir1.2-xapp-1.0)
through python3-gi, but none of them was declared in Depends.

Assisted-by: Claude Code:claude-opus-5-5
X-Python-Version refers to Python 2, whose support was removed, and
X-Python3-Version >= 3.0 does not restrict anything.

Assisted-by: Claude Code:claude-opus-5-5
None of the v13 changes affects this package: there are no tests,
overrides, manpages or tmpfiles, and dh_missing already reported no
uninstalled files, so its new --fail-missing default is harmless. The
contents and control files of the built .deb are unchanged.

Assisted-by: Claude Code:claude-opus-5-5
Import debian/copyright from the Debian packaging: it uses the DEP-5
machine-readable format, lists copyright years and holders and includes
the full LGPL-2+ license notice.

Adapt it to upstream: point Source to the current repository name and
extend the Linux Mint copyright on debian/* to 2026.

Assisted-by: Claude Code:claude-opus-5-5
4.7.0 is the debian-policy version available in Ubuntu 24.04 (noble),
the oldest base still supported.

Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Claude Code:claude-opus-5-5
AUTHORS, README and TODO are empty files, which dh_installdocs skips, so
the file installs nothing.

Assisted-by: Claude Code:claude-opus-5-5
@clefebvre
clefebvre merged commit e72db3a into linuxmint:master Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants