* Re: 05/05: store: Default to a non-empty list of substituters.
[not found] ` <E1YZob9-0002iN-JI@vcs.savannah.gnu.org>
@ 2015-03-23 18:18 ` Mark H Weaver
2015-03-23 21:11 ` Using the daemon’s default settings Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Mark H Weaver @ 2015-03-23 18:18 UTC (permalink / raw)
To: guix-devel
Ludovic Courtès <ludo@gnu.org> writes:
> commit 4d58122071bbd7bb56c9658a9bbe7621bf3e423d
> Author: Ludovic Courtès <ludo@gnu.org>
> Date: Sun Mar 22 23:43:25 2015 +0100
>
> store: Default to a non-empty list of substituters.
>
> Fixes <http://bugs.gnu.org/20163>.
> Reported by Mark H Weaver <mhw@netris.org>.
>
> * guix/store.scm (%default-substitute-urls): New variable.
> (set-build-options): Change default value of #:substitute-urls to
> %DEFAULT-SUBSTITUTE-URLS.
> ---
> guix/store.scm | 11 ++++++++++-
> 1 files changed, 10 insertions(+), 1 deletions(-)
>
> diff --git a/guix/store.scm b/guix/store.scm
> index 45c555b..3d6b069 100644
> --- a/guix/store.scm
> +++ b/guix/store.scm
> @@ -447,6 +447,10 @@ encoding conversion errors."
> (message "invalid error code")
> (status k))))))))
>
> +(define %default-substitute-urls
> + ;; Default list of substituters.
> + '("http://hydra.gnu.org"))
> +
> (define* (set-build-options server
> #:key keep-failed? keep-going? fallback?
> (verbosity 0)
> @@ -459,7 +463,12 @@ encoding conversion errors."
> (print-build-trace #t)
> (build-cores (current-processor-count))
> (use-substitutes? #t)
> - (substitute-urls '())) ; client "untrusted" cache URLs
> +
> + ;; Client-provided substitute URLs. For
> + ;; unprivileged clients, these are considered
> + ;; "untrusted"; for root, they override the
> + ;; daemon's settings.
> + (substitute-urls %default-substitute-urls))
Does this mean that even if I've configured my daemon to use a different
set of substitute-urls, when I run 'guix' as root those settings will be
overridden? That seems suboptimal.
We have a similar problem with the values of --cores and --max-jobs
passed to guix-daemon being ignored because they are always overridden
by our client.
How can we fix these so that the daemon's settings are used unless the
user specifically asks to override them in the client?
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
* Using the daemon’s default settings
2015-03-23 18:18 ` 05/05: store: Default to a non-empty list of substituters Mark H Weaver
@ 2015-03-23 21:11 ` Ludovic Courtès
2015-03-27 18:44 ` Mark H Weaver
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2015-03-23 21:11 UTC (permalink / raw)
To: Mark H Weaver; +Cc: guix-devel
Mark H Weaver <mhw@netris.org> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> commit 4d58122071bbd7bb56c9658a9bbe7621bf3e423d
>> Author: Ludovic Courtès <ludo@gnu.org>
>> Date: Sun Mar 22 23:43:25 2015 +0100
>>
>> store: Default to a non-empty list of substituters.
>>
>> Fixes <http://bugs.gnu.org/20163>.
>> Reported by Mark H Weaver <mhw@netris.org>.
>>
>> * guix/store.scm (%default-substitute-urls): New variable.
>> (set-build-options): Change default value of #:substitute-urls to
>> %DEFAULT-SUBSTITUTE-URLS.
[...]
> Does this mean that even if I've configured my daemon to use a different
> set of substitute-urls, when I run 'guix' as root those settings will be
> overridden?
Yes.
> That seems suboptimal.
Right.
> We have a similar problem with the values of --cores and --max-jobs
> passed to guix-daemon being ignored because they are always overridden
> by our client.
Indeed.
> How can we fix these so that the daemon's settings are used unless the
> user specifically asks to override them in the client?
If you look at nix-daemon.cc:543, there’s currently no way for a client
to say “default value.” The only way for a client to get the daemon’s
default values is to not call the ‘set-build-options’ RPC at all; it’s
all or nothing.
I think the way forward would be to add a new RPC, say
‘set-build-options2’, that would take a list of key/value pairs, where
keys are option names. Options not mentioned in a ‘set-build-options2’
call would keep their default value.
How does that sound?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Using the daemon’s default settings
2015-03-23 21:11 ` Using the daemon’s default settings Ludovic Courtès
@ 2015-03-27 18:44 ` Mark H Weaver
0 siblings, 0 replies; 3+ messages in thread
From: Mark H Weaver @ 2015-03-27 18:44 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
ludo@gnu.org (Ludovic Courtès) writes:
> Mark H Weaver <mhw@netris.org> skribis:
>
>> Does this mean that even if I've configured my daemon to use a different
>> set of substitute-urls, when I run 'guix' as root those settings will be
>> overridden?
>
> Yes.
>
>> That seems suboptimal.
>
> Right.
>
>> We have a similar problem with the values of --cores and --max-jobs
>> passed to guix-daemon being ignored because they are always overridden
>> by our client.
>
> Indeed.
>
>> How can we fix these so that the daemon's settings are used unless the
>> user specifically asks to override them in the client?
>
> If you look at nix-daemon.cc:543, there’s currently no way for a client
> to say “default value.” The only way for a client to get the daemon’s
> default values is to not call the ‘set-build-options’ RPC at all; it’s
> all or nothing.
Ah, okay.
> I think the way forward would be to add a new RPC, say
> ‘set-build-options2’, that would take a list of key/value pairs, where
> keys are option names. Options not mentioned in a ‘set-build-options2’
> call would keep their default value.
>
> How does that sound?
Sounds good to me!
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-27 18:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20150322224357.10349.62362@vcs.savannah.gnu.org>
[not found] ` <E1YZob9-0002iN-JI@vcs.savannah.gnu.org>
2015-03-23 18:18 ` 05/05: store: Default to a non-empty list of substituters Mark H Weaver
2015-03-23 21:11 ` Using the daemon’s default settings Ludovic Courtès
2015-03-27 18:44 ` Mark H Weaver
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.