[Slackbuilds-users] Packaging kernel modules with DKMS
Erich Ritz
erich.public at protonmail.com
Wed Jun 24 16:02:00 UTC 2026
On Wednesday, June 24th, 2026 at 7:35 AM, Erich Ritz via SlackBuilds-users <slackbuilds-users at slackbuilds.org> wrote:
> On Tuesday, June 23rd, 2026 at 4:29 PM, fsLeg via SlackBuilds-users <slackbuilds-users at slackbuilds.org> wrote:
>
> > Interesting idea, looks much cleaner than moving the entire source tree. Unfortunately, it doesn't work. DKMS still complains about the broken tree due to missing sources, so the saved dkms.conf alone is not enough.
> >
> > That includes system76-io-dkms, by the way. I don't know if you tested it or DKMS changed something over the years, but your douninst.sh fails to remove both the compiled modules and their dkms-tree. You should probably take a look at that.
> >
> > On June 23, 2026 19:17:31 GMT+03:00, Erich Ritz <erich.public at protonmail.com> wrote:
> > >
> > >Take a look at how system76-io-dkms (https://slackbuilds.org/repository/15.0/system/system76-io-dkms/) does it. I got inspiration for this idea from someone else; sorry I don't remember who it was. Basically doinst.sh creates a file that isn't tracked by pkgtools, and then douninst.sh uses that file and then deletes it for a clean uninstallation.
>
> Thanks for the heads up. I was pretty sure it worked as intended at the time...
>
> Erich
I think dkms behavior changed with this commit: https://github.com/dkms-project/dkms/commit/ef7dfa4de2604c84c0d24fca78e8134d11030c80
I don't see a way to force dkms to skip the module_is_broken_and_die check, so I'll have to get more creative to remove the built modules.
Too bad removepkg doesn't have a pre-remove hook.
Erich
More information about the SlackBuilds-users
mailing list