config sys-fs/zfs-kmod: fix Kernel version issue of zfs-kmod

In case of sysext of zfs-kmod, pkg_setup() calls linux-info_get_any_version()
of eclass/linux-info.eclass with MERGE_TYPE=binary and
LINUX_INFO_BINARY_RESET=0. That results in KV_FULL and KV_OUT_DIR being
unset, which is not what we want. So set LINUX_INFO_BINARY_RESET=1 to
avoid such side effect.

Without setting them, build_sysext complains like below, i.e. it tries to find
System.map of a wrong Kernel version 6.6.21, when it should find a newer
version like 6.6.23. That results in subsequent zfs CI tests failing due to
missing files like System.map and module deps.

```
System.map for kernel 6.6.21-flatcar was not found, may be due to the
built kernel sources no longer being available and lacking the fallback:
```

Suggested-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
Dongsu Park 2024-04-24 09:57:07 +02:00
parent 9faef63982
commit 17b1b63d76

View File

@ -1,2 +1,9 @@
: ${MODULES_ROOT:=$(echo ${SYSROOT}/lib/modules/*)}
KERNEL_DIR="${MODULES_ROOT}/build"
# Necessary to prevent KV_FULL & KV_OUT_DIR from being unset
# when building Kernel modules for sysext. See also eclass/linux-info.eclass.
cros_pre_pkg_setup_kernel_version() {
LINUX_INFO_BINARY_RESET=1
get_version
}