Bug 78216 - Doc text to encourage non-root use
Summary: Doc text to encourage non-root use
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-20 05:49 UTC by Karl O. Pinc
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-11-20 05:49:47 UTC
Embargoed:


Attachments (Terms of Use)

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.


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