[arch-dev-public] out of tree modules and alpm-hooks

Sébastien Luttringer seblu at seblu.net
Sat Feb 20 21:03:03 UTC 2016


On ven., 2016-02-19 at 17:47 +0100, Maxime Gauduin wrote:
> On Fri, Feb 19, 2016 at 4:12 PM, Sébastien Luttringer <seblu at seblu.net>
> wrote:
> 
> > I didn't tried them but I don't get how this can works when you
> > install/update
> > a dkms module.
> > 
> I'm aware of that, they were designed that way. That's why with those, and
> your hook triggered by dkms package transactions, every case will be
> covered. I guess it could be possible to handle both within a single hook
> by adding an additional trigger on "usr/src/*" and so on, but I think it's
> probably better to keep them separate.
> 
ok, you want to trigger dkms modules install/uninstall when a kernel is
added/upgraded/removed. Make sense. I completely rewrote the hook and the
script to manage all features you want in version 2.2.0.3+git151023-4.

So, with the last version of the dkms hooking system:
- When a kernel package (with headers) is installed, all DKMS modules are
installed for this kernel (means built and copied into the new kernel modules
tree). Detection is done via alpm-hooks Type=File on
/usr/lib/modules/*/build/include.

- When a kernel package (with headers) is removed, all DKMS modules are removed
for this kernel. Detection is done via alpm-hooks Type=File on
 /usr/lib/modules/*/build/include.

- When a DKMS module package is installed, its kernel modules are installed
(means registered in dkms, built, copied into the modules tree) for each kernel
with headers on the system. Detection is done via alpm-hooks Type=File on
/usr/src/*/dkms.conf

- When a DKMS module package is removed, its modules are removed (means
unregistered from dkms and removed  from the modules tree) of each kernel with
headers on the system. Detection is done via alpm-hooks Type=File on
/usr/src/*/dkms.conf

As dkms do automatically add and build modules when you install them, we don't
need anymore to register/unregister dkms modules in post_install/pre_remove. So
we'll be able to lighten our dkms modules packages. :)

Next steps:
- move dkms to extra, as it is pulled by packages in extra (e.g nvidia-dkms)
- Drop binary modules of virtualbox (and fix the wrong modules path in
/usr/src)

Testing and feedbacks of the dkms package in cty-testing is welcome.

Cheers,

-- 
Sébastien "Seblu" Luttringer
https://seblu.net | Twitter: @seblu42
GPG: 0x2072D77A

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: This is a digitally signed message part
URL: <https://lists.archlinux.org/pipermail/arch-dev-public/attachments/20160220/60c48021/attachment.asc>


More information about the arch-dev-public mailing list