Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76872 - allow bypassing of portage ebuild changing ownership in /var/tmp/ccache and /usr/portage/distfiles and use variables
Summary: allow bypassing of portage ebuild changing ownership in /var/tmp/ccache and /...
Status: VERIFIED LATER
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-06 03:51 UTC by Robin Johnson
Modified: 2007-01-11 14:23 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-01-06 03:51:08 UTC
in the portage ebuild presently, there is some code that changes the ownership and permissions on the contents of /var/tmp/ccache, and /usr/portage/distfiles.
In some systems, this can take an extremely long time.

two requests on this:
1. provide a means to bypass both of these (the user is then responsible for the permissions)
2. use variables CCACHE_DIR and DISTDIR if set instead of hardcoded pathes.
Comment 1 Alec Warner archtester Gentoo Infrastructure gentoo-dev Security 2005-01-06 09:22:19 UTC
Looking at portage 2.0.51-r3's portage.py, portage appears to already do the second idea,
try:
			mystat=os.stat(mysettings["CCACHE_DIR"])
			if (mystat[stat.ST_GID]!=portage_gid) or ((mystat[stat.ST_MODE]&02070)!=02070):
				print "*** Adjusting ccache permissions for portage user..."
				os.chown(mysettings["CCACHE_DIR"],portage_uid,portage_gid)
				os.chmod(mysettings["CCACHE_DIR"],02770)
				spawn("chown -R "+str(portage_uid)+":"+str(portage_gid)+" "+mysettings["CCACHE_DIR"],mysettings, free=1)
				spawn("chmod -R g+rw "+mysettings["CCACHE_DIR"],mysettings, free=1)
DISTDIR is the same also.  Does it print "*** Adjusting ccache permissions for portage user."?  Maybe it's changing it somewhere else in portage and I just can't find the relevant code.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-01-06 13:42:01 UTC
I said the errors are in the portage ebuild, not in portage itself.
Comment 3 Alec Warner archtester Gentoo Infrastructure gentoo-dev Security 2005-01-07 20:02:21 UTC
This is a dup of Bugzilla Bug 68078 
portage ebuild: /var/tmp/ccache and ${PORTDIR}/distfiles hardcoded
Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2005-01-10 18:01:04 UTC
Disable userpriv and you won't have such issues.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-01-10 19:48:54 UTC
while "FEATURES=-userpriv emerge portage" does skip the ccache chmod/chown, it is still applied to all of the distfiles.

If you intend userpriv to be safe with this, could you move the stuff in the ebuild that messes with the distfiles directory to be inside a userpriv conditional? (line 340-371 of portage-2.0.51-r8.ebuild v1.7)
Comment 6 Jason Stubbs (RETIRED) gentoo-dev 2005-07-28 07:25:26 UTC
Putting a hold on feature requests for portage as they are drowning out the 
bugs. Most of these features should be available in the next major version of 
portage. But for the time being, they are just drowning out the major bugs and 
delaying the next version's progress. 
 
Any bugs that contain patches and any bugs for etc-update or dispatch-conf can 
be reopened. Sorry, I'm just not good enough with bugzilla. ;) 
Comment 7 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 14:23:44 UTC
Closing due to old age (obsolete now)