* i'm not sure if this is considered sparc or sparc64 as the kernel is sparc64 yet userland is sparc, including python.
i have a fresh install, after emerging gentoo-sources and compiling my adequate kernel i'm trying to remove gentoo-sources as this machine is an ultra 30 300MHz sparc64 2MB L2 cache with 512MB and only 4.2GB of disk (only about 3.9 usable). So any freed up room is pretty much a requirement here.
-- BEGIN UNEMERGE --
ark ~ # emerge --unmerge gentoo-sources
Traceback (most recent call last):
File "/usr/bin/emerge", line 31, in <module>
from _emerge.main import emerge_main
File "/usr/lib/portage/pym/_emerge/main.py", line 17, in <module>
File "/usr/lib/portage/pym/portage/__init__.py", line 8758, in <module>
from portage.dbapi.vartree import vardbapi, vartree, dblink
File "/usr/lib/portage/pym/portage/dbapi/vartree.py", line 28, in <module>
from portage.data import portage_gid, portage_uid, secpass
File "/usr/lib/portage/pym/portage/data.py", line 88, in <module>
_("portage: 'portage' user or group missing.")) + "\n", noiselevel=-1)
File "/usr/lib/portage/pym/portage/proxy/objectproxy.py", line 31, in __call__
result = object.__getattribute__(self, '_get_target')()
File "/usr/lib/portage/pym/portage/proxy/lazyimport.py", line 110, in _get_target
File "/usr/lib/portage/pym/portage/proxy/lazyimport.py", line 61, in _unregister_module_proxy
File "/usr/lib/portage/pym/portage/proxy/lazyimport.py", line 106, in _get_target
target = getattr(sys.modules[name], attr_name)
AttributeError: 'module' object has no attribute 'userpriv_groups'
ark ~ #
-- END UNEMERGE --
i'm guessing this has to do with something i've done strange, as i'm not too familiar with linux since i've been using solaris/bsd the past years, i don't know what it is. i'm thinking it has something to do with missing groups for some reason? because the only other error i'm getting with this installation is on boot, udevd spits out a bunch of 'unknown group' messages to the console about group 'tape' and 'disk' and 'cdrom' and 'video' and some more.
Steps to Reproduce:
1. run emerge --unmerge gentoo-sources on my installation
i get the error described above
for it to unmerge gentoo-sources
Created attachment 220205 [details, diff]
fix the AttributeError
Save as /tmp/userpriv_groups.patch and apply as follows:
patch /usr/lib/portage/pym/portage/data.py /tmp/userpriv_groups.patch
(In reply to comment #1)
> Created an attachment (id=220205) [details]
> fix the AttributeError
> Save as /tmp/userpriv_groups.patch and apply as follows:
> patch /usr/lib/portage/pym/portage/data.py /tmp/userpriv_groups.patch
now i get this, should i change it back and add the group or keep the patch (though the unmerge seems to be working in progress)
-- BEGIN PORTAGE OUTPUT --
portage: 'portage' user or group missing.
For the defaults, line 1 goes into passwd, and 2 into group.
*** WARNING *** For security reasons, only system administrators should be
*** WARNING *** allowed in the portage group. Untrusted users or processes
*** WARNING *** can potentially exploit the portage group for attacks such as
*** WARNING *** local privilege escalation.
-- END PORTAGE OUTPUT --
why are all my groups missing?
Maybe /etc/group got corrupted somehow?
I bumped into this installing @system on a (very) bare system, basically from scratch.
I verified that the patch indeed fixes it; Also, I'd like to note that merely remerging @system will reconstruct the most basic /etc/passwd and /etc/group contents, as part of the post-install functions of certain ebuilds (not sure which ones), in fact most of the basic /etc configs can be reconstructed this way, so it would seem to make sense to make portage immune to deficiency of those (or similar) seemingly vital files in general, setting up some sane defaults and carrying on. (which is what the patch does for /etc/group)
Issues like this (including bug 330645) should be solved in 2.1.9 by these fixes: