RPM uses a vendor-specific value, "redhat," for the last portion of the %{_topdir} path. This usually causes each vendor to create its own variation of %{_topdir}, resulting in significant compatibility issues. I propose that RPM use %{_usrsrc}/rpm instead of %{_usrsrc}/redhat as its default value for %{_topdir}. This provides a vendor-agnostic mechanism which does not depend on, or potentially violate the trademark of, any particular company or distributor. Also, it follows the previously-established standard of /usr/src/<pkgname>.
it looks as though a patch/edit on the line: macros:%_topdir %{_usrsrc}/redhat in /usr/lib/rpm/macros would attain that state; some breakage of habituated expectation may exist (just as some still complain when trying to build with 'rpm -ba'), there are undoubtedly people still building as root within /usr/src/redhat/ tree. As such, adding a transition %post process which adds a back-compat link, while the release notes provide a transition interval, may be in order. ------------------ on the broader topic of 'agnostic' changes, in that same directory, 'macros' has constructs like: macros:%_vendor redhat which is probably already better solved elsewhere by distribution packagers, and might be set to 'unspecificed' more properly. macros:#%_solve_dbpath \ /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat (which, while presently commented out) are candidates for cleanup before roll-in ditto, this appears to be the artifact of some long lost buildsystem's mountpoints in macros: #%_solve_pkgsdir /mnt/redhat/test/latest-i386/RedHat/RPMS/ and what in the world is this piece of cruft: cross-build: if [ -r /usr/src/redhat/RPMS/sh/`echo $pkg | sed -e "s:/tmp/srpms/::" -e "s/.src.rpm/.sh.rpm/"` ]; then --- obvious grist for a cleanup. -- Russ Herrold
*** Bug 118973 has been marked as a duplicate of this bug. ***
Just a quick comment.. we (MontaVista) are for changing the default _topdir to: %{_usrsrc}/rpm
Created attachment 113926 [details] Fix hardcode redhat in %_topdir
Comment on attachment 113926 [details] Fix hardcode redhat in %_topdir Over the political choice between using /usr/src/rpm or /usr/src/%_vendor, there is currently technical typo making %_topdir not working: The Makefile.am install the tree in /usr/src/$(RPMCANONVENDOR) but the macros.in has an hardcore path to 'redhat'. The patch fixed this to have coherent setting.
Fixed (by using /usr/src/rpm for %_topdir) in rpm-4.4.3-0.22.