summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* pack: Allow multiple '--manifest' options.Ludovic Courtès2019-11-22
| | | | | | | * guix/scripts/pack.scm (guix-pack): Collect 'manifest' options, and concatenate the resulting manifests. * tests/guix-pack.sh: Test it. * doc/guix.texi (Invoking guix pack): Document it.
* package: Allow multiple '--manifest' options.Ludovic Courtès2019-11-22
| | | | | | | | | | | * guix/scripts/package.scm (manifest-action): Remove. (%actions): Remove it. (load-manifest): New procedure. (process-actions): Handle 'manifest' options. Define 'files' from 'manifest' options. Define 'manifest' based on FILES. Define 'trans' to represent the final transaction. * tests/guix-package.sh: Test it. * doc/guix.texi (Invoking guix package): Mention
* profiles: Add 'concatenate-manifests'.Ludovic Courtès2019-11-22
| | | | | * guix/profiles.scm (concatenate-manifests): New procedure. * tests/profiles.scm ("concatenate-manifests"): New test.
* import: texlive: Handle multi-license packages.Ludovic Courtès2019-11-22
| | | | | | | This fixes "guix import texlive translator". * guix/import/texlive.scm (sxml->package): Add clause for when 'license' is a list of licences, as is the case with the "translator" package.
* substitute: Don't fetch /nix-cache-info.Ludovic Courtès2019-11-22
| | | | | | | | | | | | | | | | This avoids one GET request every time 'fetch-narinfos' is called. The file itself was essentially useless. * guix/scripts/substitute.scm (<cache-info>, download-cache-info): Remove. (%unreachable-hosts): New variable. (open-connection-for-uri/maybe): New procedure. (fetch-narinfos)[handle-narinfo-response]: Check whether NARINFO has its 'path' under (%store-prefix) and ignore it otherwise. Move 'update-progress!' call before 'if'. [do-fetch]: Remove 'port' parameter. Use 'open-connection-for-uri/maybe'. Remove call to 'download-cache-info'.
* pack: Add "--derivation".Ludovic Courtès2019-11-21
| | | | | | | * guix/scripts/pack.scm (%options, show-help): Add "--derivation". (guix-pack): Honor it. * tests/guix-pack.sh: Test it. * doc/guix.texi (Invoking guix pack): Document it.
* gnu: Use GHC 8.6.5 as the main Haskell compiler.Timothy Sample2019-11-20
| | | | | | * gnu/package/haskell.scm (ghc-8): Change to 'ghc-8.6'. * guix/import/hackage.scm (ghc-standard-libraries): Add 'ghc-heap' and 'libiserv'.
* deploy: Handle "--version".Ludovic Courtès2019-11-19
| | | | * guix/scripts/deploy.scm (%options): Add "--version".
* pull: Acquire a lock for the target profile.Ludovic Courtès2019-11-19
| | | | | | | This is a followup to b1fb663404894268b5ee92c040f12c52c0bee425. * guix/scripts/pull.scm (guix-pull): Wrap 'run-with-store' call in 'with-file-lock/no-wait'.
* download: Load *.crt certificate bundles when *.pem files are missing.Ludovic Courtès2019-11-18
| | | | | | | Fixes <https://bugs.gnu.org/38254>. * guix/build/download.scm (make-credendials-with-ca-trust-files): Look for *.crt files under DIRECTORY when *.pem files cannot be found.
* build-system: emacs: Simplify the SET-EMACS-LOAD-PATH phase.Maxim Cournoyer2019-11-18
| | | | | | | | | It is no longer necessary to search for the Elisp libraries manually, as Emacs now include a search path specification serving that purpose. * guix/build/emacs-build-system.scm (set-emacs-load-path): Replace by... (add-source-to-load-path): ...this. (%standard-phases): Adjust accordingly.
* utils: Handle #f file-name.Alex Sassmannshausen2019-11-18
| | | | | | | * guix/utils.scm (current-source-directory): Change dispatch to handle #f file-name. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
* guix build: Handle "guix build /….drv" correctly for non-existent derivations.Ludovic Courtès2019-11-17
| | | | | | | | | | | | This lets the daemon substitute missing derivations, as in the example at <https://bugs.gnu.org/38226>, instead of failing with ENOENT. * guix/scripts/build.scm (options->things-to-build): In the 'derivation-path?' case, don't fail when 'read-derivation-from-file' raises to ENOENT; return the empty list in that case. (guix-build): Add non-existent '.drv' files to ITEMS. Pass ITEMS in addition to DRV to 'build-derivations'. * tests/guix-build.sh: Add test.
* time-machine: Honor the standard build options.Ludovic Courtès2019-11-15
| | | | | | | | | | | * guix/scripts/time-machine.scm (show-help): Call 'show-build-options-help'. (%options): Add %STANDARD-BUILD-OPTIONS. (%default-options): New variable. (parse-args): Pass (list %default-options) to 'parse-command-line' and remove #:build-options? parameter. (guix-time-machine): Call 'set-build-options-from-command-line' and wrap 'cached-channel-instance' call in 'with-status-verbosity'. * doc/guix.texi (Invoking guix time-machine): Mention common build options.
* time-machine: Handle 'git-error' exceptions.Ludovic Courtès2019-11-15
| | | | | | * guix/scripts/pull.scm (with-git-error-handling): Export. * guix/scripts/time-machine.scm (guix-time-machine): Wrap body in 'with-git-error-handling'.
* inferior: 'cached-channel-instance' takes an open store connection.Konrad Hinsen2019-11-15
| | | | | | | | | | | * guix/inferior.scm (cached-channel-instance): Take an explicit 'store' argument. (inferior-for-channels): Wrap call to 'cached-channel-instance' in 'with-store'. * guix/time-machine.scm (guix-time-machine): Wrap call to 'cached-channel-instance' in 'with-store'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* Add 'guix time-machine'.Konrad Hinsen2019-11-15
| | | | | | | | | | | | * guix/scripts/time-machine.scm: New file. * Makefile.am: (MODULES): Add it. * guix/scripts/pull.scm (channel-list): Export. * guix/inferior.scm (cached-channel-instance): New procedure. (inferior-for-channels): Use it. * doc/guix.texi (Invoking guix time-machine): New section. (Channels): Cross-reference it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* pull: Remove unused '--verbose' option.Ludovic Courtès2019-11-15
| | | | | | | | | This option had been ignored since commit 0d39a3b98948314e135566b9315717695a9035ea (August 2018). * guix/scripts/pull.scm (show-help, %options): Remove "--verbose". (build-and-install): Remove #:verbose?, which was unused. (guix-pull): Adjust accordingly.
* make-bootstrap: Adjust copied linux headers.Efraim Flashner2019-11-15
| | | | | * guix/build/make-bootstrap.scm (copy-linux-headers): Remove header file 'a.out.h' is no longer part of the linux kernel headers.
* guix: svn: Allow dropping externals.Julien Lepiller2019-11-13
| | | | | | * guix/build/svn.scm (svn-fetch): Allow to ignore externals. * guix/svn-download.scm (svn-reference, svn-multi-reference): Add recursive? field.
* ui: Emit hyperlinks for 'license' in package search results.Ludovic Courtès2019-11-09
| | | | | * guix/ui.scm (package->recutils): When HYPERLINKS is true, call 'hyperlink' for the 'license' field.
* ui: Produce hyperlinks for the 'location' field of search results.Ludovic Courtès2019-11-09
| | | | | | | | | | | | This affects the output of 'guix show', 'guix search', and 'guix system search'. * guix/ui.scm (hyperlink, supports-hyperlinks?, location->hyperlink): New procedures. (package->recutils): Add #:hyperlinks? and honor it. (display-search-results): Pass #:hyperlinks? to PRINT. * guix/scripts/system/search.scm (service-type->recutils): Add #:hyperlinks? and honor it.
* guix: package: lock profiles when processing them.Julien Lepiller2019-11-08
| | | | | | * guix/scripts/package.scm (process-actions): Get a per-profile lock to prevent concurrent actions on profiles. * tests/guix-package.sh: Add test.
* guix: Add file-locking with no wait.Julien Lepiller2019-11-08
| | | | | * guix/build/syscalls.scm (with-file-lock/no-wait): New procedure. (lock-file): Take a #:wait? key.
* graph: Support package transformation options.Ludovic Courtès2019-11-07
| | | | | | | | * guix/scripts/graph.scm (%options): Append %TRANSFORMATION-OPTIONS. (show-help): Call 'show-transformation-options-help'. (guix-graph): Call 'options->transformation' and use it. * tests/guix-graph.sh: Add test. * doc/guix.texi (Invoking guix graph): Document it.
* derivations: Use a regular hash table for the module cache.Ludovic Courtès2019-11-07
| | | | | | | | | | The hit rate of the 'add-data-to-store' cache goes from 10% to 4% on: guix build -e '(@@ (gnu packages libreoffice) libreoffice)' -nd * guix/derivations.scm (%module-cache): Turn into a regular hash table. It didn't make sense to use a weak-value hash table given that values are pairs.
* pull: Gracefully handle invalid Texinfo markup in news.Ludovic Courtès2019-11-01
| | | | | | | | | Reported by Oleg Pykhalov <go.wigust@gmail.com>. * guix/scripts/pull.scm (display-news-entry-title) (display-news-entry): Catch 'parser-error' around call to 'texi->plain-text', and return Texinfo as-is when an exception is caught.
* derivation: Remove memoization invalidation for 'derivation->bytevector'.Ludovic Courtès2019-10-28
| | | | | | | | This is a followup to d727a9343d861cf775645df8be5bfefd43d6c6f0, which broke 'hydra-jobs' from (gnu ci). * guix/derivations.scm (invalidate-derivation-caches!): Remove call to 'invalidate-memoization!' for 'derivation->bytevector'.
* pull: Honor '/etc/guix/channels.scm'.Ludovic Courtès2019-10-27
| | | | | | * guix/scripts/pull.scm (channel-list)[global-file]: New variable. [channels]: Honor it. * doc/guix.texi (Invoking guix pull): Document it.
* channels: Refer to 'guile-json-3'.Ludovic Courtès2019-10-27
| | | | | | | Fixes a regression introduced in 84af1e74029fd4c43636f7d8d3e6f82ddab9ce82. * guix/channels.scm (whole-package-for-legacy): Refer to GUILE-JSON-3, not GUILE-JSON.
* derivations: Don't memoize 'derivation->bytevector'.Ludovic Courtès2019-10-27
| | | | | | | | Its hit rate was only 8%. Removing it reduces heap size of "guix build libreoffice -nd" from 69MiB to 61MiB and the wall-clock time is unchanged. * guix/derivations.scm (derivation->bytevector): Change from 'mlambda' to 'lambda'.
* gexp: Cache the module to derivation mappings.Ludovic Courtès2019-10-27
| | | | | | | | | | | This reduces the number of 'add-data-to-store' cache lookups from 3329 to 2743 (hit rate: 27% to 11%) when running: GUIX_PROFILING=add-data-to-store-cache guix build libreoffice -nd Execution time of "guix build libreoffice -nd" goes from 1.86s to 1.80s. * guix/gexp.scm (imported+compiled-modules): Wrap body in 'mcached'.
* store: Allow objects in the cache to be inserted and search for with 'equal?'.Ludovic Courtès2019-10-27
| | | | | | | | * guix/store.scm (cache-object-mapping): Add #:vhash-cons parameter and honor it. (lookup-cached-object): Add #:vhash-fold* parameter and honor it. (%mcached): Add #:vhash-fold* and #:vhash-cons and honor them. (mcached): Add clauses with 'eq?' and 'equal?' as the first argument.
* gexp: Add 'imported+compiled-modules'.Ludovic Courtès2019-10-27
| | | | | | * guix/gexp.scm (imported+compiled-modules): New procedure. (lower-gexp): Use it instead of separate calls to 'imported-modules' and 'compiled-modules'.
* derivations: 'build-expression->derivation' caches its module derivations.Ludovic Courtès2019-10-27
| | | | | | | | | | | | | This reduces the number of lookups in the 'add-data-to-store' cache from 7505 to 3329 (hit rate from 68% to 27%) when running: GUIX_PROFILING=add-data-to-store-cache guix build libreoffice -nd The execution time of "guix build libreoffice -nd" goes from 2.12s to 1.87s. * guix/derivations.scm (%module-cache): New variable. (imported+compiled-modules)[key]: New variable. Lookup KEY in %MODULE-CACHE and populate %MODULE-CACHE upon cache miss.
* derivations: Introduce 'imported+compiled-modules'.Ludovic Courtès2019-10-27
| | | | | | * guix/derivations.scm (imported+compiled-modules): New procedure. (build-expression->derivation): Use it instead of separate calls to '%imported-modules' and '%compiled-modules'.
* guix build: Remove obsolete TODO.Ludovic Courtès2019-10-25
| | | | | * guix/scripts/build.scm (set-build-options-from-command-line): Remove obsolete TODO comment.
* guix build: Warn when '--keep-failed' is passed to a remote daemon.Ludovic Courtès2019-10-25
| | | | | | * guix/scripts/build.scm (set-build-options-from-command-line): When OPTS has 'keep-failed?' set, check whether STORE is connected over AF_UNIX and warn when it's not.
* Revert "guix: svn: Allow dropping externals."Tobias Geerinckx-Rice2019-10-24
| | | | | | | This reverts commit 51395c84fdbf8daed6392951a973ad750cf3eefa, fixing <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37896>. Reported by <o.rojon@posteo.net>.
* guix: svn: Allow dropping externals.Julien Lepiller2019-10-23
| | | | | | * guix/build/svn.scm (svn-fetch): Allow to ignore externals. * guix/svn-download.scm (svn-reference, svn-multi-reference): Add recursive? field.
* lint: Re-enable CVE checker.Ludovic Courtès2019-10-23
| | | | | | This reverts d7fcd9c565812919109ae88049f5d8bf4c56f9bd. * guix/lint.scm (%network-dependent-checkers): Re-enable 'cve checker.
* cve: Rewrite to read the JSON feed instead of the XML feed.Ludovic Courtès2019-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XML feed was discontinued on Oct. 16th, 2019: <https://nvd.nist.gov/General/News/XML-Vulnerability-Feed-Retirement-Phase-3> * guix/cve.scm (string->date*): New procedure. (<cve-item>, <cve>, <cve-reference>): New record types. (cpe-match->cve-configuration, configuration-data->cve-configurations) (json->cve-items, version-matches?): New procedures. (yearly-feed-uri): Change URL to refer to JSON feed. (cpe->product-alist, %parse-vulnerability-feed) (xml->vulnerabilities): Remove. (cve-configuration->package-list, merge-package-lists) (cve-item->vulnerability, json->vulnerabilities): New procedures. (write-cache): Use 'json->vulnerabilities' instead of 'xml->vulnerabilities', and remove 'parameterize'. (vulnerabilities->lookup-proc): Use 'version-matches?' when VERSION is true. * tests/cve.scm (%sample): Use 'tests/cve-sample.json'. (%expected-vulnerabilities): Rewrite accordingly. ("json->cve-items", "cve-item-published-date") ("json->vulnerabilities"): New tests. ("xml->vulnerabilities"): Remove. ("vulnerabilities->lookup-proc"): Adjust to new vulnerabilities. * tests/cve-sample.json: New file. * tests/cve-sample.xml: Remove. * Makefile.am (EXTRA_DIST): Adjust accordingly. * doc/guix.texi (Invoking guix lint): Update nist.gov URLs.
* download: Honor /etc/ssl/certs when 'SSL_CERT_DIR' is not set.Ludovic Courtès2019-10-21
| | | | | | | * guix/build/download.scm (%x509-certificate-directory): Use "/etc/ssl/certs" as a last resort. This ensures, for instance, that 'guix download' honors system-wide certificates when SSL_CERT_DIR is unset.
* packages: Add "aarch64-linux" to '%hydra-supported-systems'.Ludovic Courtès2019-10-20
| | | | * guix/packages.scm (%hydra-supported-systems): Keep "aarch64-linux".
* reconfigure: Silence "shepherd: Evaluating ..." messages.Ludovic Courtès2019-10-18
| | | | | * guix/scripts/system/reconfigure.scm (upgrade-services-program): Parameterize 'shepherd-message-port' to silent "Evaluating ..." messages.
* lint: Comment out 'cve' checker.Ludovic Courtès2019-10-18
| | | | * guix/lint.scm (%network-dependent-checkers): Comment out 'cve' checker.
* pull: Call 'ensure-default-profile' after 'set-build-options'.Ludovic Courtès2019-10-18
| | | | | | | | | | This is a followup to 81c580c8664bfeeb767e2c47ea343004e88223c7. * guix/scripts/pull.scm (guix-pull): Move 'ensure-default-profile' call after 'set-build-options-from-command-line' call. This ensures that the 'profiles/per-user/$USER' directory is created before 'ensure-default-profile' is called when 'GUIX_DAEMON_SOCKET' points to a remote TCP daemon.
* build-system/asdf: Fix package transform.Guillaume Le Vaillant2019-10-18
| | | | | | * guix/build-system/asdf.scm (package-with-build-system): [find-input-package]: New function. [rewrite]: Use it.
* daemon: Make 'profiles/per-user' non-world-writable.Ludovic Courtès2019-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/37744>. Reported at <https://www.openwall.com/lists/oss-security/2019/10/09/4>. Based on Nix commit 5a303093dcae1e5ce9212616ef18f2ca51020b0d by Eelco Dolstra <edolstra@gmail.com>. * nix/libstore/local-store.cc (LocalStore::LocalStore): Set 'perUserDir' to #o755 instead of #o1777. (LocalStore::createUser): New function. * nix/libstore/local-store.hh (LocalStore): Add it. * nix/libstore/store-api.hh (StoreAPI): Add it. * nix/nix-daemon/nix-daemon.cc (performOp): In 'wopSetOptions', add condition to handle "user-name" property and honor it. (processConnection): Add 'userId' parameter. Call 'store->createUser' when userId is not -1. * guix/profiles.scm (ensure-profile-directory): Note that this is now handled by the daemon. * guix/store.scm (current-user-name): New procedure. (set-build-options): Add #:user-name parameter and pass it to the daemon. * tests/guix-daemon.sh: Test the creation of 'profiles/per-user' when listening on a TCP socket. * tests/store.scm ("profiles/per-user exists and is not writable") ("profiles/per-user/$USER exists"): New tests.
* inferior: Set the error port when using older Guix versions.Christopher Baines2019-10-15
| | | | | | | This makes the behaviour more consistent. * guix/inferior.scm (inferior-pipe): Wrap the second open-pipe* call with with-error-to-port, to match the first call to open-pipe*.