summaryrefslogtreecommitdiff
path: root/guix/scripts
AgeCommit message (Collapse)Author
2020-05-08Merge branch 'core-updates'Marius Bakke
2020-05-07guix system: 'docker-image' honors '--network'.Ludovic Courtès
* gnu/system/vm.scm (system-docker-image): Add #:shared-network? and pass it to 'containerized-operating-system'. (qemu-image): * guix/scripts/system.scm (system-derivation-for-action): Pass #:shared-network? to 'system-docker-image'. * doc/guix.texi (Invoking guix system): Document it.
2020-05-05Merge branch 'master' into core-updatesMarius Bakke
2020-05-05image: Add a new API.Mathieu Othacehe
Raw disk-images and ISO9660 images are created in a Qemu virtual machine. This is quite fragile, very slow, and almost unusable without KVM. For all these reasons, add support for host image generation. This implies the use new image generation mechanisms. - Raw disk images: images of partitions are created using tools such as mke2fs and mkdosfs depending on the partition file-system type. The partition images are then assembled into a final image using genimage. - ISO9660 images: the ISO root directory is populated within the store. GNU xorriso is then called on that directory, in the exact same way as this is done in (gnu build vm) module. Those mechanisms are built upon the new (gnu image) module. * gnu/image.scm: New file. * gnu/system/image.scm: New file. * gnu/build/image: New file. * gnu/local.mk: Add them. * gnu/system/vm.scm (system-disk-image): Rename to system-disk-image-in-vm. * gnu/ci.scm (qemu-jobs): Adapt to new API. * gnu/tests/install.scm (run-install): Ditto. * guix/scripts/system.scm (system-derivation-for-action): Ditto.
2020-04-30Merge branch 'master' into core-updatesMarius Bakke
Conflicts: gnu/local.mk gnu/packages/backup.scm gnu/packages/emacs-xyz.scm gnu/packages/guile.scm gnu/packages/lisp.scm gnu/packages/openldap.scm gnu/packages/package-management.scm gnu/packages/web.scm gnu/packages/xorg.scm
2020-04-27guix: edit: Make nano the default editor.Raghav Gururajan
* guix/scripts/edit.scm: Make nano the default editor. Nano is sensible default, as it is installed by base system. For development, user can set custom value for $EDITOR. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-04-26pack: Use a declarative profile.Ludovic Courtès
* guix/scripts/pack.scm (guix-pack): Use a declarative profile instead of 'profile-derivation'.
2020-04-26substitute: Close port at the end of http-multiple-get.Christopher Baines
* guix/scripts/substitute.scm (http-multiple-get): Add close-port call.
2020-04-26substitute: Make http-multiple-get batch size configurable.Christopher Baines
* guix/scripts/substitute.scm (http-multiple-get): Add batch-size parameter.
2020-04-26substitute: Use the same port for multiple request batches.Christopher Baines
In http-multiple-get. * guix/scripts/substitute.scm (http-multiple-get): Switch port to p in one occurrence.
2020-04-24Merge branch 'master' into core-updatesMarius Bakke
2020-04-24guix package: Export 'search-path-environment-variables'.Marius Bakke
...because Emacs-Guix uses it. * guix/scripts/package.scm (search-path-environment-variables): Export.
2020-04-19Merge branch 'master' into core-updatesMarius Bakke
2020-04-16import/json: Use json->code.Ricardo Wurmus
* guix/import/json.scm (json->code): Export procedure. * guix/scripts/import/json.scm (guix-import-json): Use json->code.
2020-04-16scripts/package: Handle JSON files.Ricardo Wurmus
* guix/scripts/package.scm (%options): Support loading from JSON files when "install-from-file" is used.
2020-04-16scripts/build: options->things-to-build: Handle .json files.Ricardo Wurmus
* guix/scripts/build.scm (options->things-to-build): Handle files that end on .json.
2020-04-15Merge branch 'master' into core-updatesMarius Bakke
2020-04-14weather: Delete duplicate entries coming from '--manifest'.Ludovic Courtès
* guix/scripts/weather.scm (load-manifest): Call 'delete-duplicates'.
2020-04-08Merge branch 'master' into core-updatesMarius Bakke
Conflicts: etc/news.scm gnu/local.mk gnu/packages/check.scm gnu/packages/cross-base.scm gnu/packages/gimp.scm gnu/packages/java.scm gnu/packages/mail.scm gnu/packages/sdl.scm gnu/packages/texinfo.scm gnu/packages/tls.scm gnu/packages/version-control.scm
2020-04-08reconfigure: Correctly re-throw SRFI-34 exceptions on Guile 3.Ludovic Courtès
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.
2020-04-03pack: Pass the cross-compilation target to 'run-with-store'.Ludovic Courtès
This ensures '%current-target-system' is correctly bound upfront, which some packages rely on. * guix/scripts/pack.scm (guix-pack): Pass #:target to 'run-with-store'.
2020-04-03guix system: Mention 'herd restart' when reconfigure completes.Ludovic Courtès
* guix/scripts/system.scm (with-shepherd-error-handling): Use 'mbegin' instead of 'begin'. (perform-action): Print a message after 'upgrade-shepherd-services'. That message had disappeared in commit 5c8c8c455420af27189d6045b3599fe6e27ad012.
2020-04-03guix system: Remove unused procedure.Ludovic Courtès
This procedure was unused since 5c8c8c455420af27189d6045b3599fe6e27ad012. * guix/scripts/system.scm (call-with-service-upgrade-info): Remove.
2020-04-03reconfigure: Silence Guile warnings.Ludovic Courtès
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'.
2020-04-03Revert "reconfigure: Run the effect scripts as separate processes."Ludovic Courtès
This reverts commit 5517750344be05c91bc2979c1a0e2348a9ae902d. That commit would remove all sorts of error checking when running those programs.
2020-04-02reconfigure: Run the effect scripts as separate processes.Ludovic Courtès
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'.
2020-04-02guix system: Do not import the user's (guix config).Ludovic Courtès
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.
2020-04-02guix system: Use 'mapm/accumulate-builds'.Ludovic Courtès
* guix/scripts/system.scm (perform-action): Use 'mapm/accumulate-builds' instead of 'mapm'.
2020-03-31guix package: Do not misdiagnose upgrades when there are propagated inputs.Ludovic Courtès
Fixes <https://bugs.gnu.org/35872>. Reported by Andy Tai <atai@atai.org>. * guix/profiles.scm (list=?, manifest-entry=?): New procedures. * guix/scripts/package.scm (transaction-upgrade-entry): In the '=' case, use 'manifest-entry=?' to determine whether it's an upgrade. * tests/packages.scm ("transaction-upgrade-entry, zero upgrades, propagated inputs"): New test.
2020-03-31guix package: 'transaction-upgrade-entry' swallows build requests.Ludovic Courtès
Fixes a regression introduced in 131f50cdc9dbb7183023f4dae759876a9e700bef whereby the install/upgrade message would not be displayed: $ guix upgrade -n 2.1 MB would be downloaded: /gnu/store/…-something-1.2 /gnu/store/…-its-dependency-2.3 This is because we'd directly abort from 'transaction-upgrade-entry' to the build handler of 'build-notifier'. * guix/scripts/package.scm (transaction-upgrade-entry): Call 'string=?' expression in 'with-build-handler'. * tests/packages.scm ("transaction-upgrade-entry, grafts"): New test.
2020-03-31guix package: 'transaction-upgrade-entry' uses 'lower-manifest-entry'.Ludovic Courtès
* guix/profiles.scm (lower-manifest-entry): Export. * guix/scripts/package.scm (transaction-upgrade-entry)[lower-manifest-entry*] [upgrade]: New procedures. Use 'lower-manifest-entry*' instead of 'package-derivation' to compute the output file name of PKG.
2020-03-30Merge branch 'master' into core-updatesMarius Bakke
Conflicts: gnu/packages/admin.scm gnu/packages/commencement.scm gnu/packages/guile.scm gnu/packages/linux.scm gnu/packages/package-management.scm gnu/packages/pulseaudio.scm gnu/packages/web.scm
2020-03-29deploy: Use 'map/accumulate-builds'.Ludovic Courtès
* guix/scripts/deploy.scm (guix-deploy): Use 'map/accumulate-builds' instead of 'for-each'.
2020-03-29deploy: Factorize machine deployment.Ludovic Courtès
* guix/scripts/deploy.scm (deploy-machine*): New procedure. (guix-deploy): Call it in 'for-each'.
2020-03-29'--dry-run' no longer implies '--no-grafts'.Ludovic Courtès
* guix/scripts/archive.scm (%options): "dry-run" option no longer adds 'graft? #f to RESULT. * guix/scripts/environment.scm (%options): Likewise. * guix/scripts/pack.scm (%options): Likewise. * guix/scripts/package.scm (%options): Likewise. * guix/scripts/pull.scm (%options): Likewise. * guix/scripts/system.scm (%options): Likewise.
2020-03-29guix build: Use 'map/accumulate-builds'.Ludovic Courtès
* guix/scripts/build.scm (options->derivations): Use 'map/accumulate-builds' instead of 'append-map'.
2020-03-28deploy: Remove use of '~*' in format string.Marius Bakke
...since 'msgfmt' fails to interpret it. Reported by Vagrant Cascadian in <https://lists.gnu.org/archive/html/guix-devel/2020-03/msg00340.html>. See also <https://bugs.gnu.org/37505>. * guix/scripts/deploy.scm (show-what-to-deploy): Use ~d instead of ~* when displaying machines that will be deployed.
2020-03-27Merge branch 'master' into core-updatesMarius Bakke
Conflicts: gnu/packages/icu4c.scm gnu/packages/man.scm gnu/packages/python-xyz.scm guix/scripts/environment.scm guix/scripts/pack.scm guix/scripts/package.scm guix/scripts/pull.scm guix/store.scm
2020-03-26status: Display synthetic information about profiles being built.Ludovic Courtès
* guix/status.scm (print-build-event): Add 'profile case. * guix/scripts/package.scm (build-and-use-profile): Remove now redundant message.
2020-03-25environment: Use 'with-build-handler'.Ludovic Courtès
* guix/scripts/environment.scm (build-environment): Remove. (guix-environment): Wrap 'with-status-verbosity' in 'with-build-handler'. Remove 'dry-run?' conditional. Use 'built-derivations' instead of 'build-environment'.
2020-03-25archive: Use 'with-build-handler'.Ludovic Courtès
* guix/scripts/archive.scm (export-from-store): Remove call to 'show-what-to-build' and dry-run? condition. (guix-archive): Wrap 'cond' in 'with-build-handler'.
2020-03-24scripts: lint: Handle store connections for lint checkers.Christopher Baines
Rather than individual checkers opening up a connection to the store for each package to check, if any checker requires a store connection, open a connection and pass it to all checkers that would use it. This makes running the derivation checker much faster for multiple packages. * guix/scripts/lint.scm (run-checkers): Add a #:store argument, and pass the store to checkers if they require a store connection. (guix-lint): Establish a store connection if any checker requires one, and pass it through to run-checkers.
2020-03-24guix system: Fix mistaken 'guix pull' warning upon 'reconfigure'.Ludovic Courtès
Fixes <https://bugs.gnu.org/38196>. Reported by Florian Pelz <pelzflorian@pelzflorian.de>. * guix/scripts/system.scm (maybe-suggest-running-guix-pull): Check whether 'current-profile' returns true instead of checking for the existence of ~root/.config/guix/current. That way, "sudo guix system reconfigure" no longer emits a warning in that case.
2020-03-24pack: Do not store extended attributes in squashfs images.Ludovic Courtès
* guix/scripts/pack.scm (squashfs-image)[build](mksquashfs): Pass "-no-xattrs".
2020-03-23deploy: Write a message upon successful deployment.Ludovic Courtès
* guix/scripts/deploy.scm (guix-deploy): Write message upon successful deployment.
2020-03-23deploy: Show what machines will be deployed.Ludovic Courtès
* guix/scripts/deploy.scm (show-what-to-deploy): New procedure. (guix-deploy): Call it.
2020-03-23ui: Add 'indented-string'.Ludovic Courtès
* guix/scripts/pull.scm (display-news-entry): Remove extra space in format string for 'indented-string'. (indented-string): Remove. (display-new/upgraded-packages)[pretty]: Pass #:initial-indent? to 'indented-string'. * guix/ui.scm (indented-string): New procedure.
2020-03-22Remove workaround for 'time-monotonic' in Guile 2.2.2.Ludovic Courtès
This is a followup to e688c2df3924423b67892cc9939ca099c729d1cb. * build-aux/hydra/evaluate.scm <top level>: Remove 'time-monotonic' definition. * guix/cache.scm: Likewise. * guix/progress.scm: Likewise. * guix/scripts/substitute.scm: Likewise. * guix/scripts/weather.scm: Likewise. * tests/cache.scm: Likewise.
2020-03-22copy: Use 'with-build-handler'.Ludovic Courtès
* guix/scripts/copy.scm (send-to-remote-host): Remove explicit 'show-what-to-build' call. Call 'build-derivations' unconditionally. (guix-copy): Wrap 'with-status-verbosity' in 'with-build-handler'.
2020-03-22copy: Actually implement '--dry-run'.Ludovic Courtès
* guix/scripts/copy.scm (%options): Add '--dry-run'.