Skip to content

/var/db/repos/gentoo's file permissions #237

@kuraga

Description

@kuraga

I have an issue on ebuildtester 47 with Podman.
But I think it's common.

There are errors on emerge like:

Messages for package app-alternatives/bzip2-1::gentoo:                                                                                                                                                                                        * ERROR: app-alternatives/bzip2-1::gentoo failed (depend phase):                                                                                                                                                                             *   error sourcing ebuild                                                                                                                                                                                                                   
 *                                                                                                                                                                                                                                           
 * Call stack:                                                                                                                                                                                                                               
 *   ebuild.sh, line 625:  Called die                                                                                                                                                                                                        
 * The specific snippet of code:                                                                                                                                                                                                             
 *                      source "${EBUILD}" || die "error sourcing ebuild"
 * 
 * If you need support, post the output of `emerge --info '=app-alternatives/bzip2-1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-alternatives/bzip2-1::gentoo'`.
 * Working directory: '/usr/lib/python3.13/site-packages'
 * S: '/var/tmp/portage/app-alternatives/bzip2-1/work/bzip2-1'
 |/usr/lib/portage/python3.13/ebuild.sh: line 625: /var/db/repos/gentoo/net-misc/openssh/openssh-10.0_p1.ebuild: Permission denied

My investigation is below.

The {local_portage} directory is owned by host-group:host-user on the host, and is /var/db/repos/gentoo and owned by container-root:container-root in the container, by default.
Let's write this as {local_portage} (group:user) ~ /var/db/repos/gentoo (root:root).
This allows to create {local_portage}/packages (group:user) ~ /var/db/repos/gentoo/packages (root:root) and {local_portage}/distfiles (group:user) ~ /var/db/repos/gentoo/distfiles (root:root), see #229.

So, {local_portage}/**/* (group:user) ~ /var/db/repos/gentoo/**/* (root:root).
But emerge waits for ... ~ /var/db/repos/gentoo/**/* (portage:portage)!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions