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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.