Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 11189 - Do src_compile as a normal user without preloading a library
Summary: Do src_compile as a normal user without preloading a library
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Nicholas Jones (RETIRED)
URL: http://cvs.gentoo.org/~cretin
Whiteboard:
Keywords:
Depends on:
Blocks: 13401
  Show dependency tree
 
Reported: 2002-11-25 04:24 UTC by Stefan Jones (RETIRED)
Modified: 2011-10-30 22:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
portage-usermode.patch (portage-usermode.patch,6.36 KB, patch)
2002-11-25 04:25 UTC, Stefan Jones (RETIRED)
Details | Diff
portage-usermode-20021216.patch (portage-usermode.patch,6.49 KB, patch)
2002-12-16 15:23 UTC, Stefan Jones (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Jones (RETIRED) gentoo-dev 2002-11-25 04:24:18 UTC
Here is a patch which changes the way src_compile works which will
drastically cut down the number of sandbox related issues.

At the moment a number of packages fail to compile correctly as a
library is being preloaded while compiling.

Also preloading a library over prelinked binaries is causing a number of
segfaults.

The correct fix to this is to create a unprivileged user and compile the
package using this user without any need for a preloaded library.

This patch does this. It was created out of jrray's fakeroot patch. I
have nothing to say about fakeroot vs. sandbox. All I say is preloading
during the compile is bad.

The patch is against CVS portage.

A portage user and group needs to be created. To use properly you need
to rm everything in /var/tmp/portage. Also to use cvs ebuilds you need
to chown portage.portage the /usr/portage/distfiles/cvs-src dir.

Comments, rejections, and merging in portage much appreciated.
Comment 1 Stefan Jones (RETIRED) gentoo-dev 2002-11-25 04:25:20 UTC
Created attachment 5931 [details, diff]
portage-usermode.patch

The patch, a heavily modified version of jrray's fakeroot patch.
Comment 2 Stefan Jones (RETIRED) gentoo-dev 2002-12-16 15:23:08 UTC
Created attachment 6546 [details, diff]
portage-usermode-20021216.patch

This fixes the ~/.bashrc problems and makes the portage home dir
/var/tmp/portage
as per the recent baselayout changes. 
Still todo is a quick chown check on /var/tmp/portage and maybe chmod unpacked
files as per Martin S.
Comment 3 Stefan Jones (RETIRED) gentoo-dev 2003-01-11 13:17:48 UTC
Slight problem with the code, compile does not always happen as portage user.

This happens when you do ebuild <XXX>.ebuild install or emerge --buildpkg <XXX>
For those cases the unpack/compile stage is done as the root user with
libsandbox rather then as portage.

I guess in those cases the portage user launcher wrapper is not called properly,
or from an unexpected place. It needs to be fixed.

Stefan
Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2003-02-17 06:46:55 UTC
portage-2.0.47