Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 900683 - sys-apps/portage-3.0.45.2: Needs user with UID 1000 to install
Summary: sys-apps/portage-3.0.45.2: Needs user with UID 1000 to install
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: 899542
  Show dependency tree
 
Reported: 2023-03-10 10:43 UTC by tea
Modified: 2023-03-19 19:20 UTC (History)
2 users (show)

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


Attachments
build log (emerge-portage.log.xz,80.61 KB, application/x-xz)
2023-03-10 10:43 UTC, tea
Details
emerge --info (emerge--info.txt,16.43 KB, text/plain)
2023-03-10 10:45 UTC, tea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tea 2023-03-10 10:43:18 UTC
Created attachment 857127 [details]
build log

File "/var/tmp/portage/sys-apps/portage-3.0.45.2/image/usr/lib/python3.11/site-packages/portage/repository/config.py", line 360, in __init__
    elif Path(self.location).owner() not in ("root", "portage"):
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/pathlib.py", line 1021, in owner
    return pwd.getpwuid(self.stat().st_uid).pw_name
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'getpwuid(): uid not found: 1000'
Comment 1 tea 2023-03-10 10:45:20 UTC
Created attachment 857133 [details]
emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-10 10:54:23 UTC
This is obviously bad and it should absorb the exception & keep on (and fail safe re volatile), but what's the situation with your /var/db/repos/gentoo ownership?

(Also, any other context about the state the system is in?)
Comment 3 tea 2023-03-10 12:42:31 UTC
This is a chroot i use for testing. /var/db/repos/gentoo is owned by portage (inside and outside the chroot) and mounted with `mount --bind -o ro`.
Comment 4 Mike Gilbert gentoo-dev 2023-03-10 17:46:12 UTC
I would guess that you have an overlay configured in the chroot for which the owner does not exist in the chroot's /etc/passwd file.
Comment 5 tea 2023-03-10 20:35:44 UTC
Oh yeah, i bind-mount 2 repos which belong to UID 1000.
Comment 6 Larry the Git Cow gentoo-dev 2023-03-19 19:14:34 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=08cdac85ffaf9b9915c40d9ffcd0ed3cf0e434d3

commit 08cdac85ffaf9b9915c40d9ffcd0ed3cf0e434d3
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-03-10 14:56:04 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-03-19 19:14:29 +0000

    repository: config: absorb all exceptions when determining volatility
    
    Not ideal, but we don't have much else of a choice. It's a very
    small section and trying to granularly specify the relevant exceptions
    here is clearly a waste of time (see ref'd bugs).
    
    Besides, the consequence is just failing-safe and assuming the repo
    is volatile anyway.
    
    Bug: https://bugs.gentoo.org/899208
    Bug: https://bugs.gentoo.org/900683
    Signed-off-by: Sam James <sam@gentoo.org>
    Closes: https://github.com/gentoo/portage/pull/1005
    Signed-off-by: Sam James <sam@gentoo.org>

 NEWS                             | 12 ++++++++++--
 lib/portage/repository/config.py |  9 ++++++++-
 2 files changed, 18 insertions(+), 3 deletions(-)
Comment 7 Larry the Git Cow gentoo-dev 2023-03-19 19:20:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3009f682e74a46a4a88ecab250c59f8e921ea2f9

commit 3009f682e74a46a4a88ecab250c59f8e921ea2f9
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-03-19 19:20:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-03-19 19:20:17 +0000

    sys-apps/portage: add 3.0.45.3
    
    Closes: https://bugs.gentoo.org/899542
    Closes: https://bugs.gentoo.org/900683
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest                |   1 +
 sys-apps/portage/portage-3.0.45.3.ebuild | 284 +++++++++++++++++++++++++++++++
 2 files changed, 285 insertions(+)