Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 50610 - Incorrect permissions on /var/cache/edb/virtuals
Summary: Incorrect permissions on /var/cache/edb/virtuals
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-10 02:14 UTC by Octavio Ruiz (Ta^3)
Modified: 2004-10-20 08:54 UTC (History)
2 users (show)

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 Octavio Ruiz (Ta^3) 2004-05-10 02:14:06 UTC
Its really a bug?

The permissions on /var/cache/edb/virtuals are: (only tested on stage3 for amd-athlon and pentium III, and maybe an autogenerated by portage)

-rw-r-----    1 root root    1251 May  9 19:24 virtuals

It must be IMHO:

-rw-r-----    1 root portage    1251 May  9 19:24 virtuals

The problem:

I use xorg-x11 instead of xfree. When i do an `emerge -pv <anything that depends on virtual/x11>` as an user (in portage group) it shows that portage will emerge xfree-4... why? because it can not read the virtuals file.

Example:

user$ emerge -pv gvim

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N    ] x11-base/xfree-4.3.0-r5  -3dfx -3dnow -bindist -cjk -debug -doc +ipv6 +mmx +nls +pam -sdk +sse -static +truetype +xml2  65,682 kB 
[ebuild   R   ] app-editors/gvim-6.2-r9  -acl -cscope -gnome +gpm +gtk +gtk2 +motif +ncurses +nls +perl +python -ruby -(selinux)  0 kB 

root# emerge -pv gvim

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] app-editors/gvim-6.2-r9  -acl -cscope -gnome +gpm +gtk +gtk2 +motif +ncurses +nls +perl +python -ruby -(selinux)  0 kB 

If I do an `chown root:portage var/cache/edb/virtuals` everything is ok: 

user$ emerge -pv gvim

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] app-editors/gvim-6.2-r9  -acl -cscope -gnome +gpm +gtk +gtk2 +motif +ncurses +nls +perl +python -ruby -(selinux)  0 kB 

It must append with another package that depends on a virtual package pretending to emerge like a user.
Comment 1 Peter Jensen 2004-05-10 02:54:56 UTC
This is apparently not changed by portage, as I still have the original permissions:

-rw-r--r-- 1 root root 1376 May 6 19:26 /var/cache/edb/virtuals

However, the new (and IMHO incorrect) permissions are present in at least stage 1 of the 2004.1 release,
so we can probably assume that it's a general problem with that release.

It's fine in 2004.0, BTW.
Comment 2 Radek Podgorny 2004-05-10 15:13:40 UTC
Shouldn't it be "rw" for "portage" group, too?
Comment 3 Peter Jensen 2004-05-11 02:20:42 UTC
I'd say that it should not be writable by members of the portage group.
Editing that file could perhaps upset a few things in the system, so only root should be allowed to change it.
Besides, as far as I know that file is only updated by a new merge, which root will be doing anyway.
Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2004-05-16 03:14:10 UTC
The file is no longer used in portage-2.0.51.
Any user-changes will go in /etc/portage/virtuals and
permissions can be set by admin.
Comment 5 James C. Georgas 2004-10-20 08:54:31 UTC
I'm using portage 2.0.50-r11.

I think that the group should be "portage" instead of root for everything under /var/cache/edb.

The current permissions look fine to me.

The reason I think the group should be changed is so certain portage commands give the same results both to users in the portage group and to root.

For example, I have a system which is built on linux26-headers. If I do:

   emerge -uDvp world

as root on an up to date system, I get an empty list. If I do this as a normal user in the portage group, however, then I get the following:

   [ebuild  N    ] sys-kernel/linux-headers-2.4.21-r1  -build  27,864 kB

I think this is because the user can't read the virtuals file, and maybe a few other files, so portage falls back to some defaults, and I end up thinking i need to downgrade something.

Of course, I still have to be root to build and install, and the update list will be correct when I actually do the update, so it's not that serious. It is, however, confusing, and it's such an easy fix.