Package: dkms
Version: 2.3-2
Severity: important

-- System Information:
Debian Release: 9.9
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-8-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to C.UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) (ignored: LC_ALL set to 
C.UTF-8)
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.25
ii  gcc              4:6.3.0-4
ii  kmod             23-2
ii  make             4.1-9.1
ii  patch            2.7.5-1+deb9u2

Versions of packages dkms recommends:
ii  fakeroot             1.21-3.1
ii  linux-headers-amd64  4.9+80+deb9u7
ii  lsb-release          9.20161125
ii  sudo                 1.8.19p1-2.1

Versions of packages dkms suggests:
ii  menu            2.1.47+b1
pn  python3-apport  <none>

-- no debconf information

This bug was reported back in 2016 with a patch attached.

The patch is fairly simple, highly effective and still applies cleanly
(with some offset).

stretch# cd /usr/sbin
stretch# patch < /tmp/dkms.patch
patching file dkms
Hunk #1 succeeded at 1252 (offset 8 lines).

buster# cd /usr/sbin
buster# patch < /tmp/dkms.patch
patching file dkms
Hunk #1 succeeded at 1279 (offset 35 lines).

Please merge or improve this!

Thanks ;)

-----------------------------------------
Motivation and why I marked it important:
-----------------------------------------

This happened on my side when preparing Stretch for upgrade to Buster.

I want to do this slowly, that is, first upgrade Stretch to the Buster kernel,
let things settle a bit to rule out kernel issues,
and then do the Buster upgrade of the base system.

However this gave me following error:

stretch# apt-get install linux-image-amd64/stretch-backports
[..]
Setting up linux-image-4.19.0-0.bpo.5-amd64 (4.19.37-4~bpo9+1) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-4.9.0-9-amd64
I: /initrd.img.old is now a symlink to boot/initrd.img-4.9.0-9-amd64
I: /vmlinuz is now a symlink to boot/vmlinuz-4.19.0-0.bpo.5-amd64
I: /initrd.img is now a symlink to boot/initrd.img-4.19.0-0.bpo.5-amd64
/etc/kernel/postinst.d/dkms:
Error!  The dkms.conf for this module includes a BUILD_EXCLUSIVE directive which
does not match this kernel/arch.  This indicates that it should not be built.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.19.0-0.bpo.5-amd64
[..]

stretch# dkms autoinstall --kernelver 4.19.0-0.bpo.5-amd64
Error!  The dkms.conf for this module includes a BUILD_EXCLUSIVE directive which
does not match this kernel/arch.  This indicates that it should not be built.

But after the patch was manually applied:

stretch# dkms autoinstall --kernelver 4.19.0-0.bpo.5-amd64
Error!  The 
/var/lib/dkms/aufs/4.9+20161219/4.19.0-0.bpo.5-amd64/x86_64/dkms.conf for 
module aufs includes a BUILD_EXCLUSIVE directive which
does not match this kernel/arch.  This indicates that it should not be built.

This is not perfect as the reported path does no more exist after the run:

stretch# cat 
/var/lib/dkms/aufs/4.9+20161219/4.19.0-0.bpo.5-amd64/x86_64/dkms.conf
cat: /var/lib/dkms/aufs/4.9+20161219/4.19.0-0.bpo.5-amd64/x86_64/dkms.conf: No 
such file or directory

But it is quite better than to have no information at all:

stretch# grep BUILD_EXCLUSIVE_KERNEL 
/var/lib/dkms/aufs/4.9+20161219/source/dkms.conf
BUILD_EXCLUSIVE_KERNEL="^4.9.*"

In my case this pinpoints the problem (for reference how to find yourself):

stretch# ls -la /var/lib/dkms/aufs/4.9+20161219
total 16
drwxr-xr-x 4 root root 4096 Jul 31 10:53 .
drwxr-xr-x 3 root root 4096 Jul 31 10:53 ..
drwxr-xr-x 3 root root 4096 Oct 13  2018 4.9.0-8-amd64
drwxr-xr-x 3 root root 4096 Jul 31 10:50 4.9.0-9-amd64
lrwxrwxrwx 1 root root   26 Dec 17  2017 source -> /usr/src/aufs-4.9+20161219

stretch# dpkg -S /usr/src/aufs-4.9+20161219
aufs-dkms: /usr/src/aufs-4.9+20161219

stretch# apt-cache policy aufs-dkms
aufs-dkms:
  Installed: 4.9+20161219-1
  Candidate: 4.9+20161219-1
  Version table:
 *** 4.9+20161219-1 500
        500 http://httpredir.debian.org/debian stretch/main amd64 Packages
        100 /var/lib/dpkg/status

Which tells me that I have two choices:

- Do not use the backports kernel and stay at Stretch for a while
- Or update the base system to Buster now, including the kernel.

(Note that the incompatibility of aufs to the backports kernel is no bug from 
my perspective,
just some inconvenience.)

Reply via email to