summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd
diff options
context:
space:
mode:
authorLouis Rannou <lrannou@baylibre.com>2023-06-15 13:43:54 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-06-17 11:50:57 +0100
commitab0f42536f6a17dfc914ece59aefc214b93f60c7 (patch)
tree3b7c8971d1ab0057889fc6519e70aa43a068959c /meta/recipes-core/systemd
parentf5b3ded656a491b59f8c9d5ce12cee665bb5d5f5 (diff)
downloadpoky-ab0f42536f6a17dfc914ece59aefc214b93f60c7.tar.gz
systemd: replace the sysusers.d basic configuration
The default sysusers basic.conf.in file sets the root home directory to `/root` and does not permit its configuration. Replace the file delivered by systemd so the root home directory matches the `ROOT_HOME` variable. (From OE-Core rev: 5a0dd8fe478536f9ea503e3e1bc668b7e814bd85) Signed-off-by: Louis Rannou <lrannou@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd')
-rw-r--r--meta/recipes-core/systemd/systemd/basic.conf.in40
-rw-r--r--meta/recipes-core/systemd/systemd_253.3.bb5
2 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/basic.conf.in b/meta/recipes-core/systemd/systemd/basic.conf.in
new file mode 100644
index 0000000000..fac288f7fa
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/basic.conf.in
@@ -0,0 +1,40 @@
1# This file is part of systemd.
2#
3# systemd is free software; you can redistribute it and/or modify it
4# under the terms of the GNU Lesser General Public License as published by
5# the Free Software Foundation; either version 2.1 of the License, or
6# (at your option) any later version.
7
8# The superuser
9u root 0 "root" :ROOT_HOME:
10
11# The nobody user/group for NFS file systems
12g {{NOBODY_GROUP_NAME}} 65534 - -
13u {{NOBODY_USER_NAME }} 65534:65534 "Nobody" -
14
15# Administrator group: can *see* more than normal users
16g adm {{ADM_GID }} - -
17
18# Administrator group: can *do* more than normal users
19g wheel {{WHEEL_GID }} - -
20
21# Access to shared database of users on the system
22g utmp {{UTMP_GID }} - -
23
24# Physical and virtual hardware access groups
25g audio {{AUDIO_GID }} - -
26g cdrom {{CDROM_GID }} - -
27g dialout {{DIALOUT_GID}} - -
28g disk {{DISK_GID }} - -
29g input {{INPUT_GID }} - -
30g kmem {{KMEM_GID }} - -
31g kvm {{KVM_GID }} - -
32g lp {{LP_GID }} - -
33g render {{RENDER_GID }} - -
34g sgx {{SGX_GID }} - -
35g tape {{TAPE_GID }} - -
36g tty {{TTY_GID }} - -
37g video {{VIDEO_GID }} - -
38
39# Default group for normal users
40g users {{USERS_GID }} - -
diff --git a/meta/recipes-core/systemd/systemd_253.3.bb b/meta/recipes-core/systemd/systemd_253.3.bb
index 45dc6ab5bb..87fbf6f785 100644
--- a/meta/recipes-core/systemd/systemd_253.3.bb
+++ b/meta/recipes-core/systemd/systemd_253.3.bb
@@ -17,6 +17,7 @@ REQUIRED_DISTRO_FEATURES = "systemd"
17SRC_URI += " \ 17SRC_URI += " \
18 file://touchscreen.rules \ 18 file://touchscreen.rules \
19 file://00-create-volatile.conf \ 19 file://00-create-volatile.conf \
20 file://basic.conf.in \
20 ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://org.freedesktop.hostname1_no_polkit.conf', '', d)} \ 21 ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://org.freedesktop.hostname1_no_polkit.conf', '', d)} \
21 ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://00-hostnamed-network-user.conf', '', d)} \ 22 ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://00-hostnamed-network-user.conf', '', d)} \
22 file://init \ 23 file://init \
@@ -252,6 +253,10 @@ EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \
252# The 60 seconds is watchdog's default vaule. 253# The 60 seconds is watchdog's default vaule.
253WATCHDOG_TIMEOUT ??= "60" 254WATCHDOG_TIMEOUT ??= "60"
254 255
256do_configure:prepend() {
257 sed s@:ROOT_HOME:@${ROOT_HOME}@g ${WORKDIR}/basic.conf.in > ${S}/sysusers.d/basic.conf.in
258}
259
255do_install() { 260do_install() {
256 meson_do_install 261 meson_do_install
257 install -d ${D}/${base_sbindir} 262 install -d ${D}/${base_sbindir}