From patchwork Fri Aug 9 18:25:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jakob L. Kreuze" X-Patchwork-Id: 14907 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5BFD5172B6; Fri, 9 Aug 2019 19:27:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 1743B172AF for ; Fri, 9 Aug 2019 19:27:09 +0100 (BST) Received: from localhost ([::1]:33360 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hw9bY-0006C4-PX for patchwork@mira.cbaines.net; Fri, 09 Aug 2019 14:27:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48105) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hw9bU-0006Bu-45 for guix-patches@gnu.org; Fri, 09 Aug 2019 14:27:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hw9bS-00083R-QE for guix-patches@gnu.org; Fri, 09 Aug 2019 14:27:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34444) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hw9bS-00083K-MS for guix-patches@gnu.org; Fri, 09 Aug 2019 14:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hw9bS-0008OT-HO for guix-patches@gnu.org; Fri, 09 Aug 2019 14:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36872] [PATCH v2 2/2] remote: Remove '--system' argument. Resent-From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Aug 2019 18:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36872 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "Thompson\, David" Received: via spool by 36872-submit@debbugs.gnu.org id=B36872.156537517232187 (code B ref 36872); Fri, 09 Aug 2019 18:27:02 +0000 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) 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 36872@debbugs.gnu.org Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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))))