GNU bug report logs - #37039
[PATCH] machine: Use 'become-command'.

Previous Next

Package: guix-patches;

Reported by: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)

Date: Thu, 15 Aug 2019 16:10:01 UTC

Severity: normal

Tags: patch

Done: Christopher Lemmer Webber <cwebber <at> dustycloud.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37039 in the body.
You can then email your comments to 37039 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#37039; Package guix-patches. (Thu, 15 Aug 2019 16:10:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze):
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 15 Aug 2019 16:10:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze)
To: guix-patches <at> gnu.org
Subject: [PATCH] machine: Use 'become-command'.
Date: Thu, 15 Aug 2019 12:09:11 -0400
[Message part 1 (text/plain, inline)]
* gnu/machine/ssh.scm (managed-host-remote-eval): Pass an appropriate
'become-command' to 'remote-eval'.
* guix/ssh.scm (remote-authorize-signing-key): Add optional
'become-command' argument.
All callers changed.
---
 gnu/machine/ssh.scm | 7 +++++--
 guix/ssh.scm        | 5 +++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm
index ac3aa3e370..aafe0ccf41 100644
--- a/gnu/machine/ssh.scm
+++ b/gnu/machine/ssh.scm
@@ -126,7 +126,9 @@ an environment type of 'managed-host."
                  #:build-locally?
                  (machine-ssh-configuration-build-locally? config)
                  #:system
-                 (machine-ssh-configuration-system config))))
+                 (machine-ssh-configuration-system config)
+                 #:become-command
+                 (machine-become-command machine))))
 
 
 ;;;
@@ -377,7 +379,8 @@ have you run 'guix archive --generate-key?'")
                                     (lambda (port)
                                       (string->canonical-sexp
                                        (get-string-all port))))
-                                  (machine-ssh-session machine)))
+                                  (machine-ssh-session machine)
+                                  (machine-become-command machine)))
   (mlet %store-monad ((_ (check-deployment-sanity machine))
                       (boot-parameters (machine-boot-parameters machine)))
     (let* ((os (machine-operating-system machine))
diff --git a/guix/ssh.scm b/guix/ssh.scm
index 24834c6f68..7bc499a2fe 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -302,7 +302,7 @@ the machine on the other end of SESSION."
   (inferior-remote-eval '(begin (use-modules (guix utils)) (%current-system))
                         session))
 
-(define (remote-authorize-signing-key key session)
+(define* (remote-authorize-signing-key key session #:optional become-command)
   "Send KEY, a canonical sexp containing a public key, over SESSION and add it
 to the system ACL file if it has not yet been authorized."
   (inferior-remote-eval
@@ -321,7 +321,8 @@ to the system ACL file if it has not yet been authorized."
           (mkdir-p (dirname %acl-file))
           (with-atomic-file-output %acl-file
             (cut write-acl acl <>)))))
-   session))
+   session
+   become-command))
 
 (define* (send-files local files remote
                      #:key
-- 
2.22.0

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#37039; Package guix-patches. (Fri, 16 Aug 2019 12:48:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Lemmer Webber <cwebber <at> dustycloud.org>
To: guix-patches <at> gnu.org
Cc: 37039-done <at> debbugs.gnu.org
Subject: Re: [bug#37039] [PATCH] machine: Use 'become-command'.
Date: Fri, 16 Aug 2019 08:47:45 -0400
Looks fine and simple.  Merged and pushed.

Jakob L. Kreuze writes:

> * gnu/machine/ssh.scm (managed-host-remote-eval): Pass an appropriate
> 'become-command' to 'remote-eval'.
> * guix/ssh.scm (remote-authorize-signing-key): Add optional
> 'become-command' argument.
> All callers changed.
> ---
>  gnu/machine/ssh.scm | 7 +++++--
>  guix/ssh.scm        | 5 +++--
>  2 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm
> index ac3aa3e370..aafe0ccf41 100644
> --- a/gnu/machine/ssh.scm
> +++ b/gnu/machine/ssh.scm
> @@ -126,7 +126,9 @@ an environment type of 'managed-host."
>                   #:build-locally?
>                   (machine-ssh-configuration-build-locally? config)
>                   #:system
> -                 (machine-ssh-configuration-system config))))
> +                 (machine-ssh-configuration-system config)
> +                 #:become-command
> +                 (machine-become-command machine))))
>  
>  
>  ;;;
> @@ -377,7 +379,8 @@ have you run 'guix archive --generate-key?'")
>                                      (lambda (port)
>                                        (string->canonical-sexp
>                                         (get-string-all port))))
> -                                  (machine-ssh-session machine)))
> +                                  (machine-ssh-session machine)
> +                                  (machine-become-command machine)))
>    (mlet %store-monad ((_ (check-deployment-sanity machine))
>                        (boot-parameters (machine-boot-parameters machine)))
>      (let* ((os (machine-operating-system machine))
> diff --git a/guix/ssh.scm b/guix/ssh.scm
> index 24834c6f68..7bc499a2fe 100644
> --- a/guix/ssh.scm
> +++ b/guix/ssh.scm
> @@ -302,7 +302,7 @@ the machine on the other end of SESSION."
>    (inferior-remote-eval '(begin (use-modules (guix utils)) (%current-system))
>                          session))
>  
> -(define (remote-authorize-signing-key key session)
> +(define* (remote-authorize-signing-key key session #:optional become-command)
>    "Send KEY, a canonical sexp containing a public key, over SESSION and add it
>  to the system ACL file if it has not yet been authorized."
>    (inferior-remote-eval
> @@ -321,7 +321,8 @@ to the system ACL file if it has not yet been authorized."
>            (mkdir-p (dirname %acl-file))
>            (with-atomic-file-output %acl-file
>              (cut write-acl acl <>)))))
> -   session))
> +   session
> +   become-command))
>  
>  (define* (send-files local files remote
>                       #:key





Reply sent to Christopher Lemmer Webber <cwebber <at> dustycloud.org>:
You have taken responsibility. (Fri, 16 Aug 2019 12:48:02 GMT) Full text and rfc822 format available.

Notification sent to zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze):
bug acknowledged by developer. (Fri, 16 Aug 2019 12:48:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 14 Sep 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 226 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.