[Pkg-dkms-maint] Bug#894250: dkms: reinstalling custom kernel package may cause dkms to lose list of modules

Ian Abbott abbotti at mev.co.uk
Tue Mar 27 18:45:09 UTC 2018


Package: dkms
Version: 2.3-3
Severity: normal

Dear Maintainer,

For a custom-built linux-image package, the package's "prerm" script (that was
output by "scripts/package/builddeb" in the Linux kernel sources) runs the
/etc/kernel/prerm.d/* scripts regardless of the package operation type, which
may result in dkms losing its list of added modules prematurely.  This is
unlike the "prerm" script in Debian's own linux-image packages, which checks
that the package operation type is "remove" before running the
/etc/kernel/prerm.d/* scripts.

In particular, the /etc/kernel/prerm.d/dkms script will remove dkms modules
completely if they are not needed by any other kernels, causing dkms to forget
its list of modules to be built when a kernel is installed.  This is a problem
when reinstalling a custom linux-image package (or upgrading to a custom linux-
image package whose version differs only in the Debian package revision number)
when that is the only Linux kernel installed, because the system is left in a
state with none of the previous dkms modules installed.

I filed a bug upstream at https://github.com/dell/dkms/issues/37 but I was
unsure at the time whether it should be classed as an upstream bug.  I
presently do not consider it to be an upstream bug, or rather it is an issue
that has already been fixed upstream in dkms 2.4 (see yuzaipiaofei's comment
https://github.com/dell/dkms/issues/37#issuecomment-348067214 on 30 Nov 2017).
That fix involved a change to the dkms "uninstall" functionality and a change
to the upstream "kernel_prerm.d_dkms" script upon which Debian's
"/etc/kernel/prerm.d/dmks" script is based.

This may be related to bug #621846, but that one is about 7 years old.

[Note: System Information is from an embedded ARM Debian GNU/Linux
system that has the custom linux-image package installed.]



-- System Information:
Debian Release: 9.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: armhf (armv7l)

Kernel: Linux 4.14.3-ipec+ (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968), LANGUAGE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dkms depends on:
ii  build-essential  12.3
ii  coreutils        8.26-3
ii  dpkg-dev         1.18.24
ii  gcc              4:6.3.0-4
ii  kmod             23-2
ii  make             4.1-9.1
ii  patch            2.7.5-1+b2

Versions of packages dkms recommends:
ii  fakeroot                                                       1.21-3.1
pn  linux-headers-686-pae | linux-headers-amd64 | linux-headers-g  <none>
ii  lsb-release                                                    9.20161125
ii  sudo                                                           1.8.19p1-2.1

Versions of packages dkms suggests:
pn  menu            <none>
pn  python3-apport  <none>

-- no debconf information



More information about the Pkg-dkms-maint mailing list