summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd
diff options
context:
space:
mode:
authorJonas Bonn <jonas@norrbonn.se>2019-05-02 22:09:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-03 06:11:57 +0100
commit119d310f36bfaba25ad99266ad41f5abca748b43 (patch)
tree892e95b6fd3384fe2b4ef2fdfad0193c0f340c36 /meta/recipes-core/systemd
parent140c96d9653bcd6385d659d57645747ea521333d (diff)
downloadpoky-119d310f36bfaba25ad99266ad41f5abca748b43.tar.gz
systemd: do not create machine-id
There is no reason to have an emtpy machine-id as part of the systemd package. Either: i) the filesystem is writable and the file will be created automatically; or ii) the filesystem is read-only, in which case the empty machine-id file should be created as part of the read-only-rootfs tweaks. (From OE-Core rev: 76444b63e614baea33c044851a5859f6d1e69729) Signed-off-by: Jonas Bonn <jonas@norrbonn.se> 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')
-rw-r--r--meta/recipes-core/systemd/systemd-conf_242.bb9
-rw-r--r--meta/recipes-core/systemd/systemd/99-default.preset1
-rw-r--r--meta/recipes-core/systemd/systemd_242.bb6
3 files changed, 8 insertions, 8 deletions
diff --git a/meta/recipes-core/systemd/systemd-conf_242.bb b/meta/recipes-core/systemd/systemd-conf_242.bb
index 9bb27fd96d..7fe2e1105b 100644
--- a/meta/recipes-core/systemd/systemd-conf_242.bb
+++ b/meta/recipes-core/systemd/systemd-conf_242.bb
@@ -7,14 +7,13 @@ DefaultTimeoutStartSec setting."
7 7
8PACKAGE_ARCH = "${MACHINE_ARCH}" 8PACKAGE_ARCH = "${MACHINE_ARCH}"
9 9
10CONFFILES_${PN} = "${sysconfdir}/machine-id \ 10CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \
11${sysconfdir}/systemd/coredump.conf \
12${sysconfdir}/systemd/journald.conf \ 11${sysconfdir}/systemd/journald.conf \
13${sysconfdir}/systemd/logind.conf \ 12${sysconfdir}/systemd/logind.conf \
14${sysconfdir}/systemd/system.conf \ 13${sysconfdir}/systemd/system.conf \
15${sysconfdir}/systemd/user.conf" 14${sysconfdir}/systemd/user.conf"
16 15
17FILES_${PN} = "${sysconfdir}/machine-id ${sysconfdir}/systemd" 16FILES_${PN} = "${sysconfdir}/systemd"
18 17
19do_configure[noexec] = '1' 18do_configure[noexec] = '1'
20do_compile[noexec] = '1' 19do_compile[noexec] = '1'
@@ -23,10 +22,6 @@ do_install() {
23 rm -rf ${D}/${sysconfdir}/systemd 22 rm -rf ${D}/${sysconfdir}/systemd
24 install -d ${D}/${sysconfdir}/systemd 23 install -d ${D}/${sysconfdir}/systemd
25 24
26 # Create machine-id
27 # 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
28 touch ${D}${sysconfdir}/machine-id
29
30 install -m 0644 ${S}/src/coredump/coredump.conf ${D}${sysconfdir}/systemd/coredump.conf 25 install -m 0644 ${S}/src/coredump/coredump.conf ${D}${sysconfdir}/systemd/coredump.conf
31 26
32 install -m 0644 ${S}/src/journal/journald.conf ${D}${sysconfdir}/systemd/journald.conf 27 install -m 0644 ${S}/src/journal/journald.conf ${D}${sysconfdir}/systemd/journald.conf
diff --git a/meta/recipes-core/systemd/systemd/99-default.preset b/meta/recipes-core/systemd/systemd/99-default.preset
new file mode 100644
index 0000000000..1f29b50597
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/99-default.preset
@@ -0,0 +1 @@
disable *
diff --git a/meta/recipes-core/systemd/systemd_242.bb b/meta/recipes-core/systemd/systemd_242.bb
index 9f194f2b6c..7d1b0ec13a 100644
--- a/meta/recipes-core/systemd/systemd_242.bb
+++ b/meta/recipes-core/systemd/systemd_242.bb
@@ -22,6 +22,7 @@ SRC_URI += "file://touchscreen.rules \
22 file://0003-implment-systemd-sysv-install-for-OE.patch \ 22 file://0003-implment-systemd-sysv-install-for-OE.patch \
23 file://0004-rules-whitelist-hd-devices.patch \ 23 file://0004-rules-whitelist-hd-devices.patch \
24 file://0005-rules-watch-metadata-changes-in-ide-devices.patch \ 24 file://0005-rules-watch-metadata-changes-in-ide-devices.patch \
25 file://99-default.preset \
25 " 26 "
26 27
27# patches needed by musl 28# patches needed by musl
@@ -277,7 +278,6 @@ do_install() {
277 fi 278 fi
278 279
279 # conf files are handled by systemd-conf 280 # conf files are handled by systemd-conf
280 rm -f ${D}${sysconfdir}/machine-id
281 rm -f ${D}${sysconfdir}/systemd/coredump.conf 281 rm -f ${D}${sysconfdir}/systemd/coredump.conf
282 rm -f ${D}${sysconfdir}/systemd/journald.conf 282 rm -f ${D}${sysconfdir}/systemd/journald.conf
283 rm -f ${D}${sysconfdir}/systemd/logind.conf 283 rm -f ${D}${sysconfdir}/systemd/logind.conf
@@ -287,6 +287,10 @@ do_install() {
287 # duplicate udevadm for postinst script 287 # duplicate udevadm for postinst script
288 install -d ${D}${libexecdir} 288 install -d ${D}${libexecdir}
289 ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm 289 ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm
290
291 # install default policy for presets
292 # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto
293 install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_unitdir}/system-preset/99-default.preset
290} 294}
291 295
292 296