Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 147512 - emerge does not function with lack of read access to /etc/portage/profile
Summary: emerge does not function with lack of read access to /etc/portage/profile
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 147007
  Show dependency tree
 
Reported: 2006-09-13 17:05 UTC by Decibels
Modified: 2008-02-14 07:55 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 Decibels 2006-09-13 17:05:07 UTC
Upgraded Portage from portage-2.1-r2 to portage-2.1.1 . Was trying to check on a package later as User. Using 'emerge -s ivman' and got this error:
-----------------------
david@decibels ~ $ emerge -s ivman
!!! [Errno 13] Permission denied: '/etc/portage/profile/make.globals'
!!! Incorrect multiline literals can cause this. Do not use them.
!!! Errors in this file should be reported on bugs.gentoo.org.
----------------------
Checked other functions like 'emerge --info' , 'emerge -p <packagename>' same thing every time. 

At first thought it was me cause had removed a user from group and thought made an oops. Checking 'groups' showed User was in portage group. After several reboots,... Remerged portage-2.1.1 after finding nothing in bugzilla. Same problem. Rebooted and same problem.

Downgraded back to portage-2.1-r2. Tried emerge functions again and work right away:
------------------------------
david@decibels ~ $ emerge -s ivman
Searching...
[ Results for search key : ivman ]
[ Applications found : 1 ]

*  sys-apps/ivman
      Latest version available: 0.6.12
      Latest version installed: [ Not Installed ]
      Size of files: 304 kB
      Homepage:      http://ivman.sf.net
      Description:   Daemon to mount/unmount devices, based on info from HAL
      License:       GPL-2 QPL
-----------------------------

AMD64, x86_64 build, 2006.1 release.
Comment 1 Decibels 2006-09-13 17:09:44 UTC
Oh, forgot. On my system there is no /etc/portage/profile/make.globals
Haven't found anything on google search, forums, bugs about it either.
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2007-01-10 04:15:05 UTC
portage.py:1129:

mygcfg_dlists = [getconfig(os.path.join(x, "make.globals")) \
	for x in self.profiles + [os.path.join(config_root, "etc")]]

That doesn't look right. Zac, according to Subversion that's your code, any reasoning behind it?
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2007-01-10 04:43:05 UTC
Changed the code so it only pulls make.globals from /etc, but I still don't see how that error could be triggered if the mentioned file didn't exist in the first place.
Comment 4 Zac Medico gentoo-dev 2007-01-10 04:49:45 UTC
He probably didn't have permission to access /etc/portage/profile/make.globals.  Other users would have experienced this if it was a more serious problem.
Comment 5 Decibels 2007-01-10 13:26:36 UTC
True, just checked and can ls /etc/portage but not /etc/portage/profile/. But am in the portage group. Non-root portage group users can search portage and check other things, just can't actually emerge them. 

So is portage going to take the direction to not allow non-root users any use of portage? I really don't believe that is the plan. 

Still using portage-2.1-r2. 
Comment 6 Decibels 2007-01-10 13:33:37 UTC
Oh, sorry. What information do you want from me or me to do. Remerge that version and try again, newer verison? Just name it.
Comment 7 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 11:14:11 UTC
The statement about /etc/portage/profile not being readable was all that's needed here. But the patch takes care of that as now only one make.globals is checked.
Comment 8 Decibels 2007-01-11 14:19:39 UTC
I kind of gathered that, want to make sure I was correct. Good, I'll upgrade portage now. Thanks.
Comment 9 Decibels 2007-01-11 14:57:19 UTC
Just emerge sync'd this morning and upgraded, guess that patch hasn't been applied yet.

$ emerge -pD world
!!! [Errno 13] Permission denied: '/etc/portage/profile/make.globals'
!!! Incorrect multiline literals can cause this. Do not use them.
!!! Errors in this file should be reported on bugs.gentoo.org.

I'll just leave this one emerged for now and deal with it for now. If no further word then will downgrade again.

Comment 10 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 15:22:00 UTC
It's applied, just not released.
Comment 11 Zac Medico gentoo-dev 2007-01-11 22:40:33 UTC
(In reply to comment #5)
> True, just checked and can ls /etc/portage but not /etc/portage/profile/. But
> am in the portage group. Non-root portage group users can search portage and
> check other things, just can't actually emerge them. 

If /etc/portage/profile is unreadable by the user running portage then you'll get a similar error when it tries to access any other files there.  Why not just make it readable to all?

> So is portage going to take the direction to not allow non-root users any use
> of portage? I really don't believe that is the plan. 

Of course not.  In fact, it's a bad idea to put a user in the portage group unless that user is doing ebuild development (see bug #149062).  With portage-2.1.2 it's possible to run many simple emerge commands without either being root or in the portage group.
Comment 12 Decibels 2007-01-12 00:47:07 UTC
Found the problem: ENOTICE

(In reply to comment #11)
> (In reply to comment #5)
> > True, just checked and can ls /etc/portage but not /etc/portage/profile/. But
> > am in the portage group. Non-root portage group users can search portage and
> > check other things, just can't actually emerge them. 
> 
> If /etc/portage/profile is unreadable by the user running portage then you'll
> get a similar error when it tries to access any other files there.  Why not
> just make it readable to all?
> 

Looks like /etc/portage/profile was from part of a stopgap measure long time ago to log emerge messages, so users could read them later instead of having to sit there and watch the emerge process. Otherwise could miss critical messages during emerge. The workaround was ENOTICE. Removed it and all it's residuals and not getting the error now. 

FYI: Couldn't even leave the folder profile in there. Portage would still check it (for now) and even though folder empty and perms 755, it still gave error. So deleted folder cause didn't see any reason to have it. 

> > So is portage going to take the direction to not allow non-root users any use
> > of portage? I really don't believe that is the plan. 
> 
> Of course not.  In fact, it's a bad idea to put a user in the portage group
> unless that user is doing ebuild development (see bug #149062).  With
> portage-2.1.2 it's possible to run many simple emerge commands without either
> being root or in the portage group.
> 
Well, I do do some development work. But as user only need the simple commands and if portage-2.1.2 does that that is fine.

Sorry that you had to deal with this. Found a forum thread and saw Genone say ENOTICE and get rid of it, cause another user was having issues with it. Stick with Gentoo long enough and there is bound to be residual stuff laying around.
Thanks for you help. Otherwise wouldn't have figured it out.

Want to close this, is the patch still necessary? I guess that would depend if the folder /etc/portage/profile was needed.