Bug 78216 - Doc text to encourage non-root use
Doc text to encourage non-root use
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-11-20 00:49 EST by kop
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-11-20 00:49:47 EST
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 kop 2002-11-20 00:49:39 EST
Description of Problem:

The system comes configured so it's difficult to use rpm
without being root, and the use of root should be discouraged.

Additional Information:
	
Please add the following text to the rpm man page.

----------------------------<snip>---------------------------------
BUILDING AND INSTALLING WHEN NOT THE ROOT USER

By default, building takes place in /usr/src/redhat/, newly (re)built
rpms are written to /usr/src/redhat/RPMS/<arch>/ (or
/usr/src/redhat/SRPMS/), and root permissions are required to write to
these directories.  The following script places a directory named
redhat into the user's home directory and rpm is configured to build
in this new directory:

  (
    if [ -e $HOME/.rpmmacros ] ; then
      echo $HOME/.rpmmacros: already exists 1>&2
      exit 1
    fi
    if [ -e $HOME/redhat ] ; then
      echo $HOME/redhat: already exists 1>&2
      exit 1
    fi
    echo "%_topdir $HOME/redhat" > $HOME/.rpmmacros
    mkdir $HOME/redhat/{,BUILD,SOURCES,SPECS,RPMS,SRPMS}
  )

Note that root permissions will be required to install a (rebuilt)
rpm unless other options, like --relocate and --dbpath, are used.
----------------------------<snip>---------------------------------

I haven't tried using rpm to manage packages installed into my
home directory, but the above works just fine for building when
not root.  It's a start.
Comment 1 Jeff Johnson 2002-12-03 17:06:17 EST
Yes, the /usr/src/redhat scheme is clunky,
forces root use to build. It's hardly worth
the fight to change.

Your scheme is OK, but there are many other schemes.
I don't see how I can recommend one scheme over another.

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