[dunfell,2/3] systemd: Ensure uid/gid ranges are set deterministically

Message ID 56f57c70fb87beb9a7181df8cb5e7a4a0b5a184a.1646748150.git.steve@sakoman.com
State Accepted, archived
Commit 56f57c70fb87beb9a7181df8cb5e7a4a0b5a184a
Headers show
Series [dunfell,1/3] asciidoc: update git repository | expand

Commit Message

Steve Sakoman March 8, 2022, 2:13 p.m. UTC
From: Richard Purdie <richard.purdie@linuxfoundation.org>

meson.build will fall back to greping /etc/login.defs for values of these
if they're not set. Different distros set them (Centos 7/8 does, Ubuntu
does not) so output was not deterministic. Avoid this by setting to the
default values. We now match the vaules from login.defs from shadow.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 77a6ac0ac266d71e4fe67fd332662081f30cd7bf)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/recipes-core/systemd/systemd_244.5.bb | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/meta/recipes-core/systemd/systemd_244.5.bb b/meta/recipes-core/systemd/systemd_244.5.bb
index 66446e2a7c..a648272bc0 100644
--- a/meta/recipes-core/systemd/systemd_244.5.bb
+++ b/meta/recipes-core/systemd/systemd_244.5.bb
@@ -216,6 +216,8 @@  EXTRA_OEMESON += "-Dnobody-user=nobody \
                   -Drootlibdir=${rootlibdir} \
                   -Drootprefix=${rootprefix} \
                   -Ddefault-locale=C \
+                  -Dsystem-uid-max=999 \
+                  -Dsystem-gid-max=999 \
                   "
 
 # Hardcode target binary paths to avoid using paths from sysroot