Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 734002 - acct-user.eclass user.eclass do not respect ROOT variable
Summary: acct-user.eclass user.eclass do not respect ROOT variable
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
Keywords: PATCH
Depends on:
Reported: 2020-07-26 21:20 UTC by Stefan Langenmaier
Modified: 2022-04-23 19:37 UTC (History)
5 users (show)

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

account-creation.patch (file_734002.txt,3.18 KB, text/plain)
2020-07-26 21:20 UTC, Stefan Langenmaier

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Langenmaier 2020-07-26 21:20:25 UTC
Created attachment 650900 [details]

I'm using the ROOT variable to create system images. This works fine but user and group accounts are always created in `/`.

I have added a patch that works for me, but like to discuss it here as I have no experience in eclass development a.k.a. please be gentle. :)
Comment 1 Hypoon 2020-08-17 20:55:11 UTC
I just ran into the same issue.

I disagree with the patch, however. In EAPI 7, the default ROOT variable is "", not "/", which will (probably?) break commands with '-R ${ROOT}'.

Instead I suggest adding it to opts only when ROOT is changed from the default value.
Comment 2 Hypoon 2020-08-18 05:42:25 UTC
Possible duplicate, please note bug #541406.
Also, for my patch concerns, please note bug #671300.
Comment 3 Mike Gilbert gentoo-dev 2022-04-23 19:37:57 UTC
commit 6b1d4e40db188e64fb0731195b87b261d76e060c
Author:     Jérémy Connat <>
AuthorDate: Mon Feb 1 13:25:12 2021 +0100
Commit:     Sam James <>
CommitDate: Sat Apr 23 02:26:52 2022 +0100

    acct-user.eclass: Fixing user/group creation when using different ROOT
    Signed-off-by: Jérémy Connat <>
    Signed-off-by: Sam James <>