Subject: Re: bug#55248: [PATCH 0/7] gnu: Update Racket to 8.5 and Chez Scheme to 9.5.8.

From: Philip McGrath <[email-masked]>
Date: Wed, 11 May 2022 23:50:11 -0400

Hi,

On 5/9/22 05:44, Ludovic Courtès wrote:
> Hi Philip,
> 
> Philip McGrath <[email-masked]> skribis:
> 
>>    gnu: racket: Update to 8.5.
>>    gnu: racket: Fix out-of-source build.
>>    gnu: chez-scheme: Update to 9.5.8.
>>    gnu: chez-scheme: Refactor documentation phases.
>>    gnu: chez-scheme: Refactor configure phase and fix '--threads'.
>>    gnu: stex: Get machine type dynamically.
>>    gnu: chez-upstream-features-for-system: Improve implementation.
>>    gnu: chez-scheme-for-racket: Fix supported systems.
>>    gnu: chez-scheme-for-system: Adjust for bytecode backend.
> 
> I applied the whole series (great work!), but stumbled upon this:
> 
> --8<---------------cut here---------------start------------->8---
> r:sha256 hash mismatch for /gnu/store/mipblqr29m18gvcmqp5j5s3aj5jknchy-racket-gui-8.5-checkout:
>    expected hash: 0hqryw3md67j5z4d6bv5qx75w8z1vjxfixabf2xq9bj6k43yzzmi
>    actual hash:   0r3ck4gxdhnzr1a1fi0f1i7gwfip7akq10qgcxza66pp57hnl0wx
> hash mismatch for store item '/gnu/store/mipblqr29m18gvcmqp5j5s3aj5jknchy-racket-gui-8.5-checkout'
> build of /gnu/store/xsbp1m2bh5wn4h0pxc7rr5pz4w88jfns-racket-gui-8.5-checkout.drv failed
> --8<---------------cut here---------------end--------------->8---
> 
> Could it be that the v8.5 tag on that repo was modified in place?
> 
> You can resent just this one patch if you want, if it’s just a matter of
> changing the hash.
> 

Thanks for finding this! I will send the single revised patch in a 
separate email. The hashes for the "gui", "htdp", "redex", 
"typed-racket", "string-constants", and "syntax-color" origins needed to 
be updated.

The v8.5 tags were not modified, but it looks like the v8.5 tags for 
those repositories included additional commits added after the first 
release candidate, which I had built early on. (The tag is created only 
when the release is actually released.) My best guess is that, somewhere 
in the process of amending this patch series, I had done a build with 
the commit and checksum for the first release candidate, but with the 
origin file name as though it were the 8.5 release. When I then changed 
these origins to point at the tag, I must not have changed the hashes, 
and I guess Guix saw that it already had store items with the correct 
name and hash and didn't try to download them again.

I confirmed that this works by building on a computer where I hadn't 
built any of the earlier versions of this series (which took a little 
bit to set up).

I'm not sure if there's a better way to prevent or check for this sort 
of problem in general.

Just to be extra explicit, here's the diff between v3 and what I'm about 
to send as v4 1/9:

> diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
> index 1f020f1276..c4183be210 100644
> --- a/gnu/packages/racket.scm
> +++ b/gnu/packages/racket.scm
> @@ -686,13 +686,13 @@ (define-public racket
>         "games" (base32 "0kpn3izlx1ccd0pj0dnvmnrhny51b85xy418a7psj70lz8j8415d")
>         '(("games" ".")))
>        (simple-racket-origin
> -       "gui" (base32 "0hqryw3md67j5z4d6bv5qx75w8z1vjxfixabf2xq9bj6k43yzzmi")
> +       "gui" (base32 "0r3ck4gxdhnzr1a1fi0f1i7gwfip7akq10qgcxza66pp57hnl0wx")
>         '("gui" "gui-doc" "gui-lib" "tex-table"))
>        (simple-racket-origin
>         "gui-pkg-manager" (base32 "1ji9448d723nklqvycwdswj0ni28sabrncag14f9mx47did5myb5")
>         '("gui-pkg-manager-lib"))
>        (simple-racket-origin
> -       "htdp" (base32 "199qchdq6db6m2n4j861hiy4nxd6hg1qva16lhhdbfj274qmcplg")
> +       "htdp" (base32 "19xqixrqbwdxph17w9jga19008j88harb5wgml4hpqj3x0apx9g3")
>         '("htdp" "htdp-doc" "htdp-lib"))
>        (simple-racket-origin
>         "html" (base32 "18n1jnjgzfknc8nv8dppi85nb8q08gqdwkg6hfjk08x0p00anx2x")
> @@ -830,7 +830,7 @@ (define-public racket
>         "realm" (base32 "0hxcgla08iack54j8v40fj51811chpy66ym2zq76zb52c7kzn0hi")
>         '(("realm" ".")))
>        (simple-racket-origin
> -       "redex" (base32 "0a1fl5s80k3j3xh3lri8886ql443m7pmgv18y7whzlmsd7x8rdpr")
> +       "redex" (base32 "18rn8ddsqh1s7hdlb2cb9wxln63bz0wysjssaf9v92r712xnnv8i")
>         '("redex"
>           "redex-benchmark"
>           "redex-doc"
> @@ -877,7 +877,7 @@ (define-public racket
>         "snip" (base32 "01r9wc5xr3q3n4yyif6j0a37rgdzmpslxn05k13ksik73b3wj6hj")
>         '("snip" "snip-lib"))
>        (simple-racket-origin
> -       "typed-racket" (base32 "05xlyjrx3m8xrrrw1xmfb1807qa5aqfl0zp9bdxwh2z7cfxaii09")
> +       "typed-racket" (base32 "0z6bagp6qiw0i3slhvq035y5hqgq664xw3bdlvdayad0bgbg0mdc")
>         '("source-syntax"
>           "typed-racket"
>           "typed-racket-compatibility"
> @@ -888,13 +888,13 @@ (define-public racket
>         "srfi" (base32 "0aqbcdv2dfc2xnk0h6zfi56p7bpwqji8s88qds3d03hhh9k28gvn")
>         '("srfi" "srfi-doc" "srfi-lib" "srfi-lite-lib"))
>        (simple-racket-origin
> -       "string-constants" (base32 "1rjs0gyw9hsiglwxnimz272v9xj1gwjxrnzh4qbsxkvdaphvi38m")
> +       "string-constants" (base32 "0b1ji31pv6bjb0a2bh9sqp5abvf91gn2rai8r4c4nkar1fzfwfac")
>         '("string-constants" "string-constants-doc" "string-constants-lib"))
>        (simple-racket-origin
>         "swindle" (base32 "164gdsphjzdl2vv7zxz7dfk9jwax8njpmim6sidm8qz8a8589y67")
>         '(("swindle" ".")))
>        (simple-racket-origin
> -       "syntax-color" (base32 "1xf3rl8687c1nar4kkgkvyncwi0gl696rif0iqhffg730fk457gi")
> +       "syntax-color" (base32 "17lb2403ymz6sflw4vs3gsh2y7kgsf0gn8sncsxjhi16rpj3a9vm")
>         '("syntax-color" "syntax-color-doc" "syntax-color-lib"))
>        (simple-racket-origin
>         "trace" (base32 "070ihla5j796hdarn5wxdwn4xj0xnkm50shgh49jy994mribvhia")

-Philip