On a machine with mainline PPA's Linux 5.11.14 installed, installing zfs-dkms=0.8.3-1ubuntu12.8 from focal-proposed now correctly blocks the module from being built.
---
Setting up zfs-dkms (0.8.3-1ubuntu12.8) ...
Loading new zfs-0.8.3 DKMS files...
Building for 5.11.14-051114-generic
Building initial module for 5.11.14-051114-generic
Error! The /var/lib/dkms/zfs/0.8.3/5.11.14-051114-generic/x86_64/dkms.conf for module zfs includes
a BUILD_EXCLUSIVE directive which
does not match this kernel/arch. This indicates that it should not be built.
Skipped.
---
Triggering an autoinstall for 5.4 kernel does not error out.
---
$ sudo dkms autoinstall -k 5.4.0-71-generic
Kernel preparation unnecessary for this kernel. Skipping...
On a machine with mainline PPA's Linux 5.11.14 installed, installing zfs-dkms= 0.8.3-1ubuntu12 .8 from focal-proposed now correctly blocks the module from being built.
--- 051114- generic 051114- generic dkms/zfs/ 0.8.3/5. 11.14-051114- generic/ x86_64/ dkms.conf for module zfs includes
Setting up zfs-dkms (0.8.3-1ubuntu12.8) ...
Loading new zfs-0.8.3 DKMS files...
Building for 5.11.14-
Building initial module for 5.11.14-
Error! The /var/lib/
a BUILD_EXCLUSIVE directive which
does not match this kernel/arch. This indicates that it should not be built.
Skipped.
---
Triggering an autoinstall for 5.4 kernel does not error out.
---
$ sudo dkms autoinstall -k 5.4.0-71-generic
Kernel preparation unnecessary for this kernel. Skipping...
Running the pre_build script:
...
---
I considered the bug fixed.