summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel McGregor <daniel.mcgregor@vecima.com>2024-11-19 11:51:06 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-11-21 12:16:28 +0000
commit392658c663acb302ff577cd512309c354259d1b4 (patch)
tree669cf846fd9f91dfefbf04e4cd5721d4ac2596b7
parentd43508969b25a81dc0a53096857ddaecb34f7866 (diff)
downloadpoky-392658c663acb302ff577cd512309c354259d1b4.tar.gz
systemd: wrap mtime based time with packageconfig
Recently the systemd recipe grew support for setting the epoch time at image build time. Unfortunately this is unconditional, and our use case for the set-time-epoch PACKAGECONFIG is we have a system requirement that our product boot with the time set to the UNIX epoch. Instead of trying to complicate things with either an image hook or overriding the systemd recipe, just make setting the epoch at image time optional, with the same PACKAGECONFIG that controls hardcoding the systemd build time as the default epoch. (From OE-Core rev: ae433b35fb2d5475e33dea61e6bc65d83d3af56a) Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/systemd/systemd_256.7.bb4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-core/systemd/systemd_256.7.bb b/meta/recipes-core/systemd/systemd_256.7.bb
index 3831baa511..8b7ed2efe2 100644
--- a/meta/recipes-core/systemd/systemd_256.7.bb
+++ b/meta/recipes-core/systemd/systemd_256.7.bb
@@ -870,7 +870,9 @@ ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
870ALTERNATIVE_PRIORITY[runlevel] ?= "300" 870ALTERNATIVE_PRIORITY[runlevel] ?= "300"
871 871
872pkg_postinst:${PN}:append () { 872pkg_postinst:${PN}:append () {
873 touch $D${libdir}/clock-epoch 873 if ${@bb.utils.contains('PACKAGECONFIG', 'set-time-epoch', 'true', 'false', d)}; then
874 touch $D${nonarch_libdir}/clock-epoch
875 fi
874} 876}
875 877
876pkg_postinst:${PN}:libc-glibc () { 878pkg_postinst:${PN}:libc-glibc () {