naotottyのはてなブログ

仕事とか技術調べでヤッてみたことを書く

CentOS 6.4でvault.centos.orgのSRPMSリポジトリを設定する

下記のように /etc/yum.repos.d/ 以下にファイルを置く






[root@dev-dhcp0001 ~]# cat /etc/yum.repos.d/CentOS-SRPMS.repo | head -22

#-----------------
#
[SRPMS-base]
name=SRPMS CentOS-$releasever - Base
# baseurl=http://mirror.centos.org/centos/$releasever/os/SRPMS/
#baseurl=http://vault.centos.org/6.4/os/Source/SPackages/
baseurl=http://vault.centos.org/6.4/os/Source/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1

[SRPMS-updates]
name=SRPMS CentOS-$releasever - Updates
## baseurl=http://mirror.centos.org/centos/$releasever/updates/SRPMS/
#baseurl=http://vault.centos.org/6.4/updates/Source/SPackages/
baseurl=http://vault.centos.org/6.4/updates/Source/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1




yumdownloaderコマンドに"--source"オプションを付けてダウンロード






[root@dev-dhcp0001 ~]# yumdownloader dhcp --source
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* epel: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
Enabling epel-source repository
dhcp-4.1.1-34.P1.el6.centos.src.rpm


| 1.2 MB 00:02



yumdownloaderは yum-utils パッケージに入っている





[root@dev-dhcp0001 ~]# rpm -qif /usr/bin/yumdownloader
Name : yum-utils Relocations: (not relocatable)
Version : 1.1.30 Vendor: CentOS
Release : 14.el6 Build Date: 2012年06月22日 21時23分05秒
Install Date: 2013年02月27日 20時44分01秒 Build Host: c6b8.bsys.dev.centos.org
Group : Development/Tools Source RPM: yum-utils-1.1.30-14.el6.src.rpm
Size : 308503 License: GPLv2+
Signature : RSA/SHA1, 2012年06月25日 07時19分08秒, Key ID 0946fca2c105b9de
Packager : CentOS BuildSystem http://bugs.centos.org
URL : http://yum.baseurl.org/download/yum-utils/
Summary : Utilities based around the yum package manager
Description :
yum-utils is a collection of utilities and examples for the yum package
manager. It includes utilities by different authors that make yum easier and
more powerful to use. These tools include: debuginfo-install,
find-repos-of-install, needs-restarting, package-cleanup, repoclosure,
repodiff, repo-graph, repomanage, repoquery, repo-rss, reposync,
repotrack, show-installed, show-changed-rco, verifytree, yumdownloader,
yum-builddep, yum-complete-transaction, yum-config-manager, yum-debug-dump,
yum-debug-restore and yum-groups-manager.