Bug#1006431: dkms leaves directories under /lib/modules for removed kernels

2022-02-28 Thread Vincent Lefevre
This may be due to a bug with "dkms remove": the warnings at the end
suggest an inconsistent state.

# dkms remove nvidia-legacy-390xx/390.147 -k 5.16.0-1-amd64
Module nvidia-legacy-390xx-390.147 for kernel 5.16.0-1-amd64 (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.

nvidia-legacy-390xx.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.16.0-1-amd64/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


nvidia-legacy-390xx-modeset.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.16.0-1-amd64/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


nvidia-legacy-390xx-drm.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.16.0-1-amd64/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


nvidia-legacy-390xx-uvm.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.16.0-1-amd64/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

do_depmod 5.16.0-1-amd64
depmod: WARNING: could not open modules.order at /lib/modules/5.16.0-1-amd64: 
No such file or directory
depmod: WARNING: could not open modules.builtin at /lib/modules/5.16.0-1-amd64: 
No such file or directory

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#1006431: dkms leaves directories under /lib/modules for removed kernels

2022-02-25 Thread Vincent Lefevre
Package: dkms
Version: 2.8.7-2
Severity: normal

On one of my machines:

zira:~> ll /lib/modules
total 32
drwxr-xr-x 2 root root 4096 2021-10-19 02:35:29 5.14.0-1-amd64/
drwxr-xr-x 2 root root 4096 2021-11-04 23:17:00 5.14.0-2-amd64/
drwxr-xr-x 2 root root 4096 2021-11-22 04:14:28 5.14.0-3-amd64/
drwxr-xr-x 2 root root 4096 2022-01-04 20:37:12 5.14.0-4-amd64/
drwxr-xr-x 2 root root 4096 2022-02-15 12:07:48 5.15.0-1-amd64/
drwxr-xr-x 2 root root 4096 2022-02-25 12:20:03 5.15.0-3-amd64/
drwxr-xr-x 4 root root 4096 2022-02-17 12:07:07 5.16.0-1-amd64/
drwxr-xr-x 4 root root 4096 2022-02-25 12:17:30 5.16.0-2-amd64/

with, for instance:

zira:~> ll /lib/modules/5.14.0-1-amd64
total 24
-rw-r--r-- 1 root root 45 2021-10-19 02:35:29 modules.alias
-rw-r--r-- 1 root root 12 2021-10-19 02:35:29 modules.alias.bin
-rw-r--r-- 1 root root  0 2021-10-19 02:35:29 modules.builtin.alias.bin
-rw-r--r-- 1 root root  0 2021-10-19 02:35:29 modules.builtin.bin
-rw-r--r-- 1 root root  0 2021-10-19 02:35:29 modules.dep
-rw-r--r-- 1 root root 12 2021-10-19 02:35:29 modules.dep.bin
-rw-r--r-- 1 root root  0 2021-10-19 02:35:29 modules.devname
-rw-r--r-- 1 root root 55 2021-10-19 02:35:29 modules.softdep
-rw-r--r-- 1 root root 49 2021-10-19 02:35:29 modules.symbols
-rw-r--r-- 1 root root 12 2021-10-19 02:35:29 modules.symbols.bin

while the only currently installed kernels are the 5.16.* ones.

And for the modules:

zira:~> dkms status
nvidia-legacy-390xx/390.147, 5.16.0-1-amd64, x86_64: installed
nvidia-legacy-390xx/390.147, 5.16.0-2-amd64, x86_64: installed

No such issue on another machine where dkms 2.8.4-4 is still
installed.

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 
'stable-security'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.16.0-1-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=POSIX, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
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.9
ii  clang-10 [c-compiler]   1:10.0.1-8+b1
ii  clang-11 [c-compiler]   1:11.1.0-6
ii  clang-12 [c-compiler]   1:12.0.1-19
ii  clang-13 [c-compiler]   1:13.0.1-3
ii  clang-3.5 [c-compiler]  1:3.5.2-5
ii  clang-3.6 [c-compiler]  1:3.6.2-4
ii  clang-3.7 [c-compiler]  1:3.7.1-3+b2
ii  clang-7 [c-compiler]1:7.0.1-12
ii  clang-8 [c-compiler]1:8.0.1-10+b1
ii  clang-9 [c-compiler]1:9.0.1-20+b1
ii  coreutils   8.32-4.1
ii  dctrl-tools 2.24-3+b1
ii  dpkg-dev1.21.1
ii  gcc [c-compiler]4:11.2.0-2
ii  gcc-10 [c-compiler] 10.3.0-14
ii  gcc-11 [c-compiler] 11.2.0-17
ii  gcc-12 [c-compiler] 12-20220222-1
ii  gcc-4.6 [c-compiler]4.6.4-7
ii  gcc-4.8 [c-compiler]4.8.5-4
ii  gcc-4.9 [c-compiler]4.9.4-2
ii  gcc-5 [c-compiler]  5.5.0-12
ii  gcc-6 [c-compiler]  6.5.0-2
ii  gcc-8 [c-compiler]  8.4.0-7
ii  gcc-9 [c-compiler]  9.4.0-5
ii  kmod29-1
ii  lsb-release 11.1.0
ii  make4.3-4.1
ii  patch   2.7.6-7
ii  tcc [c-compiler]0.9.27+git20200814.62c30a4a-1

Versions of packages dkms recommends:
ii  fakeroot 1.27-1
ii  linux-headers-amd64 [linux-headers-generic]  5.16.10-1
ii  sudo 1.9.9-1

Versions of packages dkms suggests:
ii  e2fsprogs  1.46.5-2
ii  menu   2.1.49

-- Configuration Files:
/etc/dkms/framework.conf changed:
verbose="1"
autoinstall_all_kernels="1"


-- no debconf information

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)