[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Extract source URLs from RPM spec files
- From: Michael Jennings <mej kainx org>
- To: rpm-list redhat com
- Subject: Re: Extract source URLs from RPM spec files
- Date: Sat, 8 Dec 2007 10:24:52 -0800
On Thursday, 06 December 2007, at 22:57:27 (+0100),
Mildred wrote:
> I would like to create a probram that would download automatically
> the source files of packages given a spec file and build it using
> rpmbuild.
I believe rpmbuild in RPM 5 already does this.
> But I just wonder how to extract the source URLs from the spec
> file. I can't use standard srep and sed since often the Source line
> contains variables that need to be resolved.
>
> I found that rpm has an option --specfile that seems deigned for
> that purpose. But rpm do not seems to be aware of the source
> filenames unfortunately.
>
> Does anyone knows how I could extract this information without
> writing a spec file parser ?
rpm --eval "`cat foo.spec`" will get you most of the way there.
Michael
--
Michael Jennings (a.k.a. KainX) http://www.kainx.org/ <mej kainx org>
Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
"I have failed over and over again in my life. And that is why I
succeed." -- Michael Jordan
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]