Wrong hash for tzdata

  • Done
  • quality assurance status badge
Details
2 participants
  • Andreas Enge
  • Ludovic Courtès
Owner
unassigned
Submitted by
Andreas Enge
Severity
normal
A
A
Andreas Enge wrote on 17 Jul 2013 10:18
(address . bug-guix@gnu.org)
201307171018.20213.andreas@enge.fr
$ guix build tzdata --no-substitutes -S

...
starting download of `/nix/store/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-
tzdata2013d.tar.gz' from `http://www.iana.org/time-
zones/repository/releases/tzdata2013d.tar.gz'...
output path `/nix/store/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-
tzdata2013d.tar.gz' should have sha256 hash
`08jzd8y2xkgd89wqrv3835pqr48yjabaczxr2rmg42zaykr11an0', instead has
`011v63ppr73vhjgxv00inkn5pc7z48i8lhbapkpdq3kfczq9c76d'
...

According to the iana web page, the file was released on July 5, while the
update of the package dates from July 7.

Andreas
A
A
Andreas Enge wrote on 17 Jul 2013 10:24
(address . 14890@debbugs.gnu.org)
201307171024.13133.andreas@enge.fr
Some more information:

The file stored on hydra is
gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz
which has been decompressed before storage and is in fact not a .tar.gz,
but a .tar. It is identical to the decompressed file from the iana website.

Andreas
L
L
Ludovic Courtès wrote on 17 Jul 2013 12:23
(name . Andreas Enge)(address . andreas@enge.fr)(address . 14890@debbugs.gnu.org)
87ppuhtrhd.fsf@gnu.org
Andreas Enge <andreas@enge.fr> skribis:

Toggle quote (12 lines)
> $ guix build tzdata --no-substitutes -S
>
> ...
> starting download of `/nix/store/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-
> tzdata2013d.tar.gz' from `http://www.iana.org/time-
> zones/repository/releases/tzdata2013d.tar.gz'...
> http://www.iana.org/.../tzdata2013d.tar.gz 100.0% of 213.8 KiB
> output path `/nix/store/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-
> tzdata2013d.tar.gz' should have sha256 hash
> `08jzd8y2xkgd89wqrv3835pqr48yjabaczxr2rmg42zaykr11an0', instead has
> `011v63ppr73vhjgxv00inkn5pc7z48i8lhbapkpdq3kfczq9c76d'

Hmm, works for me:

Toggle snippet (12 lines)
$ ./pre-inst-env guix build tzdata -S
The following file will be downloaded:
/nix/store/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz
@ substituter-started /nix/store/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz /home/ludo/src/guix/nix/scripts/substitute-binary
downloading `/nix/store/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz' from `http://hydra.gnu.org/nar/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz'...
http://hydra.gnu.org/nar/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz 167.1 KiB transferred@ substituter-succeeded /nix/store/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz
/nix/store/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz

$ sudo cat /nix/var/nix/substitute-binary/cache/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq
(narinfo (version 0) (date 1374056150) (value "StorePath: /nix/store/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz\nURL: http://hydra.gnu.org/nar/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz\nCompression: bzip2\nFileHash: \nFileSize: \nNarHash: sha256:0x25a56v6j6xhmbbfl29f97ch4prfr9xsbbgw4r9p5dk9qw09wvv\nNarSize: 727152\nReferences: \nDeriver: j1c8v7bfpalq8vpk31pkazcczdgl52vq-tzdata2013d.tar.gz.drv\nSystem: x86_64-linux\n"))

Toggle quote (5 lines)
> The file stored on hydra is
> gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz
> which has been decompressed before storage and is in fact not a .tar.gz,
> but a .tar. It is identical to the decompressed file from the iana website.

What makes you think so? It’s a bzip2-compressed nar:

Toggle snippet (24 lines)
$ wget -O tgz http://hydra.gnu.org/nar/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz
--2013-07-17 12:19:28-- http://hydra.gnu.org/nar/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz

