summaryrefslogtreecommitdiff
path: root/guix/scripts
AgeCommit message (Collapse)Author
2019-04-07size: Optimize dependency size computation.Ludovic Courtès
This reduces 'guix size' run time by ~4% here: items="$(guix build icecat inkscape emacs libreoffice)" guix size $items * guix/scripts/size.scm (store-profile): Define 'size-table' and use it to lookup the size of ITEM in 'dependency-size'.
2019-04-04scripts: More commands default to verbosity level 1.Ludovic Courtès
* guix/scripts/environment.scm (%default-options): Change 'verbosity' to 1. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/system.scm (guix-system): Likewise, except for the 'build' command.
2019-04-04gexp: Remove workarounds for <https://bugs.gnu.org/15602>.Ludovic Courtès
* gnu/services/base.scm (hydra-key-authorization)[aaa]: Remove. [default-acl]: Don't import it. * guix/scripts/pack.scm (store-database)[build]: Don't import (gnu build install).
2019-04-02environment: '-C' creates namespaces where the user is not root.Ludovic Courtès
* guix/scripts/environment.scm (launch-environment/container): Add UID and GID. Use them in PASSWD and GROUPS. Pass them as #:guest-uid and #:guest-gid to 'call-with-container'. * tests/guix-environment-container.sh: Test the inner UID. In '--user' test, replace hard-coded 0 with 1000. * doc/guix.texi (Invoking guix environment): Adjust accordingly.
2019-03-28pull: Truncate the list of packages displayed on completion.Ludovic Courtès
Previously, if you'd run 'guix pull' after a couple of weeks, it would fill your screen with package names, which is unhelpful. * guix/scripts/pull.scm (ellipsis): New procedure. (display-new/upgraded-packages): Add #:concise?. [list->enumeration]: New procedure. Use it instead of 'string-join'. (display-profile-news): Pass #:concise? #t.
2019-03-28pull: Factorize pretty-printing for new/upgraded package lists.Ludovic Courtès
* guix/scripts/pull.scm (display-new/upgraded-packages)[pretty]: New procedure. Use it.
2019-03-27refresh: Update the source code URL.Ludovic Courtès
Reported by Tobias Geerinckx-Rice <me@tobias.gr> in <https://bugs.gnu.org/35010>. * guix/upstream.scm (update-package-source): Take 'source' instead of 'version' as the second argument. [update-expression]: Change to take 'replacements', a list of replacement pairs. Compute OLD-URL and NEW-URL and replace the dirname of the OLD-URL with that of NEW-URL. * guix/scripts/refresh.scm (update-package): Adjust call to 'update-package-source' accordingly.
2019-03-27upstream: 'package-update' returns the <upstream-source> object.Ludovic Courtès
Fixes a regression introduced in abd4d6b33dba4de228e90ad15a8efb456fcf7b6e, where CHANGES would no longer be a thunk. Reported by Ricardo Wurmus. * guix/upstream.scm (package-update/url-fetch): Return SOURCE as the third value instead of CHANGES. * guix/scripts/refresh.scm (update-package): Adjust accordingly.
2019-03-26environment: Create /etc/group in containers.Ludovic Courtès
Reported by Pierre Neidhardt <mail@ambrevar.xyz>. * guix/scripts/environment.scm (launch-environment/container): Create GROUPS and call 'write-group'. * tests/guix-environment-container.sh: Test it.
2019-03-26environment: Use (gnu build accounts) for /etc/passwd handling.Ludovic Courtès
* guix/scripts/environment.scm (launch-environment/container): Remove call to 'mock-passwd'; instantiate a <password-entry> instead. Call 'write-passwd' to write the pasword database instead of using custom code. (mock-passwd): Remove. * tests/guix-environment-container.sh: Test 'getpwuid'.
2019-03-23graph: Factorize calls to 'fold-packages'.Ludovic Courtès
* guix/scripts/graph.scm (all-packages): New procedure. (%reverse-package-node-type, %reverse-bag-node-type): Use 'all-packages' instead of 'fold-packages'.
2019-03-23graph: Add the 'reverse-bag' graph.Ludovic Courtès
Suggested by Julien Lepiller. * guix/scripts/graph.scm (%reverse-bag-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("reverse bag DAG"): New test. * doc/guix.texi (Invoking guix graph): Document it.
2019-03-19pack: Create an empty /home directory for '-f squashfs'.Ludovic Courtès
Fixes <https://bugs.gnu.org/34914>. * guix/scripts/pack.scm (squashfs-image)[build]: Pass "-p /home d 555 0 0".
2019-03-19pack: Produce relative symlinks when using '-f squashfs'.Ludovic Courtès
Fixes <https://bugs.gnu.org/34913>. * guix/scripts/pack.scm (squashfs-image)[build]: Use 'relative-file-name' when creating SYMLINKS. * guix/scripts/pack.scm (guix-pack): Pass #:relative-symlinks? #t when PACK-FORMAT is 'squashfs.
2019-03-18describe: Warn about 'GUIX_PACKAGE_PATH' in json and recutils format.Ludovic Courtès
Fixes <https://bugs.gnu.org/34884>. Reported by Pierre Neidhardt <mail@ambrevar.xyz>. * guix/scripts/describe.scm (display-package-search-path): Add catch-all case for FMT.
2019-03-17guix build: '--with-branch' strips slashes from the version string.Ludovic Courtès
This fixes things like: guix build glibc \ --with-git-url=glibc=git://sourceware.org/git/glibc.git \ --with-branch=glibc=release/2.25/master whereby slashes would before go straight to the 'version' field, leading to an invalid store file name. * guix/scripts/build.scm (transform-package-source-branch)[replace]: Replace slashes with hyphens in BRANCH when building the version string.
2019-03-17guix build: '--with-commit' makes recursive checkouts.Ludovic Courtès
This was an omission from commit 024a6bfba906742c136a47b4099f06880f1d3f15. * guix/scripts/build.scm (transform-package-source-commit): Add 'recursive?' field to SOURCE. * tests/scripts-build.scm ("options->transformation, with-branch") ("options->transformation, with-commit"): New tests.
2019-03-17guix build: Transformation options match packages by spec.Ludovic Courtès
This allows us to combine several transformations on a given package, in particular '--with-git-url' and '--with-branch'. Previously transformations would ignore each other since they would all take (specification->package SOURCE) as their replacement source, compare it by identity, which doesn't work if a previous transformation has already changed SOURCE. * guix/scripts/build.scm (evaluate-replacement-specs): Adjust to produce an alist as expected by 'package-input-rewriting/spec', with a package spec as the first element of each pair. (evaluate-git-replacement-specs): Likewise. (transform-package-inputs): Adjust accordingly and use 'package-input-rewriting/spec'. (transform-package-inputs/graft): Likewise. (transform-package-source-branch, transform-package-source-commit): Use 'package-input-rewriting/spec'. (transform-package-source-git-url): Likewise, and adjust the REPLACEMENTS alist accordingly. (options->transformation): Iterate over OPTS instead of over %TRANSFORMATIONS. Invoke transformations one by one. * tests/scripts-build.scm ("options->transformation, with-input"): Adjust test to compare packages by name rather than by identity. ("options->transformation, with-git-url + with-branch"): New test.
2019-03-17guix build: Factorize 'package-git-url'.Ludovic Courtès
* guix/scripts/build.scm (package-git-url): New procedure. (evaluate-git-replacement-specs): Use it.
2019-03-17guix build: Add '--with-git-url'.Ludovic Courtès
* guix/scripts/build.scm (%not-equal): New variable. (evaluate-git-replacement-specs): Use it instead of local variable 'not-equal'. (transform-package-source-git-url): New procedure. (%transformations): Add 'with-git-url'. (%transformation-options, show-transformation-options-help): Add '--with-git-url'. * tests/scripts-build.scm ("options->transformation, with-git-url"): New test.
2019-03-17guix system: Fix success report of the bootloader installation.Ludovic Courtès
Fixes <https://bugs.gnu.org/34890>. Reported by Jack Hill <jackhill@jackhill.us>. Regression introduced in 21fcfe1ee969cc477dc41486ae4074e655d44274. * guix/scripts/system.scm (bootloader-installer-script): Ungexp DEVICE.
2019-03-16guix: Match package names case-insensitively.Tobias Geerinckx-Rice
* guix/scripts/package.scm (options->upgrade-predicate, process-query): Use REGEXP/ICASE when matching package names.
2019-03-16bootloader: Use 'invoke/quiet' when running 'grub-install' and co.Ludovic Courtès
This hides potentially confusing GRUB messages from the user, such as "Installing for i386-pc platform." * gnu/bootloader/extlinux.scm (install-extlinux): Use 'invoke/quiet' instead of 'system*' and 'error'. * gnu/bootloader/grub.scm (install-grub, install-grub-efi): Likewise. * guix/scripts/system.scm (bootloader-installer-script): Guard against 'message-condition?' and handle them properly.
2019-03-15pack: Construct inferior package names correctly.P.C. Shyamshankar
* guix/scripts/pack.scm (wrapped-package): now correctly constructs full names of inferior packages. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2019-03-15pack: "-RR" produces PRoot-enabled relocatable binaries.Ludovic Courtès
* gnu/packages/aux-files/run-in-namespace.c (exec_with_proot): New function. (main): When 'clone' fails, call 'rm_rf'. [PROOT_PROGRAM]: When 'clone' fails, call 'exec_with_proot'. * guix/scripts/pack.scm (wrapped-package): Add #:proot?. [proot]: New procedure. [build]: Compile with -DPROOT_PROGRAM when PROOT? is true. * guix/scripts/pack.scm (%options): Set the 'relocatable?' value to 'proot when "-R" is passed several times. (guix-pack): Pass #:proot? to 'wrapped-package'. * tests/guix-pack-relocatable.sh: Use "-RR" on Intel systems that lack user namespace support. * doc/guix.texi (Invoking guix pack): Document -RR.
2019-03-07pack: Add '--save-provenance'.Ludovic Courtès
* guix/scripts/pack.scm (show-help, %options): Add '--save-provenance'. (guix-pack)[manifest-from-args]: Honor it. * doc/guix.texi (Invoking guix pack): Document it.
2019-03-07describe: Add 'package-provenance'.Ludovic Courtès
* guix/scripts/package.scm (package-provenance): Move to... * guix/describe.scm (package-provenance): ... here.
2019-03-04environment: Rename '--inherit' to '--preserve'.Ludovic Courtès
Suggested by Eric Bavier and Ricardo Wurmus. * guix/scripts/environment.scm (show-help, %options): Emit a deprecation warning for "--inherit" and add -E/--preserve. * tests/guix-environment.sh: Adjust accordingly. * doc/guix.texi (Invoking guix environment): Update accordingly.
2019-03-04environment: Remove deprecated -E/--exec option.Ludovic Courtès
* guix/scripts/environment.scm (%options): Remove "--exec", which was deprecated in commit 1de2fe95e017c42aacbaa34f5dab8d48249cc064 in 2015. * tests/guix-environment.sh: Remove use of '-E'.
2019-02-16environment: Add '--inherit'.Ludovic Courtès
* guix/scripts/environment.scm (purify-environment): Add 'white-list' parameter and honor it. (create-environment): Add #:white-list parameter and honor it. (launch-environment): Likewise. (launch-environment/fork): Likewise. (show-help, %options): Add '--inherit'. (guix-environment): Define 'white-list' and pass it to 'launch-environment/fork'. * tests/guix-environment.sh: Test '--inherit'. * doc/guix.texi (Invoking guix environment): Document it.
2019-02-13guix system: List old generations from newest to oldest.Ludovic Courtès
Previously 'guix system switch-generation' or 'delete-generations' would yield a GRUB menu where entries for old generations were in the wrong order (i.e., oldest first.) * guix/scripts/system.scm (reinstall-bootloader): Reverse the list returned by 'generation-numbers'.
2019-02-13guix system: Add 'delete-generations'.Ludovic Courtès
* guix/scripts/package.scm (delete-matching-generations): Export. * guix/scripts/system.scm (show-help): Add 'delete-generations'. (process-command): Honor it. (guix-system): Support it. * doc/guix.texi (Invoking guix system): Document it.
2019-02-12pull: Speed up the new/upgraded package computation.Ludovic Courtès
* guix/scripts/pull.scm (new/upgraded-packages): OLD no longer stores all the versions of each package. Remove 'vhash-fold*' call and reduce the number of 'version>?' calls when computing UPGRADED.
2019-02-12pull: Move profile comparison to 'new/upgraded-packages'.Ludovic Courtès
* guix/scripts/pull.scm (new/upgraded-packages): New procedure, with code formerly in 'display-new/upgraded-packages'. (display-new/upgraded-packages): Use it.
2019-02-12pull: Use 'fold-available-packages' for the current package list.Ludovic Courtès
* guix/scripts/pull.scm (display-profile-news): Use 'fold-available-packages' instead of 'fold-packages' to compute OLD. (profile-package-alist): Use 'inferior-available-packages'.
2019-02-11Avoid name clash with 'build' from (guix store) and (guix status).Ludovic Courtès
Since commit 976ef2d97887d16eab8d4eb9dad811786b04d690, (guix status) exports 'build', which clashes with 'build' from (guix store). * build-aux/run-system-tests.scm: Select 'with-status-verbosity' from (guix status). * guix/scripts/archive.scm: Likewise. * guix/scripts/build.scm: Likewise. * guix/scripts/copy.scm: Likewise. * guix/scripts/environment.scm: Likewise. * guix/scripts/pack.scm: Likewise. * guix/scripts/package.scm: Likewise. * guix/scripts/pull.scm: Likewise. * guix/scripts/system.scm: Likewise.
2019-02-11pack, vm: Fix incorrect use of 'package-transitive-propagated-inputs'.Ludovic Courtès
In practice the error was not triggered because 'package-transitive-propagated-inputs' currently returns the empty list for these two packages. * guix/scripts/pack.scm (gcrypt-sqlite3&co): Remove labels from the result. * gnu/system/vm.scm (gcrypt-sqlite3&co): Likewise.
2019-02-08git: Always use the system certificates by default.Ludovic Courtès
'guix pull' was always doing it, and now '--with-branch' & co. will do it as well. * guix/git.scm (honor-system-x509-certificates!): New procedure. (%certificates-initialized?): New variable. (with-libgit2): Add call to 'honor-system-x509-certificates!'. * guix/scripts/pull.scm (honor-x509-certificates): Call 'honor-system-x509-certificates!' and fall back to 'honor-lets-encrypt-certificates!'.
2019-02-08guix build: '--with-branch' & co. fetch submodules.Ludovic Courtès
* guix/scripts/build.scm (transform-package-source-branch)[replace]: Add 'recursive?' field to the new package.
2019-02-01guix package: '-A' no longer lists deprecated packages.Ludovic Courtès
Fixes a regression introduced in 0ea939fb796fdd4f0d46d3534b2ec6135e0f3dc7. * guix/scripts/package.scm (process-query) <'list-available>: Change #:superseded? to #:deprecated? since that's what 'fold-available-packages' passes.
2019-01-29pull: Default to verbosity level 1.Ludovic Courtès
* guix/scripts/pull.scm (%default-options): Change 'verbosity to 1.
2019-01-28pull: Don't trigger 'hash guix' hint needlessly.Ludovic Courtès
Previously if ~/.config/guix/current/bin was in $PATH, we'd still suggest to run 'hash guix' because we'd compare (which "guix") against /var/guix/profiles/per-user/…. * guix/scripts/pull.scm (build-and-install): Check whether (which "guix") matches PROFILE or its user-friendly variant.
2019-01-25weather: Add '--coverage'.Ludovic Courtès
* guix/scripts/weather.scm (show-help, %options): Add '--coverage'. (package-partition-boundary, package->output-mapping) (substitute-oracle, report-package-coverage-per-system) (report-package-coverage): New procedures. (guix-weather): Honor '--coverage'. * doc/guix.texi (Invoking guix weather): Document it.
2019-01-25refresh: Better account for private and generated packages.Ludovic Courtès
Until now, private and generated packages (e.g., those created by 'texlive-union') we missing from the list passed to 'node-back-edges', which would lead to inaccurate dependent counts. Previously we'd get: $ guix refresh -l texlive-fonts-cm Building the following 80 packages would ensure 116 dependent packages are rebuilt: … Now we have: $ Building the following 240 packages would ensure 597 dependent packages are rebuilt: … * guix/scripts/refresh.scm (list-dependents): Call 'package-closure'.
2019-01-25refresh: Fix format string that would lead '-l' to print incorrect numbers.Ludovic Courtès
The skip "~*" argument was misplaced, leading the number of dependents to be skipped (instead of the number of covering packages.) Thus, we'd get: $ guix refresh -l ocaml4.02-ppx-deriving@4.1 Building the following package would ensure 1 dependent packages are rebuilt: bap@1.3.0 instead of: Building the following package would ensure 26 dependent packages are rebuilt: bap@1.3.0 * guix/scripts/refresh.scm (list-dependents): Move "~*" in the right place, to skip (length covering) rather than (length dependents).
2019-01-25weather: Ignore deprecated packages but not hidden packages.Ludovic Courtès
* guix/scripts/weather.scm (all-packages): Pass #:select? to 'fold-packages'.
2019-01-22offload: 'status' reports the time difference.Ludovic Courtès
* guix/scripts/offload.scm (check-machine-status): Report the time difference for each MACHINE.
2019-01-21store: Rename '&nix-error' to '&store-error'.Ludovic Courtès
* guix/store.scm (&nix-error): Rename to... (&store-error): ... this, and adjust users. (&nix-connection-error): Rename to... (&store-connection-error): ... this, and adjust users. (&nix-protocol-error): Rename to... (&store-protocol-error): ... this, adjust users. (&nix-error, &nix-connection-error, &nix-protocol-error): Define these condition types and their getters as deprecrated aliases. * build-aux/run-system-tests.scm, guix/derivations.scm, guix/grafts.scm, guix/scripts/challenge.scm, guix/scripts/graph.scm, guix/scripts/lint.scm, guix/scripts/offload.scm, guix/serialization.scm, guix/ssh.scm, guix/tests.scm, guix/ui.scm, tests/derivations.scm, tests/gexp.scm, tests/guix-daemon.sh, tests/packages.scm, tests/store.scm, doc/guix.texi: Adjust to use the new names.
2019-01-20pull: Add missing import.Ludovic Courtès
Fixes <https://bugs.gnu.org/34136>. Reported by Pierre Neidhardt <mail@ambrevar.xyz>. Fixes wrong-type-arg crash of "guix pull -p /does-not-exist -l". * guix/scripts/pull.scm: Use (srfi srfi-34).
2019-01-20lint: check-source-unstable-tarball: Don't assume uri length.Efraim Flashner
* guix/scripts/lint.scm (check-source-unstable-tarball): Replace third with code to make sure there are enough elements to check.