diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2018-10-17 12:43:23 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-21 21:30:35 +0100 |
commit | 28c2f0dfe3ae06d87772b2a88fcace5a03e09143 (patch) | |
tree | 83097d1031d4c24034045a6bdc9bd9a042b70576 /meta/recipes-core/systemd/systemd-conf.bb | |
parent | 5293bee5f77f49a4318517d77103c818a36fafa0 (diff) | |
download | poky-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/recipes-core/systemd/systemd-conf.bb')
-rw-r--r-- | meta/recipes-core/systemd/systemd-conf.bb | 51 |
1 files changed, 51 insertions, 0 deletions
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 @@ | |||
1 | require systemd.inc | ||
2 | |||
3 | SUMMARY = "Systemd system configuration" | ||
4 | DESCRIPTION = "Systemd may require slightly different configuration for \ | ||
5 | different machines. For example, qemu machines require a longer \ | ||
6 | DefaultTimeoutStartSec setting." | ||
7 | |||
8 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
9 | |||
10 | CONFFILES_${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 | |||
17 | FILES_${PN} = "${sysconfdir}/machine-id ${sysconfdir}/systemd" | ||
18 | |||
19 | do_compile[noexec] = '1' | ||
20 | |||
21 | do_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 | ||
48 | do_install_append_qemuall() { | ||
49 | # Change DefaultTimeoutStartSec from 90s to 240s | ||
50 | echo "DefaultTimeoutStartSec = 240s" >> ${D}${sysconfdir}/systemd/system.conf | ||
51 | } | ||