summaryrefslogtreecommitdiff
path: root/guix/scripts/system.scm
Commit message (Collapse)AuthorAge
...
* guix system: Pretty-print device UUIDs.Ludovic Courtès2017-09-12
| | | | | * guix/scripts/system.scm (display-system-generation): Check if ROOT-DEVICE is a UUID and pretty-print it if it is.
* scripts: Remove 'max-silent-time' from the default options.Maxim Cournoyer2017-09-01
| | | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/27157>. Having a finite default `max-silent-time' value for scripts such as 'guix environment' could lead to timeouts when building subtitutes; this was undesirable. This change also fixes client behavior to match the documentation, which is that by default the daemon's settings are honored. * guix/scripts/archive.scm (%default-options): Remove max-silent-time entry. * guix/scripts/copy.scm (%default-options): Likewise. * guix/scripts/environment.scm (%default-options): Likewise. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/package.scm (%default-options): Likewise. * guix/scripts/pull.scm (%default-options): Likewise. * guix/scripts/system.scm (%default-options): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu: bootloader: Deprecate "device" field in favor of "target".Andy Wingo2017-08-23
| | | | | | | | | | | | | | | | | | | | | * gnu/bootloader.scm (<bootloader-configuration>): Deprecate "device" field in favor of "target" field. This is mostly a renaming but also a generalization to support UEFI targets being paths to a mounted partition instead of a device name. * gnu/system/examples/bare-bones.tmpl: * gnu/system/examples/desktop.tmpl: * gnu/system/examples/lightweight-desktop.tmpl: * gnu/system/examples/vm-image.tmpl: * gnu/system/install.scm: * gnu/tests.scm: * gnu/tests/install.scm: * gnu/tests/nfs.scm: * tests/system.scm: Adapt all invocations of bootloader-configuration. * guix/scripts/system.scm (perform-action): Rename device argument to bootloader-target. (process-action): Adapt caller. * doc/guix.texi (Proceeding with the Installation): * doc/guix.texi (Bootloader Configuration): Update documentation.
* gnu: scripts: Cleanup regarding "gnu system" bootloader devices.Andy Wingo2017-08-23
| | | | | | * guix/scripts/system.scm (install-bootloader, install): Remove unused "device" argument. (reinstall-bootloader, perform-action): Adapt callers.
* bootloader: Use <menu-entry> for the bootloader side.Danny Milosavljevic2017-07-28
| | | | | | | | | | | | | | * gnu/bootloader.scm (menu-entry-device-mount-point): New variable. Export it. (<menu-entry>: New field "device". * gnu/bootloader/grub.scm (grub-confgiuration-file): Handle <menu-entry> entries. * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Handle <menu-entry> entries. * gnu/system.scm (menu->entry->boot-parameters): Delete variable. (boot-parameters->menu-entry): New variable. Export it. (operating-system-bootcfg): Make OLD-ENTRIES a list of <menu-entry>. * guix/script/system.scm (reinstall-bootloader): Fix bootcfg usage. (perform-action): Fix bootcfg usage.
* guix system: Use "image.iso" as the name of ISO images.Ludovic Courtès2017-07-18
| | | | | * guix/scripts/system.scm (system-derivation-for-action): Pass #:name to 'system-disk-image'.
* guix system: Add "--file-system-type" option.Danny Milosavljevic2017-07-03
| | | | | | | | * guix/scripts/system.scm (process-action): Pass file-system-type to ... (perform-action): ... here. Add new keyword argument. Pass new value to ... (system-derivation-for-action): ... here. Add new keyword argument. Pass new value to system-disk-image. * doc/guix.texi (disk-image): Document new option.
* vm: Estimate the disk size by default.Ludovic Courtès2017-06-30
| | | | | | | | | | | | | | | * gnu/build/vm.scm (estimated-partition-size): New procedure. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Change #:disk-image-size default to 'guess. [builder]: When DISK-IMAGE-SIZE is 'guess, use 'estimated-partition-size' and compute and estimate of the image size. (qemu-image): Likewise. * guix/build/store-copy.scm (file-size, closure-size): New procedures. * guix/scripts/system.scm (%default-options): Change 'image-size' to 'guess. * doc/guix.texi (Building the Installation Image): Remove '--image-size' flag from example. (Invoking guix system): Document the image size estimate.
* bootloader: Rename boot-name to bootloader-name.Mathieu Othacehe2017-06-10
| | | | | | * gnu/system (<boot-parameters>)[boot-name]: Rename field to... [bootloader-name]: ... this. Adjust users. * gnu/scripts/system.scm: Adjust accordingly.
* Merge branch 'version-0.13.0'Marius Bakke2017-05-22
|\
| * guix system: Don't warn about old distros for "guix system init".Ludovic Courtès2017-05-21
| | | | | | | | | | * guix/scripts/system.scm (process-action): Don't call 'warn-about-old-distro' when ACTION is 'init' or 'build'.
| * guix system: Increase image size for 'guix system vm'.Ludovic Courtès2017-05-21
| | | | | | | | | | | | | | This is a followup to 9a1bfe764859365b6726f168da95b88a2d22403b. * guix/scripts/system.scm (system-derivation-for-action): Add 40MiB to the default size for 'vm'.
* | scripts: system: Display bootloader name in "list-generations".Mathieu Othacehe2017-05-16
| | | | | | | | | | * guix/scripts/system.scm (display-system-generation): Display bootloader name.
* | scripts: system: Adapt "switch-generation" to new bootloader API.Mathieu Othacehe2017-05-16
| | | | | | | | | | | | | | | | | | * guix/scripts/system.scm (reinstall-grub): Rename to reinstall-bootloader. Read boot-device and boot-type from parameters file to be able to restore the correct bootloader on specified device. Factorize bootloader installation code by calling install-bootloader. (system-bootloader-name): New procedure. (switch-to-system-generation): Adapt.
* | scripts: system: Adapt "init" to new bootloader API.Mathieu Othacehe2017-05-16
| | | | | | | | | | | | | | * guix/scripts/system.scm (install): Pass installer a new argument. Rename other arguments. Call install-bootloader instead of install-grub*. (perform-action): Adapt.
* | scripts: system: Adapt "reconfigure" to new bootloader API.Mathieu Othacehe2017-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/system.scm (install-grub*): Rename to install-bootloader. Use keys to pass arguments. Pass a new argument, "installer-drv" which is a script in store dealing with bootloader-specific install actions. Also call "install-boot-config" to install the bootloader config file. (install-bootloader-derivation): New procedure. It returns a derivation that builds a file containing "install-procedure" gexp. (perform-action): Build install-proc derivation and call install-bootloader with the resulting file. Stop adding GRUB to PATH as bootloaders are called in install-proc with direct store paths.
* | bootloader: Add extlinux support.Mathieu Othacehe2017-05-16
|/ | | | | | | | | | | | | | | * gnu/bootloader.scm: New file. * gnu/bootloader/extlinux.scm: New file. * gnu/bootloader/grub.scm: New file. * gnu/local.mk: Build new files. * gnu/system.scm: Adapt to new bootloader api. * gnu/scripts/system.scm: Adapt to new bootloader api. * gnu.scm: Remove (gnu system grub) and replace by (gnu bootloader) and (gnu bootloader grub) modules. * gnu/system/grub.scm: Moved content to gnu/bootloader/grub.scm. * gnu/system/vm: Replace (gnu system grub) module by (gnu bootloader). * gnu/tests.scm: Ditto. * gnu/tests/nfs.scm: Ditto.
* scripts: Warn about old distro.Ludovic Courtès2017-05-10
| | | | | | | | | | | Fixes <http://bugs.gnu.org/25852>. Suggested by Mark H Weaver <mhw@netris.org>. * guix/scripts.scm (%distro-age-warning): New variable. (warn-about-old-distro): New procedure. * guix/scripts/package.scm (process-actions): Call 'warn-about-old-distro'. * guix/scripts/system.scm (process-action): Likewise.
* scripts: Remove profile-grub-entries.Danny Milosavljevic2017-05-05
| | | | * guix/scripts/system.scm (profile-grub-entries): Delete variable.
* system: grub: Use boot-parameters instead of menu-entry where possible.Danny Milosavljevic2017-05-05
| | | | | | | | | * gnu/system/grub.scm (boot-parameters->menu-entry): New variable. (grub-configuration-file): Use boot-parameters instead of menu-entry where possible. * guix/scripts/system.scm (profile-boot-parameters): Update docstring. (reinstall-grub): Use profile-boot-parameters. (perform-action): Use profile-boot-parameters.
* scripts: Make boot-parameters label include generation number and time.Danny Milosavljevic2017-05-05
| | | | | * guix/scripts/system.scm (system->boot-parameters): Make label include generation number and time.
* system: Introduce read-boot-parameters-file.Danny Milosavljevic2017-05-05
| | | | | | | | | | * gnu/system.scm (read-boot-parameters): Remove export. (read-boot-parameters-file): New variable. Export it. * guix/scripts/system.scm (profile-boot-parameters): Use read-boot-parameters-file. (profile-grub-entries): Use read-boot-parameters-file. (reinstall-grub): Use read-boot-parameters-file. (display-system-generation): Use read-boot-parameters-file.
* ui: Rename '_' to 'G_'.Ludovic Courtès2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids collisions with '_' when the latter is used as a 'match' pattern for instance. See <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>. * guix/ui.scm: Rename '_' to 'G_'. * po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly. * build-aux/compile-all.scm (warnings): Remove 'format'. * gnu/packages.scm, gnu/services.scm, gnu/services/shepherd.scm, gnu/system.scm, gnu/system/shadow.scm, guix/gnupg.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/elpa.scm, guix/import/pypi.scm, guix/nar.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/container.scm, guix/scripts/container/exec.scm, guix/scripts/copy.scm, guix/scripts/download.scm, guix/scripts/edit.scm, guix/scripts/environment.scm, guix/scripts/gc.scm, guix/scripts/graph.scm, guix/scripts/hash.scm, guix/scripts/import.scm, guix/scripts/import/cpan.scm, guix/scripts/import/cran.scm, guix/scripts/import/crate.scm, guix/scripts/import/elpa.scm, guix/scripts/import/gem.scm, guix/scripts/import/gnu.scm, guix/scripts/import/hackage.scm, guix/scripts/import/nix.scm, guix/scripts/import/pypi.scm, guix/scripts/import/stackage.scm, guix/scripts/lint.scm, guix/scripts/offload.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/perform-download.scm, guix/scripts/publish.scm, guix/scripts/pull.scm, guix/scripts/refresh.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/scripts/system.scm, guix/ssh.scm, guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
* scripts: system: Rename --no-grub option to --no-bootloader.Mathieu Othacehe2017-04-17
| | | | | | | * guix/scripts/system.scm (%options, show-help): Adjust accordingly. Keep "--no-grub" for compatibility reasons, but do not mention it in the help. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
* services: 'service-parameters' becomes 'service-value'.Ludovic Courtès2017-04-16
| | | | | | | | | * gnu/services.scm (<service>)[parameters]: Rename to... [value]: ... this. Change calls to 'service-parameters' to 'service-value'. * gnu/system.scm, gnu/tests/base.scm, guix/scripts/system.scm, tests/services.scm: Likewise. * doc/guix.texi (Service Reference): Adjust accordingly.
* system: Make grub use <menu-entry> instead of <boot-parameters> again.Danny Milosavljevic2017-04-15
| | | | | | | | * gnu/system/grub.scm: Remove boot-parameters->menu-entry. (grub-configuration): Don't use boot-parameters->menu-entry. * gnu/system.scm (operating-system-bootcfg): Use menu-entry. * guix/scripts/system.scm (reinstall-grub): Use profile-grub-entries. (perform-action): Use profile-grub-entries.
* scripts: system: Introduce profile-boot-parameters.Danny Milosavljevic2017-04-15
| | | | | | | | * guix/scripts/system.scm (profile-boot-parameters): New variable. (reinstall-grub): Use profile-boot-parameters. (perform-action): Use profile-boot-parameters. Follow-up to 2e58e05bb68d4b747882cfa2b460b132d456f54a.
* scripts: system: Rename grub? and install-grub? to bootloader? and ↵Mathieu Othacehe2017-04-15
| | | | | | | | | install-bootloader?. * guix/scripts/system.scm (perform-action): Rename grub? to bootloader, (%options): rename install-grub? to install-bootloader?, (%default-options): ditto, (process-action): reindent and rename grub? to bootloader?.
* system: Rename operating-system-grub.cfg to operating-system-bootcfg.Mathieu Othacehe2017-04-15
| | | | | | | | | | | * gnu/system.scm (operating-system-grub.cfg): Rename to... (operating-system-bootcfg): ... this. * gnu/system/vm.scm (system-disk-image): Use operating-system-bootcfg. (system-qemu-image): Use operating-system-bootcfg. (system-qemu-image/shared-store): Use operating-system-bootcfg. * guix/scripts/system.scm (perform-action): Use operating-system-bootcfg. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
* scripts: system: Back out operating-system-bootcfg change.Danny Milosavljevic2017-04-15
| | | | | | | Follow-up to 475e2ce211ac05a814c1f1bc2b9648baa17ad369. * guix/scripts/system.scm (perform-action): Back out operating-system-bootcfg change.
* scripts: system: Move save-load-path-excursion and ↵Danny Milosavljevic2017-04-15
| | | | | | | | | | save-environment-excursion macros to the top. * guix/scripts/system.scm (save-load-path-excursion, save-environment-excursion): Move definitions to the top of the file. It allows to use them in the whole file. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
* scripts: system: Move save-load-path-excursion and ↵Mathieu Othacehe2017-04-15
| | | | | | | | | | save-environment-excursion macros to the top. * guix/scripts/system.scm (save-load-path-excursion, save-environment-excursion): Move definitions to the top of the file. It allows to use them in the whole file. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
* system: Support the --root option in 'guix system'.Chris Marusich2017-04-06
| | | | | | | | | | | | | Fixes <https://bugs.gnu.org/26271>. * guix/scripts/system.scm (perform-action): Add #:gc-root parameter and honor it. (show-help): Document the --root option. (%options): Add 'root'. (process-action): Pass 'root' option to perform-action as #:gc-root. * doc/guix.texi (Invoking guix system): Document '--root'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix system: If the new system generation already exists, overwrite it.Chris Marusich2016-12-05
| | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/25100>. Before that, 'guix system reconfigure' would fail if the next generation already existed. * guix/scripts/system.scm (switch-to-system): Use 'switch-symlink' instead of 'symlink'. * doc/guix.texi (Using the Configuration System, Invoking guix system): Document the behavior. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* store: Add 'references*'.Ludovic Courtès2016-11-19
| | | | | | | | | | | * guix/store.scm (references*): New procedure. * guix/profiles.scm (manifest-lookup-package)[references*]: Remove. * guix/scripts/system.scm (references*): Remove. * tests/gexp.scm ("gexp->file", "gexp->file + file-append") ("gexp->derivation", "gexp->derivation, cross-compilation") ("gexp->derivation, ungexp + ungexp-native") ("scheme-file", "text-file*", "mixed-text-file"): Remove 'references*' instead of (store-lift references).
* system: Use grub from bootloader configuration.Marius Bakke2016-11-08
| | | | | | | | * gnu/system/grub.scm (gnu): Export grub-configuration-grub. * guix/scripts/system.scm (perform-action): Use it. (define-module): Don't import (gnu packages grub). Co-authored-by: Danny Milosavljevic <dannym@scratchpost.org>
* system: Add 'guix system' actions: switch-generation and roll-back.Chris Marusich2016-11-06
| | | | | | | | | | | | | * guix/scripts/system.scm (roll-back-system, switch-to-system-generation): new actions. (reinstall-grub): New procedure, used by switch-to-system-generation. (show-help, process-command, guix-system): Honor the new actions. * doc/guix.texi (Invoking guix system) <switch-generation, roll-back>: Add the new actions. <reconfigure>: In the footnote, mention that the new actions also only work on GuixSD. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* system: Optionally limit the entries returned by profile-grub-entries.Chris Marusich2016-11-06
| | | | | | | * guix/scripts/system.scm (profile-grub-entries): Add an optional parameter which allows the caller to limit the number of returned grub entries. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* system: Rename previous-grub-entries to profile-grub-entries.Chris Marusich2016-11-06
| | | | | | | | | * guix/scripts/system.scm (previous-grub-entries, profile-grub-entries): Rename previous-grub-entries to profile-grub-entries to indicate that it is stateful and returns the entries for all profile generations, not just the previous ones. Update all callers. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* system: Record store file system info in each generation.Chris Marusich2016-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/system.scm (<boot-parameters>)[store-device, store-mount-point]: New fields. (read-boot-parameters): Initialize them. (operating-system-grub.cfg): Likewise. Remove STORE-FS argument from call to 'grub-configuration-file'. (operating-system-parameters-file): Add 'store' element in 'boot-parameters'. * gnu/system/grub.scm (strip-mount-point): Replace 'store-fs' parameter by 'mount-point'; adjust accordingly. Adjust callers. (<menu-entry>)[device, device-mount-point]: New fields. (eye-candy): Replace 'root-fs' parameter by 'store-device'; add 'store-mount-point'. Use keyword arguments for 'system' and 'port'. (grub-root-search): Remove 'root-fs' by 'device' and adjust accordingly. (grub-configuration-file): Remove 'store-fs' parameter. Adjust accordingly. * guix/scripts/system.scm (previous-grub-entries): Initialize 'device' and 'device-mount-point' fields from PARAMS. * doc/guix.texi (GRUB Configuration): Document 'device' and 'device-mount-point'. Explain that 'linux' can be prefixed by a GRUB device name. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* guix system: Return two values when failing to talk to shepherd.Ludovic Courtès2016-10-06
| | | | | | | | | | | | Before that, when 'guix system reconfigure' failed to talk to shepherd and a 'system-error' was raised, we would get a "too few values returned to continuation" error, which would prevent GRUB from being installed. Reported by fps on #guix. * guix/scripts/system.scm (warn-on-system-error): Remove. (with-shepherd-error-handling): Inline former 'warn-on-system-error'. Return two values when 'system-error' is raised.
* system: grub.cfg uses correct file names when store is not in root partition.Carlos Sánchez de La Lama2016-09-24
| | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/24346>. Reported by csanchezdll@gmail.com (Carlos Sánchez de La Lama). * guix/scripts/system.scm (previous-grub-entries): Get the initrd file name from PARAMS. * gnu/system.scm (operating-system-grub.cfg): Use 'operating-system-initrd-file' to retrieve the initrd file name. * gnu/system/grub.scm (strip-mount-point): New procedure. (grub-configuration-file)[entry->gexp]: Call 'strip-mount-point' for LINUX and INITRD. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* services: shepherd: Add 'shepherd-service-upgrade', from 'guix system'.Ludovic Courtès2016-08-31
| | | | | | | | | | * guix/scripts/system.scm (service-upgrade): Move to... * gnu/services/shepherd.scm (shepherd-service-upgrade): ... here. * tests/system.scm ("service-upgrade: nothing to do", "service-upgrade: one unchanged, one upgraded, one new", "service-upgrade: service depended on is not unloaded", "service-upgrade: obsolete services that depend on each other"): Move to... * tests/services.scm: ... here. Adjust to 'service-upgrade' rename.
* guix system: Do not unload services depended on.Ludovic Courtès2016-08-31
| | | | | | | | | | | | Reported by Mark H Weaver <mhw@netris.org> at <https://lists.gnu.org/archive/html/guix-devel/2016-08/msg01470.html>. * guix/scripts/system.scm (service-upgrade)[live-service-required?]: New procedure. [obsolete?]: Use it. * tests/system.scm ("service-upgrade: service depended on is not unloaded", "service-upgrade: obsolete services that depend on each other"): New tests.
* guix system: Use 'shepherd-service-lookup-procedure' in 'service-upgrade'.Ludovic Courtès2016-08-31
| | | | | | | | | | | | * guix/scripts/system.scm (service-upgrade)[essential?]: SERVICE is now a <live-service>. [lookup-target, lookup-live, running?, stopped, obsolete?]: New procedures. [to-load, to-unload]: Use them. TO-UNLOAD is now a list of <live-service>. (call-with-service-upgrade-info): Extract symbols from TO-UNLOAD. * tests/system.scm ("service-upgrade: one unchanged, one upgraded, one new"): Adjust accordingly.
* guix system: Extract and test the service upgrade procedure.Ludovic Courtès2016-08-31
| | | | | | | | | * guix/scripts/system.scm (service-upgrade): New procedure, with code from... (call-with-service-upgrade-info): ... here. Use it. * tests/system.scm (live-service, service-upgrade): New variables. ("service-upgrade: nothing to do", "service-upgrade: one unchanged, one upgraded, one new"): New tests.
* services: herd: Provide <live-service> objects.Ludovic Courtès2016-08-31
| | | | | | | | | | * gnu/services/herd.scm (<live-service>): New record type. (current-services): Change to return a single value: #f or a list of <live-service>. * guix/scripts/system.scm (call-with-service-upgrade-info): Adjust accordingly. * gnu/tests/base.scm (run-basic-test)["shepherd services"]: Adjust accordingly.
* guix scripts: Disable grafting on dry runs.Roel Janssen2016-08-28
| | | | | | * guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/environment.scm, guix/scripts/system.scm, guix/scripts/package.scm: Disable grafting when a dry-run parameter is given.
* system: Fix 'guix system' when root fs is named by UUID.Mark H Weaver2016-08-20
| | | | | | | | Fixes <https://bugs.gnu.org/23881>. * guix/scripts/system.scm (previous-grub-entries) (display-system-generation): Handle the case where the root device is specified by UUID.
* guix system: Fix the Shepherd error handling fix.Ludovic Courtès2016-08-02
| | | | | | | This is a followup to aa1e73a996ad170fecac848f203528aeb3d2173e. * guix/scripts/system.scm (with-shepherd-error-handling): Return two values when an exception is caught.