Gentoo Archives: gentoo-alt

From: Steven Trogdon <strogdon@×××××.edu>
To: gentoo-alt@l.g.o
Subject: [gentoo-alt] rap prefix - glibc-2.26-r3
Date: Tue, 28 Nov 2017 20:44:24
Message-Id: 20171128144414.020ce524.strogdon@d.umn.edu
Hello,

Upgraded my prefix rap today doing:

emerge -1 portage
emerge -uDN system

I don't think the portage upgrade is the issue since the system proceeded to
upgrade, although with numerous warnings like:

portage: 'portage' user or group missing.
         For the defaults, line 1 goes into passwd, and 2 into group.
         portage:x:250:250:portage:/var/tmp/portage:/bin/false
         portage::250:portage
*** 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.

I'm now unable to emerge anything. I think the culprit is the upgrade
of glibc from 2.25-r9 -> 2.26-r3 although it could be something else. Prior to
the upgrade getent <group | passwd> was parsing EPREFIX/etc/<group | passwd> for
group and passwd info. It clearly is now parsing /etc/<group | passwd>. And I
have no control over what is under /etc. In fact the host getent parses db
files in a non-standard location to get group/passwd info. When I attempt to
emerge I get things like

!!! Directory initialization failed:
'/storage/strogdon/gentoo-rap/var/lib/portage' !!!
chown('/storage/strogdon/gentoo-rap/var/lib/portage', -1, 0) !!! Directory
initialization failed: '/storage/strogdon/gentoo-rap/var/cache/edb' !!!
chown('/storage/strogdon/gentoo-rap/var/cache/edb', -1, 0) [Errno 1] Operation
not permitted:
'/storage/strogdon/gentoo-rap/var/lib/gentoo/news/.news-local.unread.portage_lockfile':
chown('/storage/strogdon/gentoo-rap/var/lib/gentoo/news/.news-local.unread.portage_lockfile',
-1, 0) Cannot chown a lockfile:
'/storage/strogdon/gentoo-rap/var/lib/gentoo/news/.news-local.unread.portage_lockfile'
Group IDs of current user: 925 [Errno 1] Operation not permitted:
'/storage/strogdon/gentoo-rap/var/lib/gentoo/news/.news-sage-on-gentoo.unread.portage_lockfile':
chown('/storage/strogdon/gentoo-rap/var/lib/gentoo/news/.news-sage-on-gentoo.unread.portage_lockfile',
-1, 0) Cannot chown a lockfile:
'/storage/strogdon/gentoo-rap/var/lib/gentoo/news/.news-sage-on-gentoo.unread.portage_lockfile'
Group IDs of current user: 925 [Errno 1] Operation not permitted:
'/storage/strogdon/gentoo-rap/var/lib/gentoo/news/.news-science.unread.portage_lockfile':
chown('/storage/strogdon/gentoo-rap/var/lib/gentoo/news/.news-science.unread.portage_lockfile',
-1, 0) Cannot chown a lockfile:
'/storage/strogdon/gentoo-rap/var/lib/gentoo/news/.news-science.unread.portage_lockfile'
Group IDs of current user: 925 [Errno 1] Operation not permitted:
'/storage/strogdon/gentoo-rap/var/lib/gentoo/news/.news-gentoo.unread.portage_lockfile':
chown('/storage/strogdon/gentoo-rap/var/lib/gentoo/news/.news-gentoo.unread.portage_lockfile',
-1, 0) Cannot chown a lockfile:
'/storage/strogdon/gentoo-rap/var/lib/gentoo/news/.news-gentoo.unread.portage_lockfile'
Group IDs of current user: 925 Calculating dependencies  [Errno 1] Operation
not permitted: '/storage/strogdon/gentoo-rap/var/db/.pkg.portage_lockfile':
chown('/storage/strogdon/gentoo-rap/var/db/.pkg.portage_lockfile', -1, 0)
Cannot chown a lockfile:
'/storage/strogdon/gentoo-rap/var/db/.pkg.portage_lockfile' Group IDs of
current user: 925                                                          ...
done!

and the emerge fails.

From within prefix
id
uid=105600 gid=925 groups=925

From the host
id
uid=105600(strogdon) gid=925(math) groups=925(math)

Looking for things to try without re-installing prefix[rap].

Replies

Subject Author
Re: [gentoo-alt] rap prefix - glibc-2.26-r3 Benda Xu <heroxbd@g.o>