Sorry I am making a bug for two packages in one report, however, it's the same bug so it makes sense, when trying to emerge acct-user/mail or acct-user/postmaster in a crossdev environment they will both fail for the same reason. acct-user/mail: chown: invalid group: ‘root:mail’ * ERROR: acct-user/mail-0-r3::gentoo failed (preinst phase): * fowners failed acct-user/postmaster: chown: invalid group: ‘root:mail’ * ERROR: acct-user/postmaster-0-r3::gentoo failed (preinst phase): * fowners failed Both packages try to chown /var/spool/mail with root:mail, however, even though they have acct-group/mail in their RDEPEND, it isn't replicated in their BDEPEND meaning it never gets merged on the cross host therefore from it's perspective the group doesn't exist causing chown to fail.
It should probably be in IDEPEND, not BDEPEND. I also wonder if we should handle this in the eclass instead of individual ebuilds.
Ah, this is an eclass bug that triggered only when ACCT_USER_HOME_OWNER is set in the ebuild.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f5b1abe6af8e4158491d11370748edc9a004223 commit 0f5b1abe6af8e4158491d11370748edc9a004223 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2025-05-19 19:00:34 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2025-05-22 19:38:32 +0000 acct-user.eclass: handle ACCT_USER_HOME_OWNER when ROOT is not empty We need to resolve the user and group names to numeric ids before calling fowners. Closes: https://bugs.gentoo.org/956026 Closes: https://github.com/gentoo/gentoo/pull/42158 Signed-off-by: Mike Gilbert <floppym@gentoo.org> eclass/acct-user.eclass | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)
This patch breaks acct-user/portage installation when I cross compile. ``` * Messages for package acct-group/portage-0-r2 merged to /root/crossdev-stages/stage3-20250523/: * Group portage already exists * Messages for package acct-user/portage-0-r3 merged to /root/crossdev-stages/stage3-20250523/: * User portage already exists * ERROR: acct-user/portage-0-r3::gentoo failed (preinst phase): * fowners failed * * If you need support, post the output of `emerge --info '=acct-user/portage-0-r3::gentoo'`, * the complete build log and the output of `emerge -pqv '=acct-user/portage-0-r3::gentoo'`. * The complete build log is located at '/usr/riscv64-unknown-linux-gnu/tmp/portage/acct-user/portage-0-r3/temp/build.log'. * The ebuild environment file is located at '/usr/riscv64-unknown-linux-gnu/tmp/portage/acct-user/portage-0-r3/temp/environment'. * Working directory: '/usr/riscv64-unknown-linux-gnu/tmp/portage/acct-user/portage-0-r3/empty' * S: '/usr/riscv64-unknown-linux-gnu/tmp/portage/acct-user/portage-0-r3/work/portage-0' ```