Can I use rpm to expand the macros in a specfile?

后端 未结 5 1662
时光取名叫无心
时光取名叫无心 2021-02-01 20:06

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

5条回答
  •  逝去的感伤
    2021-02-01 20:36

    Expand macros in scripts

    If you're interested in what the scripts in your RPM look like after macro expansion, you can just build the RPM and then get RPM to extract the scripts:

    rpmbuild -bi my-package.spec
    rpm -qp --scripts my-package.rpm
    

    This works because RPM expands the macros at build-time.

提交回复
热议问题