diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/conf/distro/include/init-manager-systemd.inc | 2 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd.inc | 4 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch | 22 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd/0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch | 73 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd/basic.conf.in | 40 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd_255.1.bb (renamed from meta/recipes-core/systemd/systemd_254.4.bb) | 16 |
6 files changed, 25 insertions, 132 deletions
diff --git a/meta/conf/distro/include/init-manager-systemd.inc b/meta/conf/distro/include/init-manager-systemd.inc index 595d1f2644..0a76647459 100644 --- a/meta/conf/distro/include/init-manager-systemd.inc +++ b/meta/conf/distro/include/init-manager-systemd.inc | |||
@@ -5,3 +5,5 @@ VIRTUAL-RUNTIME_init_manager ??= "systemd" | |||
5 | VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units" | 5 | VIRTUAL-RUNTIME_initscripts ??= "systemd-compat-units" |
6 | VIRTUAL-RUNTIME_login_manager ??= "shadow-base" | 6 | VIRTUAL-RUNTIME_login_manager ??= "shadow-base" |
7 | VIRTUAL-RUNTIME_dev_manager ??= "systemd" | 7 | VIRTUAL-RUNTIME_dev_manager ??= "systemd" |
8 | # systemd hardcodes /root in its source codes, other values are not offically supported | ||
9 | ROOT_HOME ?= "/root" | ||
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc index ccc3236457..1417e0150f 100644 --- a/meta/recipes-core/systemd/systemd.inc +++ b/meta/recipes-core/systemd/systemd.inc | |||
@@ -15,8 +15,8 @@ LICENSE:libsystemd = "LGPL-2.1-or-later" | |||
15 | LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ | 15 | LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ |
16 | file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" | 16 | file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" |
17 | 17 | ||
18 | SRCREV = "2e7504449a51fb38db9cd2da391c6434f82def51" | 18 | SRCREV = "2018ccef6645ce00c784369a22dc4e98f6d7061d" |
19 | SRCBRANCH = "v254-stable" | 19 | SRCBRANCH = "v255-stable" |
20 | SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}" | 20 | SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}" |
21 | 21 | ||
22 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
diff --git a/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch index 085f1e9052..be231cf6b2 100644 --- a/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch +++ b/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch | |||
@@ -1,8 +1,8 @@ | |||
1 | From ca7d9a8d9c81702af9c599bb79706f12b1a465cf Mon Sep 17 00:00:00 2001 | 1 | From 29a58009a172e369ad7166e16dab2f4945c6b0d2 Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Thu, 21 Feb 2019 16:23:24 +0800 | 3 | Date: Thu, 21 Feb 2019 16:23:24 +0800 |
4 | Subject: [PATCH] binfmt: Don't install dependency links at install time for | 4 | Subject: [PATCH 1/2] binfmt: Don't install dependency links at install time |
5 | the binfmt services | 5 | for the binfmt services |
6 | 6 | ||
7 | use [Install] blocks so that they get created when the service is enabled | 7 | use [Install] blocks so that they get created when the service is enabled |
8 | like a traditional service. | 8 | like a traditional service. |
@@ -25,10 +25,10 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
25 | 3 files changed, 7 insertions(+), 2 deletions(-) | 25 | 3 files changed, 7 insertions(+), 2 deletions(-) |
26 | 26 | ||
27 | diff --git a/units/meson.build b/units/meson.build | 27 | diff --git a/units/meson.build b/units/meson.build |
28 | index c7939a10f8..219570ab19 100644 | 28 | index e7bfb7f838..1d5ec4b178 100644 |
29 | --- a/units/meson.build | 29 | --- a/units/meson.build |
30 | +++ b/units/meson.build | 30 | +++ b/units/meson.build |
31 | @@ -149,7 +149,6 @@ units = [ | 31 | @@ -154,7 +154,6 @@ units = [ |
32 | { | 32 | { |
33 | 'file' : 'proc-sys-fs-binfmt_misc.automount', | 33 | 'file' : 'proc-sys-fs-binfmt_misc.automount', |
34 | 'conditions' : ['ENABLE_BINFMT'], | 34 | 'conditions' : ['ENABLE_BINFMT'], |
@@ -36,7 +36,7 @@ index c7939a10f8..219570ab19 100644 | |||
36 | }, | 36 | }, |
37 | { | 37 | { |
38 | 'file' : 'proc-sys-fs-binfmt_misc.mount', | 38 | 'file' : 'proc-sys-fs-binfmt_misc.mount', |
39 | @@ -246,7 +245,6 @@ units = [ | 39 | @@ -251,7 +250,6 @@ units = [ |
40 | { | 40 | { |
41 | 'file' : 'systemd-binfmt.service.in', | 41 | 'file' : 'systemd-binfmt.service.in', |
42 | 'conditions' : ['ENABLE_BINFMT'], | 42 | 'conditions' : ['ENABLE_BINFMT'], |
@@ -45,7 +45,7 @@ index c7939a10f8..219570ab19 100644 | |||
45 | { | 45 | { |
46 | 'file' : 'systemd-bless-boot.service.in', | 46 | 'file' : 'systemd-bless-boot.service.in', |
47 | diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount | 47 | diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount |
48 | index 6b1bbdc91e..5ec5b8670a 100644 | 48 | index 5d212015a5..6c2900ca77 100644 |
49 | --- a/units/proc-sys-fs-binfmt_misc.automount | 49 | --- a/units/proc-sys-fs-binfmt_misc.automount |
50 | +++ b/units/proc-sys-fs-binfmt_misc.automount | 50 | +++ b/units/proc-sys-fs-binfmt_misc.automount |
51 | @@ -22,3 +22,6 @@ Before=shutdown.target | 51 | @@ -22,3 +22,6 @@ Before=shutdown.target |
@@ -56,7 +56,7 @@ index 6b1bbdc91e..5ec5b8670a 100644 | |||
56 | +[Install] | 56 | +[Install] |
57 | +WantedBy=sysinit.target | 57 | +WantedBy=sysinit.target |
58 | diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in | 58 | diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in |
59 | index b04412e037..63f116e4fa 100644 | 59 | index 6861c76674..531e9fbd90 100644 |
60 | --- a/units/systemd-binfmt.service.in | 60 | --- a/units/systemd-binfmt.service.in |
61 | +++ b/units/systemd-binfmt.service.in | 61 | +++ b/units/systemd-binfmt.service.in |
62 | @@ -14,6 +14,7 @@ Documentation=https://docs.kernel.org/admin-guide/binfmt-misc.html | 62 | @@ -14,6 +14,7 @@ Documentation=https://docs.kernel.org/admin-guide/binfmt-misc.html |
@@ -68,12 +68,12 @@ index b04412e037..63f116e4fa 100644 | |||
68 | After=proc-sys-fs-binfmt_misc.mount | 68 | After=proc-sys-fs-binfmt_misc.mount |
69 | After=local-fs.target | 69 | After=local-fs.target |
70 | @@ -31,3 +32,6 @@ RemainAfterExit=yes | 70 | @@ -31,3 +32,6 @@ RemainAfterExit=yes |
71 | ExecStart={{ROOTLIBEXECDIR}}/systemd-binfmt | 71 | ExecStart={{LIBEXECDIR}}/systemd-binfmt |
72 | ExecStop={{ROOTLIBEXECDIR}}/systemd-binfmt --unregister | 72 | ExecStop={{LIBEXECDIR}}/systemd-binfmt --unregister |
73 | TimeoutSec=90s | 73 | TimeoutSec=90s |
74 | + | 74 | + |
75 | +[Install] | 75 | +[Install] |
76 | +WantedBy=sysinit.target | 76 | +WantedBy=sysinit.target |
77 | -- | 77 | -- |
78 | 2.39.2 | 78 | 2.34.1 |
79 | 79 | ||
diff --git a/meta/recipes-core/systemd/systemd/0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch b/meta/recipes-core/systemd/systemd/0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch deleted file mode 100644 index 98914ae154..0000000000 --- a/meta/recipes-core/systemd/systemd/0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | From f75f03ef6bc3554068e456bed227f333d5cb8c34 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 29 Sep 2020 18:01:41 -0700 | ||
4 | Subject: [PATCH] Move sysusers.d/sysctl.d/binfmt.d/modules-load.d to /usr | ||
5 | |||
6 | These directories are moved to /lib since systemd v246, commit | ||
7 | 4a56315a990b ("path: use ROOTPREFIX properly"), but in oe-core/yocto, | ||
8 | the old /usr/lib is still being used. | ||
9 | |||
10 | Upstream-Status: Inappropriate (OE-specific) | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> | ||
13 | --- | ||
14 | src/core/systemd.pc.in | 8 ++++---- | ||
15 | src/libsystemd/sd-path/sd-path.c | 8 ++++---- | ||
16 | 2 files changed, 8 insertions(+), 8 deletions(-) | ||
17 | |||
18 | diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in | ||
19 | index 693433b34b..8368a3ff02 100644 | ||
20 | --- a/src/core/systemd.pc.in | ||
21 | +++ b/src/core/systemd.pc.in | ||
22 | @@ -67,16 +67,16 @@ tmpfilesdir=${tmpfiles_dir} | ||
23 | |||
24 | user_tmpfiles_dir=${prefix}/share/user-tmpfiles.d | ||
25 | |||
26 | -sysusers_dir=${rootprefix}/lib/sysusers.d | ||
27 | +sysusers_dir=${prefix}/lib/sysusers.d | ||
28 | sysusersdir=${sysusers_dir} | ||
29 | |||
30 | -sysctl_dir=${rootprefix}/lib/sysctl.d | ||
31 | +sysctl_dir=${prefix}/lib/sysctl.d | ||
32 | sysctldir=${sysctl_dir} | ||
33 | |||
34 | -binfmt_dir=${rootprefix}/lib/binfmt.d | ||
35 | +binfmt_dir=${prefix}/lib/binfmt.d | ||
36 | binfmtdir=${binfmt_dir} | ||
37 | |||
38 | -modules_load_dir=${rootprefix}/lib/modules-load.d | ||
39 | +modules_load_dir=${prefix}/lib/modules-load.d | ||
40 | modulesloaddir=${modules_load_dir} | ||
41 | |||
42 | catalog_dir=${prefix}/lib/systemd/catalog | ||
43 | diff --git a/src/libsystemd/sd-path/sd-path.c b/src/libsystemd/sd-path/sd-path.c | ||
44 | index 1af3a36d1d..def502b717 100644 | ||
45 | --- a/src/libsystemd/sd-path/sd-path.c | ||
46 | +++ b/src/libsystemd/sd-path/sd-path.c | ||
47 | @@ -365,19 +365,19 @@ static int get_path(uint64_t type, char **buffer, const char **ret) { | ||
48 | return 0; | ||
49 | |||
50 | case SD_PATH_SYSUSERS: | ||
51 | - *ret = ROOTPREFIX_NOSLASH "/lib/sysusers.d"; | ||
52 | + *ret = "/usr/lib/sysusers.d"; | ||
53 | return 0; | ||
54 | |||
55 | case SD_PATH_SYSCTL: | ||
56 | - *ret = ROOTPREFIX_NOSLASH "/lib/sysctl.d"; | ||
57 | + *ret = "/usr/lib/sysctl.d"; | ||
58 | return 0; | ||
59 | |||
60 | case SD_PATH_BINFMT: | ||
61 | - *ret = ROOTPREFIX_NOSLASH "/lib/binfmt.d"; | ||
62 | + *ret = "/usr/lib/binfmt.d"; | ||
63 | return 0; | ||
64 | |||
65 | case SD_PATH_MODULES_LOAD: | ||
66 | - *ret = ROOTPREFIX_NOSLASH "/lib/modules-load.d"; | ||
67 | + *ret = "/usr/lib/modules-load.d"; | ||
68 | return 0; | ||
69 | |||
70 | case SD_PATH_CATALOG: | ||
71 | -- | ||
72 | 2.39.2 | ||
73 | |||
diff --git a/meta/recipes-core/systemd/systemd/basic.conf.in b/meta/recipes-core/systemd/systemd/basic.conf.in deleted file mode 100644 index fac288f7fa..0000000000 --- a/meta/recipes-core/systemd/systemd/basic.conf.in +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
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_254.4.bb b/meta/recipes-core/systemd/systemd_255.1.bb index 2819755b81..c0de44090d 100644 --- a/meta/recipes-core/systemd/systemd_254.4.bb +++ b/meta/recipes-core/systemd/systemd_255.1.bb | |||
@@ -21,7 +21,6 @@ REQUIRED_DISTRO_FEATURES += "systemd" | |||
21 | SRC_URI += " \ | 21 | SRC_URI += " \ |
22 | file://touchscreen.rules \ | 22 | file://touchscreen.rules \ |
23 | file://00-create-volatile.conf \ | 23 | file://00-create-volatile.conf \ |
24 | file://basic.conf.in \ | ||
25 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://org.freedesktop.hostname1_no_polkit.conf', '', d)} \ | 24 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://org.freedesktop.hostname1_no_polkit.conf', '', d)} \ |
26 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://00-hostnamed-network-user.conf', '', d)} \ | 25 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://00-hostnamed-network-user.conf', '', d)} \ |
27 | file://init \ | 26 | file://init \ |
@@ -29,7 +28,6 @@ SRC_URI += " \ | |||
29 | file://systemd-pager.sh \ | 28 | file://systemd-pager.sh \ |
30 | file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ | 29 | file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ |
31 | file://0008-implment-systemd-sysv-install-for-OE.patch \ | 30 | file://0008-implment-systemd-sysv-install-for-OE.patch \ |
32 | file://0004-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch \ | ||
33 | " | 31 | " |
34 | 32 | ||
35 | # patches needed by musl | 33 | # patches needed by musl |
@@ -74,6 +72,7 @@ PACKAGECONFIG ??= " \ | |||
74 | ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', 'link-udev-shared', d)} \ | 72 | ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', 'link-udev-shared', d)} \ |
75 | backlight \ | 73 | backlight \ |
76 | binfmt \ | 74 | binfmt \ |
75 | cgroupv2 \ | ||
77 | gshadow \ | 76 | gshadow \ |
78 | hibernate \ | 77 | hibernate \ |
79 | hostnamed \ | 78 | hostnamed \ |
@@ -267,12 +266,16 @@ EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \ | |||
267 | # The 60 seconds is watchdog's default vaule. | 266 | # The 60 seconds is watchdog's default vaule. |
268 | WATCHDOG_TIMEOUT ??= "60" | 267 | WATCHDOG_TIMEOUT ??= "60" |
269 | 268 | ||
270 | do_configure:prepend() { | ||
271 | sed s@:ROOT_HOME:@${ROOT_HOME}@g ${WORKDIR}/basic.conf.in > ${S}/sysusers.d/basic.conf.in | ||
272 | } | ||
273 | |||
274 | do_install() { | 269 | do_install() { |
275 | meson_do_install | 270 | meson_do_install |
271 | # Change the root user's home directory in /lib/sysusers.d/basic.conf. | ||
272 | # This is done merely for backward compatibility with previous systemd recipes. | ||
273 | # systemd hardcodes root user's HOME to be "/root". Changing to use other values | ||
274 | # may have unexpected runtime behaviors. | ||
275 | if [ "${ROOT_HOME}" != "/root" ]; then | ||
276 | bbwarn "Using ${ROOT_HOME} as root user's home directory is not fully supported by systemd" | ||
277 | sed -i -e 's#/root#${ROOT_HOME}#g' ${D}${exec_prefix}/lib/sysusers.d/basic.conf | ||
278 | fi | ||
276 | install -d ${D}/${base_sbindir} | 279 | install -d ${D}/${base_sbindir} |
277 | if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then | 280 | if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then |
278 | # Provided by a separate recipe | 281 | # Provided by a separate recipe |
@@ -757,6 +760,7 @@ FILES:udev += "${base_sbindir}/udevd \ | |||
757 | ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \ | 760 | ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \ |
758 | ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \ | 761 | ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \ |
759 | ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \ | 762 | ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \ |
763 | ${rootlibexecdir}/udev/rules.d/60-persistent-storage-mtd.rules \ | ||
760 | ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \ | 764 | ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \ |
761 | ${rootlibexecdir}/udev/rules.d/60-persistent-v4l.rules \ | 765 | ${rootlibexecdir}/udev/rules.d/60-persistent-v4l.rules \ |
762 | ${rootlibexecdir}/udev/rules.d/60-sensor.rules \ | 766 | ${rootlibexecdir}/udev/rules.d/60-sensor.rules \ |