Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| kernelmodulepackages [2022/09/21 07:53] – LucaPizzamiglio | kernelmodulepackages [2023/10/18 21:04] (current) – Italicise both 'user space' and 'kernel', to help distinguish between the two. GrahamPerrin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== The Problem ====== | ====== The Problem ====== | ||
| - | While %%FreeBSD%% | + | While %%FreeBSD%% |
| Package repositories are currently provided for every major %%FreeBSD%% release. | Package repositories are currently provided for every major %%FreeBSD%% release. | ||
| - | When a new minor %%FreeBSD%% version is released, the previous | + | When a new minor %%FreeBSD%% version is released, |
| During this period, the ports are built for the older minor version, because of the backward compatibility guarantee: newer %%FreeBSD%% version can still safely use packages built using the previous %%FreeBSD%% version. | During this period, the ports are built for the older minor version, because of the backward compatibility guarantee: newer %%FreeBSD%% version can still safely use packages built using the previous %%FreeBSD%% version. | ||
| This assumption is not necessarily true for kernel module packages, because the backward compatibility is not guaranteed in kernel space. | This assumption is not necessarily true for kernel module packages, because the backward compatibility is not guaranteed in kernel space. | ||
| Line 9: | Line 9: | ||
| The common scenario, especially for laptop users, is a kernel dump after the upgrade, because the graphic kernel modules are provided as packages. | The common scenario, especially for laptop users, is a kernel dump after the upgrade, because the graphic kernel modules are provided as packages. | ||
| - | There are several ways to solve this issue, but there is no consensus in the community towards an agreed solution | + | ====== Solutions ====== |
| - | ===== Kernel ABI compatibility ===== | + | There are several ways to solve this issue, |
| - | This solution means that the kernel ABI is backward compatible. | + | |
| - | Pros: fix the issue at the root. Easy to manage, only kernel developers are involved. | + | |
| - | Cons: Hard to implement. External kernel modules are out of hands, the entire burden is on kernel developers. Moreover, limitations introduced by this guarantee could severely limit the development. | + | |
| ===== Kernel module built on installation ===== | ===== Kernel module built on installation ===== | ||
| In this solution, kernel module packages don't contain binaries, but the code of the module. During installation, | In this solution, kernel module packages don't contain binaries, but the code of the module. During installation, | ||
| - | Pros: package is built on the fly, adapting to the local version. Extended | + | * Pros: |
| - | Cons: first tests shows several corner cases, implicit dependency of kernel header and toolchain (several vendors uses packages without the toolchain), less reproducible. | + | * package is built on the fly, adapting to the local version |
| - | + | * support for STABLE/CURRENT out of the box | |
| - | ===== Dedicated | + | |
| - | Because the issue is only affecting kernel modules, one solution is to maintain an additional package repository per minor version of %%FreeBSD%% with only kernel modules. | + | * first tests shows several corner cases |
| - | Pros: solve the issue for RELEASE, small overhead on poudriere | + | * implicit dependency of kernel header and toolchain (several vendors uses packages without the toolchain) |
| - | Cons: pkg has to be aware of Kernel ABI versioning, needs of additional repositories, | + | * less reproducible |
| + | **Additional idea**: a // | ||
| + | * '' | ||
| + | * '' | ||
| ===== Package repository for minor version ===== | ===== Package repository for minor version ===== | ||
| Line 31: | Line 31: | ||
| An additional benefit of this solution is that when a new minor release is deployed, it immediately the latest available packages (built using the new toolchain contained in the new minor release), without surprises 3 months later, when the older minor release is discontinued. | An additional benefit of this solution is that when a new minor release is deployed, it immediately the latest available packages (built using the new toolchain contained in the new minor release), without surprises 3 months later, when the older minor release is discontinued. | ||
| This solution implies a change on the package repository life cycle. | This solution implies a change on the package repository life cycle. | ||
| - | Pros: solve the issue for RELEASE, small overhead on poudriere (we could keep only quarterly up to date for the older release) | + | * Pros: |
| - | Cons: pkg has to be aware of Kernel ABI versioning, needs of additional storage, changes in the package repository life cycle, possible changes in the default repository configuration | + | * solve the issue for RELEASE |
| + | * small overhead on poudriere (we could keep only quarterly up to date for the older release) | ||
| + | | ||
| + | * pkg has to be aware of Kernel ABI versioning | ||
| + | * additional | ||
| + | * changes in the package repository life cycle | ||
| + | * possible changes in the default repository configuration | ||
| + | **Additional Note**: For the older %%FreeBSD%% release, we could only keep '' | ||
| + | |||
| + | ====== Others solutions ====== | ||
| + | Those solutions have been evaluated and considered less promising, so they won't be implemented. | ||
| + | |||
| + | ===== Kernel ABI compatibility ===== | ||
| + | This solution means that the kernel ABI is backward compatible. | ||
| + | * Pros: | ||
| + | * fix the issue at the root | ||
| + | * Easy to manage, only kernel developers are involved | ||
| + | * Cons: | ||
| + | * Hard to implement | ||
| + | * External kernel modules are out of control | ||
| + | * The entire burden is on kernel developers | ||
| + | * Kernel ABI backward compatibility could introduce limitations severely limiting the %%FreeBSD%% development | ||
| + | |||
| + | ===== Dedicated kernel module package repository ===== | ||
| + | Because the issue is only affecting kernel modules, one solution is to maintain an additional package repository per minor version of %%FreeBSD%% with only kernel modules. | ||
| + | * Pros: | ||
| + | * solve the issue for RELEASE | ||
| + | * small overhead on poudriere (only kernel module are built twice) | ||
| + | * minimal pressure on mirror storage requirements | ||
| + | * Cons: | ||
| + | * pkg has to be aware of Kernel ABI versioning | ||
| + | * needs of additional repositories | ||
| + | * changes in the package build process | ||
| + | * changes in the default repository configuration | ||
| + | |||
| + | ==== Other additional considerations ==== | ||
| + | From Warner: | ||
| + | |||
| + | If we have separate repos, we'll need the ability to warn / error-out if the minimum / maximum release constraints are violated. | ||
| + | I got a request from the QEMU folks to have the new 13.1 packages fail to install on 13.0 (or have a mode where they'd fail), and that seems like it could be used for the proposed binary repos targeting a specific release as well. | ||