bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52517: inconstency with offloading


From: Ludovic Courtès
Subject: bug#52517: inconstency with offloading
Date: Mon, 03 Jan 2022 17:52:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

> The manual provides [1] the example:
>
>       (build-machine
>         (name "armeight.example.org")
>         (systems (list "aarch64-linux"))
>         (host-key "ssh-rsa AAAAB3Nza…")
>         (user "alice")
>         (private-key
>          (string-append (getenv "HOME")
>                         "/.ssh/identity-for-guix")))
>
>
> but what is not clear is 'getenv' from who.  Concretly, adding 'pk' it
> reads:
>
> $ guix offload test
>
> ;;; ("/home/simon")
> guix offload: testing 2 build machines defined in '/etc/guix/machines.scm'...
>
>
> however, when really building with offload:
>
> $ guix build -L /tmp/mine r-cipr
> The following derivation will be built:
>    /gnu/store/mzixy5hhx79xx33k03acaasml87c0knc-r-cipr-0.1.0-1.4b01bb8.drv
>
> ;;; ("/root")

This is because guix-daemon spawns ‘guix offload’ as root.

But yeah, I agree that the example contributes to the confusion.

How about changing the manual as shown below?

Ludo’.

diff --git a/doc/guix.texi b/doc/guix.texi
index 43549da388..9c1f30e83f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1250,9 +1250,10 @@ The @file{/etc/guix/machines.scm} file typically looks 
like this:
         (systems (list "aarch64-linux"))
         (host-key "ssh-rsa AAAAB3Nza@dots{}")
         (user "alice")
-        (private-key
-         (string-append (getenv "HOME")
-                        "/.ssh/identity-for-guix"))))
+
+        ;; Remember 'guix offload' is spawned by
+        ;; 'guix-daemon' as root.
+        (private-key "/root/.ssh/identity-for-guix")))
 @end lisp
 
 @noindent

reply via email to

[Prev in Thread] Current Thread [Next in Thread]