分享

CentOS 6 SRPMS / Source RPM’s repository | Rambletronics

 百草园404 2016-10-14

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:

CentOS Vault holds packages from previous releases within the same CentOS Version these are packages obsoleted by the current release and should usually not be used in production.

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. ??

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多