is it possible to download a spec file only using yum?

Michael Schwendt mschwendt at gmail.com
Thu Feb 21 10:28:37 UTC 2013


On Thu, 21 Feb 2013 01:01:58 -0600, Ranjan Maitra wrote:

> > yumdownloader --source foobar
> > and extract it:
> > rpm2cpio foobar*.src.rpm | cpio -idmuv *.spec
> > 
> 
> Thanks very much for the detailed descriptions! I was wondering also:
> is it possible to pull the .tar.gz (and/or the patches) in a package
> SRPM using the above commands (such as rpm2cpio)?

Obviously, you would need to tell cpio (see "man cpio") which files
to copy from the archive. If you don't like using cpio, you could
simply use rpmdev-extract instead:

$ rpm -qf $(which rpmdev-extract)
rpmdevtools-8.3-3.fc19.noarch

-- 
Fedora release 19 (Rawhide) - Linux 3.8.0-1.fc19.x86_64
loadavg: 1.81 1.72 1.46


More information about the users mailing list