zfs-dkms on Focal still allows building on Linux kernel version 5.10+
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zfs-linux (Ubuntu) |
Fix Released
|
Medium
|
Colin Ian King | ||
Focal |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
== SRU update, zfs-dkms, Focal ==
[Impact]
Due to a mistake in the BUILD_EXCLUSIVE
Fixing this will stop users from installing incompatible newer versions of the kernel and hence stop dkms build failures on known incompatible kernel versions. The fix is also trivial.
[The Fix]
Correctly escape . in regex so that the final sed'd string gets modified to produce the correct regex pattern, as follows:
sed -ie '/^PACKAGE_
[Test Plan]
Without the fix, install kernels > than versions 5.4. ZFS dkms will attempt to be built against these and fail with broken builds. Installing earlier kernels such as 4.20, 5.0, 5.4 should succeed.
With the fix, installing kernels > 5.4 will skip the ZFS dkms build phase and report a meaningful error:
Error! The /var/lib/
does not match this kernel/arch. This indicates that it should not be built
Test kernels for the test from https:/
[Where problems could occur]
The change is to a regex pattern match. If this is incorrect then kernels such a 5.4 will not be allowed to build the dkms zfs driver. This will clearly show up as a ZFS dkms build denied failure with an error such as:
Error! The /var/lib/
does not match this kernel/arch. This indicates that it should not be built
This fix is relatively low-risk, it fixes am issue with an earlier fix to the regex which wasn't quite working for kernels > 5.4 and yet didn't cause any major issues blocking legitimate users from using known working 5.4 kernels with zfs dkms.
-------
Due to a mistake in the BUILD_EXCLUSIVE
The following patch to dkms.conf should fix the issue:
--- ./dkms.conf.orig 2021-03-16 04:15:55.077568974 +0700
+++ /usr/src/
@@ -1,6 +1,6 @@
PACKAGE_NAME="zfs"
PACKAGE_
-BUILD_
+BUILD_
PACKAGE_
PRE_BUILD=
--prefix=/usr
Although it's not convenient for me at the moment to create a debdiff.
Related: LP: #1902701
[1] For me it's to get a complete fix for LP: #1887190, as Focal's HWE kernel doesn't seem to work.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: zfs-dkms 0.8.3-1ubuntu12.6
Uname: Linux 5.11.6-
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Tue Mar 16 04:26:08 2021
InstallationDate: Installed on 2021-03-15 (0 days ago)
InstallationMedia: Ubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
PackageArchitec
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=th_TH.UTF-8
SHELL=/bin/bash
SourcePackage: zfs-linux
UpgradeStatus: No upgrade log present (probably fresh install)
description: | updated |
description: | updated |
description: | updated |
Changed in zfs-linux (Ubuntu): | |
importance: | Undecided → Medium |
assignee: | nobody → Colin Ian King (colin-king) |
status: | New → In Progress |
summary: |
- zfs-dkms on Focal still allow building on Linux kernel version 5.10+ + zfs-dkms on Focal still allows building on Linux kernel version 5.10+ |
Changed in zfs-linux (Ubuntu): | |
status: | In Progress → Fix Released |
Hello Ratchanan, or anyone else affected,
Accepted zfs-linux into focal-proposed. The package will build now and be available at https:/ /launchpad. net/ubuntu/ +source/ zfs-linux/ 0.8.3-1ubuntu12 .8 in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification- needed- focal to verification- done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed- focal. In either case, without details of your testing we will not be able to proceed.
Further information regarding the verification process can be found at https:/ /wiki.ubuntu. com/QATeam/ PerformingSRUVe rification . Thank you in advance for helping!
N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.