Subject: bug#28749: closed (Re: bug#28749: guix build --subsitute-urls does not override guix-daemon run with --no-subsitutes)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 09 Oct 2017 19:21:02 +0000

Your bug report

#28749: guix build --subsitute-urls does not override guix-daemon run with --no-subsitutes

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
28749: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28749
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#28749: guix build --subsitute-urls does not override guix-daemon run with --no-subsitutes
From: Leo Famulari <[email-masked]>
To: Drashne <[email-masked]>
Cc: [email-masked]
Date: Mon, 9 Oct 2017 15:20:34 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

On Sun, Oct 08, 2017 at 01:13:16PM -0400, Drashne wrote:
> From the kind people on #guix, I've heard that "guix build
> --subsitute-urls" should override "guix-daemon --no-subsitutes", but
> it seems it's not doing so for me.

The documentation of guix-daemon [0] says this on the subject:

"When the daemon runs with --no-substitutes, clients can still
explicitly enable substitution via the set-build-options remote
procedure call (see The Store)."

So, there is a way for unprivileged users to enable substitution for
themselves even when the local administrator has disabled substitution,
but it's not via the --substitute-urls mechanism.

I'm closing this bug because I think it's mostly a case of having
received mistaken advice on #guix.

[0]
https://www.gnu.org/software/guix/manual/html_node/Invoking-guix_002ddaemon.html#Invoking-guix_002ddaemon

> Here's the situation I ran in to:
> 
> While doing a "./pre-inst-env guix pull" I got an error about:
> 
>   output path `/gnu/store/53lj4z9cavl7n27r89zjnvyd8fk854kj-libgit2-0.26.0.tar.gz' should have sha256 hash `1fdk9yhwvl1w1z71ykzcvgh4nsf8scxcbclz5anh98zpplmhmisa', instead has `
> 1b3figbhp5l83vd37vq6j2narrq4yl9pfw6mw0px0dzb1hz3jqka'
> 
> So I tried "./pre-inst-env guix build --source libgit2 --substitute-urls=[https://mirror.hydra.gnu.org"](https://mirror.hydra.gnu.org)
> but it redirected me to https://codeload.github.com/libgit2/libgit2/tar.gz/v0.26.0
> which had the wrong hash.

We are discussing how to handle unstable upstream sources more
gracefully here:

https://bugs.gnu.org/28659

Subject: guix build --subsitute-urls does not override guix-daemon run with --no-subsitutes
From: Drashne <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Sun, 08 Oct 2017 13:13:16 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

From the kind people on #guix, I've heard that "guix build --subsitute-urls" should override "guix-daemon --no-subsitutes", but it seems it's not doing so for me.

Here's the situation I ran in to:

While doing a "./pre-inst-env guix pull" I got an error about:

  output path `/gnu/store/53lj4z9cavl7n27r89zjnvyd8fk854kj-libgit2-0.26.0.tar.gz' should have sha256 hash `1fdk9yhwvl1w1z71ykzcvgh4nsf8scxcbclz5anh98zpplmhmisa', instead has `
1b3figbhp5l83vd37vq6j2narrq4yl9pfw6mw0px0dzb1hz3jqka'

So I tried "./pre-inst-env guix build --source libgit2 --substitute-urls=[https://mirror.hydra.gnu.org"](https://mirror.hydra.gnu.org)
but it redirected me to https://codeload.github.com/libgit2/libgit2/tar.gz/v0.26.0
which had the wrong hash.

Attached is the full log of that failed attempt.  This was done while guix-daemon was run with the --no-subsitutes option.

Then I killed guix-daemon and restarted it without --no-subsitutes, and did the same thing and it worked (log of the success also attached).