summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd-conf_242.bb
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@hivehome.com>2019-05-02 22:09:41 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-03 06:11:57 +0100
commit92d9c493c47975c94cb159ee87574710bd0c1014 (patch)
treec3c40d5fc153c9dac3f3755792320c104e0dc373 /meta/recipes-core/systemd/systemd-conf_242.bb
parent119d310f36bfaba25ad99266ad41f5abca748b43 (diff)
downloadpoky-92d9c493c47975c94cb159ee87574710bd0c1014.tar.gz
systemd-conf: simplify creation of machine-specific configuration
The configuration files that systemd installs are just skeletons detailing the available options and their default values. The recommended means of changing the configuration is to provide snippets in configuration directories. For example, journald.conf settings are best set in /usr/lib/system.d/journald.conf.d/ and can be overridden by the user by providing overriding snippets in /etc/systemd/journald.conf.d/. The systemd-conf package is just providing machine-specific overrides for some systemd defaults. This patch restores the installation of config files by systemd and reduces systemd-conf to just providing the config snippets in /usr/lib/systemd/*.conf.d. This simpilfies the systemd-conf recipe considerably since it now just sets up a couple of text files and doesn't even need access to the systemd source anymore. License-Update: configuration snippets licensing is independent of systemd licensing (From OE-Core rev: 3150253898babce70333376d22090b56b4a70bfb) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd-conf_242.bb')
-rw-r--r--meta/recipes-core/systemd/systemd-conf_242.bb56
1 files changed, 20 insertions, 36 deletions
diff --git a/meta/recipes-core/systemd/systemd-conf_242.bb b/meta/recipes-core/systemd/systemd-conf_242.bb
index 7fe2e1105b..96beea53a7 100644
--- a/meta/recipes-core/systemd/systemd-conf_242.bb
+++ b/meta/recipes-core/systemd/systemd-conf_242.bb
@@ -1,48 +1,32 @@
1require systemd.inc
2
3SUMMARY = "Systemd system configuration" 1SUMMARY = "Systemd system configuration"
4DESCRIPTION = "Systemd may require slightly different configuration for \ 2DESCRIPTION = "Systemd may require slightly different configuration for \
5different machines. For example, qemu machines require a longer \ 3different machines. For example, qemu machines require a longer \
6DefaultTimeoutStartSec setting." 4DefaultTimeoutStartSec setting."
5LICENSE = "MIT"
6LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
7 7
8PACKAGE_ARCH = "${MACHINE_ARCH}" 8SRC_URI = "\
9 9 file://journald.conf \
10CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \ 10 file://logind.conf \
11${sysconfdir}/systemd/journald.conf \ 11 file://system.conf \
12${sysconfdir}/systemd/logind.conf \ 12 file://system.conf-qemuall \
13${sysconfdir}/systemd/system.conf \ 13"
14${sysconfdir}/systemd/user.conf"
15
16FILES_${PN} = "${sysconfdir}/systemd"
17
18do_configure[noexec] = '1'
19do_compile[noexec] = '1'
20 14
21do_install() { 15do_install() {
22 rm -rf ${D}/${sysconfdir}/systemd 16 install -D -m0644 ${WORKDIR}/journald.conf ${D}${systemd_unitdir}/journald.conf.d/00-${PN}.conf
23 install -d ${D}/${sysconfdir}/systemd 17 install -D -m0644 ${WORKDIR}/logind.conf ${D}${systemd_unitdir}/logind.conf.d/00-${PN}.conf
24 18 install -D -m0644 ${WORKDIR}/system.conf ${D}${systemd_unitdir}/system.conf.d/00-${PN}.conf
25 install -m 0644 ${S}/src/coredump/coredump.conf ${D}${sysconfdir}/systemd/coredump.conf
26
27 install -m 0644 ${S}/src/journal/journald.conf ${D}${sysconfdir}/systemd/journald.conf
28 # Enable journal to forward message to syslog daemon
29 sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
30 # Set the maximium size of runtime journal to 64M as default
31 sed -i -e 's/.*RuntimeMaxUse.*/RuntimeMaxUse=64M/' ${D}${sysconfdir}/systemd/journald.conf
32
33 install -m 0644 ${S}/src/login/logind.conf.in ${D}${sysconfdir}/systemd/logind.conf
34 # Set KILL_USER_PROCESSES to yes
35 sed -i -e 's/@KILL_USER_PROCESSES@/yes/' ${D}${sysconfdir}/systemd/logind.conf
36
37 install -m 0644 ${S}/src/core/system.conf.in ${D}${sysconfdir}/systemd/system.conf
38 # Set MEMORY_ACCOUNTING_DEFAULT to yes
39 sed -i -e 's/@MEMORY_ACCOUNTING_DEFAULT@/yes/' ${D}${sysconfdir}/systemd/system.conf
40
41 install -m 0644 ${S}/src/core/user.conf ${D}${sysconfdir}/systemd/user.conf
42} 19}
43 20
44# Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52 21# Based on change from YP bug 8141, OE commit 5196d7bacaef1076c361adaa2867be31759c1b52
45do_install_append_qemuall() { 22do_install_append_qemuall() {
46 # Change DefaultTimeoutStartSec from 90s to 240s 23 install -D -m0644 ${WORKDIR}/system.conf-qemuall ${D}${systemd_unitdir}/system.conf.d/01-${PN}.conf
47 echo "DefaultTimeoutStartSec = 240s" >> ${D}${sysconfdir}/systemd/system.conf
48} 24}
25
26PACKAGE_ARCH = "${MACHINE_ARCH}"
27
28FILES_${PN} = "\
29 ${systemd_unitdir}/journald.conf.d/ \
30 ${systemd_unitdir}/logind.conf.d/ \
31 ${systemd_unitdir}/system.conf.d/ \
32"