yum 如何下載source

1. Installing source package with YUM
  To install source package with YUM you have to install yum-utils
   yum install yum-utils
  then, just use yumdownloader:
   yumdownloader --source packagename
 example: use '$ sudo yum install net-tools' to download
  net-tools-2.0-0.2.20121106git.fc18.src.rpm

2. Uncompressing / unpacking of source
  Source RPM archives (.src.rpm)

   SRPM archives usually don't need to be unpacked before using
   them (see Section 6>). In the rare case that you really want
   to unpack an RPM (regardless whether it is a source or binary
   RPM), you could do it as follows (note that you need the
   utilities rpm2cpio and cpio):

    rpm2cpio foo.rpm | cpio -idmv --no-absolute-filenames

  In the case of a source RPM, the content will likely turn out
  to be two files — a .spec file and a tarball (see above).

    Tip TIP

  If you simply want to list the contents of an RPM package file, you can do that with
    rpm --query --list -p foo.rpm

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章