From Fedora Project Wiki

(add "why not stable and mainline-wo-mergew for rawhide?")
m (reshuffle some bits with small finetuning)
 
(43 intermediate revisions by the same user not shown)
Line 1: Line 1:
Frequently asked questions about the [[Kernel_Vanilla_Repositories|kernel vanilla repositories for Fedora]].
Frequently asked questions about the [[Kernel_Vanilla_Repositories_Copr|kernel vanilla repositories for Fedora]].


= FAQ for users =
= FAQ for users =


== What's the goal of these repositories? ==
== What is the goal of these repositories? ==


The main ideas is to help upstream development, which in the end will  benefit Fedora as well. With the packages from the mainline repositories it for example is quite easy to test kernels that are still under development. Then bugs can be found early and reported upstream, so they get fixed way before a new kernel version get released and shipped as a porper update in Fedora.
There are two main goals:


The kernels from the kernel-vanilla-fedora repositories on the other hand make it easy to check if a bug that happens with a Fedora kernel is specific to it or also present in a vanilla build. The kernels from the kernel-vanilla-stable repositories make it easy to check if a bug still happens with the latest stable kernel. If that is the case users can directly work with upstream on solutions for the problem and don't have to go through the sometimes overworked and quite busy developers that maintain the Linux kernel packages in Fedora.
* Help upstream Linux development, which in the end benefits Fedora as well.
* Make it easy for users of Fedora Linux to check if a kernel bug they face occurs with the latest upstream versions as well.


== Are the kernels from the kernel-vanilla repositories as good as those Fedora provides? ==
To explain in more details:


No. There are several reasons for why not; the most important ones:
* With the packages from the @kernel-vanilla/mainline repository it for example is quite easy to test the code that down the road will land in Fedora Linux. In other words: the repository allows people to find, report, and eliminate bugs to prevent them ever hitting a Fedora release. The packages also make it easy to check if a particular bug you encountered is already fixed upstream, as all bug-fixes have to land in mainline before they are considered for backporting to stable and longterm kernels.
* The situation with @kernel-vanilla/stable and @kernel-vanilla/stable-rc repositories is similar: you are just not that much ahead of Fedora’s kernels, as they often follow stable quite closely.
* The kernels from the @kernel-vanilla/fedora repository allow you to check if a bug in Fedora’s kernel is present in the stable series Fedora's kernels are based on as well. That way you can rule out if a problem might be caused by one of the patches Fedora applied.


* the developers that take care of the kernel package in Fedora are far more experienced in packaging kernels and kernel development itself than those that take care of the kernel-vanilla repositories
In general, these kernels make it simple to directly interact with upstream developers. That way users don't have to bother Fedora’s kernel maintainers, which often are buried in work already -- and thus lack the manpower to look into issues that only happen in certain, not that common environments (for example only on a single Laptop).
* the kernels that get used in Fedora or released as proper update get a lot of testing before getting shipped as proper update . The kernels from the kernel vanilla repositories get nearly no testing; they are only started in virtual machine and published  as long as they boot there.
* the official Fedora kernels sometimes contain changes that fix security problems or other crucial bugs before the fix gets merged upstream


In addition: It should be obvious that kernels from the mainline repository are typically still under heavy development and occasionally might have serious bugs that could lead to data loss. But in the end using the kernels from the kernel-vanilla repositories should not be any more dangerous than compiling and installing a kernel from source yourself.
== Are the vanilla kernel packages as good as Fedora's kernel? ==


== Why so many repos? This looks stupid and over-engineered! ==
For many people they just as fine, but in the end they are not as good:


Yes, it looks over-engineered on the first sight, but allows to server users just what they want; and once you look closer you'll notice that most of the time those four repositories contain only two Linux kernel versions per Fedora release.  
* The kernels shipped in the official Fedora repositories are tested by many people before they reach regular users; the kernels from the kernel vanilla repositories see no testing before being uploaded to the repositories.
* The official Fedora kernels don’t require you to turn off UEFI Secure Boot.
* The developers that take care of the kernel package in Fedora are far more experienced developers than the maintainers of the kernel vanilla repositories.
* The official Fedora kernels sometimes contain fixes for security vulnerabilities or other crucial bugs before the problem is fixed upstream; on the other hand, you often will receive fixes a bit quicker by using these repositories if they are applied upstream first.


[[File:Kernel.org-20180419.png|thumb|Kernel.org frontpage on 2018-04-09]] To explain this a bit more let's for example take a look April 9th, 2018. Back then
In the end though, using kernels from the kernel vanilla repositories is not any more dangerous than installing a Linux version using the sources from kernel.org yourself.


* Linux 4.16 was one week old and the first stable release 4.16.1 had just been released.
== Will everything continue to work with these kernels as it does with the official Fedora kernels? ==
* Linux 4.17 had one week into development, thus Linux 4.17-rc1 was still one week away.
* Linux 4.15.x was still supported upstream and 4.15.16 had just been released


At the same time
Most of the time yes, but in a few not that common situations it might not. That’s for example the case if Fedora’s kernels include a fix for an issue not yet fixed upstream. This is not that common, but within the cards; you on the other hand sometimes get bugfixed earlier with the kernels from these repositories.


* Fedora 29 was Rawhide and uses a mainline snapshot (4.17-pre-rc1)
== How up to date are the repositories? ==
* Fedora 28 was in Beta and used 4.16.x
* Fedora 27 and 26 were the current releases and used a Kernel based on Linux 4.15.x


In this situation there were users
Usually they are quite up to date: most of the time the repository ships snapshots daily and new releases within a few hours. But the maintainers of the kernel vanilla repositories do the work in their spare time. Occasionally a build problem or this strange thing called 'real life' come in between, which will lead to a bigger lag.


* that want the latest mainline snapshots (4.17-pre-rc1)
== Is there any performance penalty due to debug features ? ==
* that normally want the latest mainline snapshots, but want to avoid them during the busy merge window when most of the changes are done. They thus back then wanted the latest stable release (4.16.x)
* that always want to have the latest Linux stable release (4.16.x)
* that want to check if a problem they face with a Fedora kernel might be due to a patch that Fedora applied to their kernels (4.15.x)


[[File:Repos-20180419.png|thumb|Kernel vanilla repositories on 20180409]] And that's why there are four repos, to serve each of those users:
No. The kernels shipped in these repos use a configuration nearly identical to the one used in the kernels shipped by Fedora releases, which have no debug features enabled that are known to have a significant performance overhead.


* the mainline repo shipped the a mainline snapshot (4.17-pre-rc1)
== How to retrieve only mainline -rc releases from the mainline-wo-mergew copr? ==
* the mainline-wo-mergew repo shipped the latest stable release (4.16.1, but will jump to 4.17-rc1 once it's released)
* the stable repo shipped the latest stable release (4.16.1)
* the fedora repos shipped a vanilla build of the kernel version that release is using; hence F29/rawhide has a mainline snapshot  (4.17-pre-rc1), F28 has the lastest stable release (4.16.1) and F27 and F26 still have the stable release from the previous version line (4.15.16)


== Can we trust the people behind it? ==
The kernel vanilla repos do not support this use case, as there is no need to from the Linux perspective: -rc releases are also just snapshots, as no additional testing is performed before one is released; daily mainline snapshot thus are as reliable as -rc releases.


You have to decide yourself. If it is any help: Some of those that use or contribute to Fedora since a while will know that Thorsten has quite a history of Fedora contributions, even if he was not that much active in the past few years. You can assume he has no interest in ruin his reputation quickly by providing crappy packages in these repositories. On the other hand you should know that Thorsten started these repositories to dig deeper into the kernel and kernel development; so expect he'll make some mistakes along the way. And be reminded that using vanilla kernels has some known downsides and risks (see below).
If you nevertheless want just -rc releases, only update the kernel only on Mondays between ~10:00 UTC and ~6:00 UTC the following day.


== Thorsten, do you use the vanilla kernels yourself? ==
== Are the kernels safe to use? ==
 
Yes, I normally use the x86-64 vanilla kernels from the mainline repository, but I don't boot into each of them.


== Are the kernels safe to use? ==
That depends on your definition of 'safe'.


That depends on your definition of 'safe'.  
The Linux kernel is a complex piece of software and thus contains bugs. Those bugs in the past led to data loss a few times; in extremely rare situations they even damaged hardware. Bugs like that often only show up under specific circumstances, as they otherwise likely would have been found and fixed earlier already. Specific circumstances for example can be a specific mix of hardware used in combinations with a specific kernel version built with a particular set of configuration options. Nevertheless, in the end it is unlikely that such a bug makes it into one of the non-development kernels from the kernel vanilla repositories, but there is still a very small chance for that to happen.


The Linux kernel is a complex piece of software and thus contains bugs. Those bugs lead to data loss now and then; in very rare situations they even damaged hardware. Those bugs might only show up under specific circumstances – for example when a specific mix of hardware is used with a specific kernel version that was built with a specific configuration. It might be unlikely that such a bug is triggered by one of the non-development kernels from the kernel vanilla repositories, but there is still a very small chance that things like that can happen. Note that self compiled kernels bear exactly the same risk; chances of hitting serious bugs are lower for kernels that have undergone widespread testing already, as those found in the official Fedora repositories.
Note that self compiled kernels bear exactly the same risk; chances of hitting serious bugs are lower for kernels that have undergone widespread testing already, as those found in the official Fedora repositories.


In other words: The kernels from the kernel-vanilla repositories will work just fine for most people. But use them on your own risk and have backups handy, as you always should.
In other words: The kernels from the kernel vanilla repositories will work just fine for most people. But use them at your own risk and have current backups at hand, as you always should.


== Will everything work with the vanilla kernels that works with the official Fedora kernels? ==
== Are the vanilla kernels tested before publication? ==


No. Linux vanilla kernels are not that different from the kernels Fedora provides, but the latter include a few enhancements. Each was added for a good reason to make Fedora better, hence these improvements are missing when you use Linux vanilla kernels.
No, as they are built with Fedora’s Copr infrastructure, which doesn’t offer a simple way to test newly built packages before their publication. But all kernels shortly afterwards are booted in a virtual machine to rule out any issues; if something major is found that would affect the majority of users a package is pulled again, but that hasn't happen in a very long time for repositories containing mainline or stable kernels.


When this text was written in the spring of 2012 Fedora for example included utrace in their Linux kernels to support userspace tracing with systemtap; hence this feature didn't work with the kernels from the kernel-vanilla repositories, but should be these days, as systemtap now uses a solution from the upstream kernel for its work.  
Thorsten also regularly uses the x86_64 builds from the @kernel-vanilla/mainline-wo-mergew repository, either on the latest Fedora release or a pre-release of the next one; but he doesn't reboot every day and hence won’t give each of the builds a proper field test.


Another example: The kernels from Fedora sometimes include fresher drivers which some systems will require to work properly.
== Can we trust the people behind the kernel vanilla repositories? ==


Furthermore, in a few cases there are inter-dependencies between drivers in kernel and userland. The nouveau driver for graphics hardware from Nvidia was one such driver, as it had no stable API yet when this text was written; that's why the DRM/KMS driver in the kernel was marked as 'staging' back then. The Mesa 3D or X.org drivers included in a particular Fedora release therefore might depend on the nouveau DRM/KMS driver which is part of the kernels Fedora ships for this release; thus the nouveau drivers for Mesa 3D and X.org that are part of a certain Fedora release might not work properly with kernels found in the kernel-vanilla repositories, as those might contain an incompatible nouveau DRM/KMS driver because it they are older or newer than the one part of the official Fedora kernel.
You have to decide for yourself.


The non-development kernels found in the kernel-vanilla repositories therefore should work on a lot of systems, but on some systems they will be worse than the kernels Fedora provides.
If it is any help: some people that have used or contributed to Fedora regularly will know that Thorsten (the main maintainer for these repositories) has quite a history of Fedora contributions, even if he is not very active in Fedora these days. You can assume he has no interest in ruining his reputation quickly by providing crappy packages in these repositories. On the other hand you should know that Thorsten is not a real kernel developer, so expect an occasional mistake along the way. And be reminded that using vanilla kernels has some known downsides and risks (see below).


== Where to report bugs ==
== Where to report bugs ==


If the Linux kernels in the packages from these repositories show any bugs please report them upstream to the Linux kernel developers, just as you would after installing a Linux kernel yourself with the sources available at [http://kernel.org kernel.org]; that way all the bug reports go to the place where the people hang out that know how to fix them.
If the Linux kernels in the packages from these repositories show any bugs please report them upstream to the Linux kernel developers, just as you would after installing a Linux kernel yourself using the sources available at [http://kernel.org kernel.org]; that way all the bug reports go to the place where the people hang out that know how to fix them.


In case there are bugs in the packaging sent a mail to [[user:thl|Thorsten Leemhuis (aka "knurd")]].
In case there are bugs in the packaging sent a mail to [[user:thl|Thorsten Leemhuis (aka "knurd")]].
Line 85: Line 77:
== How can I avoid switching back and forth between vanilla kernels and Fedora kernels ? ==
== How can I avoid switching back and forth between vanilla kernels and Fedora kernels ? ==


Add 'exclude=kernel*' to the first section of these files in /etc/yum.repos.d/
This normally shouldn’t happen, as the kernel vanilla repositories typically contain packages package managers will consider as newer than the Fedora kernel. And if they nevertheless lag behind that’s likely because the maintainers of the kernel vanilla repositories are inactive for some good or bad reason – hence it might be wise to temporarily switch back to the Fedora kernel. If you nevertheless want to avoid that, add 'exclude=kernel*' to the first section of the following files in /etc/yum.repos.d/: fedora.repo, fedora-updates.repo, fedora-updates-testing.repo


fedora.repo
== Will this repository also ship updated userland components like drivers or udev that match the kernels in the repositories? ==
fedora-updates.repo
fedora-updates-testing.repo


== Will this repository also ship updates userland components like drivers or udev that match the kernels in the repositories? ==
Normally never, as there should be no need to: the interfaces between the kernel and userland software should never change in incompatible ways; Linus Torvalds makes this pretty clear every so often.


No, as there should be no need to, as the interfaces between the kernel and userland software should never change in an incompatible way; Linus Torvalds makes this pretty clear now and then.
Nevertheless in very rare situations there might be a strong reason to include such a package to avoid breakage for many users; in that case these repositories might include a package to prevent those issues.


That is the long story short. There are situations where the world is more complicated:
== Do you plan to provide packages for longterm (aka LTS) kernels ==


* above mentioned rule does not apply to staging drivers, so situations might arise where the vanilla kernels are not usable for people that need staging drivers for their system.  
That’s very unlikely, as using a Linux kernel version from a series older than the one used by the particular Fedora release can lead to issues. Providing such kernels hence would not provide a good user-experience, unless Fedora itself starts to ship longterm kernels.  
* Fedora sometimes might contain software that depends on bits that are not upstream


And even with this rule sometimes a new mainline kernel versions brings changes that require updates userland software. Three examples:
Additionally, the main goal of the kernel vanilla repositories for Fedora is to help upstream kernel development – longterm kernels don’t line up well with that, as they are quite a bit away from mainline development and a dead end.


* the version number jump from 2.6.39 to 3.0 confused some software
== Do you plan to provide packages for "linux-rt" as well? ==
* in rare cases fixing security problems was only possible my changing the interfaces in an incompatible way
* sometimes nobody notices early enough that interfaces have changed and reverting the change might break systems that already rely on the new behaviour.


It remains to be seen how often we hit such issues and how bad they are; how we deal with them will be decided on a case by case basis. In some cases we might have to other solution then to add new versions of other software to the repositories. But the plan is to avoid this if possible.
Maybe. It depends on the interest and how hard setup and maintenance would be. [[user:thl|Get in contact]] if you think investing time in these areas makes sense – or might want to help with the work.


== Do you plan to provide packages for longterm kernels ==
== Do you plan to provide vanilla kernels for RHEL and its derivatives? ==


Unlikely. The main goal of the kernel vanilla repositories for Fedora is to help upstream kernel development; but longterm kernels are a dead end and quite a bit away from mainline development, so they would not fit that well.  
For now it was decided to stay out of that business, even if it sounds like a good addition. There are several reasons for that. There for example are people more familiar with these distributions [http://elrepo.org/tiki/kernel-ml|who provide such packages already]. It would mean additional work for the maintainers of this repository, too.  


Additionally, the Linux versions shipped in this repos are normally newer than what Fedora shipswith, thus Dnf automatically prefers the kernel packages from this repo. Shipping older versions would only work if you change the repositories configuration on your systems to ignore all the kernels that Fedora ships in its repositories. That is not hard, but makes things more complicated. Using a Linux kernel from a older version line than the one used by Fedora also increases the risk that something works worse with our kernel packages.
== What configuration do those kernels use? ==


== Why are there no stable and mainline-wo-mergew repos for rawhide? ==
The configuration is pretty close to Fedora’s kernels. Which config exactly depends on the repo and branch; the kernels in @kernel-vanilla/fedora use a config that is basically identical to the kernel in the latest stable Fedora release, while those in @kernel-vanilla/mainline will be based on the config from Fedora’s rawhide kernel.


Those kernel version would be older than the ones used in Fedora rawhide. That is something we try to avoid for now (see above answer to "Do you plan to provide packages for longterm kernels" for details).
== Why not put vanilla kernels in Fedora’s main repositories? ==


== Do you plan to provide packages for "linux-next" or "linux-rt" as well? ==
The idea is not new, but the consensus in the Fedora project as far as we can see is this: that's not a good idea, as it divides the user base; it also would make the vanilla Linux kernels more 'official' and people might simply use them without knowing their downsides. Putting the kernels in a well known and widely used external add-on repository for Fedora might make sense, but some problems would be similar.


For now: No. I know there is some interest in packages for them, but maintaining those will consume a lot of time regularly and we have not enough resources to do it properly right now.  
That's the long story, rough and short. And sure, there are reasons why having vanilla kernels in the main repositories would make sense. Feel free to start a discussion on the [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ Fedora devel] and the [https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org/ Fedora kernel] mailing list, we'll watch and might jump in.


Furthermore, the CCMA people already build RT kernels and it might be the best for everyone to not compete with them.
But in the end the best approach would be to reduce the number of patches the Fedora kernel developers include to zero or something very close to that, as then some of the repos this effort provides wouldn’t be necessary at all.


Packaging -next kernels might not be a good idea in general, as chances these kernels contain serious bugs are way bigger than in the mainline or stable series. Hence it might be wise to leave -next to people that build kernels themselves.
== Are those kernels really unpatched? ==


[[user:thl|Get in contact]] if you think investing time in these areas makes sense.
Yes, apart from a handful of very small changes that are needed for packaging.  


== Do you plan to provide vanilla kernels for RHEL and derivatives like CentOS and SL? ==
That being said: in very rare situations we might include a patch to fix build problems. That normally only happens for mainline builds; those fixes often head upstream quickly and hence vanish from the vanilla packages pretty soon again.


Sounds like a good addition. But there are people more familiar with these distributions [http://elrepo.org/tiki/kernel-ml|that provide such packages already]. It would mean additional work for us, too; and we currently have no one that would regularly run such kernels. So for now we won't get our feet wet in that area. But if you want to step up and help, [[User:thl|get in contact]].
== Why so many repos? This looks stupid and over-engineered! ==


== What configuration do those kernels use? ==
It can look over-engineered at the first sight, but allows us to serve multiple use-cases with nearly no overhead – and once you look closer, you'll notice that most of the time those six repositories will only contain three Linux kernel versions per Fedora Linux release.


The mainline kernels use basically the same configuration as the Fedora rawhide kernels. Maybe a few staging drivers might get turned on to help their development, but apart from it the plan is to stick closely to what Fedora does.  
[[File:Kernel.org-20180419.png|thumb|Kernel.org frontpage on 2018-04-09]] To explain this a bit more lets take a look April 9th, 2018 while ignoring the @kernel-vanilla/stable-rc and @kernel-vanilla/next repositories to keep things simpler. Back then…


The stable kernels typically use a configuration that is close to the kernel in the particular Fedora release.
* Linux 4.17 was one week into the merge window and Linux 4.17-rc1 still one week away.
* Linux 4.16 was one week old and the first stable release 4.16.1 had just been released.
* Linux 4.15.''y'' was still supported upstream and 4.15.16 had just been released.


== Why don't you put these kernels in Fedoras main repositories ==
At the same time…


The current consensus in the Fedora project as far as we see is: That's not a good idea, as that would make the vanilla Linux kernels more 'official' and people might simply use those kernels without knowing what their downsides are.  
* Fedora 29 was prepared in Rawhide, which contained a mainline snapshot (4.17-pre-rc1).
* Fedora 28 was in Beta and contained 4.16.''y''.
* Fedora 27 and 26 were the current releases and contained a kernel based on Linux 4.15.''y''.


That's the long story rough and short. And sure, there are reasons why having vanilla kernels in the main repositories would make sense. Feel free to start a discussion on [http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org the Fedora devel mailing list], we'll watch and might jump in.
At this particular point in time there were various users:


Putting the kernels in a well know 3rd party add-on repository for Fedora might make sense, but some of the problems would be similar. It would lead to more problems, as then users might ask to build add-on modules for those kernels, too.
# Users that wanted the latest mainline snapshots (4.17-pre-rc1).
# Users that normally want the latest mainline snapshots, except during the busy merge windows when most of the changes (including all the riskier ones) happen; those users thus wanted the latest stable release instead (4.16.1).
# Users that regularly wanted to use the latest Linux stable release (4.16.1).
# Users that wanted to check if a problem they face with a Fedora kernel might be due to a patch Fedora applied to its kernels (4.16.1 for Fedora Linux 28 and 4.15.16 for Fedora Linux 27 & 26).


The best approach would be to reduce the number of patches the Fedora kernel developers include for one reason or another down to zero. That would require changes not only in Fedora, but in the upstream workflow as well.
[[File:Repos-20180419.png|thumb|Kernel vanilla repositories on 20180409]] Thanks to the various coprs the kernel vanilla repositories were able to serve each of those users what they wanted:


== Are those kernels really unpatched? ==
# @kernel-vanilla/mainline shipped a mainline snapshot (4.17-pre-rc1).
 
# @kernel-vanilla/mainline-wo-mergew shipped the latest stable release (4.16.1).
No, they contain a handful of very small changes that are needed for packaging.  
# @kernel-vanilla/stable also provided the latest stable release (4.16.1)
 
# @kernel-vanilla/fedora shipped a vanilla build of the kernel version that Fedora release was using; for users of rawhide that was a mainline snapshot (4.17-pre-rc1), for users of F28 it was the latest stable release (4.16.1) and for users of F27 and F26 it was the latest stable release from the older stable series (4.15.16).
From time to time the packages might use patches which temporary are necessary to make the kernel build or usable for people; fixes like these will normally head upstream quickly and hence vanish from the vanilla packages pretty soon again. Furthermore, this normally should only happen with mainline development kernels, not with stable kernels.


== How up2date will those repositories be? ==
A week later when 4.17-rc1 came out the @kernel-vanilla/mainline-wo-mergew switched to shipping mainline, as the merge window was over; users of @kernel-vanilla/stable stayed on the 4.16.y series instead.


We do the work in our spare time. Sometimes the day job and this strange thing called 'real life' leave not much time to work on these kernels, so there will be a lag.
About another one-and-a-half week later Fedora made the jump to 4.16.y in F27 and F26, hence users of the @kernel-vanilla/fedora started to receive those versions, too.


== Why are there no stable or mainline-wo-mergew repos for rawhide? ==


We don't bother with those, as those kernel would be older than the ones that rawhide serves.


= FAQ for contributors and developers =
= FAQ for contributors and developers =
Line 166: Line 157:
== Can you please include the patch found at <URL>? ==
== Can you please include the patch found at <URL>? ==


No. Get your patch merged upstream, then the change you are interested in will automatically show up in these packages. And even better: it will automatically get into Fedora and other distributions, too!
No. Convince upstream to merge that patch, then the change you are interested in will automatically show up in these packages. And even better: it will automatically get into Fedora and other distributions, too!


== Is there a Git tree somewhere? ==
== Where is the code from which the packages are built? ==


Sure: [http://fedorapeople.org/cgit/thl/public_git/kernel.git/ http://fedorapeople.org/cgit/thl/public_git/kernel.git/]. Kernels in the kernel-vanilla-mainline repository are normally build from the rawhide branch. Kernels in the kernel-vanilla-fedora repository are always build from the appropriate Fedora branch. Most of the time the kernels in the kernel-vanilla-stable repository come from here to, but sometimes they are build from the stabilization branch.
You can find the code [https://gitlab.com/knurd42/linux/ in the "ark-vanilla-*" branches of gitlab.com/knurd42/linux/]; it differs only slightly from the [https://gitlab.com/cki-project/kernel-ark kernel-ark infrastructure], which is used to built the SRPMs for the kernels shipped by Fedora Linux.  


Let us know if we should do modifications to allow others to contribute to or benefit from this git tree better.
Note, the ark-vanilla-next and ark-vanilla-stable-rc-* branches are rebased for each build, as the Linux git tree's they are based on are regularly rebased. The ark-vanilla-mainline and ark-vanilla-stable-* branches normally are not rebased, but the former might be when kernel-ark/os-build is.


== What Fedora versions will be supported ==
For the curious, those branches are directly or indirectly based on other branches to facilitate maintenance and avoid merge conflicts:


The plan is to always support the most recent Fedora version in the stable and mainline repositories. The mainline and sometimes the stable repo will also be provides for the distribution that is currently under development (rawhide on the first half of Fedoras development cycle iteration or the alpha/beta/rcs in the second half).
* The "ark-infra-*" branches (like `ark-infra-mainline` and `ark-infra-stable-6.2`) are forks of [https://gitlab.com/cki-project/kernel-ark kernel-ark] branches like `os-build` and `fedora-6.2` containing modifications for the ark-infra needed for vanilla builds. These branches track their upstream and normally are not rebased, unless kernel-ark rebases their upstream branches (for kernel-ark/os-build this happens every nine or ten weeks right after a new mainline release). For mainline and next there are also "ark-infra-*-latest" branches, which contain additional changes from kernel-ark's `kernel-ark/ark-latest` branch -- that's the one Fedora's rawhide kernels are build from that contains a few changes that have not yet reached the `kernel-ark/os-build`. Just like ark-latest these two branches are rebased daily.


== Why are there no debug kernels and not even debuginfo packages ==
* The "ark-patches-*" branches (like `ark-patches-mainline` or `ark-patches-stable-6.2`) are forks of the Linux kernel upstream trees (e.g. Linus tree, linux-next, linux-6.2.y). They when needed hold patches to avoid known build-problems that would prevent vanilla builds for Fedora; such fixes are rarely needed, these branches thus most of the time do not contain any changes. They track their upstream and are rebased when they are. For stable-rc and -next this means: for every release.


The space on repos.fedoraprople.org is limited, hence we need to limit the number of packages we can provide. The debuginfo packages are also quite big and thus downloading the koji results and uploading the final repo take a lot longer.
* The "ark-vanilla-*" branches is where the shipped packages are build from.  


If you need the debuginfo packags consider rebuilding the SRPM with "rpmbuild -bb --with debuginfo" and installing the results. You can also rebuild the SRPM using "rpmbuild -bb --with dbgonly" in case you need a kernel image where all sorts of debug options are enabled in the configuration.
All those branches are maintained by [https://gitlab.com/knurd42/ark-vanilla-scripts/-/blob/main/vk-gitmon.sh the script 'vk-gitmon.sh'] which automatically or semi-automaically kicks of new builds when it notices changes in the upstream Linux branches. For mainline the process round about looks like this:


Let us know if there is interest in these packages, then maybe a solution can be found to provide these packages sooner or later.
# Script notices Linux mainline was updated and merges the changes into the `mainline` branch.
# Script merges changes from `kernel-ark/os-build` into `ark-infra-mainline` up to the point where `kernel-ark/ark-latest` branched off.
# Script recreates `ark-infra-mainline-latest` from current `ark-infra-mainline` and merges the latest changes from `kernel-ark/ark-latest`.
# Script merges `mainline` into `ark-patches-mainline`.
# Script merges `ark-patches-mainline` into `ark-vanilla-mainline`.
# Script bulk-imports all ark infrastructure files (e.g. the redhat/ directory and a few other bits) from `ark-infra-mainline-latest` into `ark-vanilla-mainline`.
# Script tags the release and pushes the changes out.
# A gitlab webhook tells copr to start a new build.
# Copr builds the packages using the [https://docs.pagure.org/copr.copr/user_documentation.html#make-srpm make srpm method].


== Why don't you commit your changes to Fedora's kernel git repo on pkgs.fedoraproject.org? ==
This sounds overly complicated, but facilitates the maintenance and avoid merge conflicts that occured frequently with other schemes used earlier.


That might make sense. But it bears the risk that a commit is done to a wrong branch and disturbs the work of the Fedora kernels maintainer. Further: Not all of those that contribute to Fedora can commit there. That's similar with the fedorapeople git repository, but the docs indicate others can be given access with the help of ACLs.
This structure makes it also easy to use things in other situations – for example when someone wants to create a package based on a developer tree (say "amd-staging-drm-next"): just bulk-import the a ark-infra bits from `ark-infra-next-latest` branch (see `vkgm_update_ark_import()` in [https://gitlab.com/knurd42/ark-vanilla-scripts/-/blob/main/vk-gitmon.sh vk-gitmon.sh] for details) and adjust things to your needs in redhat/Makefile.variables, especially the DIST_BRANCH and UPSTREAM_BRANCH values; afterwards a command like `make DISTLOCALVERSION=".amdstaging" NO_CONFIGCHECKS=1 dist-srpm` allows generating a srpm.
 
But whatever: Git is made for distributed development, so simply clone it and send pull requests if you have any additions.


== Can I help? ==
== Can I help? ==
Line 198: Line 195:
== Do you work together with the developers that maintain Fedora's kernel packages? ==
== Do you work together with the developers that maintain Fedora's kernel packages? ==


There is cooperation already. If you think more is needed in some area let us know.
We know about each other and talk occasionally..


== Please stop providing alternative kernel packages, they take attention away from the kernel packages Fedora provide and thus harm Fedora! ==
== Please stop providing alternative kernel packages, they take attention away from the kernel packages Fedora provides and thus harm Fedora! ==


That's a valid concern, but we think the benefits outweigh the downsides.
That's a valid concern, but we think the benefits outweigh the downsides.


That again that is the long story short. Just to get a little bit deeper into it and show a different view on the matter at hand: Similar arguments could be used to argue that Fedora should stop shipping patched kernels, as they take attention away from the upstream kernel. Up to a point such an argument is valid, too, but there are good reasons why Fedora patches its kernels.  
That again is the long story short. Just to get a little deeper into it and show a different view on the matter at hand: similar arguments could be used to argue that Fedora should stop shipping patched kernels, as they take attention away from the upstream kernel. Up to a point such an argument is valid, too, but there are good reasons why Fedora patches its kernels.
 
== Why did you drop the '-vanilla' postfix that normally gets added to the 'name' macro when you build Fedora's kernel RPM without patches locally? ==
 
I've thought about dropping or leaving it for a while, as both schemes have various benefits and downsides. In the end I went for dropping it due to reasons like this:
 
* nearly every other repository in Fedoraland that ships variants of a packages that are included in Fedora do not change the name
* the postfix in the name breaks some tools – for example things like 'fedpkg srpm' on the git checkout
* external solutions that heavily depend on the naming scheme Fedora uses (like the akmod/kmod stuff used in some external repositories) would break with the -vanilla postfix in the name
* DNF might not recognize kernel packages with a '-vanilla' postfix as 'installonly' and thus would perform a regular update for vanilla packages instead of installing them parallel to the current one

Latest revision as of 06:22, 24 March 2024

Frequently asked questions about the kernel vanilla repositories for Fedora.

FAQ for users

What is the goal of these repositories?

There are two main goals:

  • Help upstream Linux development, which in the end benefits Fedora as well.
  • Make it easy for users of Fedora Linux to check if a kernel bug they face occurs with the latest upstream versions as well.

To explain in more details:

  • With the packages from the @kernel-vanilla/mainline repository it for example is quite easy to test the code that down the road will land in Fedora Linux. In other words: the repository allows people to find, report, and eliminate bugs to prevent them ever hitting a Fedora release. The packages also make it easy to check if a particular bug you encountered is already fixed upstream, as all bug-fixes have to land in mainline before they are considered for backporting to stable and longterm kernels.
  • The situation with @kernel-vanilla/stable and @kernel-vanilla/stable-rc repositories is similar: you are just not that much ahead of Fedora’s kernels, as they often follow stable quite closely.
  • The kernels from the @kernel-vanilla/fedora repository allow you to check if a bug in Fedora’s kernel is present in the stable series Fedora's kernels are based on as well. That way you can rule out if a problem might be caused by one of the patches Fedora applied.

In general, these kernels make it simple to directly interact with upstream developers. That way users don't have to bother Fedora’s kernel maintainers, which often are buried in work already -- and thus lack the manpower to look into issues that only happen in certain, not that common environments (for example only on a single Laptop).

Are the vanilla kernel packages as good as Fedora's kernel?

For many people they just as fine, but in the end they are not as good:

  • The kernels shipped in the official Fedora repositories are tested by many people before they reach regular users; the kernels from the kernel vanilla repositories see no testing before being uploaded to the repositories.
  • The official Fedora kernels don’t require you to turn off UEFI Secure Boot.
  • The developers that take care of the kernel package in Fedora are far more experienced developers than the maintainers of the kernel vanilla repositories.
  • The official Fedora kernels sometimes contain fixes for security vulnerabilities or other crucial bugs before the problem is fixed upstream; on the other hand, you often will receive fixes a bit quicker by using these repositories if they are applied upstream first.

In the end though, using kernels from the kernel vanilla repositories is not any more dangerous than installing a Linux version using the sources from kernel.org yourself.

Will everything continue to work with these kernels as it does with the official Fedora kernels?

Most of the time yes, but in a few not that common situations it might not. That’s for example the case if Fedora’s kernels include a fix for an issue not yet fixed upstream. This is not that common, but within the cards; you on the other hand sometimes get bugfixed earlier with the kernels from these repositories.

How up to date are the repositories?

Usually they are quite up to date: most of the time the repository ships snapshots daily and new releases within a few hours. But the maintainers of the kernel vanilla repositories do the work in their spare time. Occasionally a build problem or this strange thing called 'real life' come in between, which will lead to a bigger lag.

Is there any performance penalty due to debug features ?

No. The kernels shipped in these repos use a configuration nearly identical to the one used in the kernels shipped by Fedora releases, which have no debug features enabled that are known to have a significant performance overhead.

How to retrieve only mainline -rc releases from the mainline-wo-mergew copr?

The kernel vanilla repos do not support this use case, as there is no need to from the Linux perspective: -rc releases are also just snapshots, as no additional testing is performed before one is released; daily mainline snapshot thus are as reliable as -rc releases.

If you nevertheless want just -rc releases, only update the kernel only on Mondays between ~10:00 UTC and ~6:00 UTC the following day.

Are the kernels safe to use?

That depends on your definition of 'safe'.

The Linux kernel is a complex piece of software and thus contains bugs. Those bugs in the past led to data loss a few times; in extremely rare situations they even damaged hardware. Bugs like that often only show up under specific circumstances, as they otherwise likely would have been found and fixed earlier already. Specific circumstances for example can be a specific mix of hardware used in combinations with a specific kernel version built with a particular set of configuration options. Nevertheless, in the end it is unlikely that such a bug makes it into one of the non-development kernels from the kernel vanilla repositories, but there is still a very small chance for that to happen.

Note that self compiled kernels bear exactly the same risk; chances of hitting serious bugs are lower for kernels that have undergone widespread testing already, as those found in the official Fedora repositories.

In other words: The kernels from the kernel vanilla repositories will work just fine for most people. But use them at your own risk and have current backups at hand, as you always should.

Are the vanilla kernels tested before publication?

No, as they are built with Fedora’s Copr infrastructure, which doesn’t offer a simple way to test newly built packages before their publication. But all kernels shortly afterwards are booted in a virtual machine to rule out any issues; if something major is found that would affect the majority of users a package is pulled again, but that hasn't happen in a very long time for repositories containing mainline or stable kernels.

Thorsten also regularly uses the x86_64 builds from the @kernel-vanilla/mainline-wo-mergew repository, either on the latest Fedora release or a pre-release of the next one; but he doesn't reboot every day and hence won’t give each of the builds a proper field test.

Can we trust the people behind the kernel vanilla repositories?

You have to decide for yourself.

If it is any help: some people that have used or contributed to Fedora regularly will know that Thorsten (the main maintainer for these repositories) has quite a history of Fedora contributions, even if he is not very active in Fedora these days. You can assume he has no interest in ruining his reputation quickly by providing crappy packages in these repositories. On the other hand you should know that Thorsten is not a real kernel developer, so expect an occasional mistake along the way. And be reminded that using vanilla kernels has some known downsides and risks (see below).

Where to report bugs

If the Linux kernels in the packages from these repositories show any bugs please report them upstream to the Linux kernel developers, just as you would after installing a Linux kernel yourself using the sources available at kernel.org; that way all the bug reports go to the place where the people hang out that know how to fix them.

In case there are bugs in the packaging sent a mail to Thorsten Leemhuis (aka "knurd").

How can I avoid switching back and forth between vanilla kernels and Fedora kernels ?

This normally shouldn’t happen, as the kernel vanilla repositories typically contain packages package managers will consider as newer than the Fedora kernel. And if they nevertheless lag behind that’s likely because the maintainers of the kernel vanilla repositories are inactive for some good or bad reason – hence it might be wise to temporarily switch back to the Fedora kernel. If you nevertheless want to avoid that, add 'exclude=kernel*' to the first section of the following files in /etc/yum.repos.d/: fedora.repo, fedora-updates.repo, fedora-updates-testing.repo

Will this repository also ship updated userland components like drivers or udev that match the kernels in the repositories?

Normally never, as there should be no need to: the interfaces between the kernel and userland software should never change in incompatible ways; Linus Torvalds makes this pretty clear every so often.

Nevertheless in very rare situations there might be a strong reason to include such a package to avoid breakage for many users; in that case these repositories might include a package to prevent those issues.

Do you plan to provide packages for longterm (aka LTS) kernels

That’s very unlikely, as using a Linux kernel version from a series older than the one used by the particular Fedora release can lead to issues. Providing such kernels hence would not provide a good user-experience, unless Fedora itself starts to ship longterm kernels.

Additionally, the main goal of the kernel vanilla repositories for Fedora is to help upstream kernel development – longterm kernels don’t line up well with that, as they are quite a bit away from mainline development and a dead end.

Do you plan to provide packages for "linux-rt" as well?

Maybe. It depends on the interest and how hard setup and maintenance would be. Get in contact if you think investing time in these areas makes sense – or might want to help with the work.

Do you plan to provide vanilla kernels for RHEL and its derivatives?

For now it was decided to stay out of that business, even if it sounds like a good addition. There are several reasons for that. There for example are people more familiar with these distributions provide such packages already. It would mean additional work for the maintainers of this repository, too.

What configuration do those kernels use?

The configuration is pretty close to Fedora’s kernels. Which config exactly depends on the repo and branch; the kernels in @kernel-vanilla/fedora use a config that is basically identical to the kernel in the latest stable Fedora release, while those in @kernel-vanilla/mainline will be based on the config from Fedora’s rawhide kernel.

Why not put vanilla kernels in Fedora’s main repositories?

The idea is not new, but the consensus in the Fedora project as far as we can see is this: that's not a good idea, as it divides the user base; it also would make the vanilla Linux kernels more 'official' and people might simply use them without knowing their downsides. Putting the kernels in a well known and widely used external add-on repository for Fedora might make sense, but some problems would be similar.

That's the long story, rough and short. And sure, there are reasons why having vanilla kernels in the main repositories would make sense. Feel free to start a discussion on the Fedora devel and the Fedora kernel mailing list, we'll watch and might jump in.

But in the end the best approach would be to reduce the number of patches the Fedora kernel developers include to zero or something very close to that, as then some of the repos this effort provides wouldn’t be necessary at all.

Are those kernels really unpatched?

Yes, apart from a handful of very small changes that are needed for packaging.

That being said: in very rare situations we might include a patch to fix build problems. That normally only happens for mainline builds; those fixes often head upstream quickly and hence vanish from the vanilla packages pretty soon again.

Why so many repos? This looks stupid and over-engineered!

It can look over-engineered at the first sight, but allows us to serve multiple use-cases with nearly no overhead – and once you look closer, you'll notice that most of the time those six repositories will only contain three Linux kernel versions per Fedora Linux release.

Kernel.org frontpage on 2018-04-09

To explain this a bit more lets take a look April 9th, 2018 while ignoring the @kernel-vanilla/stable-rc and @kernel-vanilla/next repositories to keep things simpler. Back then…

  • Linux 4.17 was one week into the merge window and Linux 4.17-rc1 still one week away.
  • Linux 4.16 was one week old and the first stable release 4.16.1 had just been released.
  • Linux 4.15.y was still supported upstream and 4.15.16 had just been released.

At the same time…

  • Fedora 29 was prepared in Rawhide, which contained a mainline snapshot (4.17-pre-rc1).
  • Fedora 28 was in Beta and contained 4.16.y.
  • Fedora 27 and 26 were the current releases and contained a kernel based on Linux 4.15.y.

At this particular point in time there were various users:

  1. Users that wanted the latest mainline snapshots (4.17-pre-rc1).
  2. Users that normally want the latest mainline snapshots, except during the busy merge windows when most of the changes (including all the riskier ones) happen; those users thus wanted the latest stable release instead (4.16.1).
  3. Users that regularly wanted to use the latest Linux stable release (4.16.1).
  4. Users that wanted to check if a problem they face with a Fedora kernel might be due to a patch Fedora applied to its kernels (4.16.1 for Fedora Linux 28 and 4.15.16 for Fedora Linux 27 & 26).
Kernel vanilla repositories on 20180409

Thanks to the various coprs the kernel vanilla repositories were able to serve each of those users what they wanted:

  1. @kernel-vanilla/mainline shipped a mainline snapshot (4.17-pre-rc1).
  2. @kernel-vanilla/mainline-wo-mergew shipped the latest stable release (4.16.1).
  3. @kernel-vanilla/stable also provided the latest stable release (4.16.1)
  4. @kernel-vanilla/fedora shipped a vanilla build of the kernel version that Fedora release was using; for users of rawhide that was a mainline snapshot (4.17-pre-rc1), for users of F28 it was the latest stable release (4.16.1) and for users of F27 and F26 it was the latest stable release from the older stable series (4.15.16).

A week later when 4.17-rc1 came out the @kernel-vanilla/mainline-wo-mergew switched to shipping mainline, as the merge window was over; users of @kernel-vanilla/stable stayed on the 4.16.y series instead.

About another one-and-a-half week later Fedora made the jump to 4.16.y in F27 and F26, hence users of the @kernel-vanilla/fedora started to receive those versions, too.


FAQ for contributors and developers

Can you please include the patch found at <URL>?

No. Convince upstream to merge that patch, then the change you are interested in will automatically show up in these packages. And even better: it will automatically get into Fedora and other distributions, too!

Where is the code from which the packages are built?

You can find the code in the "ark-vanilla-*" branches of gitlab.com/knurd42/linux/; it differs only slightly from the kernel-ark infrastructure, which is used to built the SRPMs for the kernels shipped by Fedora Linux.

Note, the ark-vanilla-next and ark-vanilla-stable-rc-* branches are rebased for each build, as the Linux git tree's they are based on are regularly rebased. The ark-vanilla-mainline and ark-vanilla-stable-* branches normally are not rebased, but the former might be when kernel-ark/os-build is.

For the curious, those branches are directly or indirectly based on other branches to facilitate maintenance and avoid merge conflicts:

  • The "ark-infra-*" branches (like ark-infra-mainline and ark-infra-stable-6.2) are forks of kernel-ark branches like os-build and fedora-6.2 containing modifications for the ark-infra needed for vanilla builds. These branches track their upstream and normally are not rebased, unless kernel-ark rebases their upstream branches (for kernel-ark/os-build this happens every nine or ten weeks right after a new mainline release). For mainline and next there are also "ark-infra-*-latest" branches, which contain additional changes from kernel-ark's kernel-ark/ark-latest branch -- that's the one Fedora's rawhide kernels are build from that contains a few changes that have not yet reached the kernel-ark/os-build. Just like ark-latest these two branches are rebased daily.
  • The "ark-patches-*" branches (like ark-patches-mainline or ark-patches-stable-6.2) are forks of the Linux kernel upstream trees (e.g. Linus tree, linux-next, linux-6.2.y). They when needed hold patches to avoid known build-problems that would prevent vanilla builds for Fedora; such fixes are rarely needed, these branches thus most of the time do not contain any changes. They track their upstream and are rebased when they are. For stable-rc and -next this means: for every release.
  • The "ark-vanilla-*" branches is where the shipped packages are build from.

All those branches are maintained by the script 'vk-gitmon.sh' which automatically or semi-automaically kicks of new builds when it notices changes in the upstream Linux branches. For mainline the process round about looks like this:

  1. Script notices Linux mainline was updated and merges the changes into the mainline branch.
  2. Script merges changes from kernel-ark/os-build into ark-infra-mainline up to the point where kernel-ark/ark-latest branched off.
  3. Script recreates ark-infra-mainline-latest from current ark-infra-mainline and merges the latest changes from kernel-ark/ark-latest.
  4. Script merges mainline into ark-patches-mainline.
  5. Script merges ark-patches-mainline into ark-vanilla-mainline.
  6. Script bulk-imports all ark infrastructure files (e.g. the redhat/ directory and a few other bits) from ark-infra-mainline-latest into ark-vanilla-mainline.
  7. Script tags the release and pushes the changes out.
  8. A gitlab webhook tells copr to start a new build.
  9. Copr builds the packages using the make srpm method.

This sounds overly complicated, but facilitates the maintenance and avoid merge conflicts that occured frequently with other schemes used earlier.

This structure makes it also easy to use things in other situations – for example when someone wants to create a package based on a developer tree (say "amd-staging-drm-next"): just bulk-import the a ark-infra bits from ark-infra-next-latest branch (see vkgm_update_ark_import() in vk-gitmon.sh for details) and adjust things to your needs in redhat/Makefile.variables, especially the DIST_BRANCH and UPSTREAM_BRANCH values; afterwards a command like make DISTLOCALVERSION=".amdstaging" NO_CONFIGCHECKS=1 dist-srpm allows generating a srpm.

Can I help?

Of course. Talk to Thorsten; best if you come with some ideas what you can and want to do.

Do you work together with the developers that maintain Fedora's kernel packages?

We know about each other and talk occasionally..

Please stop providing alternative kernel packages, they take attention away from the kernel packages Fedora provides and thus harm Fedora!

That's a valid concern, but we think the benefits outweigh the downsides.

That again is the long story short. Just to get a little deeper into it and show a different view on the matter at hand: similar arguments could be used to argue that Fedora should stop shipping patched kernels, as they take attention away from the upstream kernel. Up to a point such an argument is valid, too, but there are good reasons why Fedora patches its kernels.