Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] sstate.bbclass: preserve time when unstaging files
Date: Mon, 29 Oct 2012 21:20:44 +0000	[thread overview]
Message-ID: <1351545644.2828.41.camel@ted> (raw)
In-Reply-To: <lymwz5gl3j.fsf@ensc-virt.intern.sigma-chemnitz.de>

On Mon, 2012-10-29 at 20:00 +0100, Enrico Scholz wrote:
> Richard Purdie <richard.purdie@linuxfoundation.org> writes:
> 
> >> >> But the real bug is the time mismatch in the autobuilders, isn't it?
> >> >> And this can/should be solved by synchronizing time by ntp on them
> >> >> instead of applying dirty hacks like resetting file dates.
> >> ...
> >> > Worse, when this does happen the failures are extremely unpredictable
> >> > and hard to debug. It causes things to repeatedly recompile for example,
> >> > even during do_install.
> > ...
> > Set the date stamp of some headers in the target sysroot of some key
> > system components (say glib) to a date about a day in the future,
> 
> Are there really packages which create files dated in the future?
> Perhaps a sanity check should be written which rejects files which are
> newer than their containing directory and/or the time-of-day?
>
> > then clean and rebuild some software that uses glib.
> 
> How will 'tar -m' fix this?  It makes things just worse because the
> files generated with -m are always newer than without -m (in practice,
> time offset between hosts served by ntp is far below 100ms. which is
> enough for the build stages doing the sstage file extraction).

Imagine system A generates the sysroot headers with a time ahead of
system B. These are packaged up into an sstate tarball. System B which
has a clock at some time behind system A then downloads and uses them so
the sysroot headers become some time in the future. You then see the
problem I described previously.

tar -m fixes this by timestamping things at the time of extraction,
thereby removing any issue of the timestamps being in the future. Yes,
we could add a step which iterated over the extracted files and checked
to see if any were in the future and if so, change their timestamps but
it seems a bit overkill when the option to tar resolves all the
problems.

The alternative is to mandate *every* system that builds are run on use
ntp and add checks to sanity.bbclass to this effect since someone might
try using a sstate feed with a bad clock. This would cause no end of
problems, not least with corporate filewalls and hurt usability of the
project so we took the other option which fixes things in a way this
should become a non-issue.

Cheers,

Richard





  reply	other threads:[~2012-10-29 21:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29 15:11 [PATCH] sstate.bbclass: preserve time when unstaging files Enrico Scholz
2012-10-29 16:11 ` Richard Purdie
2012-10-29 16:24   ` Enrico Scholz
2012-10-29 17:22     ` Richard Purdie
2012-10-29 17:59       ` Enrico Scholz
2012-10-29 18:19         ` Richard Purdie
2012-10-29 19:00           ` Enrico Scholz
2012-10-29 21:20             ` Richard Purdie [this message]
2012-10-29 21:41               ` Enrico Scholz
2012-10-29 21:55                 ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1351545644.2828.41.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=enrico.scholz@sigma-chemnitz.de \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox