Re: [OE-core] [PATCH] classes: rootfs-postcommands: set better sane time to systemd

2024-10-22 Thread Gaël PORTAY
On Wed Oct 23, 2024 at 4:40 AM CEST, ChenQi wrote: > The timestamps of all files in rootfs will be changed again by > reproducible_final_image_task. To achieve what you what, what you need > to do is touching an empty file, $D/usr/lib/clock-epoch, in systemd's > do_install task. > > And when you

Re: [OE-core] [PATCH] classes: rootfs-postcommands: set better sane time to systemd

2024-10-22 Thread Chen Qi via lists.openembedded.org
The timestamps of all files in rootfs will be changed again by reproducible_final_image_task. To achieve what you what, what you need to do is touching an empty file, $D/usr/lib/clock-epoch, in systemd's do_install task. And when you create /usr/lib/clock-epoch at rootfs time and changes its

Re: [OE-core] [PATCH] classes: rootfs-postcommands: set better sane time to systemd

2024-10-22 Thread Gaël PORTAY
Hello Peter, On Tue Oct 22, 2024 at 8:40 PM CEST, Peter Kjellerstedt wrote: > > I have created a rootfs-postcommand to be able to set a better time **at > > image creation** to keep the systemd package untouched (not rebuilt) by > > updateing the variable $REPRODUCIBLE_TIMESTAMP_ROOTFS. > > Can't

Re: [OE-core] [PATCH] classes: rootfs-postcommands: set better sane time to systemd

2024-10-22 Thread Peter Kjellerstedt
rg > Subject: Re: [OE-core] [PATCH] classes: rootfs-postcommands: set better > sane time to systemd > > Hello Alex, > > On Mon Oct 21, 2024 at 12:25 PM CEST, Alexander Kanavin wrote: > > Can this be done from systemd recipe itself? Items in > > rootfs-postprocess list

Re: [OE-core] [PATCH] classes: rootfs-postcommands: set better sane time to systemd

2024-10-21 Thread Alexander Kanavin
On Mon, 21 Oct 2024 at 20:02, Gaël PORTAY wrote: > Also, I wonder what is the best test to symlink the file: > - testing for the ${IMAGE_ROOTFS}/llib/systemd/systemd > - testing for systemd in DISTRO_FEATURES, > - testing for systemd in IMAGE_INSTALL? > > https://github.com/systemd/systemd/blob/4

Re: [OE-core] [PATCH] classes: rootfs-postcommands: set better sane time to systemd

2024-10-21 Thread Gaël PORTAY
On Monday 21 October 2024, Alexander Kanavin wrote: > On Mon, 21 Oct 2024 at 19:02, Gaël PORTAY wrote: > >> Or, linking the file instead: >> >> rootfs_update_timestamp () { >> if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then >> # Convert UTC in

Re: [OE-core] [PATCH] classes: rootfs-postcommands: set better sane time to systemd

2024-10-21 Thread Alexander Kanavin
On Mon, 21 Oct 2024 at 19:02, Gaël PORTAY wrote: > Or, linking the file instead: > > rootfs_update_timestamp () { > if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then > # Convert UTC into %4Y%2m%2d%2H%2M%2S > sformatted=`d

Re: [OE-core] [PATCH] classes: rootfs-postcommands: set better sane time to systemd

2024-10-21 Thread Gaël PORTAY
Hello Alex, On Mon Oct 21, 2024 at 12:25 PM CEST, Alexander Kanavin wrote: > Can this be done from systemd recipe itself? Items in > rootfs-postprocess list should not be recipe-specific. > Sure it could be done in the recipe itself ;) but... The recipe harcodes already a sane value at configure

Re: [OE-core] [PATCH] classes: rootfs-postcommands: set better sane time to systemd

2024-10-21 Thread Alexander Kanavin
Can this be done from systemd recipe itself? Items in rootfs-postprocess list should not be recipe-specific. Alex On Sat, 19 Oct 2024 at 04:19, Gaël PORTAY via lists.openembedded.org wrote: > > When systemd is started, it sets the system clock to epoch to ensure the > system clock is reasonably

[OE-core] [PATCH] classes: rootfs-postcommands: set better sane time to systemd

2024-10-18 Thread Gaël PORTAY
When systemd is started, it sets the system clock to epoch to ensure the system clock is reasonably initialized if no working RTC. As init process, systemd sets epoch very early to the more recent timestamp of[1]: - the build time of systemd (-Dtime-epoch) - the modification time ("mtime") of /v