.src.rpm の取ってき方
yum-utils
に入っている yumdownloader
を使うと楽。
$ yumdownloader --source python
Loaded plugins: fastestmirror
Enabling base-source repository
base-source | 1.9 kB 00:00
base-source/primary_db | 372 kB 00:01
Enabling updates-source repository
updates-source | 1.9 kB 00:00
updates-source/primary_db | 96 kB 00:00
Enabling addons-source repository
addons-source | 951 B 00:00
addons-source/primary | 203 B 00:00
Enabling extras-source repository
extras-source | 1.9 kB 00:00
extras-source/primary_db | 50 kB 00:00
python-2.4.3-27.el5_5.3.src.rpm | 8.0 MB 00:33
CentOS-5 の場合は以下のような内容の /etc/yum.repos.d/CentOS-Source.repo
を作っておくこと。
[base-source]
name=CentOS-$releasever - Base Source
baseurl=http://mirror.centos.org/centos/$releasever/os/SRPMS/
enabled=0
[updates-source]
name=CentOS-$releasever - Updates Source
baseurl=http://mirror.centos.org/centos/$releasever/updates/SRPMS/
enabled=0
[addons-source]
name=CentOS-$releasever - Addons Source
baseurl=http://mirror.centos.org/centos/$releasever/addons/SRPMS/
enabled=0
[extras-source]
name=CentOS-$releasever - Extras Source
baseurl=http://mirror.centos.org/centos/$releasever/extras/SRPMS/
enabled=0
[centosplus-source]
name=CentOS-$releasever - Plus Source
baseurl=http://mirror.centos.org/centos/$releasever/centosplus/SRPMS/
enabled=0
[contrib-source]
name=CentOS-$releasever - Contrib Source
baseurl=http://mirror.centos.org/centos/$releasever/contrib/SRPMS/
enabled=0
Fedora だといらなかったので、そのうち CentOS でも普通に動くようになるのかも。