Subject: Re: [PATCH] gnu: zfs: Split into packages specific for each of our major supported kernel versions.

From: raid5atemyhomework <[email-masked]>
Date: Fri, 25 Dec 2020 01:12:12 +0000

> There are primarily two ways to use Guix with a local Git repo.
>
> First, you can follow the instructions in the manual section Contributing, specifically the sections Building from Git and RunningGuix Before It Is Installed.
>
> Or, you can use something like `guix pull --url=/path/to/my/repo --commit=mycommit`.

Thank you very much, will check.

> Beyond that, does this patch create linux-libre packages with ZFS support compiled in?

No, this patch continues to use the existing technique of downloading ZFS as source and compiling it as a kernel module you have to load in, as per licensing incompatibility.

What it changes is that it compiles kernel modules for all guix-provided kernel versions that ZFS currently is rated to support, rather than compile a kernel module for whatever `(default-linux)` is, which is always the latest and greatest kernel (currently 5.10) which ZFS is currently not rated for.

As Guix goes through the trouble of maintaining a `linux-libre-4.4` package I assume at least one user somewhere is using Linux 4.4, and did not want to prevent that user from using ZFS if they decide to do so someday.

I admit the naming scheme `linux-5.9-zfs` does make it seem like the package contains an entire Linux kernel.
The alternative is to call it `zfs-for-linux-5.9` but that makes the entire package name with version `zfs-for-linux-5.9-0.8.5` which I think is worse, because the version numbers are right next to each other.
What naming scheme would you suggest?

* `linux-5.9-zfs` --- makes it look like it contains a whole Linux kernel.
* `zfs-for-linux-5.9` --- versions are right next to each other: `zfs-for-linux-5.9-0.8.5`, this is bad since some versioning conventions include a `-` in the version naming, so at a glance this makes for a very confusing version.
* `kernelmodule-5.9-zfs` --- makes it clear that it is not an entire kernel, but this package *also* includes userspace utilities not just the kernel module.
* `zfs-for-linux-5.9-version` --- kind of a weird and absurdly lengthy name but maybe palatable?

I imagine a similar problem would occur for other kernel modules --- the internal kernel interfaces are *not* stable at all, so complex external kernel modules like ZFS need to know what kernel version it's being compiled for and include a bunch of `#ifdef`s to compensate.
So we need some decent convention for "how do we name kernel modules so that they are targeted for each kernel version".