summaryrefslogtreecommitdiff
path: root/guix/scripts/system.scm
AgeCommit message (Collapse)Author
2016-05-04services: herd: Move UI handling to 'guix system'.Ludovic Courtès
This makes (gnu services herd) independent of (guix ui). * gnu/services/herd.scm (&shepherd-error, &service-not-found-error) (&action-not-found-error, &action-exception-error) (&unknown-shepherd-error): New error condition types. (report-action-error): Remove. (raise-shepherd-error): New procedure. (display-message): Do not use 'info' and '_'. (invoke-action): Use 'raise-shepherd-error' instead of 'report-action-error'. Do not use 'warning'. (current-services): Do not use 'warning'. * guix/scripts/system.scm (with-shepherd-error-handling): New macro. (report-shepherd-error, call-with-service-upgrade-info): New procedures. (upgrade-shepherd-services): Use it.
2016-04-29guix system: Reduce size of image produced for 'vm' action.Ludovic Courtès
This reduces the size of the image produced by 'guix system vm' from 26 MiB to 9 MiB. * gnu/system/vm.scm (system-qemu-image/shared-store): (system-qemu-image/shared-store-script): Change the default value of #:disk-image-size to 30 MiB when not FULL-BOOT?. * guix/scripts/system.scm (system-derivation-for-action): Likewise for the 'vm' action.
2016-03-28guix system: Warn against missing 'guix pull'.Ludovic Courtès
Suggested by Leo Famulari and others. * guix/scripts/system.scm (maybe-suggest-running-guix-pull): New procedure. (perform-action): Call it when ACTION is 'reconfigure.
2016-03-08guix system: Write the GC root on the target file system.Ludovic Courtès
Fixes <http://bugs.gnu.org/22802>. Reported by Jookia <166291@gmail.com>. * guix/scripts/system.scm (install-grub*): Prepend TARGET to GC-ROOT.
2016-03-02guix build: Move '--no-grafts' to the common build options.Ludovic Courtès
* guix/scripts/build.scm (%options): Move --no-grafts to... (%standard-build-options): ... here. (show-help, show-build-options-help): Adjust accordingly. * guix/scripts/archive.scm (%default-options): Add 'graft?'. (guix-archive): Parametrize '%graft?'. * guix/scripts/environment.scm (%default-options): Add 'graft?'. (guix-environment): Parametrize '%graft?'. * guix/scripts/package.scm (%default-options): Add 'graft?'. (guix-package): Parametrize '%graft?'. * guix/scripts/system.scm (%default-options): Add 'graft?'. (guix-system): Parametrize 'graft?'. * doc/guix.texi (Additional Build Options): Move --no-grafts to... (Common Build Options): ... here.
2016-02-25guix system: Restore load path after running the activation script.Ludovic Courtès
Fixes <http://bugs.gnu.org/22753>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/system.scm (save-load-path-excursion): New variable. (upgrade-shepherd-services): Add comment about the issue. (switch-to-system): Use 'save-load-path-excursion' around 'primitive-load' call.
2016-02-05guix system: Simply warn if we cannot talk to the shepherd.Ludovic Courtès
Before that 'open-connection' would return #f, and thus 'current-services' would return a single #f value when its continuation expects two. Reported by calher on #guix. * gnu/services/herd.scm (open-connection): Rethrow system-error exceptions. (with-shepherd): Expect CONNECTION to always be true; remove useless 'dynamic-wind'. * guix/scripts/system.scm (warn-on-system-error): New macro. (upgrade-shepherd-services): Wrap body in 'warn-on-system-error'.
2016-02-03guix system: 'reconfigure' loads and starts new services.Ludovic Courtès
Partly fixes <http://bugs.gnu.org/22039>. * gnu/services/herd.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. * gnu/services/shepherd.scm (shepherd-service-canonical-name): New procedure. (shepherd-service-file): Export. * guix/scripts/system.scm (upgrade-shepherd-services): New procedure. (switch-to-system): Use it. * guix/ui.scm (info): New procedure. * doc/guix.texi (Invoking guix system): Mention system services.
2016-01-29guix system: Rename 'dmd-graph' to 'shepherd-graph'.Alex Kost
* doc/images/dmd-graph.dot: Rename to... * doc/images/shepherd-graph.dot: ... this. * doc.am (DOT_FILES): Adjust accordingly. * guix/scripts/system.scm (dmd-service-node-label) (dmd-service-node-type, export-dmd-graph): Rename to... (shepherd-service-node-label, shepherd-service-node-type) (export-shepherd-graph): ... this. (show-help, process-action, process-command): Rename 'dmd-graph' to 'shepherd-graph'. * emacs/guix-command.el (guix-command-additional-execute-arguments) (guix-command-special-executors): Likewise. * doc/guix.texi: Likewise. * doc/emacs.texi (Emacs Popup Interface): Likewise.
2016-01-29services: Rename 'dmd' services to 'shepherd'.Alex Kost
* gnu/services/shepherd.scm (dmd-root-service-type, %dmd-root-service) (dmd-service-type, <dmd-service>, dmd-service, dmd-service?) (make-dmd-service, dmd-service-documentation, dmd-service-provision) (dmd-service-requirement, dmd-service-respawn, dmd-service-start) (dmd-service-stop, dmd-service-auto-start?, dmd-service-modules) (dmd-service-imported-modules, dmd-service-file-name, dmd-service-file) (dmd-service-back-edges): Rename to... (shepherd-root-service-type, %shepherd-root-service, shepherd-service-type) (<shepherd-service>, shepherd-service, shepherd-service?) (make-shepherd-service, shepherd-service-documentation) (shepherd-service-provision, shepherd-service-requirement) (shepherd-service-respawn, shepherd-service-start) (shepherd-service-stop, shepherd-service-auto-start?) (shepherd-service-modules, shepherd-service-imported-modules) (shepherd-service-file-name, shepherd-service-file) (shepherd-service-back-edges): ...this * gnu/services.scm: Adjust comments. * gnu/services/avahi.scm (avahi-dmd-service): Rename to... (avahi-shepherd-service): ... this. * gnu/services/base.scm (%root-file-system-dmd-service) (file-system->dmd-service-name, mapped-device->dmd-service-name) (dependency->dmd-service-name, file-system-dmd-service) (mingetty-dmd-service, nscd-dmd-service, guix-dmd-service) (guix-publish-dmd-service, udev-dmd-service, gpm-dmd-service): Rename to... (%root-file-system-shepherd-service) (file-system->shepherd-service-name, mapped-device->shepherd-service-name) (dependency->shepherd-service-name, file-system-shepherd-service) (mingetty-shepherd-service, nscd-shepherd-service, guix-shepherd-service) (guix-publish-shepherd-service, udev-shepherd-service) (gpm-shepherd-service): ... this. * gnu/services/databases.scm (postgresql-dmd-service): Rename to... (postgresql-shepherd-service): ... this. * gnu/services/desktop.scm (upower-dmd-service, elogind-dmd-service): Rename to... (upower-shepherd-service, elogind-shepherd-service): ... this. * gnu/services/dbus.scm (dbus-dmd-service): Rename to... (dbus-shepherd-service): ... this. * gnu/services/lirc.scm (lirc-dmd-service): Rename to... (lirc-shepherd-service): ... this. * gnu/services/mail.scm (dovecot-dmd-service): Rename to... (dovecot-shepherd-service): ... this. * gnu/services/networking.scm (ntp-dmd-service, tor-dmd-service) (bitlbee-dmd-service, wicd-dmd-service, network-manager-dmd-service): Rename to... (dbus-shepherd-service): ... this. * gnu/services/ssh.scm (lsh-dmd-service): Rename to... (lsh-shepherd-service): ... this. * gnu/services/web.scm (nginx-dmd-service): Rename to... (nginx-shepherd-service): ... this. * gnu/services/xorg.scm (slim-dmd-service): Rename to... (slim-shepherd-service): ... this. * gnu/system.scm (essential-services): Use '%shepherd-root-service'. * gnu/system/install.scm (cow-store-service-type): Adjust accordingly. * guix/scripts/system.scm (dmd-service-node-label, dmd-service-node-type) (export-dmd-graph): Likewise. * tests/guix-system.sh: Likewise. * tests/services.scm ("dmd-service-back-edges"): Rename to... ("shepherd-service-back-edges"): Adjust accordingly. * doc/guix.texi: Likewise. * doc/images/service-graph.dot: Use 'shepherd' service name.
2016-01-29Rename (gnu services dmd) to (gnu services shepherd).Alex Kost
* gnu/services/dmd.scm: Rename to... * gnu/services/shepherd.scm: ... this. * gnu/system.scm: Use it. * gnu/system/install.scm: Likewise. * gnu/services/xorg.scm: Likewise. * gnu/services/web.scm: Likewise. * gnu/services/ssh.scm: Likewise. * gnu/services/networking.scm: Likewise. * gnu/services/mail.scm: Likewise. * gnu/services/lirc.scm: Likewise. * gnu/services/desktop.scm: Likewise. * gnu/services/dbus.scm: Likewise. * gnu/services/databases.scm: Likewise. * gnu/services/base.scm: Likewise. * gnu/services/avahi.scm: Likewise. * guix/scripts/system.scm: Likewise. * tests/services.scm: Likewise. * tests/guix-system.sh: Likewise. * doc/guix.texi (Shepherd Services): Adjust accordingly. * gnu-system.am (GNU_SYSTEM_MODULES): Likewise. * po/guix/POTFILES.in: Likewise.
2016-01-16Move <boot-parameters> to (gnu system).Alex Kost
* guix/scripts/system.scm (previous-grub-entries) (display-system-generation): Use accessors instead of matching <boot-parameters>. (boot-parameters, boot-parameters?, boot-parameters-label) (boot-parameters-root-device, boot-parameters-kernel) (boot-parameters-kernel-arguments, read-boot-parameters): Move to... * gnu/system.scm: ... here. Export them.
2015-11-21Add (guix graph).Ludovic Courtès
* guix/scripts/graph.scm (<node-type>, <graph-backend>, emit-prologue) (emit-epilogue, emit-node, emit-edge, %graphviz-backend, export-graph): Move to... * guix/graph.scm: ... here. New file. * guix/scripts/system.scm, tests/graph.scm: Use it. * Makefile.am (MODULES): Add it.
2015-11-02guix system: Always build grub.cfg for 'init' and 'reconfigure'.Ludovic Courtès
Fixes <http://bugs.gnu.org/21068>. Reported by Germano Gabbianelli <tyrion.mx@gmail.com> and Mark H Weaver <mhw@netris.org>. * guix/scripts/system.scm (perform-action): Always add GRUB.CFG to DRVS for 'init' and 'reconfigure'. Co-authored-by: Mark H Weaver <mhw@netris.org>
2015-11-02services: Add 'system-service-type'.Ludovic Courtès
* gnu/services.scm (system-derivation): New procedure. (system-service-type): New variable. (boot-script-entry): New procedure. (boot-service-type): Extend SYSTEM-SERVICE-TYPE. (etc-entry): New procedure. (etc-service-type): Extend SYSTEM-SERVICE-TYPE. (fold-services): Change default #:target-type to SYSTEM-SERVICE-TYPE. * gnu/system.scm (operating-system-directory-base-entries): New procedure. (essential-services): Use it. Add an instance of SYSTEM-SERVICE-TYPE. (operating-system-boot-script): Pass #:target-type to 'fold-services'. (operating-system-derivation): Rewrite in terms of 'fold-services'. * gnu/system/linux-container.scm (system-container): Remove. (container-script): Use 'operating-system-derivation'. * guix/scripts/system.scm (export-extension-graph): Replace BOOT-SERVICE-TYPE by SYSTEM-SERVICE-TYPE. * doc/images/service-graph.dot: Add 'system' node and edges. * doc/guix.texi (Service Composition): Mention SYSTEM-SERVICE-TYPE. (Service Reference): Document it. Update 'fold-services' documentation.
2015-10-31guix system: Fix typo in --help message.Alex Kost
* guix/scripts/system.scm (show-help): Align 'container' the same way as other actions.
2015-10-30scripts: system: Add 'container' action.David Thompson
* guix/scripts/system.scm (show-help): Display 'container' action. (system-derivation-for-action, guix-system): Add 'container' case. (perform-action): Skip GRUB config generation when building a container. * doc/guix.texi (Invoking guix system): Document it.
2015-10-27guix system: Add the 'list-generations' command.Ludovic Courtès
* guix/scripts/system.scm (display-system-generation, list-generations): New procedures. (process-action): Clarify docstring. (process-command): New procedure. (guix-system)[parse-sub-command]: Add 'list-generations' Call 'process-command' instead of 'process-action'. * doc/guix.texi (Using the Configuration System): Mention generations, rollback, and 'list-generations'. (Invoking guix system): Document 'list-generations'.
2015-10-27guix system: Factorize boot parameter parsing.Ludovic Courtès
* guix/scripts/system.scm (<boot-parameters>): New record type. (read-boot-parameters): New procedure. (previous-grub-entries)[system->grub-entry]: Use it.
2015-10-27guix system: Extract action processing.Ludovic Courtès
* guix/scripts/system.scm (process-action): New procedure. Extracted from... (guix-system): ... here. Use it.
2015-10-25scripts: environment: Add --container option.David Thompson
* guix/scripts/system.scm (specification->file-system-mapping): Move from here... * guix/ui.scm (specification->file-system-mapping): ... to here. * guix/scripts/enviroment.scm (show-help): Show help for new options. (%options): Add --container --network, --expose, and --share options. (%network-configuration-files): New variable. (launch-environment, launch-environment/container, requisites*, inputs->requisites): New procedures. (guix-environment): Spawn new process in a container when requested. * doc/guix.texi (Invoking guix environment): Document it. * tests/guix-environment-container.sh: New file. * Makefile.am (SH_TESTS): Add it.
2015-10-14guix system: Add 'dmd-graph' command.Ludovic Courtès
* guix/scripts/system.scm (dmd-service-node-label, dmd-service-node-type, export-dmd-graph): New procedures. (show-help): Add 'dmd-graph'. (guix-system)[parse-sub-command]: Likewise. Honor it. * doc/guix.texi (Invoking guix system): Document it. (dmd Services): Add an illustration and explanation. * doc/images/dmd-graph.dot: New file. * doc.am (DOT_FILES): Add it.
2015-10-14guix system: Add 'extension-graph' command.Ludovic Courtès
* guix/scripts/system.scm (service-node-label, service-node-type, export-extension-graph): New procedures. (guix-system)[parse-sub-command]: Add 'extension-graph'. Honor it. (show-help): Add 'extension-graph'. * doc/guix.texi (Invoking guix system): Document it. (Service Composition): Add cross-reference.
2015-10-10guix system: Add '--derivation'.Ludovic Courtès
* guix/scripts/system.scm (perform-action): Add #:derivations-only? parameter and honor it. (show-help, %options): Add '--derivation'. (guix-system): Pass #:derivations-only? to 'perform-action'. * tests/guix-system.sh: Test it. * doc/guix.texi (Invoking guix system): Document it.
2015-09-22scripts: Add 'build-package'.Alex Kost
* guix/scripts/system.scm (maybe-build): Move to ... * guix/scripts.scm: ...here. (build-package): New procedure. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2015-09-18Add (guix scripts).Alex Kost
* guix/ui.scm: Add missing copyright lines. (args-fold*, environment-build-options, %default-argument-handler, parse-command-line): Move to ... * guix/scripts.scm: ...here. New file. * guix/scripts/archive.scm: Use it. * guix/scripts/build.scm: Likewise. * guix/scripts/download.scm: Likewise. * guix/scripts/edit.scm: Likewise. * guix/scripts/environment.scm: Likewise. * guix/scripts/gc.scm: Likewise. * guix/scripts/graph.scm: Likewise. * guix/scripts/hash.scm: Likewise. * guix/scripts/import/cpan.scm: Likewise. * guix/scripts/import/cran.scm: Likewise. * guix/scripts/import/elpa.scm: Likewise. * guix/scripts/import/gem.scm: Likewise. * guix/scripts/import/gnu.scm: Likewise. * guix/scripts/import/hackage.scm: Likewise. * guix/scripts/import/nix.scm: Likewise. * guix/scripts/import/pypi.scm: Likewise. * guix/scripts/lint.scm: Likewise. * guix/scripts/package.scm: Likewise. * guix/scripts/publish.scm: Likewise. * guix/scripts/pull.scm: Likewise. * guix/scripts/refresh.scm: Likewise. * guix/scripts/size.scm: Likewise. * guix/scripts/system.scm: Likewise. * tests/ui.scm (with-environment-variable, "parse-command-line", "parse-command-line and --no options"): Move to ... * tests/scripts.scm: ...here. New file. * Makefile.am (MODULES): Add guix/scripts.scm. (SCM_TESTS): Add tests/scripts.scm. * po/guix/POTFILES.in: Add guix/scripts.scm.
2015-09-15guix system: Gracefully handle incomplete commands.Ludovic Courtès
Fixes <http://bugs.gnu.org/21451>. Reported by Steve Sprang <steve.sprang@gmail.com>. * guix/scripts/system.scm (guix-system)[option-arguments]: Error out when ACTION is #f.
2015-07-17system: Add 'kernel-arguments' field.Ludovic Courtès
* gnu/system.scm (<operating-system>)[kernel-arguments]: New field. (operating-system-grub.cfg): Honor it. (operating-system-parameters-file): Add 'kernel-arguments' to the parameters file. * guix/scripts/system.scm (previous-grub-entries)[system->grub-entry]: Read the 'kernel-arguments' field of the parameters file, when available. * gnu/system/vm.scm (system-qemu-image/shared-store-script): Use (operating-system-kernel-arguments os) in '-append'. * doc/guix.texi (operating-system Reference): Document it.
2015-07-07gnu: system: Move <file-system-mapping> into (gnu system file-systems).David Thompson
* gnu/system/vm.scm (<file-system-mapping>, %store-mapping): Move from here... * gnu/system/file-systems.scm: ...to here. * guix/scripts/system.scm: Import (gnu system file-systems).
2015-06-10guix system: init: Overwrite the items in the target store.Ludovic Courtès
Fixes <http://bugs.gnu.org/20722>. Reported by Eric Bavier <ericbavier@openmailbox.org>. * guix/scripts/system.scm (copy-item): Check whether DEST exists and remove it if it does.
2015-06-08guix: Clean up --help messages.Alex Kost
* guix/scripts/import.scm (show-help): Add newline before a list of importers. * guix/scripts/lint.scm (show-help): Split a long description line. * guix/scripts/package.scm (show-help): Improve docstrings for --install and --remove options. * guix/scripts/system.scm (show-help): Format actions the same way as guix commands and importers are formatted.
2015-05-25guix system: Add '--on-error'.Ludovic Courtès
* guix/ui.scm (load*): Add #:on-error parameter. [tag, error-string]: New variables. Wrap 'load' call in 'call-with-prompt'. Pass TAG to 'make-stack'. Honor ON-ERROR after 'report-load-error' call. (report-load-error): Change to not exit on error. Make private. * guix/scripts/system.scm (show-help, %options): Add --on-error. (guix-system): Use 'load*' and pass it #:on-error.
2015-05-24guix system: init: Copy the closure of 'grub.cfg', not that of the system.Ludovic Courtès
Fixes <http://bugs.gnu.org/20591>. Reported by Daniel Pimentel <d4n1@openmailbox.org>. * guix/scripts/system.scm (install): Copy the closure of GRUB.CFG rather than that of OS-DIR.
2015-05-24guix system: Always add zero previous entries in grub.cfg for 'init'.Ludovic Courtès
* guix/scripts/system.scm (grub.cfg): Remove. (perform-action): Call 'operating-system-grub.cfg' with the empty list as the 2nd argument when ACTION is 'init.
2015-05-24guix system: init: Make sure the target is root-owned.Ludovic Courtès
Suggested by Mark H Weaver <mhw@netris.org>. * guix/scripts/system.scm (install): Add 'chown' and 'chmod' calls for TARGET when running as root, and warn otherwise.
2015-05-21ui: Deduplicate 'show-what-to-build*'.David Thompson
* guix/ui.scm (show-what-to-build*): New procedure. * guix/scripts/environment.scm (show-what-to-build*): Delete. * guix/scripts/system.scm (show-what-to-build*): Likewise. * build-aux/make-binary-tarball.scm (show-what-to-build*): Likewise.
2015-05-20ui: Factorize user-provided Scheme file loading.David Thompson
* guix/ui.scm (make-user-module, load*): New procedures. * guix/scripts/system.scm (%user-module): Define in terms of 'make-user-module'. (read-operating-system): Define in terms of load*'.
2015-04-07ui: Add 'report-load-error'.Ludovic Courtès
* guix/scripts/system.scm (read-operating-system): Replace error handling code by a call to 'report-load-error'. * guix/ui.scm (report-load-error): New procedure.
2015-02-26ui: Factorize command-line + env. var. option parsing.Ludovic Courtès
* guix/ui.scm (%default-argument-handler, parse-command-line): New procedures. (environment-build-options): Make private. * guix/scripts/archive.scm (guix-archive)[parse-options, parse-options-from]: Remove. Use 'parse-command-line' instead. * guix/scripts/build.scm (guix-build): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/package.scm (guix-package): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * tests/ui.scm (with-environment-variable): New macro. ("parse-command-line"): New test.
2015-02-24guix system: Honor '--no-grub'.Ludovic Courtès
Reported by Alex Kost <alezost@gmail.com> at <http://lists.gnu.org/archive/html/guix-devel/2015-02/msg00564.html>. * guix/scripts/system.scm (%options) <no-grub>: Use 'alist-cons' instead of 'alist-delete'.
2015-01-22guix system: Improve error messages.Ludovic Courtès
* guix/ui.scm (report-error): Export. * guix/scripts/system.scm (read-operating-system): Report syntax errors using standard GNU format. Report other errors using 'display-error'.
2015-01-14monads: Move '%store-monad' and related procedures where they belong.Ludovic Courtès
This turns (guix monads) into a generic module for monads, and moves the store monad and related monadic procedures in their corresponding module. * guix/monads.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file, package-file, package->derivation, package->cross-derivation, origin->derivation, imported-modules, compiled, modules, built-derivations, run-with-store): Move to... * guix/store.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file): ... here. (%guile-for-build): New variable. (run-with-store): Moved from monads.scm. Remove default value for #:guile-for-build. * guix/packages.scm (default-guile): Export. (set-guile-for-build): New procedure. (package-file, package->derivation, package->cross-derivation, origin->derivation): Moved from monads.scm. * guix/derivations.scm (%guile-for-build): Remove. (imported-modules): Rename to... (%imported-modules): ... this. (compiled-modules): Rename to... (%compiled-modules): ... this. (built-derivations, imported-modules, compiled-modules): New procedures. * gnu/services/avahi.scm, gnu/services/base.scm, gnu/services/dbus.scm, gnu/services/dmd.scm, gnu/services/networking.scm, gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system/install.scm, gnu/system/linux-initrd.scm, gnu/system/shadow.scm, guix/download.scm, guix/gexp.scm, guix/git-download.scm, guix/profiles.scm, guix/svn-download.scm, tests/monads.scm: Adjust imports accordingly. * guix/monad-repl.scm (default-guile-derivation): New procedure. (store-monad-language, run-in-store): Use it. * build-aux/hydra/gnu-system.scm (qemu-jobs): Add explicit 'set-guile-for-build' call. * guix/scripts/archive.scm (derivation-from-expression): Likewise. * guix/scripts/build.scm (options/resolve-packages): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * doc/guix.texi (The Store Monad): Adjust module names accordingly.
2014-12-09system: Don't make /boot/grub/grub.cfg a symlink to the store.Ludovic Courtès
This would not work when /boot is a separate partition, as reported by Nikita Karetnikov <nikita@karetnikov.org> in <http://bugs.gnu.org/19220>. This fixes a regression introduced in 39d1f82. * gnu/build/install.scm (install-grub): Copy GRUB.CFG instead of symlinking it, as was the case before 39d1f82. * gnu/build/vm.scm (register-grub.cfg-root): Add 'grub.cfg' parameter. Make it a permanent GC root instead of an indirect GC root. (initialize-hard-disk): Adjust accordingly. * guix/scripts/system.scm (install-grub*): Replace use of 'add-indirect-root' by the addition of a permanent GC root in %GC-ROOTS-DIRECTORY.
2014-12-07guix system: Fix typo affecting 'guix system init'.Ludovic Courtès
Fixes <http://bugs.gnu.org/19279>. Fixes a regression introduced in cc7fa59. Reported by Tomas Cech <tcech@suse.cz>. * guix/scripts/system.scm (install): Fix order of arguments to 'lift' and 'lift2'.
2014-12-06guix: scripts: Parse $GUIX_BUILD_OPTIONS separately.nebuli
Appending to "raw" args broke optional parameters in 'guix package -I' and 'guix package -A', and possibly other places. Therefore, switch to parsing each set of options on its own and append resulting alists together afterwards. * guix/scripts/archive.scm (parse-options-from): Rename from (parse-options) and add explicit argument. New form of (parse-options) using its old algorithm via -from function. * guix/scripts/build.scm: Ditto. * guix/scripts/environment.scm: Ditto. * guix/scripts/package.scm: Ditto. * guix/scripts/system.scm: Ditto. * tests/guix-package.sh: Add test. * doc/guix.texi (Invoking guix build): Make it clear that the options are parsed independently. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2014-12-04system: Make /boot/grub/grub.cfg an indirect GC root.Ludovic Courtès
Fixes <http://bugs.gnu.org/19160>. * guix/scripts/system.scm (install-grub*): Make /boot/grub/grub.cfg an indirect GC root. * gnu/build/install.scm (install-grub): Make TARGET a symlink. * gnu/build/vm.scm (register-grub.cfg-root): New procedure. (initialize-hard-disk): Use it.
2014-12-04guix system: Factorize 'grub-install' error handling, and use more 'mbegin'.Ludovic Courtès
* guix/scripts/system.scm (install-grub*): New procedure. (install): Use it, and use 'mwhen?'. (perform-action) <reconfigure>: Likewise.
2014-12-02guix system: Use 'mbegin' for 'install'.Ludovic Courtès
* guix/scripts/system.scm (install): Use 'mbegin'. Lift FORMAT and POPULATE-ROOT-FILE-SYSTEM, and use the result.
2014-11-30guix: scripts: Add GUIX_BUILD_OPTIONS environment handling.nebuli
* doc/guix.texi (Invoking guix build): Mention 'GUIX_BUILD_OPTIONS'. * guix/scripts/archive.scm: (append args (environment-build-options)). * guix/scripts/build.scm: Ditto. * guix/scripts/environment.scm: Ditto. * guix/scripts/package.scm: Ditto. * guix/scripts/system.scm: Ditto. * guix/ui.scm (environment-build-options): New function. * guix/utils.scm (arguments-from-environment-variable): New function. * tests/guix-build.sh: Add tests. * test-env.in: Unset GUIX_BUILD_OPTIONS. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2014-11-21guix system: Add '--share' and '--expose' options for 'vm'.Ludovic Courtès
* guix/scripts/system.scm (system-derivation-for-action): Add #:mappings parameter. Pass it to 'system-qemu-image/shared-store-script'. (perform-action): Likewise. (show-help): Document --share and --expose. (specification->file-system-mapping): New procedure. (%options): Add --share and --expose. (guix-system): Pass #:mapping to 'perform-action'. * doc/guix.texi (Invoking guix system): Document it.