From unknown Sun Jun 22 17:11:51 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#36872 <36872@debbugs.gnu.org> To: bug#36872 <36872@debbugs.gnu.org> Subject: Status: [PATCH 1/2] remote: Build derivations appropriate for the remote's architecture. Reply-To: bug#36872 <36872@debbugs.gnu.org> Date: Mon, 23 Jun 2025 00:11:51 +0000 retitle 36872 [PATCH 1/2] remote: Build derivations appropriate for the rem= ote's architecture. reassign 36872 guix-patches submitter 36872 zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) severity 36872 normal tag 36872 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 31 09:44:42 2019 Received: (at submit) by debbugs.gnu.org; 31 Jul 2019 13:44:43 +0000 Received: from localhost ([127.0.0.1]:51659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsouI-0003v1-K9 for submit@debbugs.gnu.org; Wed, 31 Jul 2019 09:44:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:60128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsouF-0003ut-K4 for submit@debbugs.gnu.org; Wed, 31 Jul 2019 09:44:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54445) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsouE-0008RF-Ct for guix-patches@gnu.org; Wed, 31 Jul 2019 09:44:39 -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,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 1hsouA-0003PY-HC for guix-patches@gnu.org; Wed, 31 Jul 2019 09:44:38 -0400 Received: from mx.sdf.org ([205.166.94.20]:59682) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hsouA-0003OO-9m for guix-patches@gnu.org; Wed, 31 Jul 2019 09:44:34 -0400 Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net [173.76.53.40]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x6VDiOXi025809 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO) for ; Wed, 31 Jul 2019 13:44:28 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) To: guix-patches@gnu.org Subject: [PATCH 1/2] remote: Build derivations appropriate for the remote's architecture. Date: Wed, 31 Jul 2019 09:41:30 -0400 Message-ID: <87lfwee2yd.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 * guix/ssh.scm (remote-system): New variable. * guix/remote.scm (remote-eval): Use result of 'remote-system' when lowering the G-Expression. (trampoline): Return a rather than a . =2D-- guix/remote.scm | 13 ++++++++----- guix/ssh.scm | 7 +++++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/guix/remote.scm b/guix/remote.scm index 853029c54f..d5738ebbfa 100644 =2D-- a/guix/remote.scm +++ b/guix/remote.scm @@ -72,7 +72,7 @@ prerequisites of EXP are already available on the host at= SESSION." "Return a \"trampoline\" gexp that evaluates EXP and writes the evaluati= on result to the current output port using the (guix repl) protocol." (define program =2D (scheme-file "remote-exp.scm" exp)) + (program-file "remote-exp.scm" exp)) =20 (with-imported-modules (source-module-closure '((guix repl))) #~(begin @@ -97,10 +97,13 @@ all the elements EXP refers to are built and deployed t= o SESSION beforehand. When BUILD-LOCALLY? is true, said dependencies are built locally and sent = to the remote store afterwards; otherwise, dependencies are built directly on= the remote store." =2D (mlet %store-monad ((lowered (lower-gexp (trampoline exp) =2D #:module-path %load-path)) =2D (remote -> (connect-to-remote-daemon session =2D socket-name))) + (mlet* %store-monad ((system -> (remote-system session)) + (lowered (lower-gexp (trampoline exp) + #:system system + #:guile-for-build #f + #:module-path %load-path)) + (remote -> (connect-to-remote-daemon session + socket-name))) (define inputs (cons (lowered-gexp-guile lowered) (lowered-gexp-inputs lowered))) diff --git a/guix/ssh.scm b/guix/ssh.scm index ede00133c8..9b5ca68894 100644 =2D-- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -39,6 +39,7 @@ remote-inferior remote-daemon-channel connect-to-remote-daemon + remote-system send-files retrieve-files retrieve-files* @@ -282,6 +283,12 @@ be read. When RECURSIVE? is true, the closure of FILE= S is exported." ,(object->string (object->string export)))))) =20 +(define (remote-system session) + "Return the system type as expected by Nix, usually ARCHITECTURE-KERNEL,= of +the machine on the other end of SESSION." + (inferior-remote-eval '(begin (use-modules (guix utils)) (%current-syste= m)) + session)) + (define* (send-files local files remote #:key recursive? =2D-=20 2.22.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl1BmooACgkQ9Qb9Fp2P 2VptEA/+J/IgPRjvq/Cbe/wFJbMLxlyiq7ZEImt88YwBIHZHhXIttMa8SfNy7L+w AZt6YhmcNH/NtxNzLGEt0uUT2zk4T/MObXuwMj4rYq0R8nOLtNOj316buNlLVz6K VPFGrOVq/rzp3IIY88QpFCTsNLNHB//7WeBbMoFGevRPGfi3+G5fjPWIPAFVci4e zQ2A8HkQ0vctOoD0KG95bMARsCSWY7n3IZ5BDhVW5X/sWse9IviQWRi1ijplqKFF 53OY5hG64wWxcuvmc5dvoq1u+uT1cOiNlSQ7Dc+7AkCc9fi4CsmT1C9u1NCYhDs1 agEYIC0R27bvocN9JZrad2kRiDLnRRDiarpsXaarsrB12xKIvgPSc4eMZX4oWQ4D ETlbd6KTtMa1H5F+Nn8wHCfVV8LfJwdP511qGB/WAgO3Ka1RQ8b2IB2xUrYNVctN Tvxh/c6QnmGPlftDoKLuF8xef7yUwv/X1sSsj+sdfgxl+n5xZIURwGJs5F5PB4qu mc+K1cz+w2lRAClZnVqWNtdzTrc/9u77n6iHiO2TKsrnT6FA/uFAfQ2+nlqCuU05 Bq8ZPU/NYGjWebEZ8E5b3gbsNuMmiTE4Sd7EyPaawlCJDalSad94JZq9VO0z9Rd/ r0a+ZT/sOHme2VhOPpcuFCGjaofulG3TXBlw+yY4NMeCslNNBGE= =hfQd -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 31 09:46:26 2019 Received: (at 36872) by debbugs.gnu.org; 31 Jul 2019 13:46:26 +0000 Received: from localhost ([127.0.0.1]:51664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsovy-0003ya-2D for submit@debbugs.gnu.org; Wed, 31 Jul 2019 09:46:26 -0400 Received: from mx.sdf.org ([205.166.94.20]:59235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsovw-0003yT-NU for 36872@debbugs.gnu.org; Wed, 31 Jul 2019 09:46:25 -0400 Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net [173.76.53.40]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x6VDkNcj024897 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO) for <36872@debbugs.gnu.org>; Wed, 31 Jul 2019 13:46:23 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) To: 36872@debbugs.gnu.org Subject: [PATCH 2/2] remote: Remove '--system' argument. References: <87lfwee2yd.fsf@sdf.lonestar.org> Date: Wed, 31 Jul 2019 09:43:29 -0400 In-Reply-To: <87lfwee2yd.fsf@sdf.lonestar.org> (Jakob L. Kreuze's message of "Wed, 31 Jul 2019 09:41:30 -0400") Message-ID: <87h872e2v2.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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36872 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 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * gnu/services.scm (activation-script): Return a rather than a . * gnu/deploy.scm (guix-deploy): Remove handling for '--system'. (show-help): Remove documentation for '--system'. (%default-options): Remove default setting for 'system'. =2D-- gnu/services.scm | 56 ++++++++++++++++++++--------------------- guix/scripts/deploy.scm | 8 ++---- 2 files changed, 30 insertions(+), 34 deletions(-) diff --git a/gnu/services.scm b/gnu/services.scm index 7de78105ff..6ee05d4580 100644 =2D-- a/gnu/services.scm +++ b/gnu/services.scm @@ -430,34 +430,34 @@ ACTIVATION-SCRIPT-TYPE." (define (activation-script gexps) "Return the system's activation script, which evaluates GEXPS." (define actions =2D (map (cut scheme-file "activate-service" <>) gexps)) =2D =2D (scheme-file "activate" =2D (with-imported-modules (source-module-closure =2D '((gnu build activation) =2D (guix build utils))) =2D #~(begin =2D (use-modules (gnu build activation) =2D (guix build utils)) =2D =2D ;; Make sure the user accounting database exists. = If it =2D ;; does not exist, 'setutxent' does not create it a= nd =2D ;; thus there is no accounting at all. =2D (close-port (open-file "/var/run/utmpx" "a0")) =2D =2D ;; Same for 'wtmp', which is populated by mingetty = et =2D ;; al. =2D (mkdir-p "/var/log") =2D (close-port (open-file "/var/log/wtmp" "a0")) =2D =2D ;; Set up /run/current-system. Among other things = this =2D ;; sets up locales, which the activation snippets =2D ;; executed below may expect. =2D (activate-current-system) =2D =2D ;; Run the services' activation snippets. =2D ;; TODO: Use 'load-compiled'. =2D (for-each primitive-load '#$actions))))) + (map (cut program-file "activate-service.scm" <>) gexps)) + + (program-file "activate.scm" + (with-imported-modules (source-module-closure + '((gnu build activation) + (guix build utils))) + #~(begin + (use-modules (gnu build activation) + (guix build utils)) + + ;; Make sure the user accounting database exists. I= f it + ;; does not exist, 'setutxent' does not create it and + ;; thus there is no accounting at all. + (close-port (open-file "/var/run/utmpx" "a0")) + + ;; Same for 'wtmp', which is populated by mingetty et + ;; al. + (mkdir-p "/var/log") + (close-port (open-file "/var/log/wtmp" "a0")) + + ;; Set up /run/current-system. Among other things t= his + ;; sets up locales, which the activation snippets + ;; executed below may expect. + (activate-current-system) + + ;; Run the services' activation snippets. + ;; TODO: Use 'load-compiled'. + (for-each primitive-load '#$actions))))) =20 (define (gexps->activation-gexp gexps) "Return a gexp that runs the activation script containing GEXPS." diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm index 8eeb9ae7a1..bc1d93a93a 100644 =2D-- a/guix/scripts/deploy.scm +++ b/guix/scripts/deploy.scm @@ -44,8 +44,6 @@ (define (show-help) (display (G_ "Usage: guix deploy [OPTION] FILE... Perform the deployment specified by FILE.\n")) =2D (display (G_ " =2D -s, --system=3DSYSTEM attempt to build for SYSTEM--e.g., \"i686-lin= ux\"")) (show-build-options-help) (newline) (display (G_ " @@ -67,8 +65,7 @@ Perform the deployment specified by FILE.\n")) %standard-build-options)) =20 (define %default-options =2D `((system . ,(%current-system)) =2D (substitutes? . #t) + `((substitutes? . #t) (build-hook? . #t) (graft? . #t) (debug . 0) @@ -91,8 +88,7 @@ Perform the deployment specified by FILE.\n")) (for-each (lambda (machine) (info (G_ "deploying to ~a...~%") (machine-display-name machine)) =2D (parameterize ((%current-system (assq-ref opts 'system= )) =2D (%graft? (assq-ref opts 'graft?))) + (parameterize ((%graft? (assq-ref opts 'graft?))) (guard (c ((message-condition? c) (report-error (G_ "failed to deploy ~a: '~a= '~%") (machine-display-name machine) =2D-=20 2.22.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl1BmwEACgkQ9Qb9Fp2P 2Vp5kw//en36fICfLjxE5bCOTR7KSDsGCzk7KsJJVi1v6v9KMhalBptAbIfD1irK GpO7GWc2+DjSPyNLCb6Syjrnq5x8xuDCJTeK1IdTMDMLogijSe0uZA43rOmXtx4L 877MQ9KB+wejy4dTTS8LyLN2AmjhQBfNzxmPgF/7BechE0X5A+E7YyaHiYDAOGZu /xmJRbK0KsFS3tCZ8HvHbT5Bx1dJYPN14oDenbNooC0wVZjHnxYf0hTJcWmdE7HK Z6YS0zgJ9QBmJnAZagqq7GXCm5QUz7PXN5hSpeIb52LNa3YhLMlJiNyYQGlJTcpw qQr3L0Z/JKbB/E9VRXncT4dsuaK5x3+7ak6Gm76JmGG9EPYjm+fQM8iDFOQEPT3e G1qAO/aSifAEg6gyr4ZCKw42wyObjB2IeVZ14wxDdknDMreiij7Aq2z/PfZtOzOq tsYseivavFPK433M8dhJnnZDkIOcZJLlArQvG6bu/W8RmwKfjg43/LBv9vzBhbxI /2wFZ3CxSWWo20YN+krINoqUnMJDIafKJwKiVKfO+kyD/WOOGBJcTrfw+6Z1VW2O qpZROkrfzZ5eW4CwBX+NH0V6WOF8l+ly+iVwpifBwvVKzccmLFmrRrrblt4+tShq F2qQq3BefVRuVXAgXf/MaoPHHIJob3Fp0Kjt8vDpx8GKBJFn1WY= =pNoE -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 16:57:38 2019 Received: (at submit) by debbugs.gnu.org; 6 Aug 2019 20:57:38 +0000 Received: from localhost ([127.0.0.1]:37890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv6WY-0006Jk-EA for submit@debbugs.gnu.org; Tue, 06 Aug 2019 16:57:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:45716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv6WW-0006Jc-LK for submit@debbugs.gnu.org; Tue, 06 Aug 2019 16:57:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38744) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hv6WV-0003DN-Az for guix-patches@gnu.org; Tue, 06 Aug 2019 16:57:36 -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 1hv6WU-0004S0-2q for guix-patches@gnu.org; Tue, 06 Aug 2019 16:57:35 -0400 Received: from dustycloud.org ([50.116.34.160]:38352) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hv6WT-0004Rq-UV for guix-patches@gnu.org; Tue, 06 Aug 2019 16:57:34 -0400 Received: from twig (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id CE96626618; Tue, 6 Aug 2019 16:57:32 -0400 (EDT) References: <87lfwee2yd.fsf@sdf.lonestar.org> <87h872e2v2.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#36872] [PATCH 2/2] remote: Remove '--system' argument. In-reply-to: <87h872e2v2.fsf@sdf.lonestar.org> Date: Tue, 06 Aug 2019 16:57:32 -0400 Message-ID: <87ef1yovur.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 50.116.34.160 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: 36872@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: -2.3 (--) I'm still wondering whether asking the remote machine what its architecture is won't turn out to be fragile in some way, though I'm not sure how to articulate how that would be yet. It seems like a weird side effect to apply before doing the build. (What if we want to build derivations when we don't actually have a machine up and running yet? Etc, etc.) But you and Dave seem to think it's the right thing to do, so I'm going to assume that you both know what to do better than I do at this point. At any rate, the patch looks fine; once it's rebased on top of master I'm ok with pushing it if there are no objections. Jakob L. Kreuze writes: > * gnu/services.scm (activation-script): Return a rather > than a . > * gnu/deploy.scm (guix-deploy): Remove handling for '--system'. > (show-help): Remove documentation for '--system'. > (%default-options): Remove default setting for 'system'. > --- > gnu/services.scm | 56 ++++++++++++++++++++--------------------- > guix/scripts/deploy.scm | 8 ++---- > 2 files changed, 30 insertions(+), 34 deletions(-) > > diff --git a/gnu/services.scm b/gnu/services.scm > index 7de78105ff..6ee05d4580 100644 > --- a/gnu/services.scm > +++ b/gnu/services.scm > @@ -430,34 +430,34 @@ ACTIVATION-SCRIPT-TYPE." > (define (activation-script gexps) > "Return the system's activation script, which evaluates GEXPS." > (define actions > - (map (cut scheme-file "activate-service" <>) gexps)) > - > - (scheme-file "activate" > - (with-imported-modules (source-module-closure > - '((gnu build activation) > - (guix build utils))) > - #~(begin > - (use-modules (gnu build activation) > - (guix build utils)) > - > - ;; Make sure the user accounting database exists. If it > - ;; does not exist, 'setutxent' does not create it and > - ;; thus there is no accounting at all. > - (close-port (open-file "/var/run/utmpx" "a0")) > - > - ;; Same for 'wtmp', which is populated by mingetty et > - ;; al. > - (mkdir-p "/var/log") > - (close-port (open-file "/var/log/wtmp" "a0")) > - > - ;; Set up /run/current-system. Among other things this > - ;; sets up locales, which the activation snippets > - ;; executed below may expect. > - (activate-current-system) > - > - ;; Run the services' activation snippets. > - ;; TODO: Use 'load-compiled'. > - (for-each primitive-load '#$actions))))) > + (map (cut program-file "activate-service.scm" <>) gexps)) > + > + (program-file "activate.scm" > + (with-imported-modules (source-module-closure > + '((gnu build activation) > + (guix build utils))) > + #~(begin > + (use-modules (gnu build activation) > + (guix build utils)) > + > + ;; Make sure the user accounting database exists. If it > + ;; does not exist, 'setutxent' does not create it and > + ;; thus there is no accounting at all. > + (close-port (open-file "/var/run/utmpx" "a0")) > + > + ;; Same for 'wtmp', which is populated by mingetty et > + ;; al. > + (mkdir-p "/var/log") > + (close-port (open-file "/var/log/wtmp" "a0")) > + > + ;; Set up /run/current-system. Among other things this > + ;; sets up locales, which the activation snippets > + ;; executed below may expect. > + (activate-current-system) > + > + ;; Run the services' activation snippets. > + ;; TODO: Use 'load-compiled'. > + (for-each primitive-load '#$actions))))) > > (define (gexps->activation-gexp gexps) > "Return a gexp that runs the activation script containing GEXPS." > diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm > index 8eeb9ae7a1..bc1d93a93a 100644 > --- a/guix/scripts/deploy.scm > +++ b/guix/scripts/deploy.scm > @@ -44,8 +44,6 @@ > (define (show-help) > (display (G_ "Usage: guix deploy [OPTION] FILE... > Perform the deployment specified by FILE.\n")) > - (display (G_ " > - -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) > (show-build-options-help) > (newline) > (display (G_ " > @@ -67,8 +65,7 @@ Perform the deployment specified by FILE.\n")) > %standard-build-options)) > > (define %default-options > - `((system . ,(%current-system)) > - (substitutes? . #t) > + `((substitutes? . #t) > (build-hook? . #t) > (graft? . #t) > (debug . 0) > @@ -91,8 +88,7 @@ Perform the deployment specified by FILE.\n")) > (for-each (lambda (machine) > (info (G_ "deploying to ~a...~%") > (machine-display-name machine)) > - (parameterize ((%current-system (assq-ref opts 'system)) > - (%graft? (assq-ref opts 'graft?))) > + (parameterize ((%graft? (assq-ref opts 'graft?))) > (guard (c ((message-condition? c) > (report-error (G_ "failed to deploy ~a: '~a'~%") > (machine-display-name machine) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 17:02:08 2019 Received: (at 36872) by debbugs.gnu.org; 6 Aug 2019 21:02:08 +0000 Received: from localhost ([127.0.0.1]:37895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv6au-0006UV-5H for submit@debbugs.gnu.org; Tue, 06 Aug 2019 17:02:08 -0400 Received: from ol.sdf.org ([205.166.94.20]:64011 helo=mx.sdf.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv6as-0006UM-4Y for 36872@debbugs.gnu.org; Tue, 06 Aug 2019 17:02:06 -0400 Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net [173.76.53.40]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x76L235R003431 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO); Tue, 6 Aug 2019 21:02:04 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) To: Christopher Lemmer Webber Subject: Re: [bug#36872] [PATCH v2 1/2] remote: Build derivations appropriate for the remote's References: <87lfwee2yd.fsf@sdf.lonestar.org> <87h872e2v2.fsf@sdf.lonestar.org> <87ef1yovur.fsf@dustycloud.org> Date: Tue, 06 Aug 2019 16:58:54 -0400 In-Reply-To: <87ef1yovur.fsf@dustycloud.org> (Christopher Lemmer Webber's message of "Tue, 06 Aug 2019 16:57:32 -0400") Message-ID: <87o912vwmp.fsf_-_@sdf.lonestar.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36872 Cc: 36872@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 (-) * guix/ssh.scm (remote-system): New variable. * guix/remote.scm (remote-eval): Use result of 'remote-system' when lowering the G-Expression. (trampoline): Return a rather than a . --- guix/remote.scm | 13 ++++++++----- guix/ssh.scm | 7 +++++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/guix/remote.scm b/guix/remote.scm index 5fecd954e9..0a0bdaf30b 100644 --- a/guix/remote.scm +++ b/guix/remote.scm @@ -71,7 +71,7 @@ prerequisites of EXP are already available on the host at SESSION." "Return a \"trampoline\" gexp that evaluates EXP and writes the evaluation result to the current output port using the (guix repl) protocol." (define program - (scheme-file "remote-exp.scm" exp)) + (program-file "remote-exp.scm" exp)) (with-imported-modules (source-module-closure '((guix repl))) #~(begin @@ -96,10 +96,13 @@ all the elements EXP refers to are built and deployed to SESSION beforehand. When BUILD-LOCALLY? is true, said dependencies are built locally and sent to the remote store afterwards; otherwise, dependencies are built directly on the remote store." - (mlet %store-monad ((lowered (lower-gexp (trampoline exp) - #:module-path %load-path)) - (remote -> (connect-to-remote-daemon session - socket-name))) + (mlet* %store-monad ((system -> (remote-system session)) + (lowered (lower-gexp (trampoline exp) + #:system system + #:guile-for-build #f + #:module-path %load-path)) + (remote -> (connect-to-remote-daemon session + socket-name))) (define inputs (cons (lowered-gexp-guile lowered) (lowered-gexp-inputs lowered))) diff --git a/guix/ssh.scm b/guix/ssh.scm index ede00133c8..9b5ca68894 100644 --- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -39,6 +39,7 @@ remote-inferior remote-daemon-channel connect-to-remote-daemon + remote-system send-files retrieve-files retrieve-files* @@ -282,6 +283,12 @@ be read. When RECURSIVE? is true, the closure of FILES is exported." ,(object->string (object->string export)))))) +(define (remote-system session) + "Return the system type as expected by Nix, usually ARCHITECTURE-KERNEL, of +the machine on the other end of SESSION." + (inferior-remote-eval '(begin (use-modules (guix utils)) (%current-system)) + session)) + (define* (send-files local files remote #:key recursive? -- 2.22.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 17:02:44 2019 Received: (at 36872) by debbugs.gnu.org; 6 Aug 2019 21:02:44 +0000 Received: from localhost ([127.0.0.1]:37898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv6bT-0006VM-FZ for submit@debbugs.gnu.org; Tue, 06 Aug 2019 17:02:43 -0400 Received: from ol.sdf.org ([205.166.94.20]:63847 helo=mx.sdf.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv6bR-0006VE-OZ for 36872@debbugs.gnu.org; Tue, 06 Aug 2019 17:02:42 -0400 Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net [173.76.53.40]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x76L2dYA017058 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO); Tue, 6 Aug 2019 21:02:40 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) To: Christopher Lemmer Webber Subject: Re: [bug#36872] [PATCH v2 2/2] remote: Remove '--system' argument. References: <87lfwee2yd.fsf@sdf.lonestar.org> <87h872e2v2.fsf@sdf.lonestar.org> <87ef1yovur.fsf@dustycloud.org> <87o912vwmp.fsf_-_@sdf.lonestar.org> Date: Tue, 06 Aug 2019 16:59:31 -0400 In-Reply-To: <87o912vwmp.fsf_-_@sdf.lonestar.org> (Jakob L. Kreuze's message of "Tue, 06 Aug 2019 16:58:54 -0400") Message-ID: <87imravwlo.fsf_-_@sdf.lonestar.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36872 Cc: 36872@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 (-) * gnu/services.scm (activation-script): Return a rather than a . * gnu/deploy.scm (guix-deploy): Remove handling for '--system'. (show-help): Remove documentation for '--system'. (%default-options): Remove default setting for 'system'. --- gnu/services.scm | 56 ++++++++++++++++++++--------------------- guix/scripts/deploy.scm | 8 ++---- 2 files changed, 30 insertions(+), 34 deletions(-) diff --git a/gnu/services.scm b/gnu/services.scm index 7de78105ff..6ee05d4580 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -430,34 +430,34 @@ ACTIVATION-SCRIPT-TYPE." (define (activation-script gexps) "Return the system's activation script, which evaluates GEXPS." (define actions - (map (cut scheme-file "activate-service" <>) gexps)) - - (scheme-file "activate" - (with-imported-modules (source-module-closure - '((gnu build activation) - (guix build utils))) - #~(begin - (use-modules (gnu build activation) - (guix build utils)) - - ;; Make sure the user accounting database exists. If it - ;; does not exist, 'setutxent' does not create it and - ;; thus there is no accounting at all. - (close-port (open-file "/var/run/utmpx" "a0")) - - ;; Same for 'wtmp', which is populated by mingetty et - ;; al. - (mkdir-p "/var/log") - (close-port (open-file "/var/log/wtmp" "a0")) - - ;; Set up /run/current-system. Among other things this - ;; sets up locales, which the activation snippets - ;; executed below may expect. - (activate-current-system) - - ;; Run the services' activation snippets. - ;; TODO: Use 'load-compiled'. - (for-each primitive-load '#$actions))))) + (map (cut program-file "activate-service.scm" <>) gexps)) + + (program-file "activate.scm" + (with-imported-modules (source-module-closure + '((gnu build activation) + (guix build utils))) + #~(begin + (use-modules (gnu build activation) + (guix build utils)) + + ;; Make sure the user accounting database exists. If it + ;; does not exist, 'setutxent' does not create it and + ;; thus there is no accounting at all. + (close-port (open-file "/var/run/utmpx" "a0")) + + ;; Same for 'wtmp', which is populated by mingetty et + ;; al. + (mkdir-p "/var/log") + (close-port (open-file "/var/log/wtmp" "a0")) + + ;; Set up /run/current-system. Among other things this + ;; sets up locales, which the activation snippets + ;; executed below may expect. + (activate-current-system) + + ;; Run the services' activation snippets. + ;; TODO: Use 'load-compiled'. + (for-each primitive-load '#$actions))))) (define (gexps->activation-gexp gexps) "Return a gexp that runs the activation script containing GEXPS." diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm index 52bba3f3bf..52d5e1e1da 100644 --- a/guix/scripts/deploy.scm +++ b/guix/scripts/deploy.scm @@ -42,8 +42,6 @@ (define (show-help) (display (G_ "Usage: guix deploy [OPTION] FILE... Perform the deployment specified by FILE.\n")) - (display (G_ " - -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) (show-build-options-help) (newline) (display (G_ " @@ -65,8 +63,7 @@ Perform the deployment specified by FILE.\n")) %standard-build-options)) (define %default-options - `((system . ,(%current-system)) - (substitutes? . #t) + `((substitutes? . #t) (build-hook? . #t) (graft? . #t) (debug . 0) @@ -88,7 +85,6 @@ Perform the deployment specified by FILE.\n")) (set-build-options-from-command-line store opts) (for-each (lambda (machine) (info (G_ "deploying to ~a...") (machine-display-name machine)) - (parameterize ((%current-system (assq-ref opts 'system)) - (%graft? (assq-ref opts 'graft?))) + (parameterize ((%graft? (assq-ref opts 'graft?))) (run-with-store store (deploy-machine machine)))) machines)))) -- 2.22.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 17:33:08 2019 Received: (at 36872) by debbugs.gnu.org; 6 Aug 2019 21:33:08 +0000 Received: from localhost ([127.0.0.1]:37920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv74u-0007Ne-4c for submit@debbugs.gnu.org; Tue, 06 Aug 2019 17:33:08 -0400 Received: from mx.sdf.org ([205.166.94.20]:50874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hv74r-0007NR-Jo for 36872@debbugs.gnu.org; Tue, 06 Aug 2019 17:33:06 -0400 Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net [173.76.53.40]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x76LX05n016922 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO); Tue, 6 Aug 2019 21:33:04 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) To: Christopher Lemmer Webber Subject: Re: [bug#36872] [PATCH 2/2] remote: Remove '--system' argument. References: <87lfwee2yd.fsf@sdf.lonestar.org> <87h872e2v2.fsf@sdf.lonestar.org> <87ef1yovur.fsf@dustycloud.org> Date: Tue, 06 Aug 2019 17:29:50 -0400 In-Reply-To: <87ef1yovur.fsf@dustycloud.org> (Christopher Lemmer Webber's message of "Tue, 06 Aug 2019 16:57:32 -0400") Message-ID: <877e7qvv75.fsf@sdf.lonestar.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36872 Cc: 36872@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 (-) Hey Chris! Christopher Lemmer Webber writes: > I'm still wondering whether asking the remote machine what its > architecture is won't turn out to be fragile in some way, though I'm not > sure how to articulate how that would be yet. It seems like a weird > side effect to apply before doing the build. (What if we want to build > derivations when we don't actually have a machine up and running yet? > Etc, etc.) I agree that it isn't the purest solution, but my thinking is that 'remote-eval' is meant to be effectful anyway. As for the situation where we build derivations for a machine that isn't running yet: I think we can cross that bridge when we get to it -- 'guix deploy' doesn't have the feature at the moment. Regards, Jakob From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 14:32:03 2019 Received: (at 36872) by debbugs.gnu.org; 7 Aug 2019 18:32:03 +0000 Received: from localhost ([127.0.0.1]:39344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvQjB-0005l6-QU for submit@debbugs.gnu.org; Wed, 07 Aug 2019 14:32:03 -0400 Received: from dustycloud.org ([50.116.34.160]:55614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvQj9-0005kr-Le for 36872@debbugs.gnu.org; Wed, 07 Aug 2019 14:32:00 -0400 Received: from twig (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id 99E112661E; Wed, 7 Aug 2019 14:31:58 -0400 (EDT) References: <87lfwee2yd.fsf@sdf.lonestar.org> <87h872e2v2.fsf@sdf.lonestar.org> <87ef1yovur.fsf@dustycloud.org> <877e7qvv75.fsf@sdf.lonestar.org> User-agent: mu4e 1.2.0; emacs 26.2 From: Christopher Lemmer Webber To: "Jakob L. Kreuze" , David Thompson Subject: Re: [bug#36872] [PATCH 2/2] remote: Remove '--system' argument. In-reply-to: <877e7qvv75.fsf@sdf.lonestar.org> Date: Wed, 07 Aug 2019 14:31:58 -0400 Message-ID: <87a7ckq129.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 36872 Cc: 36872@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 (-) Jakob L. Kreuze writes: > Hey Chris! > > Christopher Lemmer Webber writes: > >> I'm still wondering whether asking the remote machine what its >> architecture is won't turn out to be fragile in some way, though I'm not >> sure how to articulate how that would be yet. It seems like a weird >> side effect to apply before doing the build. (What if we want to build >> derivations when we don't actually have a machine up and running yet? >> Etc, etc.) > > I agree that it isn't the purest solution, but my thinking is that > 'remote-eval' is meant to be effectful anyway. As for the situation > where we build derivations for a machine that isn't running yet: I think > we can cross that bridge when we get to it -- 'guix deploy' doesn't have > the feature at the moment. > > Regards, > Jakob I thought about it more between yesterday and today, and it continues to seem strange to me that we're doing "probing" here. We don't probe to guess where Guix is currently installed or etc to specify disks. I guess that's not the same thing, but... Here's the concern: imagine that we want to be able to up-front do something like "guix system build" before we even start spinning up servers. Does this block that direction? Dave, your input appreciated on this one. I'm not sure I want to block the patch series with my hand wringing, but I do want to make sure we give it appropriate consideration. - Chris From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 15:03:26 2019 Received: (at 36872) by debbugs.gnu.org; 7 Aug 2019 19:03:26 +0000 Received: from localhost ([127.0.0.1]:39382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvRDZ-0000WO-Kw for submit@debbugs.gnu.org; Wed, 07 Aug 2019 15:03:25 -0400 Received: from mail-vs1-f65.google.com ([209.85.217.65]:33253) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvRDX-0000W4-1F for 36872@debbugs.gnu.org; Wed, 07 Aug 2019 15:03:23 -0400 Received: by mail-vs1-f65.google.com with SMTP id m8so61463105vsj.0 for <36872@debbugs.gnu.org>; Wed, 07 Aug 2019 12:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o/TMKY2gflgL6Ep+Jmx3fTKaF0zOuOrisWBVsjAQ2cc=; b=THj7TDLPpxdRa25Db13pFweGPvyYkhil7Iwfa0ZP6LEX9yL9C+IrIRz56y/D9X2VrI ZlXBJhSFcEydPT6wCZ3UeV6xxff2Nc2yRH+jw8FY8HHJdfHRpBaJbexNw5AjrsaI5JfC FAjh/Oo9YaV12fkVJdnADRBCgHZpjqArWqHHpuRgQtMAMtdlRRYam5qutRUhB2L1Aabr QZMXdBkp9r/f0KbIT5Dw+6IBRXfXyEWR48PK/JCsWenA4zQgoGv6vS3nQSBRrMLH1bzP M0rQEjrES7ZAXC1ojr9Q56V60cKr+GSDMtewt9DvImWn9Sqtdakun/hgLbbOozYwPQQN vZ1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o/TMKY2gflgL6Ep+Jmx3fTKaF0zOuOrisWBVsjAQ2cc=; b=VbzqwyFoxxep1SqSxir68S6ix5Ga4Nm1WUx6jUV83if+bAAwUqjK8sv0MxuDGcVd5V XDaF7MNjfsW+42d/+ANuDeA0cyZE20Eag2Fc9EGZxElJCnSwxl6RWB8xZODrUEmoLnnZ LwusS9QnBkTpthx+Kz1ZYHLjtTGxJTuBKYHYRtV4Ufpf4xZ6TOjkb25btrK/0OG985+h AH/pIEyboK2o+QPiZoMJCpYo7VvoQFi32z0C8QLQ601DoNc68sn6MhGVC122gEWTfdiv JsAyQsLr/jKdipb9riqJ3FNODZUe5e61FYCZYvXCQmqsu7O6k77s6RGh0DmFtpqZVhkm PKJg== X-Gm-Message-State: APjAAAXsaey5CunB37aC03fxQTYuhKQcLaZRCx/SJysQOQv7+pdsdE2a Ht+txdREZm7XtOsPdWPq9dIJYYvBfjWryw1PkGMERw== X-Google-Smtp-Source: APXvYqyau2GYnKyRCaZUg6tTsIgxaj0kcLtKLgykZC3KmDcltwoPvBa2H4NpTUO8Gx+e0A9qGZ/wtplsxsilR7ngzsQ= X-Received: by 2002:a67:ff0a:: with SMTP id v10mr7357804vsp.1.1565204597276; Wed, 07 Aug 2019 12:03:17 -0700 (PDT) MIME-Version: 1.0 References: <87lfwee2yd.fsf@sdf.lonestar.org> <87h872e2v2.fsf@sdf.lonestar.org> <87ef1yovur.fsf@dustycloud.org> <877e7qvv75.fsf@sdf.lonestar.org> <87a7ckq129.fsf@dustycloud.org> In-Reply-To: <87a7ckq129.fsf@dustycloud.org> From: "Thompson, David" Date: Wed, 7 Aug 2019 15:03:06 -0400 Message-ID: Subject: Re: [bug#36872] [PATCH 2/2] remote: Remove '--system' argument. To: Christopher Lemmer Webber Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36872 Cc: "Jakob L. Kreuze" , 36872@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 (-) Hi, On Wed, Aug 7, 2019 at 2:31 PM Christopher Lemmer Webber wrote: > > I thought about it more between yesterday and today, and it continues to > seem strange to me that we're doing "probing" here. We don't probe to > guess where Guix is currently installed or etc to specify disks. I > guess that's not the same thing, but... > > Here's the concern: imagine that we want to be able to up-front do > something like "guix system build" before we even start spinning up > servers. Does this block that direction? This is a good point. We want to make sure that the config file *completely* describes the operating systems that need to be built, therefore having to talk to a remote machine is no bueno. The reason I didn't want the user to have to explicitly specify the remote system's architecture is for usability. I wanted 'guix deploy' to just DTRT like guix already does when you run `guix system reconfigure` or `guix build` locally where %current-system defaults to what the local machine is running. However, I think that providing this information would only be a small inconvenience for the current managed host environment type. This wouldn't be an issue at all for an AWS environment type, for example, because the user would have to specify which instance type they want and with that you know what the value of %current-system should be when generating the OS derivation. I imagine this would be the case for any cloud environment. I think I've said this before (not sure if IRL or in an email) that we should make it the responsibility of the environment type to determine what the remote machine's system is. I still think that should be the case, but we should change the managed host type so that the user specifies that information as a new record field rather than making 'guix deploy' probe for it. Does this make sense? - Dave From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 16:31:35 2019 Received: (at 36872) by debbugs.gnu.org; 7 Aug 2019 20:31:35 +0000 Received: from localhost ([127.0.0.1]:39524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvSat-0006jL-7O for submit@debbugs.gnu.org; Wed, 07 Aug 2019 16:31:35 -0400 Received: from ol.sdf.org ([205.166.94.20]:60813 helo=mx.sdf.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvSar-0006hG-0z for 36872@debbugs.gnu.org; Wed, 07 Aug 2019 16:31:33 -0400 Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net [173.76.53.40]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x77KVUrL008474 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO); Wed, 7 Aug 2019 20:31:31 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) To: "Thompson\, David" Subject: Re: [bug#36872] [PATCH 2/2] remote: Remove '--system' argument. References: <87lfwee2yd.fsf@sdf.lonestar.org> <87h872e2v2.fsf@sdf.lonestar.org> <87ef1yovur.fsf@dustycloud.org> <877e7qvv75.fsf@sdf.lonestar.org> <87a7ckq129.fsf@dustycloud.org> Date: Wed, 07 Aug 2019 16:28:19 -0400 In-Reply-To: (David Thompson's message of "Wed, 7 Aug 2019 15:03:06 -0400") Message-ID: <87sgqclnz0.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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36872 Cc: Christopher Lemmer Webber , 36872@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 (-) --=-=-= Content-Type: text/plain Hi Chris and Dave, "Thompson, David" writes: > Hi, > > On Wed, Aug 7, 2019 at 2:31 PM Christopher Lemmer Webber > wrote: >> >> I thought about it more between yesterday and today, and it continues to >> seem strange to me that we're doing "probing" here. We don't probe to >> guess where Guix is currently installed or etc to specify disks. I >> guess that's not the same thing, but... >> >> Here's the concern: imagine that we want to be able to up-front do >> something like "guix system build" before we even start spinning up >> servers. Does this block that direction? > > This is a good point. We want to make sure that the config file > *completely* describes the operating systems that need to be built, > therefore having to talk to a remote machine is no bueno. The reason > I didn't want the user to have to explicitly specify the remote > system's architecture is for usability. I wanted 'guix deploy' to > just DTRT like guix already does when you run `guix system > reconfigure` or `guix build` locally where %current-system defaults to > what the local machine is running. However, I think that providing > this information would only be a small inconvenience for the current > managed host environment type. This wouldn't be an issue at all for an > AWS environment type, for example, because the user would have to > specify which instance type they want and with that you know what the > value of %current-system should be when generating the OS derivation. > I imagine this would be the case for any cloud environment. > > I think I've said this before (not sure if IRL or in an email) that we > should make it the responsibility of the environment type to determine > what the remote machine's system is. I still think that should be the > case, but we should change the managed host type so that the user > specifies that information as a new record field rather than making > 'guix deploy' probe for it. > > Does this make sense? Right. My gut feels a bit conflicted since 'remote-eval' is already talking to the remote, but the points about building ahead of time and having the configuration file completely specify the deployment are strong -- perhaps the better thing to do is to add a 'system' keyword to 'remote-eval'. I'll redo this patch as a 'system' field for the 'managed-host-environment-type' configuration. Regards, Jakob --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl1LNGMACgkQ9Qb9Fp2P 2Vqq7A/+IOlyZwgRKkoFCdK0oa/n5cvyxu+1FF3WksiEfKZ4flDF6dojOXq64jVW EutCCflOwOL3cx1QM6wpZ6pN47pvl4IeDUAIickfci9aTlgoZR+dAOCTEfpvP+6t OuxOqN2hurBRW3438U8+ugFlPSwIlW4X31eNFEnG792aivJeAWzLnAZV95iyvzuo CWuQiMWv0/6w0cr/xa6Ec+sf8tLYfsa6y3/A8m0Yf6NDNfznFXyMQ1GTGGX9pp4u 7W/Scser6rQHd7KguKS3BpmoSLwvX+xvdNNPsvJyxqS930iMvbW2fcxaX2ixXcWk xxg7QYPYIkvqW+5r6A+9ggVIae4LWVfryUEYxWjljg9RBec3zo/AHjCliPmmpNVI EHfPv1tKJcL3uIsmam5BMZza0Quvr/A5X3QQ6say/+Bp6/2EVE0WDMeT3vZA3hsn K+yyvZddbSIZ+QCW/GDJpnyJ2tn6H8o4epO88rzqlpIty/uLjoBwfT80Mypo09Xe 8GEdQkghUzkoOIOGbiWVk7jV3DIgzJSFVdh4V1oipxRsAz2zooEzNnF+0Azl1J17 r7k++fZDK0rvrGot6IFjjsPU3SX0mMsURUQhToBxcrfksLLR+0LLDKHrC3oeySez wECacMRSK6zvWM0/fvw5JElQkdwpVfHvgB4n1LeEJW53c09h8eE= =W92O -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 09 14:25:19 2019 Received: (at 36872) by debbugs.gnu.org; 9 Aug 2019 18:25:20 +0000 Received: from localhost ([127.0.0.1]:43261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hw9Zn-0008LG-FE for submit@debbugs.gnu.org; Fri, 09 Aug 2019 14:25:19 -0400 Received: from mx.sdf.org ([205.166.94.20]:50295) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hw9Zi-0008Kx-GW for 36872@debbugs.gnu.org; Fri, 09 Aug 2019 14:25:18 -0400 Received: from Upsilon (92-111-222-18.static.v4.ziggozakelijk.nl [92.111.222.18]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x79IP65b020873 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO); Fri, 9 Aug 2019 18:25:12 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) To: "Thompson\, David" Subject: Re: [bug#36872] [PATCH v2 1/2] remote: Build derivations appropriate for the remote's In-Reply-To: <87sgqclnz0.fsf@sdf.lonestar.org> (Jakob L. Kreuze's message of "Wed, 07 Aug 2019 16:28:19 -0400") References: <87lfwee2yd.fsf@sdf.lonestar.org> <87h872e2v2.fsf@sdf.lonestar.org> <87ef1yovur.fsf@dustycloud.org> <877e7qvv75.fsf@sdf.lonestar.org> <87a7ckq129.fsf@dustycloud.org> <87sgqclnz0.fsf@sdf.lonestar.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Date: Fri, 09 Aug 2019 14:24:57 -0400 Message-ID: <8736ianqme.fsf_-_@sdf.lonestar.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36872 Cc: Christopher Lemmer Webber , 36872@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 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * gnu/machine/ssh.scm (machine-ssh-configuration): Add 'system' field. (managed-host-remote-eval): Pass 'system' field to 'remote-eval'. (machine-check-building-for-appropriate-system): New variable. (check-deployment-sanity): Add call to 'machine-check-building-for-appropriate-system'. * doc/guix.texi (Invoking guix deploy): Describe new 'system' field. * guix/ssh.scm (remote-system): New variable. * guix/remote.scm (remote-eval): Use result of 'remote-system' when lowering the G-Expression. (remote-eval): Add 'system' keyword argument. (trampoline): Return a rather than a . =2D-- doc/guix.texi | 3 +++ gnu/machine/ssh.scm | 31 +++++++++++++++++++++++++++---- guix/remote.scm | 14 +++++++++----- guix/ssh.scm | 7 +++++++ 4 files changed, 46 insertions(+), 9 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 734206a4b2..a7facf4701 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -25573,6 +25573,9 @@ with an @code{environment} of @code{managed-host-en= vironment-type}. =20 @table @asis @item @code{host-name} +@item @code{system} +The Nix system type describing the architecture of the machine being deplo= yed +to. This should look something like ``x86_64-linux''. @item @code{port} (default: @code{22}) @item @code{user} (default: @code{"root"}) @item @code{identity} (default: @code{#f}) diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index ba3e33c922..670990a633 100644 =2D-- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm @@ -36,6 +36,7 @@ #:use-module (ice-9 match) #:use-module (srfi srfi-19) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:export (managed-host-environment-type =20 @@ -68,6 +69,7 @@ machine-ssh-configuration? this-machine-ssh-configuration (host-name machine-ssh-configuration-host-name) ; string + (system machine-ssh-configuration-system) ; string (build-locally? machine-ssh-configuration-build-locally? (default #t)) (port machine-ssh-configuration-port ; integer @@ -103,10 +105,12 @@ one from the configuration's parameters if one was no= t provided." "Internal implementation of 'machine-remote-eval' for MACHINE instances = with an environment type of 'managed-host." (maybe-raise-unsupported-configuration-error machine) =2D (remote-eval exp (machine-ssh-session machine) =2D #:build-locally? =2D (machine-ssh-configuration-build-locally? =2D (machine-configuration machine)))) + (let ((config (machine-configuration machine))) + (remote-eval exp (machine-ssh-session machine) + #:build-locally? + (machine-ssh-configuration-build-locally? config) + #:system + (machine-ssh-configuration-system config)))) =20 ;;; @@ -240,10 +244,29 @@ MACHINE's 'system' declaration do not exist on the ma= chine." device) (return #t))) =20 +(define (machine-check-building-for-appropriate-system machine) + "Raise a '&message' error condition if MACHINE is configured to be built +locally and the 'system' field does not match the '%current-system' report= ed +by MACHINE." + (let ((config (machine-configuration machine)) + (system (remote-system (machine-ssh-session machine)))) + (when (and (machine-ssh-configuration-build-locally? config) + (not (string=3D system (machine-ssh-configuration-system co= nfig)))) + (raise (condition + (&message + (message (format #f (G_ "incorrect target system \ +('~a' was given, while the system reports that it is '~a')~%") + (machine-ssh-configuration-system config) + system))))))) + (with-monad %store-monad (return #t))) + (define (check-deployment-sanity machine) "Raise a '&message' error condition if it is clear that deploying MACHIN= E's 'system' declaration would fail." + ;; Order is important here -- an incorrect value for 'system' will cause + ;; invocations of 'remote-eval' to fail. (mbegin %store-monad + (machine-check-building-for-appropriate-system machine) (machine-check-file-system-availability machine) (machine-check-initrd-modules machine))) =20 diff --git a/guix/remote.scm b/guix/remote.scm index 5fecd954e9..bcac64ea7a 100644 =2D-- a/guix/remote.scm +++ b/guix/remote.scm @@ -24,6 +24,7 @@ #:use-module (guix monads) #:use-module (guix modules) #:use-module (guix derivations) + #:use-module (guix utils) #:use-module (ssh popen) #:use-module (srfi srfi-1) #:use-module (ice-9 match) @@ -71,7 +72,7 @@ prerequisites of EXP are already available on the host at= SESSION." "Return a \"trampoline\" gexp that evaluates EXP and writes the evaluati= on result to the current output port using the (guix repl) protocol." (define program =2D (scheme-file "remote-exp.scm" exp)) + (program-file "remote-exp.scm" exp)) =20 (with-imported-modules (source-module-closure '((guix repl))) #~(begin @@ -89,6 +90,7 @@ result to the current output port using the (guix repl) p= rotocol." (define* (remote-eval exp session #:key (build-locally? #t) + (system (%current-system)) (module-path %load-path) (socket-name "/var/guix/daemon-socket/socket")) "Evaluate EXP, a gexp, on the host at SESSION, an SSH session. Ensure t= hat @@ -96,10 +98,12 @@ all the elements EXP refers to are built and deployed t= o SESSION beforehand. When BUILD-LOCALLY? is true, said dependencies are built locally and sent = to the remote store afterwards; otherwise, dependencies are built directly on= the remote store." =2D (mlet %store-monad ((lowered (lower-gexp (trampoline exp) =2D #:module-path %load-path)) =2D (remote -> (connect-to-remote-daemon session =2D socket-name))) + (mlet* %store-monad ((lowered (lower-gexp (trampoline exp) + #:system system + #:guile-for-build #f + #:module-path %load-path)) + (remote -> (connect-to-remote-daemon session + socket-name))) (define inputs (cons (lowered-gexp-guile lowered) (lowered-gexp-inputs lowered))) diff --git a/guix/ssh.scm b/guix/ssh.scm index ede00133c8..9b5ca68894 100644 =2D-- a/guix/ssh.scm +++ b/guix/ssh.scm @@ -39,6 +39,7 @@ remote-inferior remote-daemon-channel connect-to-remote-daemon + remote-system send-files retrieve-files retrieve-files* @@ -282,6 +283,12 @@ be read. When RECURSIVE? is true, the closure of FILE= S is exported." ,(object->string (object->string export)))))) =20 +(define (remote-system session) + "Return the system type as expected by Nix, usually ARCHITECTURE-KERNEL,= of +the machine on the other end of SESSION." + (inferior-remote-eval '(begin (use-modules (guix utils)) (%current-syste= m)) + session)) + (define* (send-files local files remote #:key recursive? =2D-=20 2.22.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl1NunsACgkQ9Qb9Fp2P 2Vo2NRAAqq0C2TeM/rHZzh+4nNS4AfOqqQ2Wp+TiLFaq+PfrCVZuBZycnl5+g8nV +FH51VUhkmIvOYpJtDJg68uwVP5wgJ1/waTZtBTsZgR0zpp5YHt2JVMxUzzimbx6 O9wvo3RLlDLhKyuvLPPaOCvfopwxyEcJHXNXw70yb60297ZwHFHD6b69uxlIpqWW aAjk+WE+fIIX7C+EUnXUHAlqrtRoaWO3L3rzpqZLQVJR7LuAzX0yAyT5er4jfEZ7 8THPj3Xrbfm9wgPuCqV83nBX9mJIn39SSyLfWP0/lsK08JEMjXSDiuV4So+UknoK 7rI0MZO0DO0gtq+efDlTYbkde6D5kdEuo/QK13h+imDckoMWk/1pi1Dk5J6zR4YE qapp/SLFAQ4Svoph1bvOUxo74QIitdufwNCIeu1nTSaiGIg3XeVY3iPMarKJay0W td0RgHBTUkn/8TxIF4M96D1Vc0bnQzguj9SUvgcMOMUiFoNtkCttv2aJ/05pzDX2 wi2vRMmrpq5BmG6khFjc+21SD1hL4tHAwU2ywR+lIj8iRBvUWHMkZiAzyOsylFDE o5cBt38y43folUo6nsVOkT2iJCK/ZlkF9TkDfmTG5qj6AfMP3Bn5R/J1SGCdb6YF S3CdxrBfTkYnqJ/Kh8I/zxXajQMJWzvuUozgB/3LVD6iZILLShY= =Ksmr -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 09 14:26:12 2019 Received: (at 36872) by debbugs.gnu.org; 9 Aug 2019 18:26:12 +0000 Received: from localhost ([127.0.0.1]:43265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hw9ae-0008N5-03 for submit@debbugs.gnu.org; Fri, 09 Aug 2019 14:26:12 -0400 Received: from mx.sdf.org ([205.166.94.20]:50143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hw9ab-0008Mu-QX for 36872@debbugs.gnu.org; Fri, 09 Aug 2019 14:26:10 -0400 Received: from Upsilon (92-111-222-18.static.v4.ziggozakelijk.nl [92.111.222.18]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x79IQ4Ge026697 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO); Fri, 9 Aug 2019 18:26:07 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) To: "Thompson\, David" Subject: Re: [bug#36872] [PATCH v2 2/2] remote: Remove '--system' argument. References: <87lfwee2yd.fsf@sdf.lonestar.org> <87h872e2v2.fsf@sdf.lonestar.org> <87ef1yovur.fsf@dustycloud.org> <877e7qvv75.fsf@sdf.lonestar.org> <87a7ckq129.fsf@dustycloud.org> <87sgqclnz0.fsf@sdf.lonestar.org> <8736ianqme.fsf_-_@sdf.lonestar.org> Date: Fri, 09 Aug 2019 14:25:54 -0400 In-Reply-To: <8736ianqme.fsf_-_@sdf.lonestar.org> (Jakob L. Kreuze's message of "Fri, 09 Aug 2019 14:24:57 -0400") Message-ID: <87y302mc0d.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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36872 Cc: Christopher Lemmer Webber , 36872@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 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * gnu/services.scm (activation-script): Return a rather than a . * gnu/deploy.scm (guix-deploy): Remove handling for '--system'. (show-help): Remove documentation for '--system'. (%default-options): Remove default setting for 'system'. =2D-- gnu/services.scm | 56 ++++++++++++++++++++--------------------- guix/scripts/deploy.scm | 8 ++---- 2 files changed, 30 insertions(+), 34 deletions(-) diff --git a/gnu/services.scm b/gnu/services.scm index 7de78105ff..6ee05d4580 100644 =2D-- a/gnu/services.scm +++ b/gnu/services.scm @@ -430,34 +430,34 @@ ACTIVATION-SCRIPT-TYPE." (define (activation-script gexps) "Return the system's activation script, which evaluates GEXPS." (define actions =2D (map (cut scheme-file "activate-service" <>) gexps)) =2D =2D (scheme-file "activate" =2D (with-imported-modules (source-module-closure =2D '((gnu build activation) =2D (guix build utils))) =2D #~(begin =2D (use-modules (gnu build activation) =2D (guix build utils)) =2D =2D ;; Make sure the user accounting database exists. = If it =2D ;; does not exist, 'setutxent' does not create it a= nd =2D ;; thus there is no accounting at all. =2D (close-port (open-file "/var/run/utmpx" "a0")) =2D =2D ;; Same for 'wtmp', which is populated by mingetty = et =2D ;; al. =2D (mkdir-p "/var/log") =2D (close-port (open-file "/var/log/wtmp" "a0")) =2D =2D ;; Set up /run/current-system. Among other things = this =2D ;; sets up locales, which the activation snippets =2D ;; executed below may expect. =2D (activate-current-system) =2D =2D ;; Run the services' activation snippets. =2D ;; TODO: Use 'load-compiled'. =2D (for-each primitive-load '#$actions))))) + (map (cut program-file "activate-service.scm" <>) gexps)) + + (program-file "activate.scm" + (with-imported-modules (source-module-closure + '((gnu build activation) + (guix build utils))) + #~(begin + (use-modules (gnu build activation) + (guix build utils)) + + ;; Make sure the user accounting database exists. I= f it + ;; does not exist, 'setutxent' does not create it and + ;; thus there is no accounting at all. + (close-port (open-file "/var/run/utmpx" "a0")) + + ;; Same for 'wtmp', which is populated by mingetty et + ;; al. + (mkdir-p "/var/log") + (close-port (open-file "/var/log/wtmp" "a0")) + + ;; Set up /run/current-system. Among other things t= his + ;; sets up locales, which the activation snippets + ;; executed below may expect. + (activate-current-system) + + ;; Run the services' activation snippets. + ;; TODO: Use 'load-compiled'. + (for-each primitive-load '#$actions))))) =20 (define (gexps->activation-gexp gexps) "Return a gexp that runs the activation script containing GEXPS." diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm index ebc99e52cc..81f2b33260 100644 =2D-- a/guix/scripts/deploy.scm +++ b/guix/scripts/deploy.scm @@ -43,8 +43,6 @@ (define (show-help) (display (G_ "Usage: guix deploy [OPTION] FILE... Perform the deployment specified by FILE.\n")) =2D (display (G_ " =2D -s, --system=3DSYSTEM attempt to build for SYSTEM--e.g., \"i686-lin= ux\"")) (show-build-options-help) (newline) (display (G_ " @@ -66,8 +64,7 @@ Perform the deployment specified by FILE.\n")) %standard-build-options)) =20 (define %default-options =2D `((system . ,(%current-system)) =2D (substitutes? . #t) + `((substitutes? . #t) (build-hook? . #t) (graft? . #t) (debug . 0) @@ -92,7 +89,6 @@ Perform the deployment specified by FILE.\n")) (set-build-options-from-command-line store opts) (for-each (lambda (machine) (info (G_ "deploying to ~a...") (machine-display-name ma= chine)) =2D (parameterize ((%current-system (assq-ref opts 'system= )) =2D (%graft? (assq-ref opts 'graft?))) + (parameterize ((%graft? (assq-ref opts 'graft?))) (run-with-store store (deploy-machine machine)))) machines)))) =2D-=20 2.22.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl1NurMACgkQ9Qb9Fp2P 2VqwcRAAqRKmTRpyD1pRRGyHhZD4XUB/vGJJ7n4GbE4/4HSOZEp5Hmynj8De9a5K 4fY1htECNrwhGiJ7Qn565IRZ6EsU0jr01QBRj2jq9zeGfbwESoS6Dk5+5+BnbnT8 rXa42OGCaLdDhth1e+o6y/kN6P0FSrDkyX0Q0dB8u/MSzRilDWyXeaC52ZPJ+ZkV JdQyscxYI+xN4ilz5jDm/dpROgTnZN96lyajfzDjhMLssjJ4ZLhooZY7jBIg/JQK Xs7CTtH+M6s9h1OQ0y7LbBKw4JEOyNqPi9AAG7dP1fj/1g+UJKUxzmIVRTsXsgrC ixHT/iU4tGRTe0ewaTvgzIEKykZfvajyLJmazgzBd0xfAtZv0irNV8C+JlQYeXMR yDOurpfsokz0sKZCFp6b3YtufdsxkZvLrE1zluPMFku7n2wNCJc9t/AHVgeo7VdG y+126dVYJ5VB4N9d9Hq2m69IXDAqZa59b8WG7UKuVptZvm23j4qesPus/W/dyY+D GoZj/T2f9QvTruXsK28D8e2jefXLLB+ZZE/Y4+1IZ2Rke3Wgi1VtrLWgsKT8T1Kj v4Xo09Wlv18rkD8CKtNPra8Ln9oajXoizsBI3bx0qghgQK9bV3oQm3XZDn4JAdNk AaNggFbkGytj7weiRBCl0UGOW6DW0SjjLdRg8VTws3+Y5dxwJrM= =UbYc -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 14 15:40:43 2019 Received: (at 36872) by debbugs.gnu.org; 14 Aug 2019 19:40:43 +0000 Received: from localhost ([127.0.0.1]:49702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hxz8S-0006Lz-KR for submit@debbugs.gnu.org; Wed, 14 Aug 2019 15:40:41 -0400 Received: from dustycloud.org ([50.116.34.160]:39752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hxz8R-0006Ln-3x for 36872@debbugs.gnu.org; Wed, 14 Aug 2019 15:40:39 -0400 Received: from twig (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id 385BD26630; Wed, 14 Aug 2019 15:40:38 -0400 (EDT) References: <87lfwee2yd.fsf@sdf.lonestar.org> <87h872e2v2.fsf@sdf.lonestar.org> <87ef1yovur.fsf@dustycloud.org> <877e7qvv75.fsf@sdf.lonestar.org> <87a7ckq129.fsf@dustycloud.org> <87sgqclnz0.fsf@sdf.lonestar.org> <8736ianqme.fsf_-_@sdf.lonestar.org> <87y302mc0d.fsf_-_@sdf.lonestar.org> User-agent: mu4e 1.2.0; emacs 26.2 From: Christopher Lemmer Webber To: "Jakob L. Kreuze" Subject: Re: [bug#36872] [PATCH v2 2/2] remote: Remove '--system' argument. In-reply-to: <87y302mc0d.fsf_-_@sdf.lonestar.org> Date: Wed, 14 Aug 2019 15:40:37 -0400 Message-ID: <87sgq3y1qi.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 36872 Cc: "Thompson, David" , 36872@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 good. Merged & pushed! Jakob L. Kreuze writes: > * gnu/services.scm (activation-script): Return a rather > than a . > * gnu/deploy.scm (guix-deploy): Remove handling for '--system'. > (show-help): Remove documentation for '--system'. > (%default-options): Remove default setting for 'system'. > --- > gnu/services.scm | 56 ++++++++++++++++++++--------------------- > guix/scripts/deploy.scm | 8 ++---- > 2 files changed, 30 insertions(+), 34 deletions(-) > > diff --git a/gnu/services.scm b/gnu/services.scm > index 7de78105ff..6ee05d4580 100644 > --- a/gnu/services.scm > +++ b/gnu/services.scm > @@ -430,34 +430,34 @@ ACTIVATION-SCRIPT-TYPE." > (define (activation-script gexps) > "Return the system's activation script, which evaluates GEXPS." > (define actions > - (map (cut scheme-file "activate-service" <>) gexps)) > - > - (scheme-file "activate" > - (with-imported-modules (source-module-closure > - '((gnu build activation) > - (guix build utils))) > - #~(begin > - (use-modules (gnu build activation) > - (guix build utils)) > - > - ;; Make sure the user accounting database exists. If it > - ;; does not exist, 'setutxent' does not create it and > - ;; thus there is no accounting at all. > - (close-port (open-file "/var/run/utmpx" "a0")) > - > - ;; Same for 'wtmp', which is populated by mingetty et > - ;; al. > - (mkdir-p "/var/log") > - (close-port (open-file "/var/log/wtmp" "a0")) > - > - ;; Set up /run/current-system. Among other things this > - ;; sets up locales, which the activation snippets > - ;; executed below may expect. > - (activate-current-system) > - > - ;; Run the services' activation snippets. > - ;; TODO: Use 'load-compiled'. > - (for-each primitive-load '#$actions))))) > + (map (cut program-file "activate-service.scm" <>) gexps)) > + > + (program-file "activate.scm" > + (with-imported-modules (source-module-closure > + '((gnu build activation) > + (guix build utils))) > + #~(begin > + (use-modules (gnu build activation) > + (guix build utils)) > + > + ;; Make sure the user accounting database exists. If it > + ;; does not exist, 'setutxent' does not create it and > + ;; thus there is no accounting at all. > + (close-port (open-file "/var/run/utmpx" "a0")) > + > + ;; Same for 'wtmp', which is populated by mingetty et > + ;; al. > + (mkdir-p "/var/log") > + (close-port (open-file "/var/log/wtmp" "a0")) > + > + ;; Set up /run/current-system. Among other things this > + ;; sets up locales, which the activation snippets > + ;; executed below may expect. > + (activate-current-system) > + > + ;; Run the services' activation snippets. > + ;; TODO: Use 'load-compiled'. > + (for-each primitive-load '#$actions))))) > > (define (gexps->activation-gexp gexps) > "Return a gexp that runs the activation script containing GEXPS." > diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm > index ebc99e52cc..81f2b33260 100644 > --- a/guix/scripts/deploy.scm > +++ b/guix/scripts/deploy.scm > @@ -43,8 +43,6 @@ > (define (show-help) > (display (G_ "Usage: guix deploy [OPTION] FILE... > Perform the deployment specified by FILE.\n")) > - (display (G_ " > - -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) > (show-build-options-help) > (newline) > (display (G_ " > @@ -66,8 +64,7 @@ Perform the deployment specified by FILE.\n")) > %standard-build-options)) > > (define %default-options > - `((system . ,(%current-system)) > - (substitutes? . #t) > + `((substitutes? . #t) > (build-hook? . #t) > (graft? . #t) > (debug . 0) > @@ -92,7 +89,6 @@ Perform the deployment specified by FILE.\n")) > (set-build-options-from-command-line store opts) > (for-each (lambda (machine) > (info (G_ "deploying to ~a...") (machine-display-name machine)) > - (parameterize ((%current-system (assq-ref opts 'system)) > - (%graft? (assq-ref opts 'graft?))) > + (parameterize ((%graft? (assq-ref opts 'graft?))) > (run-with-store store (deploy-machine machine)))) > machines)))) From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 14 16:29:56 2019 Received: (at 36872-done) by debbugs.gnu.org; 14 Aug 2019 20:29:56 +0000 Received: from localhost ([127.0.0.1]:49751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hxzu5-0008HY-SS for submit@debbugs.gnu.org; Wed, 14 Aug 2019 16:29:56 -0400 Received: from dustycloud.org ([50.116.34.160]:39990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hxzu3-0008HO-6n for 36872-done@debbugs.gnu.org; Wed, 14 Aug 2019 16:29:53 -0400 Received: from twig (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id 3E14026630; Wed, 14 Aug 2019 16:29:50 -0400 (EDT) References: <87lfwee2yd.fsf@sdf.lonestar.org> <87h872e2v2.fsf@sdf.lonestar.org> <87ef1yovur.fsf@dustycloud.org> <877e7qvv75.fsf@sdf.lonestar.org> <87a7ckq129.fsf@dustycloud.org> <87sgqclnz0.fsf@sdf.lonestar.org> <8736ianqme.fsf_-_@sdf.lonestar.org> <87y302mc0d.fsf_-_@sdf.lonestar.org> <87sgq3y1qi.fsf@dustycloud.org> User-agent: mu4e 1.2.0; emacs 26.2 From: Christopher Lemmer Webber To: "Jakob L. Kreuze" Subject: Re: [bug#36872] [PATCH v2 2/2] remote: Remove '--system' argument. In-reply-to: <87sgq3y1qi.fsf@dustycloud.org> Date: Wed, 14 Aug 2019 16:29:49 -0400 Message-ID: <87r25nxzgi.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 36872-done Cc: "Thompson, David" , 36872-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 (-) Forgot to signal -done :) Christopher Lemmer Webber writes: > Looks good. Merged & pushed! > > Jakob L. Kreuze writes: > >> * gnu/services.scm (activation-script): Return a rather >> than a . >> * gnu/deploy.scm (guix-deploy): Remove handling for '--system'. >> (show-help): Remove documentation for '--system'. >> (%default-options): Remove default setting for 'system'. >> --- >> gnu/services.scm | 56 ++++++++++++++++++++--------------------- >> guix/scripts/deploy.scm | 8 ++---- >> 2 files changed, 30 insertions(+), 34 deletions(-) >> >> diff --git a/gnu/services.scm b/gnu/services.scm >> index 7de78105ff..6ee05d4580 100644 >> --- a/gnu/services.scm >> +++ b/gnu/services.scm >> @@ -430,34 +430,34 @@ ACTIVATION-SCRIPT-TYPE." >> (define (activation-script gexps) >> "Return the system's activation script, which evaluates GEXPS." >> (define actions >> - (map (cut scheme-file "activate-service" <>) gexps)) >> - >> - (scheme-file "activate" >> - (with-imported-modules (source-module-closure >> - '((gnu build activation) >> - (guix build utils))) >> - #~(begin >> - (use-modules (gnu build activation) >> - (guix build utils)) >> - >> - ;; Make sure the user accounting database exists. If it >> - ;; does not exist, 'setutxent' does not create it and >> - ;; thus there is no accounting at all. >> - (close-port (open-file "/var/run/utmpx" "a0")) >> - >> - ;; Same for 'wtmp', which is populated by mingetty et >> - ;; al. >> - (mkdir-p "/var/log") >> - (close-port (open-file "/var/log/wtmp" "a0")) >> - >> - ;; Set up /run/current-system. Among other things this >> - ;; sets up locales, which the activation snippets >> - ;; executed below may expect. >> - (activate-current-system) >> - >> - ;; Run the services' activation snippets. >> - ;; TODO: Use 'load-compiled'. >> - (for-each primitive-load '#$actions))))) >> + (map (cut program-file "activate-service.scm" <>) gexps)) >> + >> + (program-file "activate.scm" >> + (with-imported-modules (source-module-closure >> + '((gnu build activation) >> + (guix build utils))) >> + #~(begin >> + (use-modules (gnu build activation) >> + (guix build utils)) >> + >> + ;; Make sure the user accounting database exists. If it >> + ;; does not exist, 'setutxent' does not create it and >> + ;; thus there is no accounting at all. >> + (close-port (open-file "/var/run/utmpx" "a0")) >> + >> + ;; Same for 'wtmp', which is populated by mingetty et >> + ;; al. >> + (mkdir-p "/var/log") >> + (close-port (open-file "/var/log/wtmp" "a0")) >> + >> + ;; Set up /run/current-system. Among other things this >> + ;; sets up locales, which the activation snippets >> + ;; executed below may expect. >> + (activate-current-system) >> + >> + ;; Run the services' activation snippets. >> + ;; TODO: Use 'load-compiled'. >> + (for-each primitive-load '#$actions))))) >> >> (define (gexps->activation-gexp gexps) >> "Return a gexp that runs the activation script containing GEXPS." >> diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm >> index ebc99e52cc..81f2b33260 100644 >> --- a/guix/scripts/deploy.scm >> +++ b/guix/scripts/deploy.scm >> @@ -43,8 +43,6 @@ >> (define (show-help) >> (display (G_ "Usage: guix deploy [OPTION] FILE... >> Perform the deployment specified by FILE.\n")) >> - (display (G_ " >> - -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) >> (show-build-options-help) >> (newline) >> (display (G_ " >> @@ -66,8 +64,7 @@ Perform the deployment specified by FILE.\n")) >> %standard-build-options)) >> >> (define %default-options >> - `((system . ,(%current-system)) >> - (substitutes? . #t) >> + `((substitutes? . #t) >> (build-hook? . #t) >> (graft? . #t) >> (debug . 0) >> @@ -92,7 +89,6 @@ Perform the deployment specified by FILE.\n")) >> (set-build-options-from-command-line store opts) >> (for-each (lambda (machine) >> (info (G_ "deploying to ~a...") (machine-display-name machine)) >> - (parameterize ((%current-system (assq-ref opts 'system)) >> - (%graft? (assq-ref opts 'graft?))) >> + (parameterize ((%graft? (assq-ref opts 'graft?))) >> (run-with-store store (deploy-machine machine)))) >> machines)))) From unknown Sun Jun 22 17:11:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 12 Sep 2019 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator