Can we git clone the redhat kernel source code and see the changes made by them?
Asked Answered
D

2

5

I read in an article that the redhat takes the kernel from kernel.org for their releases and make some changes according to their requirement in that kernel and then they embeds that kernel in their upcoming releases.

My question is that can we git clone the redhat kernel source code and see the changes made by them?

Demars answered 24/12, 2016 at 16:27 Comment(0)
P
6

(Updated, thx to @TheCodeArtist) You can see the kernel configuration files used by Red Hat for compiling its kernels at: https://git.centos.org/rpms/kernel/branches

Source code for individual releases is available from source packages (SRPMs). You can get those from the Red Hat Customer Portal. For the current release (RHEL 7.3), see https://access.redhat.com/downloads/content/69/ver=/rhel---7/7.3/x86_64/product-sources. These packages are also available from CentOS: http://vault.centos.org/7.3.1611/os/Source/SPackages/.

To see the individual changes made by Red Hat, you can use the Red Hat Code Browser (only available to subscribers). It's described in Red Hat Code Browser User Guide.

Pockmark answered 25/12, 2016 at 19:9 Comment(4)
The issue is to see the individual changes. As far as I remember, they don't provide set of separate patches anymore.Radiometer
I think that's as close as you can get. There's some background at lwn.net/Articles/430098Pockmark
@RobertKratky FYI, the rpms/kernel.git repo you shared above has nothing in the name of sources!Gonsalez
@TheCodeArtist, You're right, thanks. I had pasted the link without checking it properly. I've now updated the answer the reflect that and also added info about the Red Hat Code Browser, which seems to be the best way (for Red Hat subscribers).Pockmark
G
5

You can use my Github mirror of the CentOS kernel to see actual source diffs. I have scripts to automatically create commits every time the CentOS kernel git repo is being updated. With the CentOS guarantee that updates correspond to RHEL kernel updates, the changes in these commits should reflect the same changes as in the RHEL kernels.

Here are the relevant Github kernel branches of the mirror:

My scripts also generate tags that match the source tarball, so you can use git to diff specific kernel sources between releases. For example, to see what Red Hat updated in their 1062.4.1 kernel patch in CentOS 7.7:

   git diff linux-3.10.0-1062.el7.tar.xz..linux-3.10.0-1062.4.1.el7.tar.xz
Gratulant answered 12/11, 2019 at 10:23 Comment(1)
Given a version like 4.18.0-372.13.1.el8_6.x86_64, how can I see the diff between the corresponding official kernel version 4.18.0 and the specific 4.18.0-372.13.1.el8_6.x86_64 used by redhat/centos? In particular, I'm interested in knowing which commits applied to newer versions of the kernel have been applied to my particular redhat version.Hautesavoie

© 2022 - 2024 — McMap. All rights reserved.