Repository navigation
packaging: ship the build and source links in linux-headers - #196
Merged
Bjordis Collaku (bjordiscollaku) merged 1 commit intoNov 25, 2026
Merged
Conversation
Bjordis Collaku (bjordiscollaku)
force-pushed
the
fix/headers-own-build-links
branch
from
November 23, 2026 19:08
c4c4555 to
ac1e1a8
Compare
Bjordis Collaku (bjordiscollaku)
had a problem deploying
to
Staging
November 23, 2026 19:12 — with
GitHub Actions
Error
Bjordis Collaku (bjordiscollaku)
had a problem deploying
to
Staging
November 23, 2026 19:12 — with
GitHub Actions
Error
Bjordis Collaku (bjordiscollaku)
had a problem deploying
to
Staging
November 23, 2026 19:12 — with
GitHub Actions
Error
Bjordis Collaku (bjordiscollaku)
had a problem deploying
to
Staging
November 23, 2026 19:12 — with
GitHub Actions
Error
Bjordis Collaku (bjordiscollaku)
had a problem deploying
to
Staging
November 23, 2026 19:12 — with
GitHub Actions
Error
dkms cannot build modules against our kernels when only the headers are
installed:
Error! Your kernel headers for kernel 7.3.0+qcom-7.3-20261118-g808b7899155b
cannot be found at /lib/modules/<kver>/build or /lib/modules/<kver>/source.
/usr/lib/modules/<kver>/build and source are shipped by linux-image-<kver>,
so they exist only while the image is installed. Debian ships them in
linux-headers-<kver>, and that is what dkms and any module build
environment installing the headers alone rely on.
The headers package also has no postinst, so dkms's
/etc/kernel/header_postinst.d hook never runs: headers installed after the
image build nothing until dkms is run by hand.
Move both links into linux-headers-<kver> and add a postinst that runs
"linux-run-hooks headers postinst", as Debian's does, depending on
linux-base for it. Add Breaks/Replaces on linux-image-<kver> (<< same
version) so a rebuild of the same kernel release can take the links over,
and ${shlibs:Depends} for the compiled tools under scripts/.
Also drop the make headers_install step debian/README.md still lists for
the headers package; d869521 removed it from debian/rules.
Built natively on arm64 from qcom-7.3-20261118 and validated in a clean
Debian trixie container against kgsl-dkms 2.0.1 from qli:
- headers alone: links present and owned by linux-headers, dkms build
succeeds (fails with the published packages)
- headers installed after the image: kgsl built and installed by the
new postinst
- upgrade from the published 0qli1 image and headers: no file conflict,
links owned by linux-headers, dkms build succeeds
- published image plus new headers: Replaces takes the links over,
apt resolves Breaks by upgrading the image
- purging the headers removes both links
Closes: #194
Signed-off-by: Bjordis Collaku <bcollaku@qti.qualcomm.com>
Bjordis Collaku (bjordiscollaku)
force-pushed
the
fix/headers-own-build-links
branch
from
November 23, 2026 19:14
ac1e1a8 to
d6d48bd
Compare
Bjordis Collaku (bjordiscollaku)
marked this pull request as ready for review
November 23, 2026 19:15
Bjordis Collaku (bjordiscollaku)
requested a review
from Christopher Obbard (obbardc)
as a code owner
November 23, 2026 19:15
Bjordis Collaku (bjordiscollaku)
temporarily deployed
to
Staging
November 23, 2026 19:19 — with
GitHub Actions
Inactive
Bjordis Collaku (bjordiscollaku)
temporarily deployed
to
Staging
November 23, 2026 19:20 — with
GitHub Actions
Inactive
Bjordis Collaku (bjordiscollaku)
temporarily deployed
to
Staging
November 23, 2026 19:20 — with
GitHub Actions
Inactive
Bjordis Collaku (bjordiscollaku)
temporarily deployed
to
Staging
November 23, 2026 19:20 — with
GitHub Actions
Inactive
Bjordis Collaku (bjordiscollaku)
temporarily deployed
to
Staging
November 23, 2026 19:21 — with
GitHub Actions
Inactive
Bjordis Collaku (bjordiscollaku)
temporarily deployed
to
Staging
November 23, 2026 19:22 — with
GitHub Actions
Inactive
Christopher Obbard (obbardc)
approved these changes
Nov 23, 2026
Christopher Obbard (obbardc)
left a comment
Contributor
There was a problem hiding this comment.
LGTM
Bjordis Collaku (bjordiscollaku)
requested review from
Agathe Porte (gagath),
Keerthi Gowda (keerthi-go) and
Loïc Minier (lool)
November 23, 2026 19:38
Bjordis Collaku (bjordiscollaku)
deleted the
fix/headers-own-build-links
branch
November 25, 2026 05:34
This branch was previously 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.
dkms cannot build modules against our kernels when only the headers are installed:
/usr/lib/modules/<kver>/buildandsourceare shipped bylinux-image-<kver>, so they exist only while the image is installed. Debian ships them inlinux-headers-<kver>, and that is what dkms and any module build environment installing the headers alone rely on.The headers package also has no postinst, so dkms's
/etc/kernel/header_postinst.dhook never runs: headers installed after the image build nothing until dkms is run by hand.Move both links into
linux-headers-<kver>and add a postinst that runslinux-run-hooks headers postinst, as Debian's does, depending onlinux-basefor it. AddBreaks/Replacesonlinux-image-<kver> (<< same version)so a rebuild of the same kernel release can take the links over, and${shlibs:Depends}for the compiled tools underscripts/.Also drop the
make headers_installstepdebian/README.mdstill lists for the headers package; d869521 removed it fromdebian/rules.Built natively on arm64 from
qcom-7.3-20261118and validated in a clean Debian trixie container againstkgsl-dkms2.0.1 from qli:linux-headers, dkms build succeeds (fails with the published packages)0qli1image and headers: no file conflict, links owned bylinux-headers, dkms build succeedsReplacestakes the links over, apt resolvesBreaksby upgrading the imageCloses: #194