unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Lemmer Webber <cwebber@dustycloud.org>
To: 36872@debbugs.gnu.org
Subject: [bug#36872] [PATCH 2/2] remote: Remove '--system' argument.
Date: Tue, 06 Aug 2019 16:57:32 -0400	[thread overview]
Message-ID: <87ef1yovur.fsf@dustycloud.org> (raw)
In-Reply-To: <87h872e2v2.fsf@sdf.lonestar.org>

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 <program-file> rather
> than a <scheme-file>.
> * 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)

  reply	other threads:[~2019-08-06 20:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31 13:41 [bug#36872] [PATCH 1/2] remote: Build derivations appropriate for the remote's architecture Jakob L. Kreuze
2019-07-31 13:43 ` [bug#36872] [PATCH 2/2] remote: Remove '--system' argument Jakob L. Kreuze
2019-08-06 20:57   ` Christopher Lemmer Webber [this message]
2019-08-06 20:58     ` [bug#36872] [PATCH v2 1/2] remote: Build derivations appropriate for the remote's Jakob L. Kreuze
2019-08-06 20:59       ` [bug#36872] [PATCH v2 2/2] remote: Remove '--system' argument Jakob L. Kreuze
2019-08-06 21:29     ` [bug#36872] [PATCH " Jakob L. Kreuze
2019-08-07 18:31       ` Christopher Lemmer Webber
2019-08-07 19:03         ` Thompson, David
2019-08-07 20:28           ` Jakob L. Kreuze
2019-08-09 18:24             ` [bug#36872] [PATCH v2 1/2] remote: Build derivations appropriate for the remote's Jakob L. Kreuze
2019-08-09 18:25               ` [bug#36872] [PATCH v2 2/2] remote: Remove '--system' argument Jakob L. Kreuze
2019-08-14 19:40                 ` Christopher Lemmer Webber
2019-08-14 20:29                   ` bug#36872: " Christopher Lemmer Webber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ef1yovur.fsf@dustycloud.org \
    --to=cwebber@dustycloud.org \
    --cc=36872@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).