summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2018-10-17 12:43:23 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-21 21:30:35 +0100
commit28c2f0dfe3ae06d87772b2a88fcace5a03e09143 (patch)
tree83097d1031d4c24034045a6bdc9bd9a042b70576 /meta
parent5293bee5f77f49a4318517d77103c818a36fafa0 (diff)
downloadpoky-28c2f0dfe3ae06d87772b2a88fcace5a03e09143.tar.gz
systemd: Remove items that made this machine (qemu) specific
Create a new systemd-conf recipe to contain the specific system/machine configuration items. This new package is now machine specific. Without doing this trying to create a single system with multiple BSPs, one of which was qemu based, would result in the systemd -and- everything that dependend upon systemd to have their hash changed. The hash changing means lots of rebuilds, but worse if it's a package based system each different machine ends with a new PR value and a newly generated package. (From OE-Core rev: d3395418758ed414eee3e95e13d2d8bc5dca88cc) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/conf/distro/include/maintainers.inc1
-rw-r--r--meta/conf/layer.conf1
-rw-r--r--meta/recipes-core/systemd/systemd-conf.bb51
-rw-r--r--meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch35
-rw-r--r--meta/recipes-core/systemd/systemd_239.bb28
5 files changed, 62 insertions, 54 deletions
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 49d9f70481..d32e07d899 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -629,6 +629,7 @@ RECIPE_MAINTAINER_pn-systemd = "Chen Qi <Qi.Chen@windriver.com>"
629RECIPE_MAINTAINER_pn-systemd-boot = "Chen Qi <Qi.Chen@windriver.com>" 629RECIPE_MAINTAINER_pn-systemd-boot = "Chen Qi <Qi.Chen@windriver.com>"
630RECIPE_MAINTAINER_pn-systemd-bootchart = "Chen Qi <Qi.Chen@windriver.com>" 630RECIPE_MAINTAINER_pn-systemd-bootchart = "Chen Qi <Qi.Chen@windriver.com>"
631RECIPE_MAINTAINER_pn-systemd-bootconf = "Chen Qi <Qi.Chen@windriver.com>" 631RECIPE_MAINTAINER_pn-systemd-bootconf = "Chen Qi <Qi.Chen@windriver.com>"
632RECIPE_MAINTAINER_pn-systemd-conf = "Chen Qi <Qi.Chen@windriver.com>"
632RECIPE_MAINTAINER_pn-systemd-compat-units = "Chen Qi <Qi.Chen@windriver.com>" 633RECIPE_MAINTAINER_pn-systemd-compat-units = "Chen Qi <Qi.Chen@windriver.com>"
633RECIPE_MAINTAINER_pn-systemd-serialgetty = "Chen Qi <Qi.Chen@windriver.com>" 634RECIPE_MAINTAINER_pn-systemd-serialgetty = "Chen Qi <Qi.Chen@windriver.com>"
634RECIPE_MAINTAINER_pn-systemd-systemctl-native = "Chen Qi <Qi.Chen@windriver.com>" 635RECIPE_MAINTAINER_pn-systemd-systemctl-native = "Chen Qi <Qi.Chen@windriver.com>"
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index 6221a057ce..504f7fa07a 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -74,6 +74,7 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
74 gnome-icon-theme->librsvg \ 74 gnome-icon-theme->librsvg \
75 font-alias->font-util \ 75 font-alias->font-util \
76 systemd-boot->systemd-bootconf \ 76 systemd-boot->systemd-bootconf \
77 systemd->systemd-conf \
77 weston-init->weston \ 78 weston-init->weston \
78 weston-init->kbd \ 79 weston-init->kbd \
79" 80"
diff --git a/meta/recipes-core/systemd/systemd-conf.bb b/meta/recipes-core/systemd/systemd-conf.bb
new file mode 100644
index 0000000000..c694efbbf1
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd-conf.bb
@@ -0,0 +1,51 @@
1require systemd.inc
2
3SUMMARY = "Systemd system configuration"
4DESCRIPTION = "Systemd may require slightly different configuration for \
5different machines. For example, qemu machines require a longer \
6DefaultTimeoutStartSec setting."
7
8PACKAGE_ARCH = "${MACHINE_ARCH}"
9
10CONFFILES_${PN} = "${sysconfdir}/machine-id \
11${sysconfdir}/systemd/coredump.conf \
12${sysconfdir}/systemd/journald.conf \
13${sysconfdir}/systemd/logind.conf \
14${sysconfdir}/systemd/system.conf \
15${sysconfdir}/systemd/user.conf"
16
17FILES_${PN} = "${sysconfdir}/machine-id ${sysconfdir}/systemd"
18
19do_compile[noexec] = '1'
20
21do_install() {
22 install -d ${D}/${sysconfdir}/systemd
23
24 # Create machine-id
25 # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
26 touch ${D}${sysconfdir}/machine-id
27
28 install -m 0644 ${S}/src/coredump/coredump.conf ${D}${sysconfdir}/systemd/coredump.conf
29
30 install -m 0644 ${S}/src/journal/journald.conf ${D}${sysconfdir}/systemd/journald.conf
31 # Enable journal to forward message to syslog daemon
32 sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
33 # Set the maximium size of runtime journal to 64M as default
34 sed -i -e 's/.*RuntimeMaxUse.*/RuntimeMaxUse=64M/' ${D}${sysconfdir}/systemd/journald.conf
35
36 install -m 0644 ${S}/src/login/logind.conf.in ${D}${sysconfdir}/systemd/logind.conf
37 # Set KILL_USER_PROCESSES to yes
38 sed -i -e 's/@KILL_USER_PROCESSES@/yes/' ${D}${sysconfdir}/systemd/logind.conf
39
40 install -m 0644 ${S}/src/core/system.conf.in ${D}${sysconfdir}/systemd/system.conf
41 # Set MEMORY_ACCOUNTING_DEFAULT to yes
42 sed -i -e 's/@MEMORY_ACCOUNTING_DEFAULT@/yes/' ${D}${sysconfdir}/systemd/system.conf
43
44 install -m 0644 ${S}/src/core/user.conf ${D}${sysconfdir}/systemd/user.conf
45}
46
47# Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52
48do_install_append_qemuall() {
49 # Change DefaultTimeoutStartSec from 90s to 240s
50 echo "DefaultTimeoutStartSec = 240s" >> ${D}${sysconfdir}/systemd/system.conf
51}
diff --git a/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch b/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
deleted file mode 100644
index fd7bf3fcf6..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From 2925c0c3b6ce4056622b86c1c61ee14add430790 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Thu, 28 Jun 2018 10:56:29 +0800
4Subject: [PATCH] core/device.c: Change the default device timeout to 240 sec.
5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
7MIME-Version: 1.0
8Content-Type: text/plain; charset=UTF-8
9Content-Transfer-Encoding: 8bit
10
11Upstream-Status: Inappropriate [Specific case QEMU/AB]
12
13Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
16---
17 src/core/device.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/src/core/device.c b/src/core/device.c
21index a2d00a0fb..f26e55ebb 100644
22--- a/src/core/device.c
23+++ b/src/core/device.c
24@@ -95,7 +95,7 @@ static void device_init(Unit *u) {
25 * indefinitely for plugged in devices, something which cannot
26 * happen for the other units since their operations time out
27 * anyway. */
28- u->job_running_timeout = u->manager->default_timeout_start_usec;
29+ u->job_running_timeout = (240 * USEC_PER_SEC);
30
31 u->ignore_on_isolate = true;
32
33--
342.11.0
35
diff --git a/meta/recipes-core/systemd/systemd_239.bb b/meta/recipes-core/systemd/systemd_239.bb
index 7ed932141d..bc16407e09 100644
--- a/meta/recipes-core/systemd/systemd_239.bb
+++ b/meta/recipes-core/systemd/systemd_239.bb
@@ -31,7 +31,6 @@ SRC_URI += "file://touchscreen.rules \
31 file://0022-build-sys-Detect-whether-struct-statx-is-defined-in-.patch \ 31 file://0022-build-sys-Detect-whether-struct-statx-is-defined-in-.patch \
32 file://0023-resolvconf-fixes-for-the-compatibility-interface.patch \ 32 file://0023-resolvconf-fixes-for-the-compatibility-interface.patch \
33 " 33 "
34SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
35 34
36# patches made for musl are only applied on TCLIBC is musl 35# patches made for musl are only applied on TCLIBC is musl
37SRC_URI += "${SRC_URI_MUSL}" 36SRC_URI += "${SRC_URI_MUSL}"
@@ -218,10 +217,6 @@ do_install() {
218 [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init 217 [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
219 [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd 218 [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
220 219
221 # Create machine-id
222 # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
223 touch ${D}${sysconfdir}/machine-id
224
225 install -d ${D}${sysconfdir}/udev/rules.d/ 220 install -d ${D}${sysconfdir}/udev/rules.d/
226 install -d ${D}${sysconfdir}/tmpfiles.d 221 install -d ${D}${sysconfdir}/tmpfiles.d
227 install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ 222 install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
@@ -256,11 +251,6 @@ do_install() {
256 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service 251 ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
257 fi 252 fi
258 253
259 # Enable journal to forward message to syslog daemon
260 sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
261 # Set the maximium size of runtime journal to 64M as default
262 sed -i -e 's/.*RuntimeMaxUse.*/RuntimeMaxUse=64M/' ${D}${sysconfdir}/systemd/journald.conf
263
264 # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it 254 # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
265 # for existence else it fails 255 # for existence else it fails
266 if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then 256 if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
@@ -284,6 +274,14 @@ do_install() {
284 chown polkitd:root ${D}${datadir}/polkit-1/rules.d 274 chown polkitd:root ${D}${datadir}/polkit-1/rules.d
285 fi 275 fi
286 fi 276 fi
277
278 # conf files are handled by systemd-conf
279 rm -f ${D}${sysconfdir}/machine-id
280 rm -f ${D}${sysconfdir}/systemd/coredump.conf
281 rm -f ${D}${sysconfdir}/systemd/journald.conf
282 rm -f ${D}${sysconfdir}/systemd/logind.conf
283 rm -f ${D}${sysconfdir}/systemd/system.conf
284 rm -f ${D}${sysconfdir}/systemd/user.conf
287} 285}
288 286
289 287
@@ -433,13 +431,6 @@ FILES_${PN}-extra-utils = "\
433 ${rootlibexecdir}/systemd/systemd-cgroups-agent \ 431 ${rootlibexecdir}/systemd/systemd-cgroups-agent \
434" 432"
435 433
436CONFFILES_${PN} = "${sysconfdir}/machine-id \
437 ${sysconfdir}/systemd/coredump.conf \
438 ${sysconfdir}/systemd/journald.conf \
439 ${sysconfdir}/systemd/logind.conf \
440 ${sysconfdir}/systemd/system.conf \
441 ${sysconfdir}/systemd/user.conf"
442
443FILES_${PN} = " ${base_bindir}/* \ 434FILES_${PN} = " ${base_bindir}/* \
444 ${base_sbindir}/shutdown \ 435 ${base_sbindir}/shutdown \
445 ${base_sbindir}/halt \ 436 ${base_sbindir}/halt \
@@ -455,7 +446,6 @@ FILES_${PN} = " ${base_bindir}/* \
455 ${datadir}/${BPN} \ 446 ${datadir}/${BPN} \
456 ${datadir}/factory \ 447 ${datadir}/factory \
457 ${sysconfdir}/dbus-1/ \ 448 ${sysconfdir}/dbus-1/ \
458 ${sysconfdir}/machine-id \
459 ${sysconfdir}/modules-load.d/ \ 449 ${sysconfdir}/modules-load.d/ \
460 ${sysconfdir}/pam.d/ \ 450 ${sysconfdir}/pam.d/ \
461 ${sysconfdir}/sysctl.d/ \ 451 ${sysconfdir}/sysctl.d/ \
@@ -504,7 +494,7 @@ FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ $
504 494
505RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV}) util-linux-agetty util-linux-fsck" 495RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV}) util-linux-agetty util-linux-fsck"
506RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" 496RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
507RDEPENDS_${PN} += "volatile-binds update-rc.d" 497RDEPENDS_${PN} += "volatile-binds update-rc.d systemd-conf"
508 498
509RRECOMMENDS_${PN} += "systemd-extra-utils \ 499RRECOMMENDS_${PN} += "systemd-extra-utils \
510 systemd-compat-units udev-hwdb \ 500 systemd-compat-units udev-hwdb \