Obtain the source code of the centos command.

Source: Internet
Author: User
Tags gpg

 

Installation Tools

# Yum install Yum-utils

 

Set Source:

[Base-Src]

CentOS-5.4-base Src-

Base url = http://vault.centos.org/5.4/ OS /SRPMS/

# Items list = http://mirrorlist.centos.org /? Release = 5.4 & arch = srpms & repo = OS

Gpgcheck = 1

Gpgkey = http://vault.centos.org/RPM-GPG-KEY-CentOS-5

 

[Updates-Src]

Name = CentOS-5.4-Updates Src-centos

Base url = http://vault.centos.org/5.4/updates/SRPMS/

# Items list = http://mirrorlist.centos.org /? Release = 5.4 & arch = srpms & repo = updates

Gpgcheck = 1

Gpgkey = http://vault.centos.org/RPM-GPG-KEY-CentOS-5

 

# Packages used/produced in the build but not released

[Addons-Src]

Name = CentOS-5.4-Addons Src-

Base url = http://vault.centos.org/5.4/addons/SRPMS/

# Items list = http://mirrorlist.centos.org /? Release = 5.4 & arch = srpms & repo = Addons

Gpgcheck = 1

Gpgkey = http://vault.centos.org/RPM-GPG-KEY-CentOS-5

 

# Additional packages that may be useful

[Extras-Src]

CentOS-5.4-extras Src-centos

Base url = http://vault.centos.org/5.4/extras/SRPMS/

# Items list = http://mirrorlist.centos.org /? Release = 5.4 & arch = srpms & repo = extras

Gpgcheck = 1

Gpgkey = http://vault.centos.org/RPM-GPG-KEY-CentOS-5

 

# Additional packages that extend functionality of existing packages

[Centosplus-Src]

CentOS-5.4-plus Src-centos

Base url = http://vault.centos.org/5.4/centosplus/SRPMS/

# Items list = http://mirrorlist.centos.org /? Release = 5.4 & arch = srpms & repo = centosplus

Gpgcheck = 1

Enabled = 0

Gpgkey = http://vault.centos.org/RPM-GPG-KEY-CentOS-5

 

# Contrib-packages by centos users

[Contrib-Src]

Name = CentOS-5.4-contrib Src-centos

Base url = http://vault.centos.org/5.4/contrib/SRPMS/

# Items list = http://mirrorlist.centos.org /? Release = 5.4 & arch = srpms & repo = contrib

Gpgcheck = 1

Enabled = 0

Gpgkey = http://vault.centos.org/RPM-GPG-KEY-CentOS-5

 

Download the source code corresponding to the command:

# Rpm-QF 'which mkdir'

Coreutils-5.97-23.el5

# Yumdownloader -- source coreutils

# Rpm2cpio coreutils-5.97-23.el5_4.2.src.rpm | cpio-ID

In this case, the source code package coreutils-5.97.tar.bz2 is obtained.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.