Skip to contentSkip to conversation

meta-selftest/staticids: add nogroup group for distcc

PATCH In review JD Schroeder 2 participants 4 messages Sep 12, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 meta-selftest/staticids: add nogroup group for distcc

This patch adds the nogroup to the staticids to help address the warning about changing the nogroup's gid.

---
 meta-selftest/files/static-group | 1 +
 1 file changed, 1 insertion(+)
meta-selftest/files/static-group +1 -0
index af2fa0f016..4471feb688 100644
@@ -26,3 +26,4 @@ wayland:x:526:
 render:x:527:
 sgx:x:528:
 ptest:x:529:
+nogroup:x:530:
Signature · 1 line
2.37.0
#1 lore raw

PATCH 2/3 distcc: Fix groupname gid change warning

This patch fixes warnings when useradd-staticids.bbclass is used and USERADD_PARAM is used to add the user to a group that has not been explicitly created yet. By adding the GROUPADD_PARAM for the new group being used the warnings for changing the gid from GID-OLD to GID-NEW is eliminated.

Warning fixed:
distcc: Changing groupname nogroup's gid from (WXYZ) to (JKLM), verify configuration files!

---
 meta/recipes-devtools/distcc/distcc_3.4.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/distcc/distcc_3.4.bb +1 -0
index 45fc7cde53..0c20f74d68 100644
@@ -33,6 +33,7 @@ EXTRA_OECONF += "--disable-Werror PYTHON='' --disable-pump-mode"
 PACKAGE_BEFORE_PN = "${PN}-distmon-gnome ${PN}-server"
 
 USERADD_PACKAGES = "${PN}-server"
+GROUPADD_PARAM:${PN}-server = "--system nogroup"
 USERADD_PARAM:${PN}-server = "--system \
                        --home /dev/null \
                        --no-create-home \
Signature · 1 line
2.37.0
#2 lore raw

PATCH 3/3 ppp-dialin: Fix groupname gid change warning

In reply to JD Schroeder

This patch fixes warnings when useradd-staticids.bbclass is used and USERADD_PARAM is used to add the user to a group that has not been explicitly created yet. By adding the GROUPADD_PARAM for the new group being used the warnings for changing the gid from GID-OLD to GID-NEW is eliminated.

Warning fixed:
ppp-dialin: Changing groupname nogroup's gid from (WXYZ) to (JKLM), verify configuration files!

---
 meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb +1 -0
index 8a6c297cb0..a7b566515e 100644
@@ -23,6 +23,7 @@ do_install() {
 }
 
 USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "--system nogroup"
 USERADD_PARAM:${PN} = "--system --home /dev/null \
                        --no-create-home --shell ${sbindir}/ppp-dialin \
                        --no-user-group --gid nogroup ppp"
Signature · 1 line
2.37.0
#3 lore raw
In reply to JD Schroeder
Quoted 13 lines · JD Schroeder

This patch adds the nogroup to the staticids to help address the warning about changing the nogroup's gid.

---
 meta-selftest/files/static-group | 1 +
 1 file changed, 1 insertion(+)
meta-selftest/files/static-group +0 -0
index af2fa0f016..4471feb688 100644

meta-selftest/files/static-group wayland:x:526: · line 29

Quoted 4 lines
meta-selftest/files/static-group +1 -0
@@ -26,3 +26,4 @@ wayland:x:526:
 render:x:527:
 sgx:x:528:
 ptest:x:529:
+nogroup:x:530:

I was looking at this earlier today. It looks like nogroup is already defined by base-passwd so there is something else going on here which means that isn't visible somehow. We need to work that out before we can merge the other two patches though.

This isn't right as it would setup two different group IDs for nogroup.

Cheers,

Richard