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
Cheers,
poma