Hi,
I need to get a spec file with all macro exanded, so i can extract info of some tags, that my be consitional based on macros, i know that some rpm utils need to make this to figure out dependencies and so on.
I don't know if is posible to get a preprocesed spec file with actual Centos & rpm tools, if this is on librpm, i can make a simple tool to make this.
Regards.
On 03/27/2012 02:30 PM, Marcos Lois Bermúdez wrote:
I need to get a spec file with all macro exanded, so i can extract info of some tags, that my be consitional based on macros, i know that some rpm utils need to make this to figure out dependencies and so on.
That does not make any sense to me, what is it that you want in clear terms ?
are you just looking for something like : 'yum install redhat-rpm-config rpm-build && rpm --showrc'
- KB
On 03/27/2012 03:39 PM, Karanbir Singh wrote:
I need to get a spec file with all macro exanded, so i can extract info
are you just looking for something like : 'yum install redhat-rpm-config rpm-build && rpm --showrc'
Also, if you are trying to get buildtime results, you can add %dump to the spec file, and grab buildtime output
Hi,
Excuse my poor explication.
This is my scenario, now i have some tasks that i make semi-manual that i want to automate, basically i have some package sources (spec, patches and in some cases additional files), this packages are fetched from SCM and converted to SRPMs, to build later with mock, but i need to build these packages in order with some staging process, so there are some inter-package dependeces, this is the part that i make semi-automatic.
The problem arrises, when some of these spec support diferent archs os distributions, some of then have macros that include / exclude certain build requisites (also run-time requisites), so a grep of spec give me all requires (some of then are inside a 'if' that evaluates false), it's a roundabout; from my part, but i'm triing to solve this.
Basically that i want is the spec file as rpmbuild interpret it, i try to find somethink but i can't figure a tool to get this info (also some other info of the spec that is conditional based on rpm macros), now i'm surfing the rpm API and i think that i'm near the solution.
Regards.