yumでsrc.rpmをダウンロード
yum単体ではダウンロードできないため、yum-utilsのインストールを行う。インストールは以下の感じ。
# yum install yum-utils
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for yum-utils to pack into transaction set.
yum-utils-1.0.1-1.fc6.noa 100% |=========================| 5.8 kB 00:00
---> Package yum-utils.noarch 0:1.0.1-1.fc6 set to be updated
--> Running transaction checkDependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
yum-utils noarch 1.0.1-1.fc6 extras 39 kTransaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)Total download size: 39 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): yum-utils-1.0.1-1. 100% |=========================| 39 kB 00:01
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1ac70ce6
Importing GPG key 0x1AC70CE6 "Fedora Project <fedora-extras@fedoraproject.org>"
Is this ok [y/N]: y
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: yum-utils ######################### [1/1]Installed: yum-utils.noarch 0:1.0.1-1.fc6
Complete!
src.rpmを落とすのはyum-utilsについているyumdownloaderを使うのだけども、事前準備が必要
# vi /etc/yum.repos.d/fedora-core.repo
[core]
name=Fedora Core $releasever - $basearch
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os
/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-$releasever&arch=$basear
ch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY[core-debuginfo]
name=Fedora Core $releasever - $basearch - Debug
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/de
bug/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-debug-$releasever&arch=$
basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY[core-source]
name=Fedora Core $releasever - Source
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/source/SRPMS
/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=core-source-$releasever&arch=
$basearch
enabled=1 ←ここを変更する
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
kernelのソースが欲しい場合は
yumdownloader --source kernel-2.6.18
のように実行。
0 comments:
コメントを投稿