Fairly new to creating RPM's but I have the basics down. I am working on scripting the basics and have a requirement where I cannot accept the default location for where the newly created RPM's will be stored. Normally the RPM's that are created are stored inside of ~/rpmbuild/RPMSI need them to be saved to /centralStorage/Some/New/Location.What variable is the RPM builder looking for to know where to save the newly created RPM's? I cannot seem to find in the documentation how I can manaually change this.
Change where newly created RPM's are stored
linux;rhel;rpm;variable
That is set using the _topdir macro, e.g.,%_topdir /home/ed/mybuildYou can fine tune this using dependent macros.  On a Fedora system, the macros are in /usr/lib/rpm/macros, including this:#       The directory where newly built binary packages will be written.%_rpmdir                %{_topdir}/RPMSSo you could override just _rpmdir.Usually I just use settings in $HOME/.rpmmacros, others use command-line option --define, e.g.,rpmbuild --define '_topdir /Location/On/Storage/' -bb myNewServer.specFurther reading:Having RPM Use a Different Build Area (Maximum RPM: Taking the RPM Package Manager to the Limit)How to pass user defined parameters to rpmbuild to fill variablesPassing conditional parameters into a rpm build (for rpm 4)