coreos/config: Add hooks for zfs ebuilds

The zfs-kmod ebuild needs KERNEL_DIR to point to the correct
/lib/modules directory.

The zfs ebuild installs two systemd unit masks to /usr/lib/systemd which
result in "dangling symlink" errors during the image build. These
systemd unit masks are only necessary for old Ubuntu systems that have
sysv-init-systemd compat wrappers.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
Jeremi Piotrowski 2024-03-08 16:18:50 +00:00
parent bda8148236
commit e8b4b308c9
2 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,4 @@
cros_post_src_install_rm_systemd_masks() {
rm "${D}$(systemd_get_systemunitdir)"/zfs-load-key.service
rm "${D}$(systemd_get_systemunitdir)"/zfs-import.service
}

View File

@ -0,0 +1,2 @@
: ${MODULES_ROOT:=$(echo ${SYSROOT}/lib/modules/*)}
KERNEL_DIR="${MODULES_ROOT}/build"