config/env/sys-fs/zfs-kmod: un-break zfs-kmod binpkg install

This change sets SKIP_KERNEL_BINPKG_ENV_RESET in the zfs-kmod env so
linux-info.eclass keeps kernel env variables. This resolves an issue
with installing zfs-kmod as a binpkg when the kernel was not yet
installed. In a pure binpkg install the zfs-kmod package might be
installed before the kernel, leading to the kmod's kernel version
detection to fail.

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
This commit is contained in:
Thilo Fromm 2024-08-28 14:46:59 +02:00 committed by Thilo Fromm
parent 16dd403d55
commit d953260f98

View File

@ -1,6 +1,11 @@
: ${MODULES_ROOT:=$(echo ${SYSROOT}/lib/modules/*)}
KERNEL_DIR="${MODULES_ROOT}/build"
# This addresses an issue with the kernel version compatibility check
# when installing zfs-kmod to /build/<arch> (e.g. via build_packages)
# from its binpkg (i.e. not recompiling it).
SKIP_KERNEL_BINPKG_ENV_RESET=1
# 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() {