DKMS error

I am seeing dkms errors when installing / updating kernels. I am not sure when they started to appear.
I am using zfs and when dkms is excecuted during kernel install or update I see this:

/usr/lib/kernel/install.d/40-dkms.install: Zeile 4: /../trash/postinst.d/dkms: Datei oder Verzeichnis nicht gefunden

When I look at the script 40-dkms.install it does not make sense to me:

#!/bin/sh

if [ "$1" = "add" ]; then
	/../trash/postinst.d/dkms "$2"
fi

if [ "$1" = "remove" ]; then
	/../trash/prerm.d/dkms "$2"
fi

It is using absolute path like /../trash/postinst.d/dkms or /../trash/prerm.d/dkms. That seems strange.

I removed the dkms package and reinstalled it. But that does not change anything.

Does anybody know what is going on here?

I noticed the same thing. entries from /efi/loader/entries did not get properly removed. I don’t know what prerm.d relates to because kernell-install runs both. I assume remove the entry but do they both do the same thing idk.

Is that an update to systemd? What package owns /usr/lib/kernel/install.d/40-dkms.install?

ok I see there are scripts missing in /…/trash/postinst.d/dkms and the prerm.d folders that didn’t get run. I guess if I can find these and see what they say I can move them there or at least see what didn’t get complete.

It looks like it is coming from the latest version of dkms.

The beginning of that path is supposed to be replaced with an absolute path but for some reason it is getting replaced with .. instead of the correct path.

Obviously. /../ doesn’t make any sense.

yep I found a script here https://gitlab.archlinux.org/archlinux/packaging/packages/dkms
and here https://github.com/dell/dkms/blob/v3.1.1/kernel_install.d_dkms.in

The issue seems to be that the latest version moved the scripts but kconf is set like this: KCONF=/../trash in the PKGBUILD.

dkms script is in /usr/share/libalpm/scripts
maybe these are totally different scripts with the same name?

Yes, but this part of the PKGBUILD already changed in version 3.0.12 of the package.

That package was already published in January. I can hardly believe that I missed this error message for so long.

May be this s a “regression” with dkms version 3.1, which is new since yesterday. But I could not find anything in the upstream issue tracker.

The PKGBUILD change has been there for some time but in the release notes for 3.1.0 is this:

Install kernel-install drop-in to /usr/lib instead of /etc.

I just downgraded to previous version 3.0.13-1 and this does not show this error message.

1 Like

Yes, see my comment above.

What does that mean then? PKGBUILD needs to be changed to handle dkms 3.1?

PS
I just create a new issue for the DKMS package:

1 Like

I believe that is the case but I am not sure what the correct change is without deeper investigation.

It does look like a packaging issue to me though after a quick peek between doing other things.

It seems that clearly, /../trash/postinst.d/dkms is wrong.

What you are describing is all normal.

kernel-install is what calls the script but the script itself is the issue.

Any idea where the /trash folders are getting created?

That isn’t the issue. The issue is the PKGBUILD is creating the script with the wrong path.

Removing these instruction since the dkms.install is for debian. You can probably just remove the file in /lib/kernel/install.d