On Wed, Jan 15, 2003 at 09:26:01PM -0500, Michael Fratoni wrote:
[...]
> If the files are in the above location, your building packages as root. 
> You really shouldn't do that. For a simple script to set up an rpm build 
> environment in your unprivledged /home/user directory, look here:
> http://www.tuxfan.homeip.net:8080/hack.html

Another option is what I'm using:

- add a new group called 'src' (well, you can pick any name you deem
  suitable)
- add the user you want to use to that group (you'll have to log out
  and back in to make that change stick if you were already logged in
  as that user)
- change the whole /usr/src/redhat hierarchy to have group 'src' and
  be writable by members of group 'src'. I usually also set the SGID
  bits on the directories (chmod g+s).

Voila - I can now build RPMs as ordinary user without any changes in
rpm commands or macros. For me, this setup is better, as I usually
have more space in /usr than in /home. The biggest disadvantage of
this setup is that the permissions on /usr/src/redhat get reset each
time you update rpm itself - but that doesn't happen very often and is
easily fixed.


[...]
> %_builddir (RPM_BUILD_DIR) is where the source code is expanded, patched, 
> configured and, compiled prior to installation in %_buildroot.
> 
> Many (most?) packages do not remove the %_builddir as part of the post 
> build cleanup.

No. However, I got into the habit of running

rpm --clean --rmsource RPM-NAME.spec

after I'm finished with an RPM. That removes the stuff in ../BUILD as
well. See 'man rpm'.

Cheerio,

Thomas
-- 
==> RH List Archive: http://marc.theaimsgroup.com/?l=redhat-list&r=1&w=2 <==
-----------------------------------------------------------------------------
                Thomas Ribbrock    http://www.ribbrock.org 
  "You have to live on the edge of reality - to make your dreams come true!"



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to