systemd: wrap mtime based time with packageconfig
Quoted 24 lines · Dan McGregor via lists.openembedded.org
From: Daniel McGregor <[email protected]>
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.
Signed-off-by Daniel McGregor <[email protected]>--- meta/recipes-core/systemd/systemd_256.7.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)meta/recipes-core/systemd/systemd_256.7.bb +0
-0
meta/recipes-core/systemd/systemd_256.7.bb ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" · line 874
Quoted 6 lines
meta/recipes-core/systemd/systemd_256.7.bb +2
-1@@ -870,7 +870,9 @@ ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" ALTERNATIVE_PRIORITY[runlevel] ?= "300" pkg_postinst:${PN}:append () { - touch $D${libdir}/clock-epoch + if ${@bb.utils.contains('PACKAGECONFIG', 'set-time-epoch', 'true', 'false', d)}; then + touch $D${nonarch_libdir}/clock-epoch
I noticed this one shortly after the original patch.. systemd checks /usr/lib/clock-epoch, libdir might be something like /usr/lib64.
Quoted 16 lines
meta/recipes-core/systemd/systemd_256.7.bb +1
-1+ fi } pkg_postinst:${PN}:libc-glibc () { --2.47.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#207401): https://lists.openembedded.org/g/openembedded-core/message/207401
Mute This Topic: https://lists.openembedded.org/mt/109669301/3617261
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-