From unknown Fri Aug 15 12:51:51 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37039] [PATCH] machine: Use 'become-command'. Resent-From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 Aug 2019 16:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37039 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37039@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15658853779142 (code B ref -1); Thu, 15 Aug 2019 16:10:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Aug 2019 16:09:37 +0000 Received: from localhost ([127.0.0.1]:52328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyIJl-0002NN-7s for submit@debbugs.gnu.org; Thu, 15 Aug 2019 12:09:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:47199) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyIJj-0002NG-QP for submit@debbugs.gnu.org; Thu, 15 Aug 2019 12:09:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43559) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyIJe-0005md-8B for guix-patches@gnu.org; Thu, 15 Aug 2019 12:09:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hyIJX-0007AU-Bm for guix-patches@gnu.org; Thu, 15 Aug 2019 12:09:27 -0400 Received: from mx.sdf.org ([205.166.94.20]:61839) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hyIJX-00079K-3a for guix-patches@gnu.org; Thu, 15 Aug 2019 12:09:23 -0400 Received: from Upsilon (tor2.anonymizer.ccc.de [217.115.10.132]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x7FG9Bl6006321 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO) for ; Thu, 15 Aug 2019 16:09:19 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) Date: Thu, 15 Aug 2019 12:09:11 -0400 Message-ID: <87o90qe7h4.fsf@sdf.lonestar.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 205.166.94.20 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * 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. =2D-- 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 =2D-- 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 =2D (machine-ssh-configuration-system config)))) + (machine-ssh-configuration-system config) + #:become-command + (machine-become-command machine)))) =20 ;;; @@ -377,7 +379,8 @@ have you run 'guix archive --generate-key?'") (lambda (port) (string->canonical-sexp (get-string-all port)))) =2D (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 =2D-- 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-syste= m)) session)) =20 =2D(define (remote-authorize-signing-key key session) +(define* (remote-authorize-signing-key key session #:optional become-comma= nd) "Send KEY, a canonical sexp containing a public key, over SESSION and ad= d 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 authorize= d." (mkdir-p (dirname %acl-file)) (with-atomic-file-output %acl-file (cut write-acl acl <>))))) =2D session)) + session + become-command)) =20 (define* (send-files local files remote #:key =2D-=20 2.22.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl1Vg6cACgkQ9Qb9Fp2P 2Voe2g//RWxOVT1M0mhS+gbGBWoepPPxuCp/E2UcakG5qzwoeibRHAv3GsC7e76x zAHCd4klo3cQcR8NUsR9yBpu0C+1P2aW8Tc1SLfSh6p87UJD7KFRK3ihN/G4aZ86 yAPwydcfBEfFK7AfR7ioMzHXYGlHNFJCxj+fv9zTfvGplvhY1sgh7BZRwvsHoVaA MrcaddatzZ+A4Y8pG5/MXrkphCtYVTfhx7wn0JZBi6xnW2Tna+FGx5DMDez9rEiS W23ZkuKRqyLAe1zrmF0CtFTqVjGdRTJ1AYIP43OC87zhZy9nVy3tA2rawcbp0lF3 1s/HfHxLlCn6skHWA9AvX4wZD9eD4yZxqdA5/TGe7scVj8Eh+DFXGexht2L9g3sz FRfJA3Ezn+OkI5JBxgMMslA9eCdjr6ppW9WIHDvIO8FrRcl1eiP6eCZoZ+VVi1rm oEZrygdihoBqx8e50Y3xyVHX1TluDqUkeP+tfqqX+CDMLhD+ZA5SWb0icKq9Xk5K i+HdBDOqOdya6HBlEwvX1cFgvnVk5m/SY1Sk07IFzeQZ6nKKMWxiu0CsHWx0aK+H toyv/EHXoZarnYCn82OQdOKeuhWWbwhDr9t+iXiWXOeonc8ACYIt2XbSr/x5aIXR KlxKWcNZpjkgZH12BcUzEjlIUq3sEP8lhztLKb5szmj7D5yCT/0= =u5rr -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Aug 15 12:51:51 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#37039] [PATCH] machine: Use 'become-command'. Resent-From: Christopher Lemmer Webber Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 16 Aug 2019 12:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37039 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37039@debbugs.gnu.org Cc: 37039-done@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15659596721366 (code B ref -1); Fri, 16 Aug 2019 12:48:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Aug 2019 12:47:52 +0000 Received: from localhost ([127.0.0.1]:53272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hybe3-0000Ly-N7 for submit@debbugs.gnu.org; Fri, 16 Aug 2019 08:47:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:60439) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hybe2-0000Lr-87 for submit@debbugs.gnu.org; Fri, 16 Aug 2019 08:47:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59580) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hybe0-0002DA-Tc for guix-patches@gnu.org; Fri, 16 Aug 2019 08:47:50 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hybdz-0001f1-Rt for guix-patches@gnu.org; Fri, 16 Aug 2019 08:47:48 -0400 Received: from dustycloud.org ([2600:3c02::f03c:91ff:feae:cb51]:43292) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hybdz-0001eU-No for guix-patches@gnu.org; Fri, 16 Aug 2019 08:47:47 -0400 Received: from twig (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id A557926630; Fri, 16 Aug 2019 08:47:46 -0400 (EDT) References: <87o90qe7h4.fsf@sdf.lonestar.org> User-agent: mu4e 1.2.0; emacs 26.2 From: Christopher Lemmer Webber In-reply-to: <87o90qe7h4.fsf@sdf.lonestar.org> Date: Fri, 16 Aug 2019 08:47:45 -0400 Message-ID: <874l2hxoni.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c02::f03c:91ff:feae:cb51 X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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. [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [2600:3c02:0:0:f03c:91ff:feae:cb51 listed in] [zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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. [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [2600:3c02:0:0:f03c:91ff:feae:cb51 listed in] [zen.spamhaus.org] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 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 From unknown Fri Aug 15 12:51:51 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) Subject: bug#37039: closed (Re: [bug#37039] [PATCH] machine: Use 'become-command'.) Message-ID: References: <874l2hxoni.fsf@dustycloud.org> <87o90qe7h4.fsf@sdf.lonestar.org> X-Gnu-PR-Message: they-closed 37039 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 37039@debbugs.gnu.org Date: Fri, 16 Aug 2019 12:48:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1565959682-1391-1" This is a multi-part message in MIME format... ------------=_1565959682-1391-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #37039: [PATCH] machine: Use 'become-command'. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 37039@debbugs.gnu.org. --=20 37039: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D37039 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1565959682-1391-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 37039-done) by debbugs.gnu.org; 16 Aug 2019 12:47:49 +0000 Received: from localhost ([127.0.0.1]:53269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hybe1-0000Lj-B0 for submit@debbugs.gnu.org; Fri, 16 Aug 2019 08:47:49 -0400 Received: from dustycloud.org ([50.116.34.160]:47600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hybdz-0000LZ-2l for 37039-done@debbugs.gnu.org; Fri, 16 Aug 2019 08:47:47 -0400 Received: from twig (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id A557926630; Fri, 16 Aug 2019 08:47:46 -0400 (EDT) References: <87o90qe7h4.fsf@sdf.lonestar.org> User-agent: mu4e 1.2.0; emacs 26.2 From: Christopher Lemmer Webber To: guix-patches@gnu.org Subject: Re: [bug#37039] [PATCH] machine: Use 'become-command'. In-reply-to: <87o90qe7h4.fsf@sdf.lonestar.org> Date: Fri, 16 Aug 2019 08:47:45 -0400 Message-ID: <874l2hxoni.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 37039-done Cc: 37039-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 ------------=_1565959682-1391-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Aug 2019 16:09:37 +0000 Received: from localhost ([127.0.0.1]:52328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyIJl-0002NN-7s for submit@debbugs.gnu.org; Thu, 15 Aug 2019 12:09:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:47199) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyIJj-0002NG-QP for submit@debbugs.gnu.org; Thu, 15 Aug 2019 12:09:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43559) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyIJe-0005md-8B for guix-patches@gnu.org; Thu, 15 Aug 2019 12:09:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hyIJX-0007AU-Bm for guix-patches@gnu.org; Thu, 15 Aug 2019 12:09:27 -0400 Received: from mx.sdf.org ([205.166.94.20]:61839) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hyIJX-00079K-3a for guix-patches@gnu.org; Thu, 15 Aug 2019 12:09:23 -0400 Received: from Upsilon (tor2.anonymizer.ccc.de [217.115.10.132]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x7FG9Bl6006321 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO) for ; Thu, 15 Aug 2019 16:09:19 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) To: guix-patches@gnu.org Subject: [PATCH] machine: Use 'become-command'. Date: Thu, 15 Aug 2019 12:09:11 -0400 Message-ID: <87o90qe7h4.fsf@sdf.lonestar.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 205.166.94.20 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * 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. =2D-- 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 =2D-- 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 =2D (machine-ssh-configuration-system config)))) + (machine-ssh-configuration-system config) + #:become-command + (machine-become-command machine)))) =20 ;;; @@ -377,7 +379,8 @@ have you run 'guix archive --generate-key?'") (lambda (port) (string->canonical-sexp (get-string-all port)))) =2D (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 =2D-- 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-syste= m)) session)) =20 =2D(define (remote-authorize-signing-key key session) +(define* (remote-authorize-signing-key key session #:optional become-comma= nd) "Send KEY, a canonical sexp containing a public key, over SESSION and ad= d 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 authorize= d." (mkdir-p (dirname %acl-file)) (with-atomic-file-output %acl-file (cut write-acl acl <>))))) =2D session)) + session + become-command)) =20 (define* (send-files local files remote #:key =2D-=20 2.22.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl1Vg6cACgkQ9Qb9Fp2P 2Voe2g//RWxOVT1M0mhS+gbGBWoepPPxuCp/E2UcakG5qzwoeibRHAv3GsC7e76x zAHCd4klo3cQcR8NUsR9yBpu0C+1P2aW8Tc1SLfSh6p87UJD7KFRK3ihN/G4aZ86 yAPwydcfBEfFK7AfR7ioMzHXYGlHNFJCxj+fv9zTfvGplvhY1sgh7BZRwvsHoVaA MrcaddatzZ+A4Y8pG5/MXrkphCtYVTfhx7wn0JZBi6xnW2Tna+FGx5DMDez9rEiS W23ZkuKRqyLAe1zrmF0CtFTqVjGdRTJ1AYIP43OC87zhZy9nVy3tA2rawcbp0lF3 1s/HfHxLlCn6skHWA9AvX4wZD9eD4yZxqdA5/TGe7scVj8Eh+DFXGexht2L9g3sz FRfJA3Ezn+OkI5JBxgMMslA9eCdjr6ppW9WIHDvIO8FrRcl1eiP6eCZoZ+VVi1rm oEZrygdihoBqx8e50Y3xyVHX1TluDqUkeP+tfqqX+CDMLhD+ZA5SWb0icKq9Xk5K i+HdBDOqOdya6HBlEwvX1cFgvnVk5m/SY1Sk07IFzeQZ6nKKMWxiu0CsHWx0aK+H toyv/EHXoZarnYCn82OQdOKeuhWWbwhDr9t+iXiWXOeonc8ACYIt2XbSr/x5aIXR KlxKWcNZpjkgZH12BcUzEjlIUq3sEP8lhztLKb5szmj7D5yCT/0= =u5rr -----END PGP SIGNATURE----- --=-=-=-- ------------=_1565959682-1391-1--