summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* guix build: '--with-source' correctly matches versioned file names.Ludovic Courtès2016-03-23
| | | | | | | | * guix/scripts/build.scm: Use the right 'package-name->name+version' procedure. Fixes a regression introduced in 1b846da8c372bee78851439fd9e72b2499115e5a. * tests/scripts-build.scm ("options->transformation, with-source, with version"): New test.
* derivations: Raise an error when a module file is not found.Ludovic Courtès2016-03-23
| | | | | | | | | | | | Suggested by Jookia. * guix/derivations.scm (&file-search-error): New error condition. (search-path*): Raise it when 'search-path' returns #f. * guix/gexp.scm (search-path*): Remove. * guix/ui.scm (call-with-error-handling): Add case for 'file-search-error?'. * tests/derivations.scm ("build-expression->derivation and invalid module name"): New test.
* derivations: Add 'module->source-file-name'.Ludovic Courtès2016-03-23
| | | | | | * guix/derivations.scm (module->source-file-name): New procedure. (%imported-modules): Use it. * guix/gexp.scm (imported-modules): Likewise.
* substitute: Gracefully handle TLS errors.Ludovic Courtès2016-03-23
| | | | | * guix/scripts/substitute.scm (with-networking): Use 'match-lambda*' and add case for 'gnutls-error'.
* import: cran: Accept single URL in addition to single URL.Ricardo Wurmus2016-03-22
| | | | | * guix/import/cran.scm (package->upstream-name): Match single URL in addition to list of URLs.
* build-system/gnu: Add #:disallowed-references.Ludovic Courtès2016-03-20
| | | | | | * guix/build-system/gnu.scm (gnu-build): Add #:disallowed-references and honor it. (gnu-cross-build): Likewise.
* gexp: Add #:disallowed-references.Ludovic Courtès2016-03-20
| | | | | | | | * guix/gexp.scm (gexp->derivation): Add #:disallowed-references and honor it. * tests/gexp.scm ("gexp->derivation #:disallowed-references, allowed") ("gexp->derivation #:disallowed-references"): New tests. * doc/guix.texi (G-Expressions): Adjust accordingly.
* derivations: Add #:disallowed-references.Ludovic Courtès2016-03-20
| | | | | | | | | * guix/derivations.scm (derivation): Add #:disallowed-references. [user+system-env-vars]: Honor it. (build-expression->derivation): Likewise. * tests/derivations.scm ("derivation #:disallowed-references, ok") ("derivation #:disallowed-references, not ok"): New tests. * doc/guix.texi (Derivations): Adjust accordingly.
* import: pypi: Emit 'pypi-uri' only when it yields the right URL.Ludovic Courtès2016-03-19
| | | | | | | | | | | | Fixes <http://bugs.gnu.org/23062>. Reported by Danny Milosavljevic <dannym@scratchpost.org>. * guix/import/pypi.scm (make-pypi-sexp): Check whether 'pypi-uri' returns SOURCE-URL and fall back to the full URL otherwise. * tests/pypi.scm ("pypi->guix-package"): Adjust expected URI accordingly. Co-authored-by: Danny Milosavljevic <dannym@scratchpost.org>
* substitute: Do not leak file descriptors for TLS connections.Ludovic Courtès2016-03-17
| | | | | | | | Partially fixes <http://bugs.gnu.org/20145>. * guix/scripts/substitute.scm (fetch, download-cache-info): (http-multiple-get, fetch-narinfos, progress-report-port): Use 'close-connection' instead of 'close-port'.
* substitute: Cache transient HTTP errors for 10mn.Ludovic Courtès2016-03-17
| | | | | | * guix/scripts/substitute.scm (fetch-narinfos)[handle-narinfo-response]: Cache transient errors for 10mn. (%narinfo-transient-error-ttl): New variable.
* lint: Do not leak file descriptors for TLS connections.Ludovic Courtès2016-03-17
| | | | | | | Partially fixes <http://bugs.gnu.org/20145>. * guix/scripts/lint.scm (probe-uri): Use 'close-connection' instead of 'close-port'.
* download: Add 'close-connection'.Ludovic Courtès2016-03-17
| | | | | | | | | | Partially fixes <http://bugs.gnu.org/20145>. * guix/build/download.scm (add-weak-reference): Remove. (%tls-ports): New variable. (register-tls-record-port): New procedure. (tls-wrap): Use it instead of 'add-weak-reference'. (close-connection): New procedure.
* substitute: Update progress for responses different from 200/404.Ludovic Courtès2016-03-17
| | | | | * guix/scripts/substitute.scm (fetch-narinfos)[handle-narinfo-response]: Add missing call to 'update-progress!'.
* licenses: Add Apache Software License 1.1.Roel Janssen2016-03-17
| | | | | | * guix/licenses.scm (asl1.1): New variables. Signed-off-by: Leo Famulari <leo@famulari.name>
* substitute: Honor client-provided empty URL list.Ludovic Courtès2016-03-16
| | | | | | | | | | | | | | | Before that, 'guix build --substitute-urls=""' would lead to using the daemon's own URL list instead of the empty list. The 'or*' hack, which is to blame, had become unnecessary since commit fb4bf72be3fbc23bca35ba4b842b7e1517ef0e3a. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/substitute.scm (or*): Remove. (%cache-urls): Use 'or' instead of 'or*'. * tests/store.scm ("substitute query, alternating URLs"): Add test with empty URL list. * doc/guix.texi (Common Build Options): Mention the empty string.
* substitute: Honor the 'max-age' of 'Cache-Control' headers.Ludovic Courtès2016-03-16
| | | | | | | | | | This allows substitute servers to tell 'guix substitute' how long they can cache narinfo lookups. * guix/scripts/substitute.scm (cache-narinfo!): Add 'ttl' parameter. [cache-entry]: Honor it. (fetch-narinfos)[handle-narinfo-response]: Check the 'Cache-Control' header of RESPONSE and pass its 'max-age' value to 'cache-narinfo!'.
* substitute: Make room for a 'ttl' field in cached entries.Ludovic Courtès2016-03-16
| | | | | | | | * guix/scripts/substitute.scm (cached-narinfo): Expect 'narinfo' sexp version 2 with a 'ttl' field. (cache-narinfo!)[cache-entry]: Produce 'narinfo' sexp version 2 with a 'ttl' field. (remove-expired-cached-narinfos)[expired?]: Read 'narinfo' sexp version 2.
* build: Default to "https://mirror.hydra.gnu.org/" for substitutes.Ludovic Courtès2016-03-16
| | | | | | | | | | | * config-daemon.ac: Check for (gnutls) and define 'GUIX_SUBSTITUTE_URLS'. * nix/nix-daemon/guix-daemon.cc (main): Use GUIX_SUBSTITUTE_URLS. * guix/store.scm (%default-substitute-urls): Use 'https' when (gnutls) is available. * doc/guix.texi (Binary Installation): Mention mirrors (Invoking guix-daemon): Mention mirror.hydra.gnu.org. (Substitutes): Mention mirrors. (Invoking guix archive): Show https URLs.
* http-client: No 'setvbuf' for non-file ports.Ludovic Courtès2016-03-16
| | | | | * guix/http-client.scm (http-fetch): Do not call 'setvbuf' on non-file ports.
* grafts: Update the narinfo cache before building a derivation.Ludovic Courtès2016-03-14
| | | | | * guix/grafts.scm (references-oracle)[references*]: Add call to 'substitution-oracle'.
* substitute: Keep the initial connection alive.Ludovic Courtès2016-03-14
| | | | | | | | | | | | | | The connection used to fetch /nix-cache-info is now reused for the subsequent narinfo requests. * guix/scripts/substitute.scm (download-cache-info)[download]: Remove. [uri, read-cache-info]: New variables. Rewrite in terms of 'http-fetch' instead of 'fetch'. Return an open port in addition to a <cache-info>. * guix/scripts/substitute.scm (http-multiple-get): Add #:port parameter and honor it. (fetch-narinfos)[do-fetch]: Add 'port' parameter. Adjust to new 'download-cache-info' and 'do-fetch' signatures.
* http-client: Add #:keep-alive? parameter.Ludovic Courtès2016-03-14
| | | | | * guix/http-client.scm (http-fetch): Add #:keep-alive? parameter and pass it to 'http-get' or 'http-get*'.
* substitute: Remove dead code.Ludovic Courtès2016-03-14
| | | | | | | | This parameter became unused with the switch to HTTP pipelining in commit d3a652037ef879f9279bc056c43d15ba7afcbb25. * guix/scripts/substitute.scm (fetch): Remove #:quiet-404? and adjust accordingly.
* store: 'references/substitutes' caches its results.Ludovic Courtès2016-03-14
| | | | | * guix/store.scm (%reference-cache): New variable. (references/substitutes): Use it.
* size: Disable grafts.Ludovic Courtès2016-03-14
| | | | * guix/scripts/size.scm (guix-size): Parametrize '%graft?'.
* build: Add Ant build system.Ricardo Wurmus2016-03-14
| | | | | | | * guix/build-system/ant.scm: New file. * guix/build/ant-build-system: New file. * Makefile.am (MODULES): Add new files. * doc/guix.texi (Build Systems): Document ant-build-system.
* cve: Read entire CVE databases for the current year and the past year.Ludovic Courtès2016-03-11
| | | | | | | | | | | | | | The "Modified" database that we were reading is much smaller, but it only shows CVEs modified over the past week. * guix/cve.scm (%now, %current-year, %past-year): New variables. (yearly-feed-uri): New procedure. (%cve-feed-uri, %ttl): Remove. (%current-year-ttl, %past-year-ttl): New variables. (call-with-cve-port): Add 'uri' and 'ttl' parameters and honor them. Add 'setvbuf' call. (current-vulnerabilities)[read-vulnerabilities]: New procedure. Read from both %LAST-YEAR and %CURRENT-YEAR.
* cve: Make CPE patch level part of the version string.Ludovic Courtès2016-03-11
| | | | | * guix/cve.scm (%cpe-package-rx): Adjust to account for :PATCH-LEVEL. (cpe->package-name): Likewise.
* substitute: Optimize HTTP pipelining over TLS.Ludovic Courtès2016-03-10
| | | | | * guix/scripts/substitute.scm (http-multiple-get): Write the requests to a bytevector output port before sending them.
* substitute: Add HTTPS support.Ludovic Courtès2016-03-10
| | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/22937>. Reported by Chris Marusich <cmmarusich@gmail.com>. * guix/scripts/substitute.scm (fetch): Add 'https' alongside 'http'. Use 'open-connection-for-uri' instead of 'open-socket-for-uri'. Call 'setvbuf' only when PORT matches 'file-port?'. (http-multiple-get): Likewise. Change 'base-url' parameter to 'base-uri'. (fetch-narinfos)[do-fetch]: Add 'https' case alongside 'http'. Pass URI instead of URL to 'http-multiple-get'. * doc/guix.texi (Requirements): Move GnuTLS one level higher and mention HTTPS substitutes. (Substitutes): Mention HTTPS and recommend it. Explain why servers are not authenticated. Add "On Trusting Binaries" subsection.
* substitute: Error out on unsupported URL schemes.Ludovic Courtès2016-03-09
| | | | | | | Reported in <http://bugs.gnu.org/22937> by Chris Marusich <cmmarusich@gmail.com>. * guix/scripts/substitute.scm (fetch): Add 'else' case and call 'leave'.
* ui: Do not call 'port-filename' on closed file ports.Ludovic Courtès2016-03-09
| | | | | | * guix/ui.scm (call-with-error-handling)[port-filename*]: New procedure. Use it in the 'nar-error?' case.
* upstream: Fix 'signature-urls' coalescing.Ludovic Courtès2016-03-09
| | | | | | | | | Previously, the resulting 'signature-urls' would contain N times the same URL. * guix/upstream.scm (coalesce-sources): Fix TWO in 'signature-urls'. * tests/upstream.scm: New file. * Makefile.am (SCM_TESTS): Add it.
* guix build: Add '--quiet'.Ludovic Courtès2016-03-08
| | | | | | | | | | Fixes <http://bugs.gnu.org/19772>. Reported by Andrei Osipov <andrspv@gmail.com>. * guix/scripts/build.scm (show-help, %options): Add --quiet. (guix-build): Parameterize 'current-build-output-port' accordingly. * doc/guix.texi (Invoking guix build): Use it in example. (Additional Build Options): Document it.
* guix system: Write the GC root on the target file system.Ludovic Courtès2016-03-08
| | | | | | | Fixes <http://bugs.gnu.org/22802>. Reported by Jookia <166291@gmail.com>. * guix/scripts/system.scm (install-grub*): Prepend TARGET to GC-ROOT.
* packages: Cache the result of 'input-grafts'.Ludovic Courtès2016-03-08
| | | | | | | | | | | This reduces the wall-clock time of guix environment gnutls --pure -E true by ~35%. * guix/packages.scm (%graft-cache): New variable. (input-graft): Use 'cached' to cache to %GRAFT-CACHE.
* packages: Cache the result of 'package->bag'.Ludovic Courtès2016-03-08
| | | | | | | | | | | This reduces the wall-clock time of guix environment gnutls --pure -E true by ~25%. * guix/packages.scm (%bag-cache): New variable. (package->bag): Use 'cached' to cache things to %BAG-CACHE.
* packages: Generalize the 'cached' macro.Ludovic Courtès2016-03-08
| | | | | | * guix/packages.scm (cache): Rename to... (cache!): ... this. Add 'cache' parameter, and use it. (cached): Add a rule to allow the cache to be specified.
* import: snix: Use the right 'package-name->name+version'.Ludovic Courtès2016-03-06
| | | | | | | | Fixes a regression introduced in 1b846da8c372bee78851439fd9e72b2499115e5a. * guix/import/snix.scm: Use 'package-name->name+version' from (guix build utils).
* store: 'references/substitutes' correctly handles the order of substitutes.Ludovic Courtès2016-03-05
| | | | | | | | | | | | | | | Before that, 'references/substitutes' would assume that 'substitutable-path-info' would return things in the same order as its arguments, which is not the case. Thus, it would sometimes provide incorrect reference information, occasionally leading to infinite loop (because dependency information would denote cycles.) Fixes <http://bugs.gnu.org/22914>. Reported by Eric Bavier <ericbavier@openmailbox.org>. * guix/store.scm (references/substitutes): Make ITEMS the first argument of the loop; match on it. Use 'any' to find a matching substitute. (substitutable-path-info): Clarify docstring about ordering.
* grafts: Memoize intermediate results in 'cumulative-grafts'.Ludovic Courtès2016-03-05
| | | | | | | | | | | | | The time for: guix build inkscape -n --no-substitutes goes down by 30% (in the presence of 3 replacements among all the packages.) * guix/grafts.scm (cumulative-grafts): Turn into a monadic procedure in %STATE-MONAD. Use the current state as a derivation-to-graft cache. (graft-derivation): Call 'cumulative-grafts' within 'run-with-state'.
* packages: The result of 'bag-grafts' does not contain duplicates.Ludovic Courtès2016-03-05
| | | | * guix/packages.scm (bag-grafts): Add call to 'delete-duplicates'.
* grafts: Use dependency information from substitutes when possible.Ludovic Courtès2016-03-05
| | | | | | | | | | | | | | This avoids starting derivation builds just for the sake of knowing the references of their outputs, thereby restoring the expected behavior of --dry-run when substitutes are available. * guix/grafts.scm (non-self-references): Remove 'store' parameter, and add 'references'. Use it. Update caller. (references-oracle): New variable. (cumulative-grafts): Add 'references' parameter and use it. Update callers. (graft-derivation): Remove 'build-derivations' call. Add call to 'references-oracle'.
* store: Add 'references/substitutes'.Ludovic Courtès2016-03-05
| | | | | | * guix/store.scm (references/substitutes): New procedure. * tests/store.scm ("references/substitutes missing reference info") ("references/substitutes with substitute info"): New tests.
* tests: Narinfos can specify an non-empty reference list.Ludovic Courtès2016-03-05
| | | | | | | | * guix/tests.scm (derivation-narinfo): Add #:references and honor it. (call-with-derivation-narinfo, call-with-derivation-substitute): Likewise. (with-derivation-narinfo, with-derivation-substitute): Add 'references' keyword.
* guix build: Set the build options early.Ludovic Courtès2016-03-05
| | | | | | | | | | | | This fixes a bug whereby, with grafts leading to builds very early, build options such as --substitute-urls would not be taken into account yet. Reported by Andreas Enge <andreas@enge.fr>. * guix/scripts/build.scm (guix-build): Move 'opts' to the beginning. Use 'with-store' instead of 'open-connection'. Call 'set-build-options-from-command-line' right after 'with-store'.
* lint: cve: Gracefully handle HTTP errors.Ludovic Courtès2016-03-04
| | | | | * guix/scripts/lint.scm (current-vulnerabilities*): New procedure. (package-vulnerabilities): Use it.
* lint: derivation: Disable grafts, but check replacements.Ludovic Courtès2016-03-03
| | | | | * guix/scripts/lint.scm (check-derivation): Pass #:graft? #f. When 'package-replacement' exists, compute its derivation.
* guix build: -S returns the replacement's source.Ludovic Courtès2016-03-03
| | | | | | | | Reported by Mark H Weaver. * guix/scripts/build.scm (options->derivations): When SRC and GRAFT? are true, use the source of P's replacement. * tests/guix-build.sh: Add test.