Bug#931017: dkms: "install" loads modules immediately, and loads more than the newly installed modules

2019-06-25 Thread Raphael Hertzog
Control: forwarded -1 https://github.com/dell/dkms/issues/85

On Mon, 24 Jun 2019, Raphaël Hertzog wrote:
> The reason is that "dkms install" runs this:
> find /sys/devices -name modalias -print0 | xargs -0 cat | xargs modprobe -a 
> -b -q

This was added in this commit:
https://github.com/dell/dkms/commit/f5bfb12fef1fc06e56355cdba500eaa98d4e6aa8

The rationale given there does not apply at all to Debian where
the modules are built/installed as soon as the DKMS package is installed
and not only on next reboot...

So we can likely just patch this out until upstream provides a way
to disable this code.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/



Bug#931017: dkms: "install" loads modules immediately, and loads more than the newly installed modules

2019-06-24 Thread Raphaël Hertzog
Package: dkms
Version: 2.6.1-4
Severity: important
User: de...@kali.org
Usertags: origin-kali

While working on automatic installation of virtualbox-guest-dkms in
debian-installer when running in VirtualBox VM, I have discovered
that the package installation would break debian installer.

The reason is that "dkms install" runs this:
find /sys/devices -name modalias -print0 | xargs -0 cat | xargs modprobe -a -b 
-q

This will load the newly built modules but possibly also other modules...
and the fact that those modules get loaded, somehow breaks the
X server run by debian-installer.

This "feature" is new in buster compared to stretch. It would be nice to
have a way to disable this automatic loading... ideally an environment
variable makes it easy to disable this from debian-installer without
having to modify the target system. But a command line option (and/or an
entry in the configuration file) is certainly a good idea as well.

And it would be even better if it could just do its work on the modules
that the "dkms install" actually installed.

Cheers,

-- System Information:
Debian Release: 10.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 
'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dkms depends on:
ii  build-essential  12.6
ii  coreutils8.30-3
ii  dpkg-dev 1.19.7
ii  gcc  4:8.3.0-1
ii  kmod 26-1
ii  make 4.2.1-1.2
ii  patch2.7.6-3

Versions of packages dkms recommends:
ii  fakeroot  1.23-1
pn  linux-headers-686-pae | linux-headers-amd64 | linux-headers-  
pn  linux-image   
ii  lsb-release   10.2019051400
ii  sudo  1.8.27-1

Versions of packages dkms suggests:
pn  menu
pn  python3-apport