unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
To: 50468@debbugs.gnu.org
Subject: bug#50468: Should `guix deploy` save to the deployed server the operating-system, or the entire file passed into the command?
Date: Tue, 07 Sep 2021 22:09:08 -0500	[thread overview]
Message-ID: <87pmtjwyp7.fsf@gmail.com> (raw)

*Observed Behavior:*

Invoking `guix deploy my-config.scm` will store `my-config.scm` in the
deployed server's store, and links that as
`/run/current-system/configuration.scm`.

*Expected Behavior*

I expected the deployed server to only be made aware of the requested
`operating-system` declaration. In other words, `my-config.scm` contains
a list of machines, and each machine has an `operating-system`
declaration. I would expect each deployed machine to only have a copy of
their, and only their, `operating-system` declaration, fully resolved
from Guile variables into strings and such.

*Justification*

`guix deploy` expects a file that "evaluates to a list of machine
objects". Because of this, it is expected that multiple machines are
declared in a single file. These machines may not be related to each
other, and they may even have information that should be kept from one
another. Therefore, deploying the entire file's contents to a deployed
machine's remote store is incorrect behavior.

Further, `guix deploy` works if the file given does something like
`(load "my-private-stuff.scm")`. It will resolve the Guile variables
before deploying, and everything will work. But the `configuration.scm`
on the deployed server will only have a reference to the `load` which
won't be in the store. The unresolved Guile variables will be listed
where they are used.

*Workaround*

Each machine can reside in a separate file, and then `guix deploy` can
be executed for each file with:

find . -iregex '.*\.scm' -print -execdir guix deploy "{}" \;

-- 
Katherine




                 reply	other threads:[~2021-09-08  3:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87pmtjwyp7.fsf@gmail.com \
    --to=cox.katherine.e@gmail.com \
    --cc=50468@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).