[...]

2013-07-17 12:19:29 (171 KB/s) - ‘tgz’ saved [171109]

$ file tgz
tgz: bzip2 compressed data, block size = 900k

$ bunzip2 < tgz > nar

$ grep nix-archive nar
Binary file nar matches

$ guile -c '(use-modules (guix nar)) (call-with-input-file "nar" (lambda (p) (restore-file p ",,out")))'

$ file ,,out
,,out: POSIX tar archive (GNU)

$ guix hash ,,out
08jzd8y2xkgd89wqrv3835pqr48yjabaczxr2rmg42zaykr11an0

Could it be that there was a transient networking failure or something?

Thanks,
Ludo’.
A
A
Andreas Enge wrote on 17 Jul 2013 14:12
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 14890@debbugs.gnu.org)
201307171412.10085.andreas@enge.fr
Am Mittwoch, 17. Juli 2013 schrieb Ludovic Courtès:
Toggle quote (3 lines)
> Hmm, works for me:
> $ ./pre-inst-env guix build tzdata -S

Yes, downloading the source from hydra works. The result is the file
/nix/store/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz
but it is only a tar, non gzipped. (I was making assumptions about how
things are stored on hydra, which were apparently wrong. In any case, I end
up with a file in the store that is not compressed.)

$ guix build tzdata --no-substitutes -S
gives the error message.

And
zones/repository/releases/tzdata2013d.tar.gz
outputs
/nix/store/75pgvyrgx8z1z534y9nk2rcr0x9rhfva-tzdata2013d.tar.gz
011v63ppr73vhjgxv00inkn5pc7z48i8lhbapkpdq3kfczq9c76d

The hash in the package description seems to be for the non-compressed
file, also stored on hydra, while the download tries to store the
compressed file, which has a different hash.

Andreas
L
L
Ludovic Courtès wrote on 17 Jul 2013 14:23
(name . Andreas Enge)(address . andreas@enge.fr)(address . 14890-done@debbugs.gnu.org)
87d2qhtlwk.fsf@gnu.org
ludo@gnu.org (Ludovic Courtès) skribis:

Toggle quote (5 lines)
>> The file stored on hydra is
>> gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz
>> which has been decompressed before storage and is in fact not a .tar.gz,
>> but a .tar. It is identical to the decompressed file from the iana website.

[...]

Toggle quote (5 lines)
> $ guile -c '(use-modules (guix nar)) (call-with-input-file "nar" (lambda (p) (restore-file p ",,out")))'
>
> $ file ,,out
> ,,out: POSIX tar archive (GNU)

Oh I see what you meant now. Sorry for being sleepy. ;-)

I just checked and the new tzdata is bit-for-bit the previous .tar, but
gzipped.

Commit 1855577 updates the hash.

Thanks!

Ludo’.
Closed
L
L
Ludovic Courtès wrote on 17 Jul 2013 14:29
(name . Andreas Enge)(address . andreas@enge.fr)(address . 14890@debbugs.gnu.org)
87txjts72i.fsf@gnu.org
Andreas Enge <andreas@enge.fr> skribis:

Toggle quote (10 lines)
> Am Mittwoch, 17. Juli 2013 schrieb Ludovic Courtès:
>> Hmm, works for me:
>> $ ./pre-inst-env guix build tzdata -S
>
> Yes, downloading the source from hydra works. The result is the file
> /nix/store/gryg2h8lp3s8cc4zgxw14yn7d0wgc9lq-tzdata2013d.tar.gz
> but it is only a tar, non gzipped. (I was making assumptions about how
> things are stored on hydra, which were apparently wrong. In any case, I end
> up with a file in the store that is not compressed.)

Yeah, got it now.

That means there’s an intern (or not!) at IANA who had forgotten to gzip
the tarball, and just did that silently.

Ludo’.
?