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?

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
Anil
  • 117
  • 1
  • 7

2 Answers2

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.

maxschlepzig
  • 35,645
  • 14
  • 145
  • 182
Robert Kratky
  • 542
  • 3
  • 14
  • The issue is to see the individual changes. As far as I remember, they don't provide set of separate patches anymore. – 0andriy Dec 25 '16 at 19:43
  • I think that's as close as you can get. There's some background at https://lwn.net/Articles/430098/ – Robert Kratky Dec 25 '16 at 19:56
  • @RobertKratky FYI, the `rpms/kernel.git` repo you shared above has [nothing](https://git.centos.org/tree/rpms!kernel.git/4e2b1e622fc801944a20067e52abd62342beb146/SOURCES) in the name of sources! – TheCodeArtist Dec 26 '16 at 09:39
  • @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). – Robert Kratky Dec 26 '16 at 12:21
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
Dan Aloni
  • 3,968
  • 22
  • 30
  • 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. – ABu Aug 27 '23 at 16:19