summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* substitute-binary: Remove thread-safe 'regexp-exec' wrapper.Ludovic Courtès2015-03-23
| | | | * guix/scripts/substitute-binary.scm: Remove 'regexp-exec' setting.
* substitute-binary: Pipeline HTTP requests instead of using threads.Ludovic Courtès2015-03-23
| | | | | | | | | | | * guix/scripts/substitute-binary.scm (fetch-narinfo, %lookup-threads, n-par-map*): Remove. (narinfo-cache-file, cached-narinfo, cache-narinfo!, narinfo-request, http-multiple-get, read-to-eof, fetch-narinfos, lookup-narinfos, narinfo-from-file): New procedures. (lookup-narinfo): Rewrite in terms of 'lookup-narinfos'. (guix-substitute-binary): Use 'lookup-narinfos' instead of 'lookup-narinfo'.
* substitute-binary: Allow callers to specify the size of a narinfo.Ludovic Courtès2015-03-23
| | | | | * guix/scripts/substitute-binary.scm (read-narinfo): Add #:size parameter and honor it.
* guix package: '-s' sorts packages by name, then by version.Ludovic Courtès2015-03-20
| | | | | | | | | | | | | Before that it would sort them by name only, so the order in which two packages with the same name but a different version would appear was non-deterministic. Reported by Tomáš Čech <sleep_walker@gnu.org>. * guix/scripts/package.scm (find-packages-by-description)[version<?]: New variable. Change the 2nd argument to 'sort' to use 'string-compare' and resort to 'version<?' when P1 and P2 have the same name.
* guix package: '-s' displays different packages that have the same location.Ludovic Courtès2015-03-20
| | | | | | | | | | | | | | | | | Before that, 'guix package -s foobarbaz' would display only one package when several match but they have the same location (which is common when using 'inherit'.) The original rationale was given at <http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00280.html> but it was arguably misguided because it led to "real" packages being hidden. Reported by Tomáš Čech <sleep_walker@gnu.org>. * guix/scripts/package.scm (find-packages-by-description)[same-location?]: Remove. Remove call to 'delete-duplicates'.
* lint: Report details about FTP errors.Ludovic Courtès2015-03-19
| | | | | | | * guix/scripts/lint.scm (probe-uri) <'ftp>: Pass more information about failures alongside 'ftp-response. (validate-uri) <ftp-response>: Handle it, and adjust "not reachable" message accordingly.
* lint: Change misleading variable name.Ludovic Courtès2015-03-19
| | | | * guix/scripts/lint.scm (probe-uri) <'ftp>: Rename 'port' to 'conn'.
* substitute-binary: Fix recently-introduced regression.Ludovic Courtès2015-03-18
| | | | | * guix/scripts/substitute-binary.scm (%cache-url): Fix regression introduced in 41c45e7.
* store: Add preliminary support for client-supplied substitute URLs.Ludovic Courtès2015-03-18
| | | | | | | | * guix/store.scm (set-build-options): Rename #:binary-caches to #:substitute-urls. Actually pass it in 'pairs' under the "substitute-urls" key. * guix/scripts/substitute-binary.scm (%cache-url): Add comment for "untrusted-substitute-urls".
* scripts: environment: Improve error messages.David Thompson2015-03-16
| | | | | * guix/scripts/environment.scm (guix-environment): Wrap procedure body with error handling form.
* lint: Add tests for the 'source' checker.Ludovic Courtès2015-03-05
| | | | | | * guix/scripts/lint.scm (check-source): Export. * tests/lint.scm (%null-sha256): New procedure. ("source: 200", "source: 404"): New tests.
* tests: Remove dependency on 'glibc-utf8-locales' for profile tests.Ludovic Courtès2015-03-04
| | | | | | | | | | | This fixes a regression introduced in commit 536c3ee. * guix/profiles.scm (ca-certificate-bundle): When MANIFEST is empty, make a trivial derivation. * guix/scripts/package.scm (guix-package)[process-actions]: Pass #:ca-certificate-bundle? to 'profile-generation'. * tests/packages.scm ("--search-paths with pattern"): Likewise. * tests/profiles.scm ("profile-derivation"): Likewise.
* ui: Factorize command-line + env. var. option parsing.Ludovic Courtès2015-02-26
| | | | | | | | | | | | | | * guix/ui.scm (%default-argument-handler, parse-command-line): New procedures. (environment-build-options): Make private. * guix/scripts/archive.scm (guix-archive)[parse-options, parse-options-from]: Remove. Use 'parse-command-line' instead. * guix/scripts/build.scm (guix-build): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/package.scm (guix-package): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * tests/ui.scm (with-environment-variable): New macro. ("parse-command-line"): New test.
* guix system: Honor '--no-grub'.Ludovic Courtès2015-02-24
| | | | | | | | Reported by Alex Kost <alezost@gmail.com> at <http://lists.gnu.org/archive/html/guix-devel/2015-02/msg00564.html>. * guix/scripts/system.scm (%options) <no-grub>: Use 'alist-cons' instead of 'alist-delete'.
* lint: handle FTP URIs.Cyril Roelandt2015-02-10
| | | | * guix/scripts/lint.scm (probe-uri): handle FTP URIs.
* guix package: Make custom profiles actual indirect roots.Ludovic Courtès2015-02-06
| | | | | | | | | | | | | Before that, any profile generation built when '-p' is used would effectively become a permanent GC root because the symlink in /var/guix/gcroots/auto would point directly to /gnu/store/...-profile. * guix/scripts/package.scm (maybe-register-gc-root): Rename to... (register-gc-root): ... this. Remove conditional, and replace call to 'canonicalize-path' with (string-append (getcwd) "/" ...). (guix-package): Call 'register-gc-root' only if PROFILE is different from %CURRENT-PROFILE. * tests/guix-package.sh: Add test case.
* pull: Always install the ~/.config/guix/latest symlink.Ludovic Courtès2015-02-06
| | | | | | | | | | Before that, if two users on the same machine ran 'guix pull', the second one would have the "Guix already up to date" message and their ~/.config/guix/latest link would be left unchanged---effectively preventing them from updating. * guix/scripts/pull.scm (build-and-install): Install the 'latest' symlink regardless of whether TO-DO? is true or false.
* offload: Better report failure to create the GC root directory.Ludovic Courtès2015-02-05
| | | | | | | | Suggested by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>. * guix/scripts/offload.scm (register-gc-root)[script]: Replace 'false-if-exception' with a finer-grain 'system-error handler. Provide the name of MACHINE in 'leave' error message.
* offload: Warn about SSH client issues.Ludovic Courtès2015-02-05
| | | | | | | | Suggested by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>. * guix/scripts/offload.scm (remote-pipe): Remove unneeded 'catch'. (machine-load): Check the exit value upon (close-pipe pipe). Call 'warning' when it is non-zero.
* guix: environment: Consider all package outputs.David Thompson2015-02-03
| | | | | | * guix/scripts/environment.scm (for-each-search-path): Iterate over all derivation output paths. (packages->transitive-inputs): Process inputs that specify an output, too.
* lint: Fix argument parsing when several packages are specified.Ludovic Courtès2015-01-28
| | | | | | | | * guix/scripts/lint.scm (%options) <--checkers>: Remove 'arg-handler' parameter, and return a single value. (guix-lint)[parse-options]: Remove 'arg-handler' parameter from handlers. Remove second seed to 'args-fold*'. * tests/guix-lint.sh: Add test.
* substitute-binary: Let the user know when the cache is being updated.Ludovic Courtès2015-01-26
| | | | | * guix/scripts/substitute-binary.scm (open-cache*): New macro. (guix-substitute-binary): Use it instead of (delay (open-cache ...)).
* guix lint: Make the 'source' checker happy if at least one URI is valid.Ludovic Courtès2015-01-26
| | | | | | | | Before that it would check all the URIs of each package. * guix/scripts/lint.scm (validate-uri): Really return #f on failure and #t otherwise. (check-source): Replace 'for-each' with 'any'.
* lint: add 'source' checker.Cyril Roelandt2015-01-25
| | | | | * guix/scripts/lint.scm (validate-uri?): New procedure. (%checkers): Add 'source' checker
* guix system: Improve error messages.Ludovic Courtès2015-01-22
| | | | | | * guix/ui.scm (report-error): Export. * guix/scripts/system.scm (read-operating-system): Report syntax errors using standard GNU format. Report other errors using 'display-error'.
* guix package: Avoid spurious warnings from 'find-files'.Ludovic Courtès2015-01-20
| | | | | | | | Reported by Andreas Enge <andreas@enge.fr>. * guix/scripts/package.scm (with-null-error-port): New macro. (search-path-environment-variables): Wrap 'search-path-as-list' call in 'with-null-error-port'.
* guix archive: Add -r/--recursive.Ludovic Courtès2015-01-17
| | | | | | | * guix/scripts/archive.scm (show-help, %options): Add -r/--recursive. (export-from-store): Pass #:recursive? to 'export-paths'. * doc/guix.texi (Invoking guix archive): Add -r in Emacs example. Add example with ~/.guix-profile. Document -r/--recursive.
* guix archive: Remove unused -r/--root option.Ludovic Courtès2015-01-17
| | | | * guix/scripts/archive.scm (%options): Remove -r/--root.
* Merge branch 'core-updates'Ludovic Courtès2015-01-16
|\ | | | | | | | | Conflicts: gnu/packages/bootstrap.scm
| * Merge branch 'master' into core-updatesMark H Weaver2015-01-11
| |\
| * | guix package: Follow symlinks for pattern search paths.Ludovic Courtès2015-01-03
| | | | | | | | | | | | | | | | | | * guix/scripts/package.scm (search-path-environment-variables): Add local 'files' variable. * tests/packages.scm ("--search-paths with pattern"): New test.
| * | Merge branch 'master' into core-updatesMark H Weaver2014-12-30
| |\ \
| * | | guix package: Use 'search-path-as-list' instead of custom code.Ludovic Courtès2014-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This will handle the new 'file-type' and 'file-pattern' fields correctly. * guix/scripts/package.scm (search-path-environment-variables)[search-path-definition]: Rewrite in terms of 'search-path-as-list'.
| * | | utils: Export 'search-path-as-list'.Ludovic Courtès2014-12-27
| | | | | | | | | | | | | | | | | | | | * guix/build/utils.scm (search-path-as-list): Make public. * guix/scripts/environment.scm (for-each-search-path): Use it.
| * | | packages: Add 'file-type' field to 'search-path-specification'.Ludovic Courtès2014-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/18033>. * guix/packages.scm (<search-path-specification>): Rename 'directories' field to 'files'. Add 'file-type'. (search-path-specification->sexp): Honor 'file-type'. * gnu/packages/autotools.scm, gnu/packages/bootstrap.scm, gnu/packages/cross-base.scm, gnu/packages/games.scm, gnu/packages/gcc.scm, gnu/packages/glib.scm, gnu/packages/guile.scm, gnu/packages/man.scm, gnu/packages/perl.scm, gnu/packages/pkg-config.scm, gnu/packages/python.scm, gnu/packages/ruby.scm, gnu/packages/xfce.scm: Change 'directories' to 'files'. * tests/packages.scm ("search paths"): Change 'directories' field to 'files'. * guix/scripts/environment.scm (for-each-search-path): Likewise.
* | | | monads: Move '%store-monad' and related procedures where they belong.Ludovic Courtès2015-01-14
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This turns (guix monads) into a generic module for monads, and moves the store monad and related monadic procedures in their corresponding module. * guix/monads.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file, package-file, package->derivation, package->cross-derivation, origin->derivation, imported-modules, compiled, modules, built-derivations, run-with-store): Move to... * guix/store.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file): ... here. (%guile-for-build): New variable. (run-with-store): Moved from monads.scm. Remove default value for #:guile-for-build. * guix/packages.scm (default-guile): Export. (set-guile-for-build): New procedure. (package-file, package->derivation, package->cross-derivation, origin->derivation): Moved from monads.scm. * guix/derivations.scm (%guile-for-build): Remove. (imported-modules): Rename to... (%imported-modules): ... this. (compiled-modules): Rename to... (%compiled-modules): ... this. (built-derivations, imported-modules, compiled-modules): New procedures. * gnu/services/avahi.scm, gnu/services/base.scm, gnu/services/dbus.scm, gnu/services/dmd.scm, gnu/services/networking.scm, gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system/install.scm, gnu/system/linux-initrd.scm, gnu/system/shadow.scm, guix/download.scm, guix/gexp.scm, guix/git-download.scm, guix/profiles.scm, guix/svn-download.scm, tests/monads.scm: Adjust imports accordingly. * guix/monad-repl.scm (default-guile-derivation): New procedure. (store-monad-language, run-in-store): Use it. * build-aux/hydra/gnu-system.scm (qemu-jobs): Add explicit 'set-guile-for-build' call. * guix/scripts/archive.scm (derivation-from-expression): Likewise. * guix/scripts/build.scm (options/resolve-packages): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * doc/guix.texi (The Store Monad): Adjust module names accordingly.
* | | import: Add CPAN importer.Eric Bavier2015-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/import/cpan.scm, guix/scripts/import/cpan.scm, tests/cpan.scm: New files. * Makefile.am (MODULE)[HAVE_GUILE_JSON]: Add them. * guix/scripts/import.scm (importers): Add cpan. * doc/guix.texi (Requirements): Mention `guix import cpan` as a user of guile-json. (Invoking guix import): Document new `guix import cpan` command.
* | | substitute-binary: Micro-optimize 'narinfo-sha256'.Ludovic Courtès2015-01-09
| |/ |/| | | | | | | | | | | | | * guix/scripts/substitute-binary.scm (narinfo-signature->canonical-sexp): Change "~a" to "~s" in error message. (%signature-line-rx): Remove. (narinfo-sha256): Use 'string-contains' instead of 'regexp-exec', and 'string-take' instead of 'match:substring'.
* | lint: Add tests for the 'home-page' checker.Ludovic Courtès2014-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by Cyril Roelandt <tipecaml@gmail.com>. * tests/lint.scm (%http-server-port, %http-server-socket, %local-url, stub-http-server): New variables. (http-write, call-with-http-server): New procedures. (with-http-server): New macro. ("home-page: wrong home-page", "home-page: invalid URI", "home-page: host not found", "home-page: Connection refused", "home-page: 200", "home-page: 404"): New tests. * guix/scripts/lint.scm (check-home-page): Export.
* | lint: Report on the package being checked.Ludovic Courtès2014-12-28
| | | | | | | | | | | | * guix/scripts/lint.scm (run-checkers): Check whether (current-error-port) is a tty, and print the package being checked and the checker currently running when it is.
* | lint: Add 'home-page' checker.Ludovic Courtès2014-12-28
|/ | | | | | * guix/build/download.scm (open-connection-for-uri): Export. * guix/scripts/lint.scm (probe-uri, check-home-page): New procedures. (%checkers): Add 'home-page' checker.
* substitute-binary: Add missing newline in download progress report.Ludovic Courtès2014-12-09
| | | | | | | | Fixes <http://bugs.gnu.org/19313>. Reported by rekado <rekado@elephly.net>. * guix/scripts/substitute-binary.scm (guix-substitute-binary) <--substitute>: Add 'newline' call.
* system: Don't make /boot/grub/grub.cfg a symlink to the store.Ludovic Courtès2014-12-09
| | | | | | | | | | | | | | | This would not work when /boot is a separate partition, as reported by Nikita Karetnikov <nikita@karetnikov.org> in <http://bugs.gnu.org/19220>. This fixes a regression introduced in 39d1f82. * gnu/build/install.scm (install-grub): Copy GRUB.CFG instead of symlinking it, as was the case before 39d1f82. * gnu/build/vm.scm (register-grub.cfg-root): Add 'grub.cfg' parameter. Make it a permanent GC root instead of an indirect GC root. (initialize-hard-disk): Adjust accordingly. * guix/scripts/system.scm (install-grub*): Replace use of 'add-indirect-root' by the addition of a permanent GC root in %GC-ROOTS-DIRECTORY.
* guix system: Fix typo affecting 'guix system init'.Ludovic Courtès2014-12-07
| | | | | | | | | Fixes <http://bugs.gnu.org/19279>. Fixes a regression introduced in cc7fa59. Reported by Tomas Cech <tcech@suse.cz>. * guix/scripts/system.scm (install): Fix order of arguments to 'lift' and 'lift2'.
* guix: scripts: Parse $GUIX_BUILD_OPTIONS separately.nebuli2014-12-06
| | | | | | | | | | | | | | | | | | | | Appending to "raw" args broke optional parameters in 'guix package -I' and 'guix package -A', and possibly other places. Therefore, switch to parsing each set of options on its own and append resulting alists together afterwards. * guix/scripts/archive.scm (parse-options-from): Rename from (parse-options) and add explicit argument. New form of (parse-options) using its old algorithm via -from function. * guix/scripts/build.scm: Ditto. * guix/scripts/environment.scm: Ditto. * guix/scripts/package.scm: Ditto. * guix/scripts/system.scm: Ditto. * tests/guix-package.sh: Add test. * doc/guix.texi (Invoking guix build): Make it clear that the options are parsed independently. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* system: Make /boot/grub/grub.cfg an indirect GC root.Ludovic Courtès2014-12-04
| | | | | | | | | | Fixes <http://bugs.gnu.org/19160>. * guix/scripts/system.scm (install-grub*): Make /boot/grub/grub.cfg an indirect GC root. * gnu/build/install.scm (install-grub): Make TARGET a symlink. * gnu/build/vm.scm (register-grub.cfg-root): New procedure. (initialize-hard-disk): Use it.
* guix system: Factorize 'grub-install' error handling, and use more 'mbegin'.Ludovic Courtès2014-12-04
| | | | | | * guix/scripts/system.scm (install-grub*): New procedure. (install): Use it, and use 'mwhen?'. (perform-action) <reconfigure>: Likewise.
* guix system: Use 'mbegin' for 'install'.Ludovic Courtès2014-12-02
| | | | | * guix/scripts/system.scm (install): Use 'mbegin'. Lift FORMAT and POPULATE-ROOT-FILE-SYSTEM, and use the result.
* guix: scripts: Add GUIX_BUILD_OPTIONS environment handling.nebuli2014-11-30
| | | | | | | | | | | | | | | * doc/guix.texi (Invoking guix build): Mention 'GUIX_BUILD_OPTIONS'. * guix/scripts/archive.scm: (append args (environment-build-options)). * guix/scripts/build.scm: Ditto. * guix/scripts/environment.scm: Ditto. * guix/scripts/package.scm: Ditto. * guix/scripts/system.scm: Ditto. * guix/ui.scm (environment-build-options): New function. * guix/utils.scm (arguments-from-environment-variable): New function. * tests/guix-build.sh: Add tests. * test-env.in: Unset GUIX_BUILD_OPTIONS. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* substitute-binary: Change "unresponsive" to "slow".Ludovic Courtès2014-11-28
| | | | | | * guix/scripts/substitute-binary.scm (fetch): Change "unresponsive" to "somewhat slow". I'm being told that the former is often misunderstood as "broken".