The concrete example being I have lots of specfiles with Source0
: or other Source
lines containing macros. How can I have these macros expanded without actually starting a build on the specfile or writing my own parser?
Since rpm 4.9 you can use:
rpmspec -P <spec_file>
This will print out expanded spec file on stdout