[Buildroot] [PATCH v2] Makefile: Update mtime of $(TARGET_DIR)/usr in target-finalize

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu May 3 20:13:02 UTC 2018


Hello,

On Mon, 30 Apr 2018 12:14:11 -0500, Chris Lesiak wrote:
> The systemd ConditionNeedsUpdate option is useful when offline updates
> of the vendor operating system resources in /usr require updating of
> /etc or /var on the next following boot.
> 
> Two examples of services making use of this option are
> systemd-hwdb-update.service and systemd-sysusers.service.
> 
> ConditionNeedsUpdate=/etc will be true if the mtime of /etc/.updated
> is older than the mtime of /usr.  After services conditional on
> ConditionNeedsUpdate have run, systemd-update-done.service will
> synch the mtime of /usr to /etc/.updated so that the condition will
> be false on subsequent boots.
> 
> For systems with writable /usr partitions where updates are done to
> the running system, the update program will touch /usr as a final step.
> But with Buildroot, where updates are often done by dumping a new
> image onto the device, and where /usr is on a filesystem mounted
> read-only, touching /usr as part of the update process is not practical.
> Instead, it should be done a build time.
> 
> For testers, please note that systemd-update-done in v234 added a
> regression where the mtime of /etc/.updated is set to the current time
> instead of the mtime or /usr.  This will be fixed in v239.
> 
> For more details, see:
> http://0pointer.de/public/systemd-man/systemd.unit.html
> http://0pointer.de/public/systemd-man/systemd-update-done.service.html
> 
> Signed-off-by: Chris Lesiak <chris.lesiak at licor.com>
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
> ---
> Changed v1 --> v2
>   - Provide a more detailed commit message.
> ---
>  Makefile | 2 ++
>  1 file changed, 2 insertions(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list