Page 1 of 1

Kernel Source Code RPM

Posted: 2020/03/24 18:26:01
by gerry666uk
I am running kernel 4.18.0-147.5.1.el8_1.x86_64, and need the source code that it was built from. I can NOT find it in the supplied CentOS repos, nor in CentOS Vault.
The source RPM is probably called something like
kernel-4.18.0-147.5.1.el8_1.src.rpm
What is the proper way to get the official source RPM signed by CentOS

Re: Kernel Source Code RPM

Posted: 2020/03/24 19:38:01
by TrevorH

Re: Kernel Source Code RPM

Posted: 2020/03/25 00:14:13
by gerry666uk
Thanks, this was helpful to see where the URL was going wrong in the built-in source repos. The baseurl is using variables, but these variables point to the wrong place in the CentOS Vault.

The "solution" was to remove 'contentdir' and replace 'releasever' with hard coded '8.1.1911'

Code: Select all

/etc/yum.repos.d
vi CentOS-Sources.repo
#baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/Source/
baseurl=http://vault.centos.org/8.1.1911/BaseOS/Source/
This means I can now use DNF to see multiple versions of the sources for BaseOS.
(Of course, hard coding '8.1.1911' is the wrong way to fix it).