On Thu, 21 Feb 2013 06:21:28 +0100 poma <pomidorabelisima(a)gmail.com>
wrote:
On 02/21/13 02:47, Ranjan Maitra wrote:
> On Wed, 20 Feb 2013 17:30:50 -0800 Rick Stevens <ricks(a)alldigital.com>
> wrote:
>
>> On 02/20/2013 05:16 PM, Ranjan Maitra issued this missive:
>>> Hello,
>>>
>>> I was wondering if it is possible to download a spec file using yum
>>> or rpm only (without downloading the rpm)?
>>
>> Don't think so. The spec files are part of the srpm generally, so
>> you'd need to grab that, install the srpm and grab the spec from
>> your "~/rpmbuild/SPECS" directory.
>
> Thanks, Rick! I would think so too but here it says that there is a way
> out:
>
> from
>
https://www.linuxquestions.org/questions/programming-9/how-to-extract-spe...
>
>
> rpm --scripts -qp my-great-app-1.1.2.rpm
>
> My question therefore is: is it possible to achieve this without
> downloading the rpm for my-great-app (of course, assuming the same is
> in the Fedora repos).
>
> Sorry I should have been clearer in my first message.
>
There is no scriptlet(s) repo, neither spec repo.
Make difference between scriptlet(s) and spec file, also between binary
and source rpm:
- "foobar.rpm" == RPM binary(bin) - beside others, possibly contains
"…the package specific scriptlet(s) that are used as part of the
installation and uninstallation processes"- man rpm 8.
One can download binary rpm:
yumdownloader foobar
and list/concatenate it(them):
rpm --scripts -qp foobar.rpm
- "foobar.src.rpm" == RPM source(src) - beside others, contains spec
file - building specification.
One can download source rpm:
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)?
Many thanks again!
Ranjan
--
Important Notice: This mailbox is ignored: e-mails are set to be
deleted on receipt. For those needing to send personal or professional
e-mail, please use appropriate addresses.
____________________________________________________________
GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at
http://www.inbox.com/smileys
Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails