<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.30.3">
</HEAD>
<BODY>
Le mercredi 29 d&#233;cembre 2010 &#224; 14:11 +0100, Jonas Smedegaard a &#233;crit&nbsp;:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Wed, Dec 29, 2010 at 10:23:35AM +0100, R&#233;mi Thebault wrote:
&gt;
&gt;
&gt;&gt; &gt;I don't get this. Do you expect a cdbs script to unpack the waf file 
&gt;&gt; &gt;(I don't know the format, but it is probably not so hard) and to 
&gt;&gt; &gt;checksum each file inside ?
&gt;&gt;
&gt;&gt; Nah, not checksum each file separately - unless it turns out that it 
&gt;&gt; is indeed helpful to track the contained files individually.
&gt;&gt;
&gt;&gt; For now I &quot;just&quot; suggest to unpack the blob when failing, and 
&gt;&gt; emitting a message to first check those files, then delete them and 
&gt;&gt; then apply the magic checksum.
&gt;&gt;
&gt;
&gt;
&gt;If I understand well:
&gt;1. If no safetybelt, we checksum the waf file with debian/waf.sha1sum
&gt;2. If the checksum fail, we unpack waf and display a relevant mesg like
&gt;     &quot;waf checksum failed, check the content in debian/wafunpacked and
&gt;do `sha1sum ./waf &gt; debian/waf.sha1sum`&quot;
&gt;3. adding &quot;rm -rf debian/wafunpacked&quot; in clean target (could depend on
&gt;the safety belt)
&gt;
&gt;Is this correct ?

I guess you mean _unless_ no safetybelt at 1).

Here's a proposed pseudo-code:

If not safetybelt-off; then
   do-checksum
   mesg checksum
   if checksum-match-fail (including no stored checksum at all); then
     unpack-waf
     error &quot;waf checksum failed. inspect unpacked waf, and if ok
            store above calculated checksum as debian/waf.sha1sum
            and remove the unpacked files&quot;
else
   warning &quot;WARNING: waf file is executed without prior inspection!
            this might be unsafe - you have been warned...!&quot;

I.e. a little more than your summary, but not much.  does that look 
sane?
</PRE>
</BLOCKQUOTE>
OK I will work this way.<BR>
<BR>
R&#233;mi
</BODY>
</HTML>