Repository navigation
deb: raise debhelper compat level to 12 - #1308
Merged
Merged
Conversation
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
approved these changes
Nov 19, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_fixpermsworkaround with anexecute_after_dh_fixpermshook. The override was only there because hook targets (debhelper 12.8+) did not work on bionic. With the hook, Dalec no longer re-implements thedh_fixpermscall, and a spec that overridesdh_fixpermsfrom 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_dwzjoins the default sequence, butdebian/rulesalready overrides it.dh_installinitramfsjoins the default sequence, but Dalec does not generate initramfs hooks.dh_installdebstops installingdebian/<pkg>.conffiles, but Dalec does not generate that file (deb: Do not create conffiles #545).dh_missingnow lists files left indebian/tmp. Dalec does not install there, so the list is empty.dh_makeshlibswrites versioned shlibs dependencies. This only makes the metadata stricter for packages that ship shared libraries.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,HOMEreset fordh_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_artifactsanddocs_and_headers_and_licenses_are_handled_correctlyonTestFocalandTestTrixie,subpackagesonTestTrixieandTestFocal, and a smoke set onTestNoble. The build logs showdebian/rules execute_after_dh_fixpermsrunning. The permission tests only pass if the hook runs, because they expect 0644 files in/usr/bin.