diff options
author | Louis Rannou <lrannou@baylibre.com> | 2023-06-15 13:43:54 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-17 11:50:57 +0100 |
commit | ab0f42536f6a17dfc914ece59aefc214b93f60c7 (patch) | |
tree | 3b7c8971d1ab0057889fc6519e70aa43a068959c /meta/recipes-core/systemd | |
parent | f5b3ded656a491b59f8c9d5ce12cee665bb5d5f5 (diff) | |
download | poky-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.in | 40 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd_253.3.bb | 5 |
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 | ||
9 | u root 0 "root" :ROOT_HOME: | ||
10 | |||
11 | # The nobody user/group for NFS file systems | ||
12 | g {{NOBODY_GROUP_NAME}} 65534 - - | ||
13 | u {{NOBODY_USER_NAME }} 65534:65534 "Nobody" - | ||
14 | |||
15 | # Administrator group: can *see* more than normal users | ||
16 | g adm {{ADM_GID }} - - | ||
17 | |||
18 | # Administrator group: can *do* more than normal users | ||
19 | g wheel {{WHEEL_GID }} - - | ||
20 | |||
21 | # Access to shared database of users on the system | ||
22 | g utmp {{UTMP_GID }} - - | ||
23 | |||
24 | # Physical and virtual hardware access groups | ||
25 | g audio {{AUDIO_GID }} - - | ||
26 | g cdrom {{CDROM_GID }} - - | ||
27 | g dialout {{DIALOUT_GID}} - - | ||
28 | g disk {{DISK_GID }} - - | ||
29 | g input {{INPUT_GID }} - - | ||
30 | g kmem {{KMEM_GID }} - - | ||
31 | g kvm {{KVM_GID }} - - | ||
32 | g lp {{LP_GID }} - - | ||
33 | g render {{RENDER_GID }} - - | ||
34 | g sgx {{SGX_GID }} - - | ||
35 | g tape {{TAPE_GID }} - - | ||
36 | g tty {{TTY_GID }} - - | ||
37 | g video {{VIDEO_GID }} - - | ||
38 | |||
39 | # Default group for normal users | ||
40 | g 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" | |||
17 | SRC_URI += " \ | 17 | SRC_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. |
253 | WATCHDOG_TIMEOUT ??= "60" | 254 | WATCHDOG_TIMEOUT ??= "60" |
254 | 255 | ||
256 | do_configure:prepend() { | ||
257 | sed s@:ROOT_HOME:@${ROOT_HOME}@g ${WORKDIR}/basic.conf.in > ${S}/sysusers.d/basic.conf.in | ||
258 | } | ||
259 | |||
255 | do_install() { | 260 | do_install() { |
256 | meson_do_install | 261 | meson_do_install |
257 | install -d ${D}/${base_sbindir} | 262 | install -d ${D}/${base_sbindir} |