[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: jigdo-lite Error: ... does not match checksum in template data



OK, I know now what causes the problem. I haven't found the error in JTE 
(or jigdo-file?) yet.

Downloaders, as a short-term workaround add "--no-check-files" to jigdoOpts 
in your ~/.jigdo-lite.

As of version 1.12, JTE not only outputs md5sums for each file, but also an
"Rsync64Sum" for the first 1k of each file. I asked Steve to implement this
- in the future, it'll allow the jigdo GUI to abort downloads early if the
checksum of the first 1k doesn't match during the download.

JTE 1.11 outputs a zero "blockLen" field to the .template, which switches
off comparison of Rsync64Sums by "jigdo-file make-image" (used by
jigdo-lite).

JTE 1.12 sets "blockLen" to 1024, but outputs a wrong Rsync64Sum. With our 
example file, adduser_3.59_all.deb:

$ jigdo-file mt -fi adduser_3.59_all.deb -j grr.jigdo -t grr.template adduser_3.59_all.deb
Match of `adduser_3.59_all.deb' at offset 0           
Finished - image size is 93882 bytes.
$ jigdo-file ls -t grr.template
need-file              0        93882 K3IwZGUJlF7q6sCv7t8PfA kRjI35yjRzk
image-info         93882              K3IwZGUJlF7q6sCv7t8PfA 1024
$ jigdo-file ls -t grr.template --hex
need-file              0        93882 2b7230646509945eeaeac0afeedf0f7c 9118c8df9ca34739
image-info         93882              2b7230646509945eeaeac0afeedf0f7c 1024

This means that the Rsync64Sum expected by jigdo-file is kRjI35yjRzk, or 
9118c8df9ca34739 in hexadecimal. For the algorithm, this means that 
lo=0xdfc81891, hi=0x3947a39c.

The JTE-generated .template contains something else:

$ jigdo-file ls -t sarge-i386-1.template|grep 52803584
need-file       52803584        93882 K3IwZGUJlF7q6sCv7t8PfA gIOeQJMjgK4
$ jigdo-file ls -t sarge-i386-1.template --hex|grep 52803584
need-file       52803584        93882 2b7230646509945eeaeac0afeedf0f7c 80839e40932380ae

So for JTE, lo=0x409e8380 and hi=0xae802393 - the bytes are not just
reordered like I initially suspected, but completely different. %-| Having
stared at JTE's implementation of the algorithm as well as jigdo-file's (in
src/rsyncsum.cc:73), I cannot figure out any differences. Grr, I'll have a
closer look tomorrow - unless Steve beats me in finding the bug. ;-)

Cheers,

  Richard

-- 
  __   _
  |_) /|  Richard Atterer     |  GnuPG key:
  | \/¯|  http://atterer.net  |  0x888354F7
  ¯ '` ¯



Reply to: