Skip to content

deb: raise debhelper compat level to 12 - #1308

Merged
cpuguy83 merged 1 commit into
project-dalec:mainfrom
NopeCharon:deb-debhelper-compat-12
Nov 20, 2026
Merged

cpuguy83 merged 1 commit into
project-dalec:mainfrom
NopeCharon:deb-debhelper-compat-12

Conversation

@NopeCharon

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

The deb packaging pinned debhelper compat 11 because that is what Ubuntu 18.04 (bionic) shipped. Now that bionic is gone (#1280), the oldest deb target is Ubuntu 20.04 (focal) with debhelper 12.10, so this raises the compat level to 12 for all deb targets.

It also replaces the override_dh_fixperms workaround with an execute_after_dh_fixperms hook. The override was only there because hook targets (debhelper 12.8+) did not work on bionic. With the hook, Dalec no longer re-implements the dh_fixperms call, and a spec that overrides dh_fixperms from its build steps keeps its custom artifact permissions.

I went through the compat 12 changes in debhelper 12.10 (the compat(11) branches in the tools and the upgrade checklist). None of them change the packages Dalec generates:

  • dh_dwz joins the default sequence, but debian/rules already overrides it.
  • dh_installinitramfs joins the default sequence, but Dalec does not generate initramfs hooks.
  • dh_installdeb stops installing debian/<pkg>.conffiles, but Dalec does not generate that file (deb: Do not create conffiles #545).
  • dh_missing now lists files left in debian/tmp. Dalec does not install there, so the list is empty.
  • dh_makeshlibs writes versioned shlibs dependencies. This only makes the metadata stricter for packages that ship shared libraries.
  • The autoconf/meson/cmake build system changes do not apply because Dalec overrides the dh_auto_* steps.

The docs tip on overriding debian rules now mentions that the execute_before_/execute_after_ hook targets are available.

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #1279

Special notes for your reviewer:

I kept a single compat level for every target instead of choosing one per target. Compat 13 needs debhelper 13, which focal doesn't have, and it changes more defaults (dh_missing --fail-missing, HOME reset for dh_auto_*, dh_installtmpfiles). A per-target level would make the generated packaging behave differently across distros, so it seemed better as a separate change once focal is dropped.

Unit tests are updated to expect the hook. I also ran these integration tests locally on arm64 and they passed: test_artifact_permissions, test_directory_creation, test_systemd_unit_single, test_systemd_unit_multiple_components, test_config_files_handled, go_module, test_library_artifacts and docs_and_headers_and_licenses_are_handled_correctly on TestFocal and TestTrixie, subpackages on TestTrixie and TestFocal, and a smoke set on TestNoble. The build logs show debian/rules execute_after_dh_fixperms running. The permission tests only pass if the hook runs, because they expect 0644 files in /usr/bin.

The deb packaging pinned debhelper compat 11 because that is what
Ubuntu 18.04 (bionic) shipped. Bionic has been removed, and the oldest
remaining deb target is Ubuntu 20.04 (focal), which ships debhelper
12.10, so raise the compat level to 12 for all deb targets.

None of the compat 12 behavior changes affect the packages Dalec
generates:

- dh_dwz joins the default sequence, but debian/rules already overrides
  it.
- dh_installinitramfs joins the default sequence, but Dalec does not
  generate initramfs hooks.
- debian/<pkg>.conffiles is no longer installed by dh_installdeb, but
  Dalec does not generate it.
- dh_missing now lists files left in debian/tmp, which Dalec does not
  install to.
- dh_makeshlibs generates versioned shlibs dependencies, which only
  tightens the metadata for packages shipping shared libraries.
- The autoconf, meson and cmake build system changes do not apply
  because Dalec overrides the dh_auto_* steps.

Compat 13 would need debhelper 13, which focal does not have, so keep a
single level for all targets.

With debhelper 12.8 or newer available on every target, replace the
override_dh_fixperms workaround with an execute_after_dh_fixperms hook.
The override only existed because the hook targets did not work on
bionic. Running the permissions fixup as a hook leaves dh_fixperms
itself to debhelper, so a spec can still override dh_fixperms from its
build steps without dropping the custom permissions.

Mention the hook targets in the "Overriding default debian rules" tip.

Fixes project-dalec#1279

Signed-off-by: NopeCharon <115794254+NopeCharon@users.noreply.github.com>
@cpuguy83
cpuguy83 merged commit 39d23bc into project-dalec:main Nov 20, 2026
25 checks passed

This branch was successfully deployed

1 active deployment
deploy-docs — 38ea2eb8 Deployed Nov 14, 2026 by NopeCharon via Generate docs website to GitHub Pages #1353
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.

[REQ] Raise debhelper compat level now that bionic is removed

2 participants