Skip to content

Debian packaging improvements - #851

Open
Fantu wants to merge 22 commits into
linuxmint:masterfrom
Fantu:debian-packaging-improvements
Open

Fantu wants to merge 22 commits into
linuxmint:masterfrom
Fantu:debian-packaging-improvements

Conversation

@Fantu

@Fantu Fantu commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

I don't have time to complete merging improvements from Debian (if compatible with mint 22 and lmde 7) and test today, so I open as draft for now

Fantu added 22 commits October 3, 2026 11:25
The source stanza has no Homepage field, so the project URL is missing
from the binary packages and from anything reading the package metadata.
Point it at the upstream repository, as the Debian packaging already
does.

Assisted-by: Claude Code:claude-opus-5
libmuffin-dev ships the .gir files (usr/lib/*/muffin/*.gir) but never
declares them, which lintian reports as gir-package-name-does-not-match
because the package name does not follow the gir1.2-* convention. Only
the field was missing: the substitution is filled in by dh_girepository,
already run through dh-sequence-gir and the override in debian/rules.
Same as the Debian packaging.

Assisted-by: Claude Code:claude-opus-5
The only thing the build needs from dbus is dbus-run-session, used to
run the test suite in debian/rules, and that binary is shipped by
dbus-daemon. Build-Depending on the dbus metapackage instead drags in
the session and system bus setup as well, which is what the Debian
packaging stopped doing to avoid blocking dbus-broker adoption (Debian
bug #1122680).

The package is available on every currently supported target: Ubuntu
24.04 (Linux Mint 22.x) already ships dbus-daemon 1.14.10, with both
/usr/bin/dbus-daemon and /usr/bin/dbus-run-session in it.

Assisted-by: Claude Code:claude-opus-5
pkg-config is only a transitional package depending on pkgconf, so
build-depending on it adds an indirection for nothing. The
/usr/bin/pkg-config symlink meson looks for is shipped by pkgconf
itself, so nothing changes for the build. Already the case on the oldest
supported target: Ubuntu 24.04 (Linux Mint 22.x) has pkgconf 1.8.1 with
pkg-config as a transitional package on top of it.

The old >= 0.22 constraint goes away with the rename, being older than
anything shipped anywhere by now. Same as the Debian packaging (commit
1e96ded1).

Assisted-by: Claude Code:claude-opus-5
…ally used

libgirepository1.0-dev is a non multi-arch metapackage pulling in the
whole introspection stack, while the build only needs three parts of it:

- libgirepository-1.0-dev (multi-arch) for girepository.h, included by
src/core/main.c for g_irepository_prepend_search_path()
- gir1.2-freedesktop-dev for the cairo-1.0, GL-1.0, xlib-2.0 and
xfixes-4.0 GIR XML listed in the generate_gir() calls of src/, cogl/ and
clutter/
- gir1.2-glib-2.0-dev for GObject-2.0

The gobject-introspection-1.0.pc used by meson comes from
gobject-introspection, which is already a build dependency. All three
packages are available on the oldest supported target, Ubuntu 24.04
(Linux Mint 22.x), where libgirepository1.0-dev is already nothing but a
metapackage depending on them. The >= 0.9.12 constraint goes away as
meaningless, libgirepository-1.0-dev existing only since 1.80.

Same change as the Debian packaging (commit baa4cad6, Debian bug
#1118900).

Assisted-by: Claude Code:claude-opus-5
gnome-pkg-tools provides the dh_gnome and dh_gnome_clean helpers, the
gnome dh sequence and the control.in/uploaders machinery of the GNOME
team packaging. debian/rules runs plain "dh $@" without the gnome
sequence and nothing else in debian/ uses it, so it was only installed
for nothing.

Same as the Debian packaging (commit b6dc4a9c).

Assisted-by: Claude Code:claude-opus-5-5
The API reference was built with gtk-doc by the old autotools build
system (GTK_DOC_CHECK in configure.ac), which went away with the rebase
onto mutter 3.36 and the switch to meson (commit 8599127). The meson
build has no gtk-doc support at all and the muffin-doc package is long
gone, so the build dependency is a leftover.

Same as the Debian packaging (commit b6dc4a9c).

Assisted-by: Claude Code:claude-opus-5-5
Nothing in muffin uses PAM: no pam dependency() in the meson build and
no PAM header or call anywhere in the sources, nor in the git history.
The build dependency came in with the packaging imported from mutter in
the rebase onto mutter 3.36 (commit 8599127) and has been dead weight
since.

Same as the Debian packaging (commit b6dc4a9c).

Assisted-by: Claude Code:claude-opus-5-5
The meson build looks for dependency('xtst'), used by clutter and by the
X11 backend (src/backends/x11/meta-virtual-input-device-x11.c includes
X11/extensions/XTest.h), while nothing uses the X Toolkit Intrinsics: no
Xt header nor xt dependency anywhere. So libxt-dev, there since the
initial packaging, is unused, and xtst.pc only got in transitively.

Replace one with the other, as xtst.pc is shipped by libxtst-dev,
available on the oldest supported target, Ubuntu 24.04 (Linux Mint
22.x).

Same as the Debian packaging (commit b6dc4a9c).

Assisted-by: Claude Code:claude-opus-5-5
The meson build requires dependency('atk') (atk_dep, used by clutter,
whose Cally accessibility API exposes ATK types in the public headers),
but libatk1.0-dev was not listed and only got in transitively through
libgtk-3-dev. List it explicitly, as already done in the Depends of
libmuffin-dev.

No version constraint: the meson minimum (>= 2.5.3) is far older than
anything shipped by now, the oldest supported target, Ubuntu 24.04
(Linux Mint 22.x), having 2.52.0.

Same as the Debian packaging (commit b6dc4a9c).

Assisted-by: Claude Code:claude-opus-5-5
The only thing the build needs from udev is udev.pc, read by meson
(dependency('udev')) to get udevdir, where 61-muffin.rules is installed.
udev.pc is shipped by systemd-dev, not by udev, already on the oldest
supported target, Ubuntu 24.04 (Linux Mint 22.x, systemd 255), and
systemd-dev is already a build dependency for exactly this reason since
commit 120ade8. Nothing else in the build or in the tests uses the udev
package.

Same as the Debian packaging, which uses systemd-dev instead of udev
(commit 0c5caa0b).

Assisted-by: Claude Code:claude-opus-5-5
libgdk-pixbuf2.0-dev is a transitional package depending on
libgdk-pixbuf-2.0-dev (plus libgdk-pixbuf-xlib-2.0-dev, which muffin
does not use), and libgdk-pixbuf-2.0-dev, the first alternative, is
available on every supported target, starting from the oldest, Ubuntu
24.04 (Linux Mint 22.x). The fallback is never taken, so drop it, both
from the build dependencies and from the Depends of libmuffin-dev.

Same as the Debian packaging (commit f09a9445).

Assisted-by: Claude Code:claude-opus-5-5
With Wayland enabled, the generated muffin-cogl-0.pc (and the ones
requiring it) lists wayland-server in Requires, as wayland_server_dep is
part of cogl_pkg_deps, and the installed cogl/cogl-wayland-server.h
includes wayland-server.h. Without libwayland-dev, building against
libmuffin-dev fails at the pkg-config step unless something else pulls
it in by chance.

Same as the Debian packaging (commit 0c5caa0b).

Assisted-by: Claude Code:claude-opus-5-5
gbm is only a private dependency of libmuffin: libgbm_dep is added to
muffin_pkg_private_deps, under have_native_backend, not to the
muffin_pkg_deps that end up in the Requires of libmuffin-0.pc, and gbm.h
is only included by headers of src/backends/native/, which are not
installed (only src/meta/ headers are). Users of libmuffin-dev never
need the gbm headers or .pc, so the dependency only drags in an unneeded
package. libgbm-dev stays a build dependency, as the native backend
needs it.

It had already been dropped from libmuffin-dev in commit a0ca0ec, and
came back in commit bc10efe together with the build dependency when
Wayland support was restored, while the native backend part of the
pkg-config dependencies has not changed since the rebase onto mutter
3.36.

The Debian packaging never had it in the Depends of libmuffin-dev.

Assisted-by: Claude Code:claude-opus-5-5
gir1.2-muffin-3.0 was renamed to gir1.2-meta-muffin-0.0 in 2016, in time
for muffin 3.0 (commit 0ba1d74), ten years and many releases ago. No
system still upgradable to the current version can have the old package
installed: the oldest supported target, Linux Mint 22.x, is only
reachable from Linux Mint 21.x, which has never shipped it. So the
Breaks/Replaces no longer has any effect.

Same as the Debian packaging, which does not have it.

Assisted-by: Claude Code:claude-opus-5-5
The Breaks: apparmor (<< 2.13.3-5~) came along with the libmutter
packaging imported in the rebase onto mutter 3.36 (commit 8599127,
restored in commit da49bc3 after the packaging rework). That apparmor
version is long gone: the oldest supported target, Ubuntu 24.04 (Linux
Mint 22.x), ships apparmor 4.0.1, so the relation can never be triggered
anymore.

Same as the Debian packaging, which does not have it.

Assisted-by: Claude Code:claude-opus-5-5
debian/rules relies on DEB_HOST_ARCH_OS, DEB_HOST_MULTIARCH,
DEB_HOST_GNU_TYPE and DEB_HOST_ARCH being exported by dpkg-buildpackage.
When it is invoked directly (e.g. fakeroot debian/rules binary) they are
empty: the Linux check fails, so Wayland and the native backend are
disabled and dh_makeshlibs fails on the missing symbols, and
dh_girepository/dh_shlibdeps get /usr/lib//muffin.

/usr/share/dpkg/architecture.mk sets them only when not already defined,
so nothing changes for dpkg-buildpackage builds. It is shipped by
dpkg-dev on every supported target, starting from the oldest, Ubuntu
24.04 (Linux Mint 22.x, dpkg-dev 1.22.6).

Same as the Debian packaging (commit 2044200c).

Assisted-by: Claude Code:claude-opus-5-5
The build system is meson: there is no configure.ac or configure.in in
the tree since the switch away from autotools, so dh_autoreconf exits
right away without doing anything (it checks for them first), with or
without --as-needed. The override, added back when muffin used autotools
(commit 82057b7), is dead code.

Same as the Debian packaging (commit cbe850df).

Assisted-by: Claude Code:claude-opus-5-5
…flag

The toolchain already links with --as-needed by default: on the oldest
supported target, Ubuntu 24.04 (Linux Mint 22.x), the gcc 13 specs pass
--as-needed to the linker, as Ubuntu has done for a long time and Debian
since bullseye. Passing it again is redundant (lintian:
debian-rules-uses-as-needed-linker-flag). -Wl,-O1 stays.

Same as the Debian packaging (commit 9bd0ae85).

Assisted-by: Claude Code:claude-opus-5-5
Set the priority of the x-window-manager alternative to 90, as computed
with the formula of Debian Policy 11.8.4 ("Packages providing a window
manager"): start with 40, add 40 for compliance with the Window Manager
Specification (EWMH/NetWM), and add 10 if the window manager permits the
X session to be restarted with a different window manager without
killing the X server.

muffin satisfies all three criteria:
- it is EWMH compliant (extensive _NET_WM_* support in the codebase)
- it supports --replace and can itself be replaced by another window
manager without killing X, through the WM_Sn selection mechanism

The previous value of 60 came with the packaging imported from mutter in
the rebase onto mutter 3.36 (commit 8599127) and does not match the
formula.

Same as the Debian packaging (commit de7e1880).

Assisted-by: Claude Code:claude-opus-5-5
The file is a 2009 note from the Debian mutter packaging, carried over
since the initial packaging: it describes the Mutter compositor, GNOME
Shell and how to enable compositing through the
/apps/mutter/general/compositing_manager gconf key. None of that applies
to muffin: compositing is always on, there is no such setting and gconf
is long gone. Being a generic debian/README.Debian, dh_installdocs also
ships it in the first binary package of debian/control,
gir1.2-meta-muffin-0.0, where it makes even less sense.

Same as the Debian packaging, which removed it in 2012 (commit
f026c1cf).

Assisted-by: Claude Code:claude-opus-5-5
Take the file as is from the Debian packaging, where it is kept up to
date:
- update the years of the mutter authors and Red Hat (2024) and of
Robert Mader (2021), and add the missing copyright holders: Endless,
SUSE, Linux Mint, Jonas Dreßler, Sebastian Wick and Giovanni Campagna
(Debian commit 29102baf)
- follow the rename of src/x11/mutter-Xatomtype.h to
src/x11/muffin-Xatomtype.h done in commit 4ad9aae (Debian commit
05742361)
- drop debian/* from the Files: * paragraph, as * already matches it
(Debian commit 029c03a9)

Every Files: pattern matches at least one file of the current tree.

Assisted-by: Claude Code:claude-opus-5-5
@Fantu
Fantu force-pushed the debian-packaging-improvements branch from a03c3b9 to d50eb37 Compare October 3, 2026 10:12
@Fantu
Fantu marked this pull request as ready for review October 3, 2026 14:14
@Fantu

Fantu commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

@mtwebster There are some other changes, including a few I just made on Debian while checking things here, that I could apply. Would you prefer to merge up to this part first, and then I can handle the rest later, so we don't have too many changes bundled together?

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.

1 participant