Bug 114385

Summary: RFE: Non-vendor value for _topdir
Product: [Retired] Red Hat Raw Hide Reporter: Michael Jennings (KainX) <mej>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED UPSTREAM QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: herrold, jos, mitr
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-25 23:49:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix hardcode redhat in %_topdir none

Description Michael Jennings (KainX) 2004-01-27 15:30:50 UTC
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>.

Comment 1 R P Herrold 2004-01-27 16:10:22 UTC
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

Comment 2 Jeff Johnson 2004-03-24 01:07:00 UTC
*** Bug 118973 has been marked as a duplicate of this bug. ***

Comment 3 Mark Hatle 2005-05-02 15:43:36 UTC
Just a quick comment..  we (MontaVista) are for changing the default _topdir to:

%{_usrsrc}/rpm

Comment 4 Nanar 2005-05-02 15:45:16 UTC
Created attachment 113926 [details]
Fix hardcode redhat in %_topdir

Comment 5 Nanar 2005-05-02 15:47:39 UTC
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 23:49:50 UTC
Fixed (by using /usr/src/rpm for %_topdir) in rpm-4.4.3-0.22.