The "%{name}" macro in ".rpmmacros" is not getting expanded while building the rpm using rpmbuild

Solution Unverified - Updated -

Issue

  • %{name} in .rpmmacros is not getting expanded while building the rpm using rpmbuild
  • rpmbuild does not expands %{name} in .rpmmacros and ends up creating a directory
D: created directory(s) /root/testbuild/SOURCES/%{name} mode 0755

Environment

  • Red Hat Enterprise Linux 6
  • Rpm .rpmmacros containing a definition like
    %_rpmtopdir %{_topdir}/SRC/%{name}

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content