Bug 75265 - Add --topdir to redifine the rpm %_topdir macro
Add --topdir to redifine the rpm %_topdir macro
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
7.3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-06 09:58 EDT by Eugene Gluzberg
Modified: 2008-05-01 11:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-10-06 14:09:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eugene Gluzberg 2002-10-06 09:58:30 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2a) Gecko/20020910

Description of problem:
I find that rpm -bb is difficult to run when you are not root. /usr/src/redhat
is usually not accessable by the user. Without root access the only way for me
to build rpms is to redifine the %_topdir macro in the spec file:

%define _topdir /var/tmp/rpm

Then you have to create the whole rpm directory structure under there. The
enchancement I am asking for is 2 fold:

1. Add a --topdir option to the build command to specify where the directories
are (rather then having the user change the spec file) 
2. Try to create these directories if they don't exist. 

If you are on a system hosted by someone else, root access is not nesseserally
available to change the permissions of /usr/src/redhat dirs.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
run rpm -bb blah.spec as anything except root on a default installed RH system.

Actual Results:  permission denied errors.

Expected Results:  I would not get those since i would use the --topdir option
to point to a writable directory.

Additional info:
Comment 1 Miloslav Trmac 2002-10-06 14:09:20 EDT
echo '%_topdir /home/mitr/data/redhat' >> ~/.rpmmacros
is better than that, it is permanent and you don't need
to add the --target to every rpmbuild invocation.
Comment 2 Jeff Johnson 2002-10-08 09:07:59 EDT
You can add a --topdir option to rpmbuild by
putting in /etc/popt or ~/.popt

    rpmbuild alias --topdir --define '_topdir !#:+'

rpm has way too many options for this to be added
as part of default configuration

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