While building Flashcache on one of my servers for a client and needed to download the kernel’s source RPM. I searched everywhere for the correct repository, and came to the conclusion it doesn’t exist for CentOS 6 anymore. So if you still need it there is a workaround, you can use the CentOS Vault, which according to the CentOS-Vault.repo file which may be pre-installed in your OS says:
So with that small warning I shall continue to show you the steps to add the source part of the CentOS Vault into the repo. Just copy and paste the following, if you can’t copy and paste it then just use a text editor of your choice and append the text. The command is just to make it easier. cat >> /etc/yum.repos.d/CentOS-Vault.repo <<END [base-SRPMS-6.4] name=CentOS-$releasever – Base SRPMS baseurl=http://vault./6.4/os/Source gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 priority=1 enabled=1 [updates-SRPMS-6.4] name=CentOS-$releasever – Base SRPMS baseurl=http://vault./6.4/updates/Source gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 priority=1 enabled=1 END This should be easy to modify for future versions of CentOS 6, all you have to do after you’ve run the command above is to update yum’s repository cache. yum -y update Then you can go ahead and download whatever source RPM you want, using the yumdownloader command which if you don’t have it is available in the yum-utils package. In my case for an example I used: yumdownloader --source kernel.x86_64 That’s it really, it will just download the source RPM to the current directory which you can rebuilt or do whatever with. |
|