Users are largely irrelevant for prefix, but we still don't want the
build to break.
I left the home and shell related bits alone, as it's less clear whether these should be prefixed or not. Obviously /dev/null should not be. It's slightly academic anyway, as nothing in the main repo uses this eclass
any more.
Groups are largely irrelevant for prefix, but we still don't want the
build to break.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
---
eclass/acct-group.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
index 590a2f20ed8e..ada5fe386693 100644
--- a/eclass/acct-group.eclass
+++ b/eclass/acct-group.eclass
@@ -176,7 +176,7 @@ acct-group_pkg_preinst() {
fi
if [[ -n ${ROOT} ]]; then
On Tue, Dec 6, 2022 at 5:24 PM James Le Cuirot <chewi@gentoo.org> wrote:
Groups are largely irrelevant for prefix, but we still don't want the
build to break.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
---
eclass/acct-group.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
index 590a2f20ed8e..ada5fe386693 100644
--- a/eclass/acct-group.eclass
+++ b/eclass/acct-group.eclass
@@ -176,7 +176,7 @@ acct-group_pkg_preinst() {
fi
if [[ -n ${ROOT} ]]; then
You should probably change this to [[ -n ${EROOT} ]]. Same goes for acct-user.eclass.
Also see bug 779181; I'm not sure updating ${EROOT}/etc/group and ${EROOT}/etc/passwd makes any sense at all.
The new eclasses also skip the operation if you are root. As that bug report says, running a prefixed system as root is probably unsupported. I was doing this as root into a ROOTed prefix though, which is slightly different. Should we also skip the operation if EPREFIX non-empty? I'll think about it.
On Wed, Dec 7, 2022 at 4:24 AM James Le Cuirot <chewi@gentoo.org> wrote:
The new eclasses also skip the operation if you are root. As that bug report
says, running a prefixed system as root is probably unsupported. I was doing
this as root into a ROOTed prefix though, which is slightly different. Should
we also skip the operation if EPREFIX non-empty? I'll think about it.
I would be in favor of skipping adding users/groups if EPREFIX is
non-empty, at least as a temporary solution.
If someone presents a use case where adding users to
${EROOT}/etc/passwd makes sense, we can revisit it then.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 475 |
Nodes: | 16 (2 / 14) |
Uptime: | 18:21:05 |
Calls: | 9,487 |
Calls today: | 6 |
Files: | 13,617 |
Messages: | 6,121,091 |