On Tuesday, February 21, 2017 9:51:06 AM CET Daniel Kahn Gillmor wrote:
> On Tue 2017-02-21 06:31:57 -0500, Tim Ruehsen wrote:
> > both, /usr/share/publicsuffix/public_suffix_list.dafsa and
> > /usr/share/publicsuffix/public_suffix_list.dat have the same file date
> > (mtime).
> > 
> > Together with a small glitch in libpsl/psl_latest() this leads to .dat
> > being loaded which causes lot's of parse/conversion/malloc overhead.
> 
> whoops, thanks for catching this!
> 
> > There are two possible solutions:
> > 1. The .dafsa file should be older than the .dat file by at least 1s.
> > This makes sense since the .dafsa file is generated from .dat and thus
> > should be older.
> 
> as you said in your followup, the .dafsa should be *newer* than the
> .dat.  I'm trying to decide how to package this change most cleanly.
> 
> The timestamps for the installed files are "clamped" to the timestamp in
> the debian/changelog entry.  This is a relatively new change, in debian,
> the result of the reproducible-builds policy, which is the right one.
> 
> Since the build daemons are all going to do the build *after* the
> debian/changelog entry timestamp, just including a "sleep 1" before
> invoking psl-make-dafsa won't provide a fix.
> 
> > Also the .dat file should have the original timestamp from upstream.
> 
> What timestamp do you mean by this?  I don't think that the upstream
> development includes a specific timestamp aside from those found in the
> git commit history.  Do you mean that the .dat should have timestamp
> based on the git commit timestamp?  if so, which timestamp -- the author
> timestamp or the committer timestamp?  Given that i'm naming the
> upstream package version number based on the committer timestamp, that
> might be a reasonable way to choose the timestamp for the .dat file.
> 
> if we do that, then should we let the .dafsa receive the clamped timestamp
> of the debian/changelog?  or should we explicitly set the .dafsa to the
> .dat + 1 second?

Technically it doesn't matter as long as the .dafsa is at least 1s newer than 
the .dat. The timestamp of the latest commit/change would be fine, though.

Maybe this can be used by 'date' and/or 'touch' ?
git log -n 1 --pretty=format:%cd --date=iso public_suffix_list.dat


> > 2. Apply a 1-line patch to libpsl (already in upstream git repo) which
> > prefers the distribution (.dafsa) file.
> 
> I think this is worth applying anyway, since it's the right thing to
> do.  thanks!  I've cloned this bug report and reassigned the clone to
> libpsl to track that.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to