From Fedora Project Wiki

(→‎Chat: Add IRC reference)
 
(45 intermediate revisions by 6 users not shown)
Line 3: Line 3:


= Current versions =
= Current versions =
{| border="1" align="center" style="text-align:center;"
The current policy of the Fedora kernel is to stay on the latest released kernel and rebase when it goes EOL. This means that each released Fedora version (e.g. F33, F34) will receive multiple major kernel versions throughout its life cycle. This wiki page used to list versions but it was frequently out of date.
|Release
|Version
|MotM
|Comments
|-
|F20
|3.18.x
|jforbes
|
|-
|F21
|3.18.x
|jforbes
|3.19 rebase soon
|-
|Rawhide
|Latest mainline (4.0)
|jwb
| Pretty much always the latest mainline tree.
|}
 
Each branches maintainer rotates each month. The MotM field above refers to the current months active maintainer.
If in doubt, send mail to the kernel list (info below) rather than individuals.


= Fedora kernel mailing list =
= Fedora kernel mailing list =
Line 34: Line 11:
{{fplist|kernel}}
{{fplist|kernel}}


= IRC =
= Chat =


Join the {{fpchat|#fedora-kernel}} channel on freenode.net.
Join the [https://matrix.to/#/#kernel:fedoraproject.org Fedora Kernel Matrix room].


Every two weeks, the fedora kernel team meets in the {{fpchat|#fedora-meeting}} channel on freenode.net for a one hour meeting. (Details on times at [[Meeting_channel]])
Alternatively, join the {{fpchat|#fedora-kernel}} channel on libera.chat.


= Source checkout info =
= Source checkout info =
The Fedora kernel is largely maintained via an exploded source git tree at [https://gitlab.com/cki-project/kernel-ark Gitlab]. While there is [https://cki-project.gitlab.io/kernel-ark/ documentation] to get you started, a bit of overview as to how this applies to Fedora is listed here.  There are a few branches of particular interest:
* '''os-build''': This is the default branch, and where the "Rawhide kernel" is maintained. It is synced with Linus master daily. Merge Requests should typically target this branch unless it is something that is already there and needs to be backported.  Even if you wish to get the change into fedora-6.x, it needs to be in os-build as well, or it will be dropped on the next rebase.
* '''ark-latest''': This is a rebase branch that includes os-build and any patches which have been tagged but not merged as required for build.  While it is what we actually build dist-git from, no development should be done here. Merge requests for rawhide should be against os-build.
* '''fedora-6.*''': These are stable Fedora branches. A single branch is used across all Fedora releases which are rebased to that release.  If there are config variations required to support an older Fedora release, those should be noted in 'redhat/rebase-notes.txt'
* '''ark-infra''': This is a stripped down tree with basically the srpm/dist git utility (the redhat directory).  The purpose of this branch is to be able to merge it onto any upstream tree and interact with it just like you would the Fedora tree, meaning tools like 'make dist-srpm' or 'make dist-git' should work on that tree you merge onto.
* '''linux-6.*.y''': These are branches pulled from the upstream stable tree. As the mirroring is not automated, I only tend to keep them updated as long as Fedora is shipping kernels based on this branch.
* '''master''': This is linus' upstream tree, it is automatically mirrored, and should typically be up to date.
'''Dist Git''':


<pre>
<pre>
fedpkg co -B kernel
fedpkg co kernel
</pre>
</pre>


This gets you the git checkout and sets up branches for f13, f14, and master (devel).
This gets you the git checkout and sets up branches for the current releases and rawhide (devel).
Once you have switched to the branch you care about (with git checkout branchname), fedpkg prep will create a tree.
Once you have switched to the branch you care about (with git checkout branchname), fedpkg prep will create a tree.


You'll then be left with a kernel-2.6.? directory, containing both an unpatched 'vanilla-2.6.?' dir, and a linux-2.6.?-noarch hardlinked dir which has the Fedora patches applied.
You'll then be left with a kernel-6.X.? directory, containing both an unpatched 'vanilla-6.X.?' dir, and a linux-6.X.?-noarch hardlinked dir which has the Fedora patches applied.


The above command will require you to have SSH access to the Fedora pkg-git archives. If you want to do an anonymous checkout of the sources, you can use:
The above command will require you to have SSH access to the Fedora pkg-git archives. If you want to do an anonymous checkout of the sources, you can use:


<pre>
<pre>
fedpkg co -Ba kernel
fedpkg co -a kernel
</pre>
</pre>


= Contributing to the Fedora kernel =
= Contributing to the Fedora kernel =
* For one-off fixes, send them to the fedora-kernel mailing list, or if they are relevant upstream, send them directly to linux-kernel@vger.kernel.org and Fedora will inherit them on the next rebase
* If you are sending patches for the first time, there is a [[Kernel/FirstKernelPatch | guide]] to help you.
* If you are sending lots of changes to the Fedora kernel, then it may make more sense for you to get commit access. (Note, for most things, sending them upstream is far more preferable).
* For one-off fixes, create a merge request against kernel-ark, or if they are relevant upstream, send them directly to linux-kernel@vger.kernel.org and Fedora will inherit them on the next rebase
* To request commit access to the Fedora kernel:
* Get a [[PackageMaintainers/Join|fedora account]] if you don't already have one
* Visit [https://admin.fedoraproject.org/pkgdb/acls/name/kernel the package db entry for the kernel]  and request access for the branch(es) which interest you.
* '''Please''' subscribe to the mailing list above. Important announcements regarding rebases, builds, patches being disabled, and much more happen there.
* '''Please''' subscribe to the mailing list above. Important announcements regarding rebases, builds, patches being disabled, and much more happen there.
* If you're interested in adding an out-of-tree driver or similar to the Fedora kernel, please read [[KernelDriverPolicy]] first. See [[KernelStagingPolicy]] also.
* If you're interested in adding an out-of-tree driver or similar to the Fedora kernel, please read [[KernelDriverPolicy]] first. See [[KernelStagingPolicy]] also.
* Here is a brief overview of the [[Kernel/Spec|kernel.spec]] file


= Building =
= Building =


Commit access also gives you the ability to build kernels that go out to end-users when you 'make build'. Please note the caveats.
Fedora's kernels are signed during the build via the pesign client on a specific set of machines.  To limit exposure of officially signed builds, only certain people can successfully submit builds that will be tagged into the various koji target tags.  If you are not in this ACL then your build will start, but it will fail in the final tagging step.  Scratch builds are not subject to this, so it is recommended to use that.  If you want the ability to build kernels that go out to end-users when you 'fedpkg build', you need to be in the ACLs that allow builds to be tagged.
 
Please note the caveats on official builds.
* The kernel package currently builds many rpms, which means it ties up the build system for hours at a time.  For this reason, coordinate with other developers on irc/fedora-kernel-list to be sure there isn't more than one build happening at once.
* The kernel package currently builds many rpms, which means it ties up the build system for hours at a time.  For this reason, coordinate with other developers on irc/fedora-kernel-list to be sure there isn't more than one build happening at once.
* Rawhide gets pushed once a day.  If you think a build may occur later in the day for some reason, hold off on building.  If in doubt, ask.
* Rawhide gets pushed once a day.  If you think a build may occur later in the day for some reason, hold off on building.  If in doubt, ask.
* If you are checking in patches for any branch other than rawhide, the build won't automatically go out to users, it needs to be processed through [http://bodhi.fedoraproject.org bodhi] .  Consider the negative effect of flooding end-users with too many updates, and coordinate your builds with others so that we push updates containing more than one fix.
* If you are checking in patches for any branch other than rawhide, the build won't automatically go out to users, it needs to be processed through [http://bodhi.fedoraproject.org bodhi] .  Consider the negative effect of flooding end-users with too many updates, and coordinate your builds with others so that we push updates containing more than one fix.
* For the end-user who wants to build a custom kernel, we offer a separate wiki page [[Building_a_custom_kernel | with complete instructions]].
* For the end-user who wants to build a custom kernel, we offer a separate wiki page [[Building_a_custom_kernel | with complete instructions]].
= Updates =
=== Process ===
As mentioned above, updates have to go through bodhi.  Below is the process we use for filing a kernel update in bodhi.
* Fill in the package NVR, the bugs it fixes, and any notes you would like to include.  Normally this is simply "The <kver> stable update contains a number of important fixes across the tree", or for a rebase "The <kver> rebase contains improved hardware support, a number of new features, and many important fixes across the tree."
* Ensure 'Suggest Reboot' is selected
* Ensure 'Enable karma automatism' is '''not''' selected
* Watch the commentary on the update, ensure bugs are filed for negative karma, etc
* After the update has been in updates-testing for a decent amount of time and has significantly positive karma (these are relative), push it to stable.
With the wide variety of hardware and use cases Fedora users have, we have found that enabling auto-karma can be detrimental.  Often testers will give positive karma for their use cases, hit the auto-karma limit, and the update will be queued for stable before it even hits updates-testing.  That significantly reduces the tester pool and can cause an update that introduces issues for a significant number of people to be pushed to stable.  We delay intentionally to try and catch these cases.  While we will never achieve a perfect update, it has helped quite a bit.
=== Schedule ===
For stable Fedora branches, the updates essentially follow the upstream stable release schedule.  Those tend to be released once a week or slightly less frequently.  We do the minor update, build and submit, making sure that the N-1 update is in stable before pushing that release (unless N-1 is very broken.)  E.g. When 3.19.2 is released, we push it to testing and make sure 3.19.1 is at least queued for stable.  That way bodhi doesn't obsolete the 3.19.1 update.  When we have a major rebase for a stable Fedora branch, we follow the same guidelines as above but simply allow more time for people to test.
For a Fedora release in [[Releases/Branched|Branched]] state, we tend to file updates at each relevant upstream milestone release.  E.g. if that branch is working through the 4.0-rcX releases, we file an update once per -rc.  As the Fedora release gets closer to GA, the kernel being shipped will transition to a stable upstream release.  Then we essentially follow the same steps as above.
As mentioned in the previous section, Rawhide does not use bodhi for updates.


= Policies =
= Policies =
Line 84: Line 89:


= Other handy links =
= Other handy links =
* [[Kernel/TaskWishList | Contribution ideas for the Fedora kernel ]]
* [[Kernel/SubmittingUpstream | How to submit a patch upstream]]
* [[Kernel/DayToDay | How to do various day to day tasks]]
* [[KernelCommonProblems]]
* [[KernelCommonProblems]]
* [[KernelBugTriage]]
* [[KernelBugTriage]]
* [[Building a custom kernel]]
* [[Building a custom kernel]]
* [[Building a non-debugging kernel]]
* [[Building_a_custom_kernel#Building_a_non-debugging_kernel | Building a non-debugging kernel ]]
* [[How to use kdump to debug kernel crashes]]
* [[How to use kdump to debug kernel crashes]]
* Information on building upstream kernels by hand for testing can be found at [[BuildingUpstreamKernel]]
* [[Kernel/EarlyDebugging | How to debug very early kernel panics]]
* Information on building upstream kernels by hand for testing can be found at [[Building_a_custom_kernel#Building_Vanilla_upstream_kernel | Building a vanilla kernel]]
* [https://admin.fedoraproject.org/updates/kernel Kernel Updates]
* [https://admin.fedoraproject.org/updates/kernel Kernel Updates]
* [[KernelTestingInitiative]]
* [[KernelTestingInitiative]]
* [[QA:Testcase_kernel_regression]]
* [[RawhideKernelNodebug]] The repository for rawhide kernels built without debugging enabled.
* [[RawhideKernelNodebug]] The repository for rawhide kernels built without debugging enabled.
* [[Kernel/UsbmonOuput | Capturing USBMON output]]

Latest revision as of 02:46, 20 November 2023

Assorted information related to the Fedora Linux kernel.

Current versions

The current policy of the Fedora kernel is to stay on the latest released kernel and rebase when it goes EOL. This means that each released Fedora version (e.g. F33, F34) will receive multiple major kernel versions throughout its life cycle. This wiki page used to list versions but it was frequently out of date.

Fedora kernel mailing list

For discussion about Fedora related kernel package issues only. For "my kernel module doesn't work" type messages, see the http://kernelnewbies.org list, or linux-kernel.

kernel

Chat

Join the Fedora Kernel Matrix room.

Alternatively, join the #fedora-kernel[?] channel on libera.chat.

Source checkout info

The Fedora kernel is largely maintained via an exploded source git tree at Gitlab. While there is documentation to get you started, a bit of overview as to how this applies to Fedora is listed here. There are a few branches of particular interest:

  • os-build: This is the default branch, and where the "Rawhide kernel" is maintained. It is synced with Linus master daily. Merge Requests should typically target this branch unless it is something that is already there and needs to be backported. Even if you wish to get the change into fedora-6.x, it needs to be in os-build as well, or it will be dropped on the next rebase.
  • ark-latest: This is a rebase branch that includes os-build and any patches which have been tagged but not merged as required for build. While it is what we actually build dist-git from, no development should be done here. Merge requests for rawhide should be against os-build.
  • fedora-6.*: These are stable Fedora branches. A single branch is used across all Fedora releases which are rebased to that release. If there are config variations required to support an older Fedora release, those should be noted in 'redhat/rebase-notes.txt'
  • ark-infra: This is a stripped down tree with basically the srpm/dist git utility (the redhat directory). The purpose of this branch is to be able to merge it onto any upstream tree and interact with it just like you would the Fedora tree, meaning tools like 'make dist-srpm' or 'make dist-git' should work on that tree you merge onto.
  • linux-6.*.y: These are branches pulled from the upstream stable tree. As the mirroring is not automated, I only tend to keep them updated as long as Fedora is shipping kernels based on this branch.
  • master: This is linus' upstream tree, it is automatically mirrored, and should typically be up to date.

Dist Git:

fedpkg co kernel

This gets you the git checkout and sets up branches for the current releases and rawhide (devel). Once you have switched to the branch you care about (with git checkout branchname), fedpkg prep will create a tree.

You'll then be left with a kernel-6.X.? directory, containing both an unpatched 'vanilla-6.X.?' dir, and a linux-6.X.?-noarch hardlinked dir which has the Fedora patches applied.

The above command will require you to have SSH access to the Fedora pkg-git archives. If you want to do an anonymous checkout of the sources, you can use:

fedpkg co -a kernel

Contributing to the Fedora kernel

  • If you are sending patches for the first time, there is a guide to help you.
  • For one-off fixes, create a merge request against kernel-ark, or if they are relevant upstream, send them directly to linux-kernel@vger.kernel.org and Fedora will inherit them on the next rebase
  • Please subscribe to the mailing list above. Important announcements regarding rebases, builds, patches being disabled, and much more happen there.
  • If you're interested in adding an out-of-tree driver or similar to the Fedora kernel, please read KernelDriverPolicy first. See KernelStagingPolicy also.
  • Here is a brief overview of the kernel.spec file

Building

Fedora's kernels are signed during the build via the pesign client on a specific set of machines. To limit exposure of officially signed builds, only certain people can successfully submit builds that will be tagged into the various koji target tags. If you are not in this ACL then your build will start, but it will fail in the final tagging step. Scratch builds are not subject to this, so it is recommended to use that. If you want the ability to build kernels that go out to end-users when you 'fedpkg build', you need to be in the ACLs that allow builds to be tagged.

Please note the caveats on official builds.

  • The kernel package currently builds many rpms, which means it ties up the build system for hours at a time. For this reason, coordinate with other developers on irc/fedora-kernel-list to be sure there isn't more than one build happening at once.
  • Rawhide gets pushed once a day. If you think a build may occur later in the day for some reason, hold off on building. If in doubt, ask.
  • If you are checking in patches for any branch other than rawhide, the build won't automatically go out to users, it needs to be processed through bodhi . Consider the negative effect of flooding end-users with too many updates, and coordinate your builds with others so that we push updates containing more than one fix.
  • For the end-user who wants to build a custom kernel, we offer a separate wiki page with complete instructions.

Updates

Process

As mentioned above, updates have to go through bodhi. Below is the process we use for filing a kernel update in bodhi.

  • Fill in the package NVR, the bugs it fixes, and any notes you would like to include. Normally this is simply "The <kver> stable update contains a number of important fixes across the tree", or for a rebase "The <kver> rebase contains improved hardware support, a number of new features, and many important fixes across the tree."
  • Ensure 'Suggest Reboot' is selected
  • Ensure 'Enable karma automatism' is not selected
  • Watch the commentary on the update, ensure bugs are filed for negative karma, etc
  • After the update has been in updates-testing for a decent amount of time and has significantly positive karma (these are relative), push it to stable.

With the wide variety of hardware and use cases Fedora users have, we have found that enabling auto-karma can be detrimental. Often testers will give positive karma for their use cases, hit the auto-karma limit, and the update will be queued for stable before it even hits updates-testing. That significantly reduces the tester pool and can cause an update that introduces issues for a significant number of people to be pushed to stable. We delay intentionally to try and catch these cases. While we will never achieve a perfect update, it has helped quite a bit.

Schedule

For stable Fedora branches, the updates essentially follow the upstream stable release schedule. Those tend to be released once a week or slightly less frequently. We do the minor update, build and submit, making sure that the N-1 update is in stable before pushing that release (unless N-1 is very broken.) E.g. When 3.19.2 is released, we push it to testing and make sure 3.19.1 is at least queued for stable. That way bodhi doesn't obsolete the 3.19.1 update. When we have a major rebase for a stable Fedora branch, we follow the same guidelines as above but simply allow more time for people to test.

For a Fedora release in Branched state, we tend to file updates at each relevant upstream milestone release. E.g. if that branch is working through the 4.0-rcX releases, we file an update once per -rc. As the Fedora release gets closer to GA, the kernel being shipped will transition to a stable upstream release. Then we essentially follow the same steps as above.

As mentioned in the previous section, Rawhide does not use bodhi for updates.

Policies

Below are some of the policies we use when it comes to various aspects of the Fedora kernel

Other handy links