summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2019-01-09download: Remove Guile 2.0 workaround.Ludovic Courtès
* guix/build/download.scm: Remove Guile 2.0 workaround.
2019-01-09maint: Remove 'cond-expand' forms for Guile 2.0.Ludovic Courtès
Note: Leave 'cond-expand' forms used in the build-side modules that can run on %BOOTSTRAP-GUILE, which is currently Guile 2.0. * guix/build/compile.scm: Move 'use-modules' clause from 'cond-expand' to 'define-module' form. (%default-optimizations): Remove 'cond-expand'. * guix/build/download.scm (tls-wrap): Remove 'cond-expand'. * guix/build/syscalls.scm: Remove 'cond-expand' form around '%set-automatic-finalization-enabled?!' and 'without-automatic-finalization'. * guix/inferior.scm (port->inferior): Remove 'cond-expand'. * guix/scripts/pack.scm (wrapped-package)[build]: Remove 'cond-expand'. * guix/status.scm (build-event-output-port): Remove 'cond-expand'. * guix/store.scm (open-inet-socket): Remove 'cond-expand'. * guix/ui.scm (install-locale): Remove 'cond-expand'. * tests/status.scm ("current-build-output-port, UTF-8 + garbage"): Remove 'cond-expand'. * tests/store.scm ("current-build-output-port, UTF-8 + garbage"): Remove 'cond-expand'.
2019-01-08pull: Document '--system'.Ludovic Courtès
Fixes <https://bugs.gnu.org/34010>. Reported by Alex Kost <alezost@gmail.com>. This is a followup to 5923102f7b58f0a0120926ec5b81ed48b26a188e. * guix/scripts/pull.scm (show-help): Add '--system'.
2019-01-08self: Compress Info files.Ludovic Courtès
Fixes <https://bugs.gnu.org/33993>. Reported by Adonay Felipe Nogueira <adfeno@hyperbola.info>. * guix/self.scm (info-manual): Compress Info files.
2019-01-07gexp: 'gexp->script' does not emit load-path expression when unnecessary.Ludovic Courtès
This removes two elements from %LOAD-PATH and %LOAD-COMPILED-PATH of the 'guix' command and thus further reduces the number of 'stat' calls it makes. * guix/gexp.scm (load-path-expression): Return #f when MODULES and EXTENSIONS are both empty. (gexp->script): Don't emit anything when SET-LOAD-PATH is #f.
2019-01-07self: Move all modules into a single directory.Ludovic Courtès
This halves the number of elements in %LOAD-PATH and %LOAD-COMPILED-PATH and halves the number of 'stat' calls as reported by: env -i $(type -P guix) build -e '(@ (gnu packages base) coreutils)' -nd * guix/self.scm (node-source+compiled, guile-module-union): New procedures. (guix-command): Remove 'compiled-modules' parameter. Remove 'source-directories' and 'object-directories' variables and add 'module-directory'. Change command so that it adds nothing but MODULE-DIRECTORY to %LOAD-PATH and %LOAD-COMPILED-PATH. (whole-package): Remove #:compiled-modules. Assume MODULES contains 'share/guile/site' and 'lib/guile' and adjust code accordingly. (compiled-guix): When PULL-VERSION is 1, use 'node-source+compiled' only. Remove #:compiled-modules argument to 'whole-package'. * guix/channels.scm (whole-package-for-legacy): Add 'module+compiled' and pass it to 'whole-package'.
2019-01-07import: opam: Parse comments.Julien Lepiller
* guix/import/opam.scm: Add comment support in parser.
2019-01-07import: opam: Add updater.Julien Lepiller
* guix/import/opam.scm (%opam-updater): New variable.
2019-01-07import: opam: Add recursive option.Julien Lepiller
* guix/script/import/opam.scm: Add recursive option. * guix/import/opam.scm (opam->guix-package): return two values. (opam-recursive-import): New variable.
2019-01-07lint: Avoid 'dirname' call at the top level.Ludovic Courtès
* guix/scripts/lint.scm (%distro-directory): Wrap in 'mlambda'. (check-patch-file-names): Adjust accordingly.
2019-01-07Remove (guix build pull).Ludovic Courtès
This module had been unused since commit 5f93d97005897c2d859f0be1bdff34c88467ec61 (Oct. 2017). * guix/build/pull.scm: Delete. * Makefile.am (MODULES): Remove.
2019-01-06hydra: Compute jobs in an inferior.Ludovic Courtès
Previously we would rely on auto-compilation of all the Guix modules. The complete evaluation would take ~15mn on berlin.guixsd.org and require lots of RAM. This approach should be faster since potentially only part of the modules are rebuilt. Furthermore, as a side-effect, it builds the derivations that 'guix pull' uses. * build-aux/hydra/gnu-system.scm: Remove 'eval-when' form. (hydra-jobs): New procedure. * gnu/ci.scm (package->alist, qemu-jobs, system-test-jobs) (tarball-jobs): Return strings for the 'license' field. * guix/self.scm (compiled-guix)[*cli-modules*]: Add (gnu ci).
2019-01-06lint: Rename checker to 'github-url'.Ludovic Courtès
* guix/scripts/lint.scm (%checkers): Rename 'github-uri' to 'github-url' to match the documentation.
2019-01-06git-download: Use 'invoke'.Ludovic Courtès
* guix/build/git.scm (git-fetch): Use 'invoke' instead of 'system*' for "git submodule update".
2019-01-06git-download: 'git-fetch' really returns #f upon error.Ludovic Courtès
This allows the fallback code in (guix git-download) to actually run. Regression introduced in commit 329dabe13bf98b899b907b45565434c5140804f5. Fixes <https://bugs.gnu.org/33911>. Reported by Björn Höfling <bjoern.hoefling@bjoernhoefling.de>. * guix/build/git.scm (git-fetch): Guard against 'invoke-error?' and really return #f upon failure.
2019-01-05ui: It's 2019 now!Ludovic Courtès
* guix/ui.scm (show-version-and-exit): Change year to 2019.
2019-01-05guix build: Honor '--system' for file-like objects and gexps.Ludovic Courtès
Fixes a bug whereby "guix build -f file.scm -s SYSTEM" would not honor SYSTEM when 'file.scm' returns a gexp or a file-like object. * guix/scripts/build.scm (options->derivations): Pass #:system to 'run-with-store' in the 'file-like?' and 'gexp?' cases.
2019-01-05gexp: Lowering a <computed-file> honors SYSTEM and TARGET.Ludovic Courtès
* guix/gexp.scm (computed-file-compiler): Pass #:system and #:target to 'gexp->derivation'. * tests/gexp.scm ("lower-object, computed-file, #:system"): New test.
2019-01-03import: cran: Default to 'cran repo.Ricardo Wurmus
* guix/import/cran.scm (cran-recursive-import): Default to 'cran repo.
2019-01-03import: cran: Abort if no description could be fetched.Ricardo Wurmus
* guix/import/cran.scm (cran->guix-package): Only proceed if a valid description could be fetched.
2019-01-03import: cran: Use HTTPS.Ricardo Wurmus
* guix/import/cran.scm (%cran-url): Use HTTPS.
2019-01-03import: cran: Download tarballs only once.Ricardo Wurmus
* guix/import/cran.scm (download): New procedure. (fetch-description, description->package): Use it.
2018-12-31refresh: github: updates for origins using 'git-fetch'.Eric Bavier
* guix/import/github.scm (updated-github-url): Respond with the repository url for the 'git-fetch' fetch method. (github-package?): Simplify boolean expression. (github-repository, github-user-slash-repository): Strip trailing ".git" from project if present. (latest-release)<origin-github-uri>: Recognize a 'git-reference'.
2018-12-27lint: Check for unstable tarballs.Efraim Flashner
* guix/scripts/lint.scm (check-source-unstable-tarball): New procedure. (%checkers): Add it. * tests/lint.scm ("source-unstable-tarball", "source-unstable-tarball: source #f", "source-unstable-tarball: valid", "source-unstable-tarball: package named archive", "source-unstable-tarball: not-github", "source-unstable-tarball: git-fetch"): New tests. * doc/guix.texi (Invoking guix lint): Document it.
2018-12-27pull: Add '--system'.Ludovic Courtès
* guix/scripts/pull.scm (%options): Add '--system'. (guix-pull): Honor it. * doc/guix.texi (Invoking guix pull): Document it.
2018-12-26offload: Remove unnecessary locking on machine slots.Ludovic Courtès
This extra level of locking turned out to be unnecessary. * guix/scripts/offload.scm (with-machine-lock): Remove. (machine-lock-file): Remove. (acquire-build-slot): Remove surrounding 'with-machine-lock'.
2018-12-26offload: Remove the "machine choice" lock.Ludovic Courtès
This lock was unnecessary and it led to a contention when many 'guix offload' processes are polling for available machines. * guix/scripts/offload.scm (machine-choice-lock-file): Remove. (choose-build-machine): Remove surrounding 'with-file-lock (machine-lock-file)'.
2018-12-25offload: Adjust 'test' and 'status' to the latest changes.Ludovic Courtès
This is a followup to ed7b44370f71126087eb953f36aad8dc4c44109f; following that commit, 'guix offload test' and 'guix offload status' would abort with a backtrace instead of clearly diagnosing a missing 'guix' command on the build machine. * guix/scripts/offload.scm (assert-node-has-guix): Call 'leave' when NODE is not an inferior. Remove 'catch' blocks for 'node-repl-error'. (check-machine-availability): Invoke 'assert-node-has-guix' first. (check-machine-status): Print a warning when 'remote-inferior' returns #f.
2018-12-24offload: Use (guix inferior) instead of (ssh dist node).Ludovic Courtès
Using inferiors and thus 'guix repl' simplifies setup on build machines (no need to worry about GUILE_LOAD_PATH etc.) Furthermore, the 'guix repl -t machine' protocol running in a remote pipe addresses several issues with the current implementation of nodes and RREPLs in Guile-SSH: fewer round trips, doesn't leave a 'guile --listen' process behind it, stateless (since a new process is started each time), more efficient (the SSH channel can be reused), more reliable (no 'pgrep', 'pkill', and shellology; see <https://github.com/artyom-poptsov/guile-ssh/issues/11> as an example.) * guix/ssh.scm (inferior-remote-eval): New procedure. (send-files): Use it instead of 'make-node' and 'node-eval'. * guix/scripts/offload.scm (node-guile-version): New procedure. (node-free-disk-space, transfer-and-offload, node-load) (choose-build-machine, assert-node-has-guix): Use 'remote-inferior' instead of 'make-node' and 'inferior-eval' instead of 'node-eval'. (assert-node-can-import, assert-node-can-export): Likewise, and add 'session' parameter. (check-machine-availability): Likewise, and add calls to 'close-inferior' and 'disconnect!'. (check-machine-status): Likewise. * doc/guix.texi (Daemon Offload Setup): Remove bit related to 'guile' in $PATH and $GUILE_LOAD_PATH; mention 'guix' alone.
2018-12-24ssh: Add 'remote-inferior'.Ludovic Courtès
* guix/inferior.scm (<inferior>)[close]: New field. (port->inferior): New procedure. (open-inferior): Rewrite in terms of 'port->inferior'. (close-inferior): Honor INFERIOR's 'close' field. (inferior-eval-with-store): Add FIXME comment. * guix/ssh.scm (remote-inferior): New procedure.
2018-12-24scripts: refresh: Allow searching recursively.Efraim Flashner
* guix/scripts/refresh.scm (refresh-recursive, list-transitive): New procedures. (show-help): Document it. (guix-refresh): Add flags and checks for new options. * doc/guix.texi (Invoking guix refresh): Document new options.
2018-12-24guix: lint: Check for source URIs redirecting to GitHub.Arun Isaac
* guix/scripts/lint.scm (check-github-uri): New procedure. (%checkers): Add it. * doc/guix.texi (Invoking guix lint): Document it. * tests/lint.scm ("github-url", "github-url: one suggestion"): New tests.
2018-12-23offload: Display the normalized load in 'guix offload status' output.Ludovic Courtès
Fixes a regression introduced in bbe66a530a014e8146d63002a5294941e935f863 whereby the actual load (non-normalized) would be displayed. * guix/scripts/offload.scm (check-machine-status): Add call to 'normalized-load'.
2018-12-21database: Use "write-ahead log" mode and set a long "busy timeout".Ludovic Courtès
This should avoid "database is locked" errors when there's a lot of concurrency, for instance when offloading simultaneously a lot of builds. * guix/store/database.scm (call-with-database): Add two 'sqlite-exec' calls to set 'journal_mode' and 'busy_timeout'.
2018-12-21offload: Recognize build failures due to lack of disk space.Ludovic Courtès
Previously, if a remote build would fail due to lack of disk space, this would be considered a permanent failure and thus cached as a build failure if the local daemon runs with '--cache-failures'. * guix/scripts/offload.scm (transfer-and-offload): Upon 'nix-protocol-error?' call 'node-free-disk-space' and return 1 instead of 100 if the result if lower than 10 MiB.
2018-12-21offload: Skip machines that are low on disk space.Ludovic Courtès
Fixes <https://bugs.gnu.org/33378>. * guix/scripts/offload.scm (node-free-disk-space): New procedure. (%minimum-disk-space): New variable. (choose-build-machine): Call 'node-free-disk-space' and take it into account in addition to LOAD. (check-machine-status): Display the free disk space.
2018-12-21offload: Decompose 'machine-load' into simpler procedures.Ludovic Courtès
* guix/scripts/offload.scm (machine-load): Remove. (node-load, normalized-load): New procedures. (choose-build-machine): Call 'open-ssh-session' and 'make-node' from here; pass the node to 'node-load'. (check-machine-status): Use 'node-load' instead of 'machine-load'. Call 'disconnect!' on SESSION.
2018-12-20import: cran: Try import via CRAN if package is not on Bioconductor.Ricardo Wurmus
* guix/import/cran.scm (fetch-description): Return #F on failure. (cran->guix-package): Retry from CRAN on failure to fetch description from bioconductor.
2018-12-19download: 'built-in-builders*' relies on the functional cache.Ludovic Courtès
The previous caching strategy, which used STORE as an 'eq?' key, would no longer work when the functional cache is used because subsequent store values are not 'eq?'. * guix/download.scm (built-in-builders*): Rewrite in terms of 'mcached'.
2018-12-19utils: Memoize 'absolute-dirname'.Ludovic Courtès
* guix/utils.scm (absolute-dirname): Wrap in 'mlambda'.
2018-12-19packages: Turn 'cache!' into a single-value-return cache.Ludovic Courtès
* guix/packages.scm (cache!): Assume THUNK returns a single value. (cached): Likewise.
2018-12-19Use 'mapm' instead of 'sequence' + 'map'.Ludovic Courtès
Previously we'd use the (sequence M (map P L)) idiom just because 'mapm' was slower (not specialized for the given monad). This is no longer the case since commit dcb95c1fc936d74dfdf84b7e59eff66cb99c5a63. * guix/gexp.scm (lower-inputs): Use (mapm M P L) instead of (sequence M (map P L)). (lower-references, gexp->sexp, imported-files): Likewise. * guix/profiles.scm (profile-derivation): Likewise. * guix/scripts/environment.scm (inputs->requisites): Likewise. * guix/scripts/system.scm (copy-closure): Likewise.
2018-12-19store: Add 'GUIX_PROFILING' support for the object cache.Ludovic Courtès
* guix/store.scm (profiled?): New procedure. (record-operation): Use it. (record-cache-lookup!): New procedure. (lookup-cached-object): Use it.
2018-12-19ui: Report profile hooks separately.Ricardo Wurmus
* guix/ui.scm (profile-hook-derivation?): New procedure. (show-what-to-build): Distinguish among BUILD derivations that match 'profile-hook-derivation?'. Report them separately. * guix/status.scm (hook-message): New procedure. (print-build-event): Display profile hooks with readable hook name. * guix/profiles.scm (info-dir-file, ghc-package-cache-file, ca-certificate-bundle, glib-schemas, gtk-icon-themes, gtk-im-modules, xdg-desktop-database, xdg-mime-database, fonts-dir-file, manual-database): Augment derivation with "type" and "hook" properties.
2018-12-18build: Add dune-build-system.Julien Lepiller
* guix/build/dune-build-system.scm, guix/build-system/dune.scm: New files. * Makefile.am (MODULES): Add them. * doc/guix.texi (Build Systems): Document dune-build-system. * guix/build-system/ocaml.scm (lower, default-findlib, default-ocaml): Export them. (package-with-explicit-ocaml): Also transform packages built with dune-build-system.
2018-12-18guix system: Clarify the three strategies available.swedebugia
* guix/scripts/system.scm (show-help): Clarify the three choices. * doc/guix.texi (Invoking guix system): Add 3 @cindex to make on-error=strategy easier to find. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-12-18ui: Report file names in 'system-error' exceptions from 'execlp'.Timothy Sample
Fixes <https://bugs.gnu.org/33755>. * guix/ui.scm (apply-formals): New macro. (execlp): New error-reporting wrapper. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-12-17publish: Add a 'Cache-Control' header on /nar responses.Ludovic Courtès
Fixes <https://bugs.gnu.org/33721>. Reported by Chris Marusich <cmmarusich@gmail.com>. * guix/scripts/publish.scm (render-nar/cached): Add #:ttl and honor it. (make-request-handler): Pass #:ttl to 'render-nar/cached'. * tests/publish.scm ("with cache, uncompressed"): Pass "--ttl=42h" to 'guix publish'. Check 'Cache-Control' on narinfo response and on nar response.
2018-12-17environment: Support package transformation options.Ludovic Courtès
Fixes <https://bugs.gnu.org/33776>. Reported by Adrien Guilbaud <adrien.guilbaud@inria.fr>. * guix/scripts/environment.scm (show-help): Add call to 'show-transformation-options-help'. (%options): Add %TRANSFORMATION-OPTIONS. (options/resolve-packages): Add 'store' parameter. [transform, package->manifest-entry*]: New procedures. Use 'package->manifest-entry*' instead of 'package->manifest-entry'. (guix-environment): Move definition of 'manifest' within 'with-store'. * tests/guix-environment.sh: Add test.
2018-12-17import: Update opam importer.Julien Lepiller
* guix/import/opam.scm: Update importer for opam 2. * tests/opam.scm: Update tests for the opam 2 importer.