Subject: Re: bug#57118: [PATCH] gnu: Add linode-cli.

From: Csepp <[email-masked]>
Date: Thu, 01 Sep 2022 03:10:32 +0200

Ludovic Courtès <[email-masked]> writes:

> Hi,
>
> raingloom <[email-masked]> skribis:
>
>> From: Csepp <[email-masked]>
>>
>> * gnu/packages/python-xyz.scm (linode-cli) (linode-openapi-spec): New variables.
>
> [...]
>
>> +;; linode-cli would normally fetch this at build time
>> +;; TODO: is there a way to refer to previous versions? is there even a point
>> +;; in trying to?
>> +(define linode-openapi-spec
>> +  (origin
>> +    (method url-fetch)
>> +    (uri "https://www.linode.com/docs/api/openapi.yaml")
>> +    (sha256
>> +     (base32
>> +      "1jcjfnagjihcy03fcmn5sghdf7a80798xjgj1x7z3ncqwd5aggwg"))))
>
> Unfortunately, as you probably guess, this file was updated in place and
> the hash is now different.
>
> Is there a stable URL for the specific version we’d want to use here?
> Otherwise it’s just too shaky: the thing will fail to build a week or
> month later, when linode.com decides to update that file.
>
> With this fixed, the patch is ready to go.
>
> Thanks in advance,
> Ludo’.

I skimmed the OpenAPI spec and couldn't find any mention of how to
access previous versions.
IMHO if there is a build failure, guix refresh -u should take care of
updating the hash.  It's better than trying to use an outdated API
description without notifying the user.