Subject: Re: [bug#57453] WIP (chrpath)

From: Maxime Devos <[email-masked]>
Date: Sat, 17 Sep 2022 21:57:21 +0200

On 17-09-2022 21:23, [email-masked] wrote:
> Thank it works!
> 
> Regarding patch, I tried the following lines:
> 
>              (uri (list (string-append
>                          
> "https://deb.debian.org/debian/pool/main/c/chrpath/chrpath_ 
> <https://deb.debian.org/debian/pool/main/c/chrpath/chrpath_>"
>                          version ".orig.tar.gz")
>                         (string-append
>                          
> "http://deb.debian.org/debian/pool/main/c/chrpath/chrpath_ 
> <http://deb.debian.org/debian/pool/main/c/chrpath/chrpath_>"
>                          version  "-2.diff.gz")))
>              (patches (search-patches "chrpath_0.16-2.diff"))
> 
> but it looks like the second uri is not downloading. However I saw a 
> similar packages. Do you know what maybe wrong here?

The URL second downloads fine for me (tried out in a browser) 
<http://deb.debian.org/debian/pool/main/c/chrpath/chrpath_0.16-2.diff.gz>. 
  Taking the information at face value, I'm guessing temporarily did not 
have Internet access or that the Debian servers were down for a moment.

As a general recommendation, when something doesn't work, I recommend 
sending a copy of the error message, that would be helpful for 
determining what's actually wrong.

I'm guessing you got the following error message:

[...]
guix build: error: chrpath_0.16.2.diff: patch not found

If so, you forgot to put the patch somewhere where it could be found by 
Guix.  For that, I refer to my earlier response about gnu/local.mk and 
gnu/packages/patches.

Another possibility is that you got a 'hash mismatch' error.  In that 
case, the problem is that while the hash of the .orig.tar.gz is 
presumably correct, it is virtually guaranteed to be different than the 
hash of the .diff.gz -- all the 'uri' are supposed to be equivalent, 
this is not a place to put URLs of patches (aside from some edge cases 
like xvfb-run, which don't apply here).

In that case, the solution is to remove the .diff.gz URL as you are 
already adding a local copy of the patch for 'search-patches' to find.

If it's something else, you need to share the error message.

Greetings,
Maxime.