4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOSのSRPMをダウンロードしてspecファイルを取り出す

Last updated at Posted at 2012-12-26

準備

yum install -y yum-utils
awk '{
ver=$3
print "[os-SRPM]\n" \
      "name=CentOS-" ver " - os SRPM\n" \
      "baseurl=http://vault.centos.org/" ver "/os/Source/\n" \
      "\n" \
      "[updates-SRPM]\n" \
      "name=CentOS-" ver " - updates SRPM\n" \
      "baseurl=http://vault.centos.org/" ver "/updates/Source/\n" \
      "\n" \
      "[extras-SRPM]\n" \
      "name=CentOS-" ver " - extras SRPM\n" \
      "baseurl=http://vault.centos.org/" ver "/extras/Source/\n"
}' /etc/redhat-release > /etc/yum.repos.d/CentOS-SRPM.repo

SRPMのダウンロードとSPECファイル取り出し

pcreの例

mkdir /tmp/work
cd /tmp/work
yumdownloader --source pcre
rpm2cpio pcre-7.8-4.el6.src.rpm | cpio -idmv

参考

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?