1 |
On 01/27/2017 09:37 PM, Patrick McLean wrote: |
2 |
> |
3 |
> To make something to solve our problem (and I suspect everyone |
4 |
> else who cares about this), it would be sufficient to have a mechanism |
5 |
> to override the default random assignment with a fixed UID/GID. |
6 |
|
7 |
What I had in mind for this is that a "normal" user ebuild would look |
8 |
like... |
9 |
|
10 |
EAPI=6 |
11 |
# SYS_USER_NAME defaults to ${PN} |
12 |
SYS_USER_GROUPS="foo" # defaults empty or to ${PN}, not sure |
13 |
# SYS_USER_UID left undefined to get the next available |
14 |
# SYS_USER_HOME left undefined to get the default |
15 |
# SYS_USER_SHELL left undefined... etc. |
16 |
inherit sys-user.eclass |
17 |
... |
18 |
# DEPEND set to "sys-group/foo" by the eclass |
19 |
# RDEPEND set to "sys-group/foo" by the eclass |
20 |
... |
21 |
# src_install and pkg_prerm from the eclass. |
22 |
|
23 |
To override the UID behavior, I think package.env would work, but an |
24 |
overlay where the ebuild has SYS_USER_UID=42 is guaranteed to. |