Bug 78216

Summary: Doc text to encourage non-root use
Product: [Retired] Red Hat Linux Reporter: Karl O. Pinc <kop>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-11-20 05:49:47 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:

Description Karl O. Pinc 2002-11-20 05:49:39 UTC
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 22:06:17 UTC
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.