summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* publish: Add '--listen'.Ludovic Courtès2015-05-12
| | | | | | | | | | | * guix/scripts/publish.scm (show-help, %options): Add --listen. (getaddrinfo*): New procedure. (%default-options): Add 'address'. (open-server-socket): Replace 'addr' and 'port' with 'address', a sockaddr. (guix-publish): Adjust accordingly. Augment "publishing" message with the actual address. * doc/guix.texi (Invoking guix publish): Document it.
* publish: Add '--user' option.Ludovic Courtès2015-05-12
| | | | | | | | | | | | * guix/scripts/publish.scm (show-help): Add --user. (%options): Likewise. (run-publish-server): Change 'port' parameter to 'socket'. Pass #:socket instead of #:addr and #:port to 'run-server'. Update caller accordingly. (open-server-socket, gather-user-privileges): New procedures. (guix-publish): Use them. Force %PRIVATE-KEY and %PUBLIC-KEY early on. Warn when running as root. * doc/guix.texi (Invoking guix publish): Document --user.
* Remove assorted Guile 2.0.5 workarounds.Ludovic Courtès2015-05-10
| | | | | | | | * guix/scripts/authenticate.scm (%default-port-conversion-strategy): Remove. * guix/scripts/substitute.scm (fetch): Remove 2.0.5 special cases. * guix/serialization.scm (write-file): Remove 'scandir' workaround. * guix/ui.scm (command-files): Likewise.
* download: Work around Guile small-receive-buffer bug.Ludovic Courtès2015-05-06
| | | | | | | | | | | | | | | | Previously, code using directly (guix build download) was still affected by <http://bugs.gnu.org/15368>. This includes source derivations, the 'guix download' command, and (guix gnu-maintenance). 'guix substitute' was unaffected since it used (guix http-client), which already had the fix. * guix/http-client.scm (open-socket-for-uri): Remove. (http-fetch): Remove #:buffered? argument to 'open-socket-for-uri'; use 'setvbuf' instead. * guix/scripts/substitute.scm (fetch): Likewise. * guix/build/download.scm (open-socket-for-uri): New procedure, taken from guix/http-client.scm, but without the #:buffered? parameter.
* environment: Move iteration outside of 'for-each-search-path'.Ludovic Courtès2015-05-05
| | | | | | | | | | | * guix/search-paths.scm (search-path-definition): New procedure. * guix/scripts/environment.scm (for-each-search-path): Rename to... (evaluate-input-search-paths): ... this. Remove 'proc' and 'pure?' parameters, and return directly the list of search-path/value pairs. (create-environment): Use 'for-each' and 'evaluate-input-search-paths' instead of 'for-each-search-path'. (show-search-paths): Use 'for-each', 'search-path-definition', and 'evaluate-search-paths' instead of 'for-each-search-path'.
* environment: Use 'evaluate-search-paths'.Ludovic Courtès2015-05-05
| | | | | | | | | This allows 'guix environment' to correctly handle non-directory and/or pattern search-path specifications, such as that for 'XML_CATALOG_FILES'. * guix/scripts/environment.scm (for-each-search-path): Use 'evaluate-search-paths' instead of 'search-path-as-list' & co.
* search-paths: Define the 'PATH' environment variable.Ludovic Courtès2015-05-05
| | | | | * guix/search-paths.scm ($PATH): New variable. * guix/scripts/environment.scm (for-each-search-path): Use it.
* search-paths: 'evaluate-search-paths' can be passed a list of directories.Ludovic Courtès2015-05-05
| | | | | | | * guix/search-paths.scm (evaluate-search-paths): Change 'directory' to 'directories', and adjust 'search-path-as-list' accordingly. * guix/scripts/package.scm (search-path-environment-variables): Adjust call accordingly.
* environment: Use (guix search-paths).Ludovic Courtès2015-05-05
| | | | | * guix/scripts/environment.scm: Use (guix search-paths). Fixes a regression introduced in e89431b.
* search-paths: 'evaluate-search-paths' now returns spec/value pairs.Ludovic Courtès2015-05-04
| | | | | | | * guix/search-paths.scm (evaluate-search-paths): Return specification/value pairs instead of variable/value pairs. * guix/scripts/package.scm (search-path-environment-variables): Adjust accordingly. Pass #:separator to 'environment-variable-definition'.
* search-paths: Add 'environment-variable-definition'.Ludovic Courtès2015-05-04
| | | | | * guix/search-paths.scm (environment-variable-definition): New variable. * guix/scripts/package.scm (search-path-environment-variables): Use it.
* search-paths: Add 'evaluate-search-paths', from (guix scripts package).Ludovic Courtès2015-05-04
| | | | | | | | | * guix/scripts/package.scm (with-null-error-port, evaluate-search-paths): Move to... * guix/search-paths.scm: ... here. * guix/utils.scm (string-tokenize*): Move to... * guix/search-paths.scm: ... here. * tests/utils.scm ("string-tokenize*"): Adjust accordingly.
* Move search path specifications to (guix search-paths).Ludovic Courtès2015-05-04
| | | | | | | | | | | | | * guix/packages.scm (<search-path-specification>, search-path-specification->sexp, sexp->search-path-specification): Move to... * guix/search-paths.scm: ... here. New file. * Makefile.am (MODULES): Add it. * guix/build-system/cmake.scm, guix/build-system/glib-or-gtk.scm, guix/build-system/gnu.scm, guix/build-system/haskell.scm, guix/build-system/perl.scm, guix/build-system/python.scm, guix/build-system/ruby.scm, guix/build-system/waf.scm, guix/profiles.scm, guix/scripts/package.scm: Use it.
* substitute: Increase TTL from 24h to 36h.Ludovic Courtès2015-05-04
| | | | * guix/scripts/substitute.scm (%narinfo-ttl): Increase to 36h.
* guix: build: Fix indentation for --sources in help output.Eric Bavier2015-05-04
| | | | | * guix/scripts/build.scm (show-help)[--sources]: Make indentation consistent with other long options.
* guix package: Introduce 'evaluate-search-paths'.Ludovic Courtès2015-05-04
| | | | | | * guix/scripts/package.scm (evaluate-search-paths): New procedure, with most of the code formerly in 'search-path-environment-variables'. (search-path-environment-variables): Use it.
* guix package: Move profile cleaning out of 'search-path-environment-variables'.Ludovic Courtès2015-05-04
| | | | | | | | * guix/scripts/package.scm (user-friendly-profile): New procedure. (search-path-environment-variables): Remove 'profile' local variable. (display-search-paths): Explicitly call 'user-friendly-profile' for the argument to 'search-path-environment-variables'. (guix-package)[process-query]: Likewise.
* guix: build: Add transitive source building.Eric Bavier2015-05-02
| | | | | | | * guix/scripts/build.scm (%options, options->derivations): Add --sources option. * doc/guix.texi (Invoking guix build): Document --sources option. * tests/guix-build.sh: Add tests.
* profiles: Store search paths in manifests.Ludovic Courtès2015-05-02
| | | | | | | | | | | | | | | | | | | Discussed in <http://bugs.gnu.org/20255>. * guix/packages.scm (sexp->search-path-specification): New variable. * guix/profiles.scm (<manifest-entry>)[search-paths]: New field. (package->manifest-entry): Initialize it. (manifest->gexp): Match it. Wrap #$deps in (propagated-inputs ...). Emit (search-paths ...). Increment version. (find-package): New procedure. (sexp->manifest)[infer-search-paths]: New procedure. Use it to initialize the 'search-paths' field for versions 0 and 1. Add case for version 2. * guix/scripts/package.scm (search-path-environment-variables)[manifest-entry->package]: Remove. Use 'manifest-entry-search-paths' instead of 'manifest-entry->package' plus 'package-native-search-paths'. * tests/profiles.scm ("profile-manifest, search-paths"): New test.
* substitute: Fix file descriptor leak in 'http-multiple-get'.Ludovic Courtès2015-05-01
| | | | | | | | In practice we would not leak much since we reconnect after ~100 requests (with nginx running on hydra.gnu.org.) * guix/scripts/substitute.scm (http-multiple-get): Call 'close-port' before 'connect'.
* guix package: Fix 'readlink*' implementation.Ludovic Courtès2015-04-19
| | | | | * guix/scripts/package.scm (readlink*): Fix to handle symlinks with relative targets. Taken from ld-wrapper2.in.
* guix package: -A and -s take supported systems into account.Ludovic Courtès2015-04-19
| | | | | | | | | | * guix/scripts/package.scm (guix-package)[process-query] <list-available>: Restrict results to packages matching 'supported-package?". * guix/ui.scm (package->recutils): Print "systems:". * tests/guix-package.sh: Add tests. * doc/guix.texi (Invoking guix package): Adjust description of '--list-available' accordingly.
* Merge branch 'master' into core-updatesMark H Weaver2015-04-17
|\ | | | | | | | | | | Conflicts: gnu-system.am gnu/packages/gstreamer.scm
| * profiles: Generalize "hooks" for 'profile-derivation'.Ludovic Courtès2015-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/profiles.scm (info-dir-file): Remove (null? (manifest-entries manifest)) test. (ca-certificate-bundle): Likewise. (ghc-package-cache-file): Turn 'if' into 'and', and remove second arm. (%default-profile-hooks): New variable. (profile-derivation): Remove #:info-dir?, #:ghc-package-cache?, and #:ca-certificate-bundle?. Add #:hooks. Iterate over HOOKS. Adjust 'inputs' accordingly. * guix/scripts/package.scm (guix-package): Adjust 'profile-derivation' call accordingly. * tests/packages.scm ("--search-paths with pattern"): Likewise. * tests/profiles.scm ("profile-derivation", "profile-derivation, inputs"): Likewise.
| * guix package: Add '--do-not-upgrade' option.Mark H Weaver2015-04-14
| | | | | | | | | | | | | | | | | | * guix/scripts/package.scm (%options): Add the '--do-not-upgrade' option. (show-help): Document it. (options->installable): Add 'do-not-upgrade-regexps' variable. Use it in 'packages-to-upgrade'. * doc/guix.texi (Invoking guix package): Document the '--do-not-upgrade' option.
* | refresh: Allow users to refer to specific package versions.Ludovic Courtès2015-04-16
| | | | | | | | | | | | | | * guix/scripts/refresh.scm (guix-refresh): Use 'specification->package' instead of 'find-packages-by-name'. This allows users to specify things like "qt-4.8.6". * doc/guix.texi (Invoking guix refresh): Add an example.
* | lint: Add a 'derivation' checker.Ludovic Courtès2015-04-13
| | | | | | | | | | | | * guix/scripts/lint.scm (check-derivation): New procedure. (%checkers): Add 'derivation' checker. * tests/lint.scm ("derivation: invalid arguments"): New test.
* | lint: Report patches that cannot be found.Ludovic Courtès2015-04-10
| | | | | | | | | | * guix/scripts/lint.scm (check-patch-file-names): Wrap body in 'guard'. * tests/lint.scm ("patches: not found"): New test.
* | lint: Rename 'check-patches' to 'check-patch-file-names'.Ludovic Courtès2015-04-10
| | | | | | | | | | | | | | * guix/scripts/lint.scm (check-patches): Rename to... (check-patch-file-names): ... this. Rename 'filename' to 'file'. (%checkers): Adjust accordingly. * tests/lint.scm ("patches: file names"): Likewise.
* | Merge branch 'master' into core-updatesLudovic Courtès2015-04-09
|\|
| * profiles: Generate GHC's package database cache.Federico Beffa2015-04-08
| | | | | | | | | | | | | | | | | | | | * guix/profiles.scm (ghc-package-cache-file): New procedure. (profile-derivation): Add 'ghc-package-cache?' keyword argument. If true (the default), add the result of 'ghc-package-cache-file' to 'inputs'. * guix/scripts/package.scm (guix-package)[process-actions]: Pass #:ghc-package-cache? to 'profile-generation'. * tests/packages.scm ("--search-paths with pattern"): Likewise. * tests/profiles.scm ("profile-derivation"): Likewise.
| * import: Add hackage importer.Federico Beffa2015-04-08
| | | | | | | | | | | | | | * guix/scripts/import.scm (importers): Add hackage. * guix/scripts/import/hackage.scm: New file. * po/guix/POTFILES.in: Add guix/scripts/import.scm. * doc/guix.texi: Add section on 'hackage' importer.
* | Merge branch 'master' into core-updates宋文武2015-04-08
|\|
| * guix package: Avoid 'exit' calls in 'delete-matching-generations'.Ludovic Courtès2015-04-06
| | | | | | | | | | | | * guix/scripts/package.scm (delete-matching-generations): Remove call to 'exit' when PATTERN is "0". Call 'leave' instead of 'exit' when (null-list? number).
| * guix package: Never remove the current generation and warn about it.Ludovic Courtès2015-04-06
| | | | | | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/19978>. Reported by taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer). * guix/scripts/package.scm (delete-matching-generations): Warn when CURRENT is in NUMBERS, and always remove it before calling 'delete-generations'. * tests/guix-package.sh: Add --switch-generation=2 invocation before --delete-generations=3 invocation. Add --delete-generations=1.. test case.
| * guix package: Move generation deletion to its own procedure.Ludovic Courtès2015-04-06
| | | | | | | | | | | | | | * guix/scripts/package.scm (delete-matching-generations): New procedure, with code formerly found... (guix-package)[process-actions]: ... here. Use it. Remove 'current-generation-number'.
| * scripts: Add 'publish' command.David Thompson2015-04-04
| | | | | | | | | | | | | | | | | | * guix/scripts/publish.scm: New file. * po/guix/POTFILES.in: Add it. * tests/publish.scm: New file. * Makefile.am (MODULES): Add script module. (SCM_TESTS): Add test module. * doc/guix.texi ("Invoking guix publish"): New node.
* | ui: Add 'report-load-error'.Ludovic Courtès2015-04-07
|/ | | | | | * guix/scripts/system.scm (read-operating-system): Replace error handling code by a call to 'report-load-error'. * guix/ui.scm (report-load-error): New procedure.
* substitute: Rename cache directory from "substitute-binary" to "substitute".Ludovic Courtès2015-03-25
| | | | | | | * guix/scripts/substitute.scm (%narinfo-cache-directory): Change "substitute-binary" to "substitute". * tests/store.scm ("substitute query"): Likewise. * tests/substitute.scm (call-with-narinfo): Likewise.
* Rename 'guix substitute-binary' to 'guix substitute'.Ludovic Courtès2015-03-25
| | | | | | | | | | | | | | | | | | | * guix/scripts/substitute-binary.scm: Rename to... * guix/scripts/substitute.scm: ... this. Adjust module name, entry point, comments, and help string accordingly. * nix/scripts/substitute-binary.in: Rename to... * nix/scripts/substitute.in: ... this. * pre-inst-env.in (NIX_SUBSTITUTERS): Adjust accordingly. * tests/substitute-binary.scm: Rename to... * tests/substitute.scm: ... this. Adjust references to (guix scripts substitute) accordingly. * guix/ui.scm (show-guix-help)[internal?]: Change "substitute-binary" to "substitute". * Makefile.am (MODULES, SCM_TESTS): Adjust to file renames. * daemon.am (nodist_pkglibexec_SCRIPTS): Likewise. * config-daemon.ac: Likewise. * guix/tests.scm (call-with-derivation-narinfo): Adjust comments and docstring.
* 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.