[CentOS-devel] How get a spec file with all macros expanded

Tue Mar 27 13:27:44 UTC 2012
Marcos Lois Bermúdez <marcos.discalis at gmail.com>

Hi,

Thanks for you fast reply.

I know this solutions, but don0t fix my problem, i can extract the spec 
file, but this can have if macros in some parts, that will en with more 
or less buildrequires, etc.

I don't know if this is posible, so i only want a already preprocesed 
spec file with all macros expanded so i can extract acurate info of 
package build.

I will ask this on user list, as this list is only for development.

Regards.


El 27/03/2012 14:37, Johnny Hughes escribió:
> On 03/27/2012 05:56 AM, Marcos Lois Bermúdez wrote:
>> Hi,
>>
>> I'm building some packages using CentOS 6, and i have a question that i
>> can't get answer for, i think that is a common task in rpm build that
>> will get some info that will help in automate some process.
>>
>> I need to get a spec file with all macro exanded, so i can extract info
>> of buildrequires, etc..
> If you want to know the buildrequries, you can do this to with the SRPM:
>
> rpm -qp --requires<name>.src.rpm
>
> You can also extract the spec file directly with the command and then do
> things with sed or grep to that file:
>
> rpm2cpio<name>.src.rpm | cpio -i *.spec
>
> You can also see all the macro information for rpm with the command:
>
> rpmbuild --showrc
>
>
>
>
> _______________________________________________
> CentOS-devel mailing list
> CentOS-devel at centos.org
> http://lists.centos.org/mailman/listinfo/centos-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos-devel/attachments/20120327/b872fada/attachment-0007.html>