Skip to content

Debian packaging improvements#205

Open
Fantu wants to merge 15 commits into
linuxmint:masterfrom
Fantu:debian-improve2
Open

Debian packaging improvements#205
Fantu wants to merge 15 commits into
linuxmint:masterfrom
Fantu:debian-improve2

Conversation

@Fantu
Copy link
Copy Markdown
Contributor

@Fantu Fantu commented May 31, 2026

Merge packaging improvements from Debian packaging, considering support of the Ubuntu and Debian versions supported by Mint (the actual older one Mint 22 based on ubuntu 24.04).

I tried to create a skill for doing it with Claude, but it is difficult to explain and make to do it correctly, so I think I won't publish it (as it still requires guidance and checks from someone experienced) and it will only remain a help to save some time in some operations.

For the research and testing part, I had some difficulty creating a minimal Mint chroot, so I ended up creating one in Ubuntu 24.04, adding the Mint 22.3 repositories. As I've seen several times over the years, Mint doesn't support build in clean and minimal environments like Debian and Ubuntu do, but I think it would be nice to be able to do that in Mint as well.

I did it in a separate commit so is possible to cherry-pick excluding something, even I think all can be merged, including compat 11->13 (as 11 can cause know issues) and libexec in private folder.

Let me know if you have any questions or concerns.

Fantu added 15 commits May 30, 2026 15:02
copied from Debian packaging
Drop build dependencies that are no longer referenced by the build
system or the source code:
- intltool: po/meson.build is empty and the build uses no i18n.gettext()
- libjson-glib-dev: no dependency('json-glib-*') in meson.build, unused
in the code
- libupower-glib-dev: upower support was removed from csm-consolekit.c
upstream (commit 97bcafd, linuxmint#185); no dependency('upower-*') remains
- libxt-dev: no dependency('xt') and no libXt usage anywhere in the
source

Verified with a clean build in a Mint 22.x (noble) chroot using the
reduced set of build dependencies.

Assisted-by: Claude Code (Opus 4.8)
meson.build calls dependency('pango') unconditionally (and
dependency('pangoxft', required: false)), both provided by
libpango1.0-dev. So far pango.pc was only pulled in transitively via
libgtk-3-dev; declare it explicitly as a direct build dependency.

Assisted-by: Claude Code (Opus 4.8)
…esa-dev

libgl1-mesa-dev is a transitional dummy package. meson.build needs gl.pc
(dependency('gl')), which is provided by libgl-dev (libglvnd); depend on
it directly.

Assisted-by: Claude Code (Opus 4.8)
Point to the upstream repository at
https://github.com/linuxmint/cinnamon-session.

Assisted-by: Claude Code (Opus 4.8)
The Breaks/Replaces on cinnamon-session-common (<< 2.2.2-5~) covered an
old file move between the two binary packages. Version 2.2.2-5 is
ancient enough that no supported upgrade path (not even from earlier
major releases) can still hit it, so the relationship is no longer
needed.

Assisted-by: Claude Code (Opus 4.8)
…pat 11 to 13

Drop the deprecated debian/compat file and declare the level through a
debhelper-compat build dependency, bumping the compatibility level from
11 to 13.

Reviewed every compatibility change from 11 to 13 against this package:
it ships no systemd units, registers no meson tests and builds no shared
libraries, so the dh_installsystemd, "meson test" (compat 13) and
dh_makeshlibs changes have no effect here. The dh_missing override keeps
the lenient --list-missing behaviour (compat 13 would otherwise default
to --fail-missing); its comment is updated accordingly.

Verified with a before/after binary build in a Mint 22.x (noble) chroot:
the installed file lists, maintainer scripts, conffiles and control
fields are identical. The only difference is that dh_dwz, added to the
default sequence in compat 12, adds a .gnu_debugaltlink section to the
executables; their code (text/data/bss) is byte-identical, so this is
the expected debug-info optimisation rather than a content change.

Assisted-by: Claude Code (Opus 4.8)
Drop the override_dh_missing target so dh_missing uses the compat 13
default of --fail-missing instead of the lenient --list-missing. The
build now fails if meson installs a file that is neither picked up by a
*.install file nor listed in debian/not-installed, catching files
silently left out of the packages (as seen in a recent PR).

All meson-installed files are already covered by the *.install files and
debian/not-installed, so the build still succeeds.

Assisted-by: Claude Code (Opus 4.8)
--as-needed has been the linker default on Debian/Ubuntu for years, so
passing it explicitly via DEB_LDFLAGS_MAINT_APPEND is redundant. lintian
flags it as debian-rules-uses-as-needed-linker-flag.

Assisted-by: Claude Code (Opus 4.8)
Switch DEB_BUILD_MAINT_OPTIONS from hardening=+bindnow to
hardening=+all, turning on the full set of hardening flags instead of
just bindnow on top of the defaults.

Assisted-by: Claude Code (Opus 4.8)
Add the licenserecon (lrc) config so that running lrc on this tree skips
the usual false positives out of the box: the generic license-like
filenames (about, authors, copying, ...) and specific ones spotted in
Debian packaging. Helps keeping debian/copyright in check.

Assisted-by: Claude Code (Opus 4.8)
Update from the very old 3.9.6 to 4.7.0, the debian-policy version
shipped by the oldest still-supported target (Ubuntu 24.04 noble / Mint
22). No further changes needed.

Assisted-by: Claude Code (Opus 4.8)
Configure meson with
--libexecdir=/usr/lib/$(DEB_HOST_MULTIARCH)/cinnamon-session so the
helper executables (cinnamon-session-binary,
cinnamon-session-check-accelerated and its helper) land in a
package-private directory instead of directly in the multiarch libdir.
meson propagates the path to LIBEXECDIR, so the helpers are still found
at runtime.

Verified with a binary build in a Mint 22.x (noble) chroot: the existing
usr/lib/*/cinnamon-session* glob in cinnamon-session.install still picks
the binaries up in the new subdirectory and dh_missing (--fail-missing)
reports nothing missing.

Debian have it since 2018:
https://salsa.debian.org/cinnamon-team/cinnamon-session/-/commit/07ffe1d63cd7fe5bd21e86f01537984e9f34dd08

Assisted-by: Claude Code (Opus 4.8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant