void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.6k stars 2.16k forks source link

Linux LTS + ZFS #30401

Closed Ypnose closed 3 months ago

Ypnose commented 3 years ago

System

Expected behavior

I stick with LTS kernels because it fits my needs. Installing zfs will automatically pull dkms dependency and therefore linux-headers meta-package (linux-headers-5.11_1linux5.11-headers-5.11.15_1 as of today). Linux 5.11 is not installed on my system. Even if linux5.10-headers is installed, it will not be "detected" as the required dependendy here (instead of linux5.11-headers). It would be good to not install latest linux5.xx-headers on a system with LTS only.

Actual behavior

linux-headers-5.11_1 meta-package is pulled by xbps as a dkms dependency. Then, DKMS builds for 5.11.x will be attempted on my system, even if no 5.11 kernel is installed :

$ xbps-query -l | grep linux
ii linux-headers-5.11_1               Linux kernel headers meta package
ii linux5.10-5.10.31_1                Linux kernel and modules (5.10 series)
ii linux5.10-headers-5.10.31_1        Linux kernel and modules (5.10 series) - source headers for 3rd party modules
ii linux5.11-headers-5.11.15_1        Linux kernel and modules (5.11 series) - source headers for 3rd party modules

Here's the xbps output :

Installing DKMS module 'zfs-2.0.4' for kernel-5.10.31_1... done.
Building DKMS module 'zfs-2.0.4' for kernel-5.11.11_1... done.
Installing DKMS module 'zfs-2.0.4' for kernel-5.11.11_1... done.
Building DKMS module 'zfs-2.0.4' for kernel-5.11.15_1... done.
Installing DKMS module 'zfs-2.0.4' for kernel-5.11.15_1... done.
Skipping kernel-5.4.78_1. kernel-headers package not installed...
Skipping kernel-5.9.11_1. kernel-headers package not installed...
Regenerating initramfs, please wait...
depmod: WARNING: could not open modules.order at /var/tmp/dracut.BJxh6X/initramfs/lib/modules/5.11.11_1: No such file or directory
depmod: WARNING: could not open modules.builtin at /var/tmp/dracut.BJxh6X/initramfs/lib/modules/5.11.11_1: No such file or directory
depmod: WARNING: could not open modules.order at /var/tmp/dracut.fyIoT7/initramfs/lib/modules/5.11.15_1: No such file or directory
depmod: WARNING: could not open modules.builtin at /var/tmp/dracut.fyIoT7/initramfs/lib/modules/5.11.15_1: No such file or directory
zfs-2.0.4_1: installed successfully.

On older systems, it takes quite some time for nothing.

Steps to reproduce the behavior

Install zfs on systems with LTS kernels only.

ericonr commented 3 years ago

Maybe we could check for both the kernel headers and the kernel package itself. Building for a given kernel whose headers aren't installed already fails...

Ypnose commented 3 years ago

Thanks for your help. Actually, if dkms do not rely on meta-package linux-headers which will pull latest linux5.xx-headers, but instead rely on the headers for the latest kernel installed, all problems could be solved. Unfortunately, I do not know how it can be done.

q66 commented 3 years ago

echo ignorepkg=linux-headers > /etc/xbps.d/ignore-latest.conf

and then uninstall linux-headers

Ypnose commented 3 years ago

Seems to do the trick, thank you.

github-actions[bot] commented 2 years ago

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.

ericonr commented 2 years ago

Another solution that has been floated is making all headers and kernels provides= for the metapackages.

classabbyamp commented 5 months ago

probably solved by #43519