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.
Created attachment 5931 [details, diff] portage-usermode.patch The patch, a heavily modified version of jrray's fakeroot patch.
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.
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
portage-2.0.47