Bug 114385 - RFE: Non-vendor value for _topdir
RFE: Non-vendor value for _topdir
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
: FutureFeature
: 118973 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2004-01-27 10:30 EST by Michael Jennings (KainX)
Modified: 2007-04-18 13:02 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-10-25 19:49:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Fix hardcode redhat in %_topdir (563 bytes, patch)
2005-05-02 11:45 EDT, Nanar
no flags Details | Diff

  None (edit)
Description Michael Jennings (KainX) 2004-01-27 10:30:50 EST
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

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>.
Comment 1 R P Herrold 2004-01-27 11:10:22 EST
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


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   \
(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
Comment 2 Jeff Johnson 2004-03-23 20:07:00 EST
*** Bug 118973 has been marked as a duplicate of this bug. ***
Comment 3 Mark Hatle 2005-05-02 11:43:36 EDT
Just a quick comment..  we (MontaVista) are for changing the default _topdir to:

Comment 4 Nanar 2005-05-02 11:45:16 EDT
Created attachment 113926 [details]
Fix hardcode redhat in %_topdir
Comment 5 Nanar 2005-05-02 11:47:39 EDT
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.
Comment 6 Jeff Johnson 2005-10-25 19:49:50 EDT
Fixed (by using /usr/src/rpm for %_topdir) in rpm-4.4.3-0.22.

Note You need to log in before you can comment on or make changes to this bug.