summaryrefslogtreecommitdiff
path: root/guix/scripts
AgeCommit message (Collapse)Author
2018-12-21offload: Recognize build failures due to lack of disk space.Ludovic Courtès
Previously, if a remote build would fail due to lack of disk space, this would be considered a permanent failure and thus cached as a build failure if the local daemon runs with '--cache-failures'. * guix/scripts/offload.scm (transfer-and-offload): Upon 'nix-protocol-error?' call 'node-free-disk-space' and return 1 instead of 100 if the result if lower than 10 MiB.
2018-12-21offload: Skip machines that are low on disk space.Ludovic Courtès
Fixes <https://bugs.gnu.org/33378>. * guix/scripts/offload.scm (node-free-disk-space): New procedure. (%minimum-disk-space): New variable. (choose-build-machine): Call 'node-free-disk-space' and take it into account in addition to LOAD. (check-machine-status): Display the free disk space.
2018-12-21offload: Decompose 'machine-load' into simpler procedures.Ludovic Courtès
* guix/scripts/offload.scm (machine-load): Remove. (node-load, normalized-load): New procedures. (choose-build-machine): Call 'open-ssh-session' and 'make-node' from here; pass the node to 'node-load'. (check-machine-status): Use 'node-load' instead of 'machine-load'. Call 'disconnect!' on SESSION.
2018-12-19Use 'mapm' instead of 'sequence' + 'map'.Ludovic Courtès
Previously we'd use the (sequence M (map P L)) idiom just because 'mapm' was slower (not specialized for the given monad). This is no longer the case since commit dcb95c1fc936d74dfdf84b7e59eff66cb99c5a63. * guix/gexp.scm (lower-inputs): Use (mapm M P L) instead of (sequence M (map P L)). (lower-references, gexp->sexp, imported-files): Likewise. * guix/profiles.scm (profile-derivation): Likewise. * guix/scripts/environment.scm (inputs->requisites): Likewise. * guix/scripts/system.scm (copy-closure): Likewise.
2018-12-18guix system: Clarify the three strategies available.swedebugia
* guix/scripts/system.scm (show-help): Clarify the three choices. * doc/guix.texi (Invoking guix system): Add 3 @cindex to make on-error=strategy easier to find. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-12-17publish: Add a 'Cache-Control' header on /nar responses.Ludovic Courtès
Fixes <https://bugs.gnu.org/33721>. Reported by Chris Marusich <cmmarusich@gmail.com>. * guix/scripts/publish.scm (render-nar/cached): Add #:ttl and honor it. (make-request-handler): Pass #:ttl to 'render-nar/cached'. * tests/publish.scm ("with cache, uncompressed"): Pass "--ttl=42h" to 'guix publish'. Check 'Cache-Control' on narinfo response and on nar response.
2018-12-17environment: Support package transformation options.Ludovic Courtès
Fixes <https://bugs.gnu.org/33776>. Reported by Adrien Guilbaud <adrien.guilbaud@inria.fr>. * guix/scripts/environment.scm (show-help): Add call to 'show-transformation-options-help'. (%options): Add %TRANSFORMATION-OPTIONS. (options/resolve-packages): Add 'store' parameter. [transform, package->manifest-entry*]: New procedures. Use 'package->manifest-entry*' instead of 'package->manifest-entry'. (guix-environment): Move definition of 'manifest' within 'with-store'. * tests/guix-environment.sh: Add test.
2018-12-14substitute: Ignore irrelevant narinfo signatures.Ludovic Courtès
Fixes <https://bugs.gnu.org/33733>. Fixes a bug whereby 'guix substitute' would accept narinfos whose signature does not cover the StorePath/NarHash/References tuple. * guix/scripts/substitute.scm (narinfo-sha256)[%mandatory-fields]: New variable. Compute SIGNED-FIELDS; return #f unless each of the %MANDATORY-FIELDS is among SIGNED-FIELDS. * tests/substitute.scm ("query narinfo with signature over nothing") ("query narinfo with signature over irrelevant bits"): New tests.
2018-12-10refresh: Account for overlapping updater coverage.Eric Bavier
* guix/scripts/refresh.scm (list-updaters-and-exit): Do not assume updater predicates are disjoint. Track covered packages directly.
2018-12-07guix system: Fix bootloader config file generation by 'guix system roll-back'.Ludovic Courtès
Fixes <https://bugs.gnu.org/33623>. Reported by Diego Nicola Barbato <dnbarbato@posteo.de>. Regression introduced in commit 46c296dcc4817f15a4b4ef7e5ef622306b4db62e. * guix/scripts/system.scm (reinstall-bootloader): Add call to 'lower-object'.
2018-12-07describe: In 'channels' format, quote the channel name.Ludovic Courtès
Fixes a regression introduced in commit 8548f995494d8d6358e6a8d7bc3b3bb5a0cbecb5. * guix/scripts/describe.scm (channel->sexp): Quote the channel name.
2018-12-04refresh: '--list-dependents' ignores deprecated packages.Ludovic Courtès
* guix/scripts/refresh.scm (all-packages): Filter out deprecated packages.
2018-12-04build: Default to https://ci.guix.info for substitutes.Ludovic Courtès
* config-daemon.ac (guix_substitute_urls): Always default to "https://ci.guix.info". * doc/guix.texi (SUBSTITUTE-SERVER): Switch to ci.guix.info. * guix/scripts/build.scm (%default-log-urls): Likewise. * guix/scripts/substitute.scm (%default-substitute-urls): Likewise. * guix/store.scm (%default-substitute-urls): Likewise.
2018-12-04Remove most references to hydra.gnu.org.Ludovic Courtès
* Makefile.am (assert-binaries-available): Don't mention hydra.gnu.org in comment. * build-aux/check-available-binaries.scm: Likewise. * build-aux/check-final-inputs-self-contained.scm: Likewise. * doc/guix.texi (SUBSTITUTE-SERVER): New variable. Use it throughout instead of "mirror.hydra.gnu.org". * doc/contributing.texi (Submitting Patches): Likewise. * gnu/services/base.scm (hydra-key-authorization) (guix-activation): Remove mentions of "hydra.gnu.org" in comments and messages. * gnu/system/install.scm (%installation-services): Likewise. * guix/scripts/size.scm (guix-size): Likewise.
2018-12-03repl: Load user's initialization file.Oleg Pykhalov
* guix/scripts/repl.scm (guix-repl): Load user's initialization file.
2018-11-30guix build: Add '--with-commit'.Ludovic Courtès
* guix/git.scm (<git-checkout>)[commit]: New field. (git-checkout-compiler): Honor it. * guix/scripts/build.scm (evaluate-git-replacement-specs): Add 'proc' parameter and honor it. (transform-package-source-branch)[replace]: New procedure. Adjust 'evaluate-git-replacement-specs' accordingly. (transform-package-source-commit): New procedure. (%transformations, %transformation-options) (show-transformation-options-help): Add 'with-commit'. * tests/guix-build-branch.sh: Add test. * doc/guix.texi (Package Transformation Options): Document it.
2018-11-30guix build: Add '--with-branch' transformation option.Ludovic Courtès
* guix/scripts/build.scm (evaluate-git-replacement-specs) (transform-package-source-branch): New procedures. (%transformations, %transformation-options): Add 'with-branch'. (show-transformation-options-help): Likewise. * tests/guix-build-branch.sh: New file. * Makefile.am (SH_TESTS): Add it. * doc/guix.texi (Package Transformation Options): Document it.
2018-11-28guix hash: Fix version and help messagesTim Gesthuizen
ca719424455465fca4b872c371daf2a46de88b33 changes the name of the executable to be displayed by the --version and --help commands of `guix hash` to "gcrypt hash". This is reverted by this commit. * guix/scripts/hash.scm (show-help): Change string literals Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-11-27pack: List the available formats.Efraim Flashner
* guix/scripts/pack.scm (show-formats): New variable. (%options, show-help): Add 'list-formats' option.
2018-11-27describe: Delete 'directory' argument from 'display-checkout-info'.Oleg Pykhalov
This commit follows 1255400faabfcf0ca1666d17f2f34ea0d49f6b1f. * guix/scripts/describe.scm (display-checkout-info): Delete 'directory' argument.
2018-11-26repl: Do not exit repl on SIGINT.Oleg Pykhalov
* guix/scripts/repl.scm (guix-repl): Do not exit repl on SIGINT.
2018-11-23pack: Add '--profile-name'.Ludovic Courtès
* guix/scripts/pack.scm (self-contained-tarball): Add #:profile-name and honor it. (squashfs-image, docker-image): Add #:profile-name. (%default-options): Add 'profile-name'. (%options, show-help): Add "--profile-name". (guix-pack): Honor it. * tests/guix-pack-localstatedir.sh: New file. * Makefile.am (SH_TESTS): Add it. * doc/guix.texi (Invoking guix pack): Document "--profile-name".
2018-11-22describe: Add recutils format.Oleg Pykhalov
* guix/scripts/describe.scm (channel->recutils): New procedure. (display-checkout-info, display-profile-info): Use this. (%options): Add 'recutils' option. * doc/guix.texi (Invoking guix describe): Document this.
2018-11-22describe: Add json format.Oleg Pykhalov
* guix/scripts/describe.scm (channel->json): New procedure. (display-checkout-info, display-profile-info): Use this. (%options): Add 'json' option. * doc/guix.texi (Invoking guix describe): Document this.
2018-11-22describe: Use a procedure to format output.Oleg Pykhalov
* guix/scripts/describe.scm (channel->sexp): New procedure. (display-checkout-info, display-profile-info): Use this.
2018-11-21guix system: Fix 'init' again.Ludovic Courtès
Fixes a regression introduced in 52ee4479ef26826a53b9929cd00ca7738be687b1, whereby 'install' would now be passed a procedure instead of a lowerable object. * guix/scripts/system.scm (perform-action): Pass BOOTLOADER-SCRIPT as the #:bootloader-installer argument of 'install'.
2018-11-21describe: Add profile option.Oleg Pykhalov
* guix/scripts/describe.scm (%options): Add profile option. (show-help): Document this. (display-checkout-info): Check for profile argument. * doc/guix.texi (Invoking guix describe): Document this.
2018-11-21describe: Fix 'format' option.Oleg Pykhalov
Fix ‘guix describe’ ignores ‘--format=FORMAT’ option. * guix/scripts/describe.scm (%options): Fix 'format' option.
2018-11-20lint: 'check-derivation' fully disables grafts.Ludovic Courtès
Previously grafting could take place indirectly, for instance when lowering origins. * guix/scripts/lint.scm (check-derivation)[try]: Parameterize '%graft?'.
2018-11-20lint: 'check-derivation' tries all the package's supported systems.Ludovic Courtès
This allows us to catch architecture-specific evaluation failures. * guix/scripts/lint.scm (check-derivation): Move body into... [try]: ... this. New procedure. Call 'try' for each supported system of PACKAGE.
2018-11-19guix system: Fix 'init'.Ludovic Courtès
Fixes a regression introduced in 52ee4479ef26826a53b9929cd00ca7738be687b1, whereby 'install' would now be passed a <computed-file> object instead of a derivation. * guix/scripts/system.scm (install): Call 'lower-object' on BOOTCFG.
2018-11-18guix system: Clarify 'perform-action'.Ludovic Courtès
* guix/scripts/system.scm (perform-action): Move non-monadic local variables outside the 'mlet' form.
2018-11-18guix system: De-monadify bootloader installation script.Ludovic Courtès
* guix/scripts/system.scm (bootloader-installer-derivation): Rename to... (bootloader-installer-script): ... this. Use 'scheme-file' instead of 'gexp->file'. (perform-action): Adjust accordingly. Move 'lower-object' call to the point where DRVS is computed.
2018-11-18guix system: Simplify bootloader package handling.Ludovic Courtès
* guix/scripts/system.scm (perform-action): Remove 'bootloader-package' variable. Pass (bootloader-package bootloader) as the 2nd argument to 'bootloader-installer-derivation'. Remove BOOTLOADER-PACKAGE from DRVS since it's redundant.
2018-11-18system: De-monadify 'operating-system-bootcfg'.Ludovic Courtès
* gnu/system.scm (operating-system-bootcfg): Remove 'mlet*' and 'lower-object' call. * gnu/system/vm.scm (system-disk-image) (system-qemu-image/shared-store): Adjust accordingly. * guix/scripts/system.scm (perform-action): Add 'lower-object' call for BOOTCFG.
2018-11-11guix system: Invoking 'guix system init' twice keeps timestamps zeroed.Ludovic Courtès
Fixes a bug whereby running 'guix system init config.scm /mnt' twice would, on the second run, change timestamps in /mnt/gnu/store from the Epoch to now. This is because the 'register-path' call would bypass the 'reset-timestamps' phase altogether in that case, as a consequence of commit bb3b6ccb05550fbfbeb459c68819a752327d6e1e. Reported by Christopher Baines. * guix/scripts/system.scm (install): When TARGET/var/guix exists, delete it. As a side-effect, this ensures that later on, the 'register-path' call invokes 'reset-timestamps' on all the copied store items.
2018-11-11guix package: '--show' errors when asked for a non-existent package.Ludovic Courtès
Fixes <https://bugs.gnu.org/33323>. Reported by swedebugia <swedebugia@riseup.net>. * guix/scripts/package.scm (process-query): Call 'leave' when 'find-packages-by-name' returns the empty list. * tests/guix-package.sh: Test it.
2018-11-07pull: Add missing monadic 'return'.Ludovic Courtès
Fixes a regression introduced in 5f7dd092ca577a534067f577b8849ed06cabf970 where, upon completion, 'guix pull' would fail (instead of printing the new/upgraded packages) with ugly errors like: successfully built /gnu/store/…-profile.drv 1 package in profile Backtrace: […] In guix/store.scm: 1605:24 1 (run-with-store _ _ #:guile-for-build _ #:system _ # _) In unknown file: 0 (_ #<build-daemon 256.97 2476b40>) ERROR: Wrong type to apply: #t Reported by thorwil on #guix. * guix/scripts/pull.scm (build-and-install): Add missing 'return' when DRY-RUN? is wrong.
2018-11-06pack: Squashfs backend now honors '--localstatedir'.Ludovic Courtès
* guix/scripts/pack.scm (squashfs-image)[database]: New variable. [build]: Add (gnu build install) to the closure. Call 'install-database-and-gc-roots' when DATABASE is true, and invoke mksquashfs once more. * tests/pack.scm ("squashfs-image + localstatedir"): New test.
2018-11-06pack: Docker backend now honors '--localstatedir'.Ludovic Courtès
* guix/docker.scm (build-docker-image): Add #:database parameter. Create /var/guix/db, /var/guix/profiles, etc. when DATABASE is true. * guix/scripts/pack.scm (docker-image): Export. Remove #:deduplicate? parameter. Define 'database' and pass it to 'docker-image'. * tests/pack.scm (test-assertm): Recompile the derivation of %BOOTSTRAP-GUILE. ("docker-image + localstatedir"): New test.
2018-11-06pack: Import (guix store database) only when '--localstatedir' is passed.Ludovic Courtès
This is another way to address <https://bugs.gnu.org/32184>, which was previously addressed in commit 19c924af4f3726688ca155a905ebf1cb9acdfca2. * gnu/build/install.scm (register-closure): Move to... * gnu/build/vm.scm (register-closure): ... here. New procedure. * guix/scripts/pack.scm (self-contained-tarball)[build]: Remove now unneeded 'with-extensions' form and custom (guix config) module. * tests/guix-pack.sh: Revert the strategy from commit 19c924af4f3726688ca155a905ebf1cb9acdfca2. * tests/pack.scm ("self-contained-tarball"): Likewise.
2018-11-06pack: Move store database creation to a separate derivation.Ludovic Courtès
* guix/scripts/pack.scm (store-database): New procedure. (self-contained-tarball): Use it when LOCALSTATEDIR? is true. Remove 'schema' and add 'database'. [build]: Pass DATABASE to 'populate-single-profile-directory'. (squashfs-image): Remove #:deduplicate? parameter. [build]: Remove (gnu build install) and (guix config) from the imported modules. Remove 'with-extensions'. * gnu/build/install.scm (populate-single-profile-directory): Remove #:deduplicate?, #:register?, and #:schema; add #:database. Remove call to 'register-closure' and simply copy DATABASE instead.
2018-11-06pull: Make '--dry-run' behave as expected.Ludovic Courtès
* guix/scripts/pull.scm (show-help): Document '--dry-run'. (build-and-install): Add #:dry-run? parameter and honor it. (guix-pull): Remove (assoc-ref opts 'dry-run?) condition. Instead, pass it as #:dry-run? to 'build-and-install'. * doc/guix.texi (Invoking guix pull): Document '--dry-run'. Move '--verbose' to the bottom.
2018-10-29Add 'guix processes'.Ludovic Courtès
* guix/scripts/processes.scm, tests/processes.scm: New files. * Makefile.am (MODULES): Add the former. (SCM_TESTS): Add the latter. * po/guix/POTFILES.in: Add guix/scripts/processes.scm. * doc/guix.texi (Invoking guix processes): New node. (Invoking guix-daemon): Reference it.
2018-10-27pack: Hide 'zip' colliding binding.Ludovic Courtès
* guix/scripts/pack.scm: Hide 'zip' from (gnu packages compression).
2018-10-27pack: Remove unused variable.Ludovic Courtès
* guix/scripts/pack.scm (self-contained-tarball)[libgcrypt]: Remove.
2018-10-23scripts: Suggest running 'guix gc' when we're short on disk space.Ludovic Courtès
* guix/scripts.scm (%disk-space-warning): New variable. (warn-about-disk-space): New procedure. * guix/scripts/package.scm (build-and-use-profile): Use it. * guix/scripts/system.scm (process-action): Likewise.
2018-10-19pack: Fix "-C none -f tarball".Ludovic Courtès
Fixes a regression introduced in 48b444304e206c35cf2c8e0d87a4711f1aac4fd4 whereby "guix pack -C none hello" would fail with: ERROR: In procedure string-join: In procedure string-join: Wrong type argument in position 1: #f builder for `/gnu/store/…-tarball-pack.tar.drv' failed with exit code 1 * guix/scripts/pack.scm (self-contained-tarball): Adjust for when 'compressor-command' returns #f.
2018-10-17import cran: Document "recursive" option.Pierre Neidhardt
* guix/scripts/import/cran.scm: (show-help): Document "recursive" option.
2018-10-15status: Build upon multiplexed build output.Ludovic Courtès
This allows for more accurate status tracking and parsing of extended build traces. * guix/status.scm (multiplexed-output-supported?): New procedure. (print-build-event): Don't print \r when PRINT-LOG? is true. Adjust 'build-log' handling for when 'multiplexed-output-supported?' returns true. (bytevector-index, split-lines): New procedures. (build-event-output-port)[%build-output-pid, %build-output] [%build-output-left]: New variables. [process-line]: Handle "@ build-output" traces. [process-build-output]: New procedure. [write!]: Add case for when %BUILD-OUTPUT-PID is true. Use 'bytevector-index' rather than 'string-index'. (compute-status): Add #:derivation-path->output-path. Use it. * tests/status.scm ("compute-status, multiplexed build output"): New test. ("build-output-port, UTF-8") ("current-build-output-port, UTF-8 + garbage"): Adjust to new 'build-log' output. * guix/scripts/build.scm (set-build-options-from-command-line): Pass #:multiplexed-build-output?. (%default-options): Add 'multiplexed-build-output?'. * 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.