summaryrefslogtreecommitdiff
path: root/guix/scripts/system
Commit message (Collapse)AuthorAge
* reconfigure: Use 'current-channels' to obtain provenance data.Ludovic Courtès2022-08-31
| | | | | | | | | | | | | This reinstates a modified version of b08439809f0868a74d0bd0e14d45cb3e5dd46a8c, which contained a thinko. Previously, build-time metadata from (guix config) would be ignored when available--e.g., when running /run/current-system/profile/bin/guix. This is a followup to 316fc2acbb112bfa572ae30f95a93bcd56621234. * guix/scripts/system/reconfigure.scm (check-forward-update): Use 'current-channels' rather than 'current-profile' + 'profile-channels'.
* Revert "reconfigure: Use 'current-channels' to obtain provenance data."宋文武2022-08-30
| | | | | | This fixes <https://issues.guix.gnu.org/57480>. This reverts commit b08439809f0868a74d0bd0e14d45cb3e5dd46a8c.
* reconfigure: Use 'current-channels' to obtain provenance data.Ludovic Courtès2022-08-30
| | | | | | | | | | Previously, build-time metadata from (guix config) would be ignored when available--e.g., when running /run/current-system/profile/bin/guix. This is a followup to 316fc2acbb112bfa572ae30f95a93bcd56621234. * guix/scripts/system/reconfigure.scm (check-forward-update): Use 'current-channels' rather than 'current-profile' + 'profile-channels'.
* guix system: Add 'edit' sub-command.Ludovic Courtès2022-06-04
| | | | | | | | | | * guix/scripts/system/edit.scm: New file. * Makefile.am (MODULES): Add it. * guix/scripts/system.scm (show-help): Mention "edit". (actions): Add it. (process-command): Handle it. * doc/guix.texi (Invoking guix system): Document it. * po/guix/POTFILES.in: Add guix/scripts/system/edit.scm.
* guix system: Highlight search results.Ludovic Courtès2022-04-29
| | | | | | | This is a followup to 5e0c3479759047311b6a518fd0bc512b232f201a. * guix/scripts/system/search.scm (guix-system-search): Pass #:regexps parameter to 'display-search-results'.
* ui: Highlight package and service search results.Ludovic Courtès2022-04-19
| | | | | | | | | | | * guix/ui.scm (package->recutils): Add #:highlighting parameter and use it. (display-search-results): Add #:regexps parameter; call 'colorize-full-matches' and pass #:highlighting. * guix/scripts/package.scm (process-query): Pass #:regexps to 'display-search-results'. * guix/scripts/home.scm (search): Likewise. * guix/scripts/system/search.scm (service-type->recutils): Add #:highlighting parameter and use it.
* ui: Highlight important bits in recutils output.Ludovic Courtès2022-04-19
| | | | | | * guix/scripts/system/search.scm (service-type->recutils): Highlight the value of the 'name' field. * guix/ui.scm (package->recutils): Likewise for 'name' and 'version'.
* reconfigure: Fix typo on 'live-service-transient?'.Ludovic Courtès2022-04-11
| | | | | | | Fix typo introduced in e25eca35ff04e4234d0376fbb9a8e146869772c8. * guix/scripts/system/reconfigure.scm (running-services): Add question mark to 'live-service-transient?.
* services: herd: Adjust to <live-service> changes.Ludovic Courtès2022-04-10
| | | | | | | | | | | This is a followup to a2c759c8304c461d096ab763568e7f71546ff4e8. * guix/scripts/system/reconfigure.scm (running-services): Fill in the 'transient?' field of <live-service>. * tests/services.scm ("shepherd-service-upgrade: one unchanged, one upgraded, one new") ("shepherd-service-upgrade: service depended on is not unloaded") ("shepherd-service-upgrade: obsolete services that depend on each other"): Adjust calls to 'live-service'.
* ui: Move 'location->hyperlink' to (guix diagnostics).Ludovic Courtès2022-04-08
| | | | | | * guix/ui.scm (location->hyperlink): Move to... * guix/diagnostics.scm: ... here. * guix/scripts/system/search.scm: Adjust imports accordingly.
* ui: Move hyperlink facilities to (guix colors).Ludovic Courtès2022-04-08
| | | | | | | * guix/ui.scm (supports-hyperlinks?, file-hyperlink, hyperlink): Move to... * guix/colors.scm: ... here. * guix/scripts/home.scm, guix/scripts/system.scm, guix/scripts/system/search.scm: Adjust imports accordingly.
* gnu: bootloader: Support multiple targets.Maxim Cournoyer2021-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/40997>. * gnu/bootloader.scm (<bootloader-configuration>): New 'targets' field. (%bootloader-configuration-target): New procedure. (bootloader-configuration-target): Add deprecation warning. (bootloader-configuration-targets): New procedure. * guix/scripts/system.scm (install): Access targets via bootloader-configuration-targets. (perform-action)[bootloader-target]: Remove unused argument and update doc. Access targets via bootloader-configuration-targets and fix indentation. (process-action): Access targets via bootloader-configuration-targets. Do not provide the unused BOOTLOADER-TARGET argument when applying `perform-action'. * guix/scripts/system/reconfigure.scm (install-bootloader-program): Rename DEVICE argument to DEVICES. Adjust doc and comment. Apply `installer' and `disk-installer' for every DEVICES. (install-bootloader): Access targets via bootloader-configuration-targets and rename variable from DEVICE to DEVICES. * gnu/tests/install.scm: Adjust accordingly. * tests/guix-system.sh: Likewise. * gnu/tests/reconfigure.scm (run-install-bootloader-test): Adjust the DEVICES argument so that it is a list. * doc/guix.texi: Update doc.
* reconfigure: Use 'formatted-message'.Ludovic Courtès2021-06-25
| | | | | | * guix/scripts/system/reconfigure.scm (ensure-forward-reconfigure): Use 'formatted-message'. * guix/scripts/deploy.scm (deploy-machine*): Handle it.
* guix system: Adjust 'upgrade-shepherd-services' to shepherd service change.Ludovic Courtès2021-01-30
| | | | | | | Fixes a regression introduced in 95f72dcd7aece05e9252c93bef5a831f96cb5393. * guix/scripts/system/reconfigure.scm (upgrade-shepherd-services)[target-services]: Add call to 'shepherd-configuration-services'.
* system: reconfigure: Use the disk-installer if provided.Mathieu Othacehe2020-11-03
| | | | | | | | | | | Fixes: <https://issues.guix.gnu.org/44101>. * gnu/build/bootloader.scm (write-file-on-device): Pass 'no-fail flag instead of 'no-create. Use a latin-1 transcoder. * guix/scripts/system/reconfigure.scm (install-bootloader-program): Add a "disk-installer" argument and use it as a fallback. (install-bootloader): Adapt accordingly. * gnu/tests/reconfigure.scm (run-install-bootloader-test): Ditto.
* reconfigure: Start services not currently running.Ludovic Courtès2020-10-11
| | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/43720>. Reported by Andreas Enge <andreas@enge.fr>. The bug was introduced in 5c793753b31b1dcd9a554bce953124f7ae88ca9a, which changed the way TO-START is computed: as a function of the running services first, and then as a function of the live services (which includes services not currently running). * guix/scripts/system/reconfigure.scm (running-services): Serialize the 'running' field and return it. (upgrade-shepherd-services): Comput RUNNING. Compute TO-START as the difference between TARGET-SERVICES and RUNNING.
* machine: ssh: Check for potential system downgrades.Ludovic Courtès2020-07-27
| | | | | | | | | | | | | | | This is a followup to 8e31736b0a60919cc1bfc5dc22c395b09243484a. * guix/scripts/system/reconfigure.scm (check-forward-update): Add #:current-channels. Use it instead of OLD. * gnu/services.scm (sexp->system-provenance): New procedure. (system-provenance): Use it. * gnu/machine/ssh.scm (<machine-ssh-configuration>)[allow-downgrades?]: New field. (machine-check-forward-update): New procedure. (check-deployment-sanity)[assertions]: Call it. * doc/guix.texi (Invoking guix deploy): Document 'allow-downgrades?' field.
* utils: Move '&fix-hint' to (guix diagnostics).Ludovic Courtès2020-07-25
| | | | | | | | | | | * guix/utils.scm (&fix-hint): Move to... * guix/diagnostics.scm (&fix-hint): ... here. * gnu.scm: Adjust imports accordingly. * gnu/system/mapped-devices.scm: Likewise. * guix/channels.scm: Likewise. * guix/profiles.scm: Likewise. * guix/scripts/system/reconfigure.scm: Likewise. * guix/ssh.scm: Likewise.
* guix system: 'reconfigure' disallows downgrades by default.Ludovic Courtès2020-07-23
| | | | | | | | | | | | | | | | This is similar to what 9744cc7b4636fafb772c94adb8f05961b5b39f16 did for 'guix pull'. * guix/scripts/system/reconfigure.scm (ensure-forward-reconfigure) (warn-about-backward-reconfigure, channel-relations) (check-forward-update): New procedures. * guix/scripts/system.scm (perform-action): Add #:validate-reconfigure. Call 'check-forward-update' when ACTION is 'reconfigure. (%options, show-help): Add "--allow-downgrades". (%default-options): Add 'validate-reconfigure' key. (process-action): Pass #:validate-reconfigure to 'perform-action'. * doc/guix.texi (Invoking guix system): Document 'guix system describe' more prominently, and document '--allow-downgrades'.
* Add more missing (ice-9 format) imports.Marius Bakke2020-06-28
| | | | | | | * gnu/machine/ssh.scm: Import (ice-9 format). * guix/scripts/graph.scm: Likewise. * guix/scripts/system/search.scm: Likewise. * guix/remote.scm: Likewise.
* reconfigure: Correctly re-throw SRFI-34 exceptions on Guile 3.Ludovic Courtès2020-04-08
| | | | | | | | | | | | Previously, we'd just print an ugly backtrace when running on Guile 3 because the '%exception throw would not be caught anywhere. Reported by Arne Babenhauserheide <arne_bab@web.de> in <https://bugs.gnu.org/40496>. * guix/scripts/system/reconfigure.scm (install-bootloader-program): In 'catch' handler, match '%exception and use 'raise-exception' instead of 'throw' to rethrow in that case.
* reconfigure: Silence Guile warnings.Ludovic Courtès2020-04-03
| | | | | | | | | Fixes <https://bugs.gnu.org/39301>. Reported by strypsteen@posteo.net. * guix/scripts/system/reconfigure.scm (switch-to-system) (upgrade-shepherd-services, install-bootloader): Wrap 'primitive-load' call in 'parameterize'.
* Revert "reconfigure: Run the effect scripts as separate processes."Ludovic Courtès2020-04-03
| | | | | | This reverts commit 5517750344be05c91bc2979c1a0e2348a9ae902d. That commit would remove all sorts of error checking when running those programs.
* reconfigure: Run the effect scripts as separate processes.Ludovic Courtès2020-04-02
| | | | | | | | | Fixes <https://bugs.gnu.org/39301>. Reported by strypsteen@posteo.net. * guix/scripts/system/reconfigure.scm (switch-to-system) (upgrade-shepherd-services, install-bootloader): Use 'system*' instead of 'primitive-load'.
* guix system: Do not import the user's (guix config).Ludovic Courtès2020-04-02
| | | | | | | | | | Previously, 'switch-to-system.drv' and 'install-bootloader.drv' would depend on the user's (guix config) module. This is no longer the case. * guix/scripts/system/reconfigure.scm (not-config?): New procedure. (switch-system-program): Do not import the user's (guix config). Use 'make-config.scm' instead. (install-bootloader-program): Likewise.
* Update e-mail address for Jakob L. Kreuze.Tobias Geerinckx-Rice2020-02-09
| | | | | | | | | | | As requested here: <https://lists.gnu.org/archive/html/guix-devel/2020-02/msg00128.html>. * .mailmap: Add an entry for Jakob. * gnu/machine.scm, gnu/machine/digital-ocean.scm, gnu/machine/ssh.scm, gnu/packages/admin.scm, gnu/packages/i2p.scm, gnu/packages/music.scm, gnu/packages/web.scm, gnu/tests/reconfigure.scm, guix/scripts/deploy.scm, guix/scripts/system/reconfigure.scm: Update their e-mail address.
* ui: Produce hyperlinks for the 'location' field of search results.Ludovic Courtès2019-11-09
| | | | | | | | | | | | This affects the output of 'guix show', 'guix search', and 'guix system search'. * guix/ui.scm (hyperlink, supports-hyperlinks?, location->hyperlink): New procedures. (package->recutils): Add #:hyperlinks? and honor it. (display-search-results): Pass #:hyperlinks? to PRINT. * guix/scripts/system/search.scm (service-type->recutils): Add #:hyperlinks? and honor it.
* reconfigure: Silence "shepherd: Evaluating ..." messages.Ludovic Courtès2019-10-18
| | | | | * guix/scripts/system/reconfigure.scm (upgrade-services-program): Parameterize 'shepherd-message-port' to silent "Evaluating ..." messages.
* reconfigure: Fix GC root installation.Jakob L. Kreuze2019-08-06
| | | | | | | | | | Fixes <https://bugs.gnu.org/36942>. Reported by ison <ison@airmail.cc>. guix/scripts/system/reconfigure.scm (install-bootloader-program): Switch new symlink to the canonical bootloader configuration file. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
* reconfigure: Reload all shepherd files when upgrading services.Jakob L. Kreuze2019-08-02
| | | | | | | | | | Fixes <https://bugs.gnu.org/36878>. Reported by Robert Vollmert <rob@vllmrt.net>. * guix/scripts/system/reconfigure.scm (upgrade-shepherd-services): Load all service files, rather than just those of services to be started. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
* guix system: Add 'reconfigure' module.Jakob L. Kreuze2019-07-26
| | | | | | | | | | | | | | * guix/scripts/system/reconfigure.scm: New file. * Makefile.am (MODULES): Add it. * guix/scripts/system.scm (bootloader-installer-script): Export variable. * gnu/machine/ssh.scm (switch-to-system, upgrade-shepherd-services) (install-bootloader): Delete variable. * gnu/machine/ssh.scm (deploy-managed-host): Rewrite procedure. * gnu/services/herd.scm (live-service): Export variable. * gnu/services/herd.scm (live-service-canonical-name): New variable. * tests/services.scm (live-service): Delete variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* ui: Add 'display-search-results' and use it.Ludovic Courtès2019-06-27
| | | | | | | | | | * guix/ui.scm (display-search-results): New procedure. * guix/scripts/package.scm (find-packages-by-description): Remove 'unzip2' call and return a list of pairs. (process-query): Change to use 'display-search-results'. * guix/scripts/system/search.scm (find-service-types): Remove 'unzip2' call and return a list of pairs. (guix-system-search): Use 'display-search-results'.
* guix system: search: Display all provision names as 'shepherdnames'.Clément Lassieur2018-05-01
| | | | | * guix/scripts/system/search.scm (service-type-shepherd-names): Append provision lists together instead of returning a list of provision cars.
* guix system: search: Display default Shepherd service names.Ludovic Courtès2018-04-30
| | | | | | | | | | Fixes <https://bugs.gnu.org/29707>. Reported by Clément Lassieur <clement@lassieur.org>. * guix/scripts/system/search.scm (service-type-default-shepherd-services) (service-type-shepherd-names): New procedures. (service-type->recutils): Use it. * tests/guix-system.sh: Add test.
* guix system: Add 'search' command.Ludovic Courtès2017-09-16
* guix/scripts/system.scm (resolve-subcommand): New procedure. (process-command): Handle 'search'. (guix-system): Likewise. (show-help): Augment. * guix/scripts/system/search.scm: New file. * po/guix/POTFILES.in: Add it. * Makefile.am (MODULES): Add it. * guix/ui.scm (%text-width): Export. * doc/guix.texi (Invoking guix system): Document it. (Service Types and Services): Mention 'guix system search'. * tests/guix-system.sh: Test it.