mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 00:32:13 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
d43508969b
commit
392658c663
@@ -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
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst:${PN}:libc-glibc () {
|
||||
|
||||
Reference in New Issue
Block a user