RFC: add a mechanism to disable building a module for known bad kernels

Bug #735505 reported by Timo Aaltonen
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dkms (Ubuntu)
Expired
Wishlist
Unassigned

Bug Description

Binary package hint: dkms

Proprietary modules (like fgrlx) usually need an update to build against newer kernels than what the driver was tested with. People installing backported kernels (either from a distro release or vanilla upstream ones) face problems when the build fails against such a kernel, and apport files bugs which have to be cleaned afterwards.

There should be a way to tell dkms not to build a module for kernels newer than $FOO, or (maybe preferably) at least make the failure non-fatal so that the package still installs fine but issues a warning that the build failed for some kernel(s).

Timo Aaltonen (tjaalton)
Changed in dkms (Ubuntu):
importance: Undecided → Wishlist
Revision history for this message
Mario Limonciello (superm1) wrote :

There is a way already in dkms.conf to specify which kernels not to build with. Look at the OBSOLETE_BY directive. I don't see why you would ever want the package to install though if it's not going to work with your kernel.

That sounds to me like a core problem that user needs to know about and should block package installation.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Ok, I didn't know about that one (neither did Alberto).

The problem is that you can have several kernel versions installed on your system, and it'd be rather rude to make the new kernel remove the package which worked fine with the original kernel version.

Revision history for this message
Alberto Milone (albertomilone) wrote :

Thanks Mario.

According to the man page we can do something like the following:

               ubuntu_804="Ubuntu
               8.04"
               if [ -x /usr/bin/lsb_release ]; then
                 if [ "$(/usr/bin/lsb_release -sir)" == "${ubuntu_804}" ]; then
                   OBSOLETE_BY="2.6.25"
                 fi
               fi

This is more or less what we need. I'll add the logic to nvidia and fglrx.

Revision history for this message
Felix Geyer (debfx) wrote :

> There should be a way to tell dkms not to build a module for kernels
> newer than $FOO, or (maybe preferably) at least make the failure
> non-fatal so that the package still installs fine but issues a warning
> that the build failed for some kernel(s).

A dkms variable that contains the last kernel version that the module in known to work with would be great.
If a build fails with a kernel version that is > that variable, dkms could display a warning that the kernel is not supported
and not run the apport hook.

> I don't see why you would ever want the package to install though
> if it's not going to work with your kernel.

I agree that the user should know that module X failed to build with kernel Y, but doing that by failing the package installation is a bad idea.
You have false-positives because a user might have a kernel installed that he doesn't use (anymore).
You don't catch a lot of cases:
- module build fails with a kernel that has been isntalled after the *-dkms package
- the header files aren't installed

Using OBSOLETE_BY is just a hack to prevent package installation failures. You still end up having a kernel without the module.

Revision history for this message
Mario Limonciello (superm1) wrote :

At least in master right now there is actually code to check if the kernel is a distro kernel. The apport rule will only file bugs on distro kernels. That means that kernels from earlier releases and kernels from PPAs shouldn't trigger the apport rule.

Would that be sufficient to avoid problems? I feel like any kernels within a given distro release should still trigger a bug though.

Changed in dkms (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for dkms (Ubuntu) because there has been no activity for 60 days.]

Changed in dkms (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.