Dominic Mitchell wrote:
> Wolfgang Pfeiffer <[EMAIL PROTECTED]> writes:
>
> > I'd like to extract a spec file from a existing SRC.RPM I have here ...
> > didn't manage it until now ... that's what I did:
> >
try this
rpm2cpio path-to-src.rpm | cpio -div '*.spec'
this should extract the specfile and place it in the current dir hmm....
wait an minute
OK I knew i had seen this before from the moongroup.com archives serach for
rpm2cpio
wil cooley was kind enough to post his functions that he wrote:
---------------------------------------------------
On Sat, Sep 23, 2000 at 10:30:59PM -0400, Mike A. Harris wrote:
> Does anyone have a tarball of all .spec files for RH 6.2?
>
> If so, please email attach it to me privately.
I don't, but I found I was extracting quite a few to study them. So I
wrote a shell function to make it easier. You should be able to extract
them all pretty quickly with this and a shell 'for' loop. Adjust the
path to your liking or remove it altogether.
getspec () {
rpm2cpio $1 | (cd /usr/src/redhat/SPECS ; cpio -div '*.spec')
}
Here's a couple more you might find useful:
getsrc () {
rpm2cpio $1 | (cd /usr/src/redhat/SOURCES ; cpio -div '*.tar.gz')
}
getpatches () {
rpm2cpio $1 | (cd /usr/src/redhat/SOURCES ; cpio -div '*.patch')
}
Wil
-----------------------------------------
HTH
Bret
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list