summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2018-10-29Add 'guix processes'.Ludovic Courtès
* guix/scripts/processes.scm, tests/processes.scm: New files. * Makefile.am (MODULES): Add the former. (SCM_TESTS): Add the latter. * po/guix/POTFILES.in: Add guix/scripts/processes.scm. * doc/guix.texi (Invoking guix processes): New node. (Invoking guix-daemon): Reference it.
2018-10-28import: hackage: Do not repeat inputs in native-inputs.Arun Isaac
* guix/import/hackage.scm (hackage-module->sexp): Do not repeat inputs again in native-inputs. native-inputs should only contain packages that are not already listed in inputs.
2018-10-27gexp: 'gexp-modules' now consistently deletes duplicates.Ludovic Courtès
Fixes <https://bugs.gnu.org/32966>. Reported by Clément Lassieur <clement@lassieur.org>. * guix/gexp.scm (gexp-attribute): Add 'equal?' optional parameter; pass it to 'delete-duplicates'. (gexp-modules)[module=?]: New procedure. Pass it to 'gexp-attribute'. * tests/gexp.scm ("gexp-modules deletes duplicates"): New test.
2018-10-27pack: Hide 'zip' colliding binding.Ludovic Courtès
* guix/scripts/pack.scm: Hide 'zip' from (gnu packages compression).
2018-10-27pack: Remove unused variable.Ludovic Courtès
* guix/scripts/pack.scm (self-contained-tarball)[libgcrypt]: Remove.
2018-10-26profiles: Fix typo in exports.Ludovic Courtès
* guix/profiles.scm (&profile-collistion-error): Fix typo in export list.
2018-10-23scripts: Suggest running 'guix gc' when we're short on disk space.Ludovic Courtès
* guix/scripts.scm (%disk-space-warning): New variable. (warn-about-disk-space): New procedure. * guix/scripts/package.scm (build-and-use-profile): Use it. * guix/scripts/system.scm (process-action): Likewise.
2018-10-19tests: Run 'guix pack' tests using the external store.Ludovic Courtès
Fixes <https://bugs.gnu.org/32184>. * guix/tests.scm (call-with-external-store): New procedure. (with-external-store): New macro. * tests/pack.scm (%store): Remove. (test-assertm): Add 'store' parameter. ("self-contained-tarball"): Wrap in 'with-external-store'. * tests/guix-pack.sh: Connect to the external store, if possible, by setting NIX_STORE_DIR and GUIX_DAEMON_SOCKET. Remove most uses of '--bootstrap'.
2018-10-19pack: Fix "-C none -f tarball".Ludovic Courtès
Fixes a regression introduced in 48b444304e206c35cf2c8e0d87a4711f1aac4fd4 whereby "guix pack -C none hello" would fail with: ERROR: In procedure string-join: In procedure string-join: Wrong type argument in position 1: #f builder for `/gnu/store/…-tarball-pack.tar.drv' failed with exit code 1 * guix/scripts/pack.scm (self-contained-tarball): Adjust for when 'compressor-command' returns #f.
2018-10-18gnu: Use pypi.org.Leo Famulari
<pypi.io> redirects to <pypi.org>. * guix/build-system/python.scm (pypi-uri): Replace pypi.io with pypi.org. * guix/import/pypi.scm (pypi-url?): Likewise. * tests/pypi.scm: Likewise.
2018-10-18services: dhcp-client: Deprecate 'dhcp-client-service' procedure.Ludovic Courtès
* gnu/services/networking.scm (dhcp-client-service-type): Add default value. * gnu/system/examples/bare-bones.tmpl: Use (service dhcp-client-service-type) instead of (dhcp-client-service). * gnu/system/examples/beaglebone-black.tmpl: Likewise. * gnu/tests/base.scm (%avahi-os): Likewise. * gnu/tests/databases.scm (%memcached-os): Likewise. (%mongodb-os): Likewise. * gnu/tests/dict.scm (%dicod-os): Likewise. * gnu/tests/mail.scm (%opensmtpd-os): Likewise. (%exim-os): Likewise. (%dovecot-os): Likewise. * gnu/tests/messaging.scm (run-xmpp-test): Likewise. (run-bitlbee-test): Likewise. * gnu/tests/monitoring.scm (%prometheus-node-exporter-os): Likewise. * gnu/tests/networking.scm (%inetd-os): Likewise. (run-iptables-test): Likewise. * gnu/tests/nfs.scm (%base-os): Likewise. * gnu/tests/rsync.scm (%rsync-os): Likewise. * gnu/tests/ssh.scm (run-ssh-test): Likewise. * gnu/tests/version-control.scm (%cgit-os): Likewise. (%git-http-os): Likewise. (%gitolite-os): Likewise. * gnu/tests/virtualization.scm (%libvirt-os): Likewise. * gnu/tests/web.scm (%httpd-os): Likewise. (%nginx-os): Likewise. (%varnish-os): Likewise. (%php-fpm-os): Likewise. (%hpcguix-web-os): Likewise. (%tailon-os): Likewise. * tests/guix-system.sh: Likewise. * doc/guix.texi (Networking Services): Document 'dhcp-client-service-type' and remove 'dhcp-client-service'.
2018-10-17import cran: Document "recursive" option.Pierre Neidhardt
* guix/scripts/import/cran.scm: (show-help): Document "recursive" option.
2018-10-16ui: Fix port-buffering with guile@2.0.Eric Bavier
* guix/status.scm (build-event-output-port)[guile@2.0]: Do not call 'setvbuf' on custom binary port. * tests/status.scm (current-build-output-port, UTF-8 + garbage)[guile@2.0]: Use "?" in place of REPLACEMENT CHARACTER.
2018-10-16import: json: Handle the error case.Danny Milosavljevic
* guix/import/json.scm (json-fetch-alist): Handle the error case.
2018-10-15status: Build upon multiplexed build output.Ludovic Courtès
This allows for more accurate status tracking and parsing of extended build traces. * guix/status.scm (multiplexed-output-supported?): New procedure. (print-build-event): Don't print \r when PRINT-LOG? is true. Adjust 'build-log' handling for when 'multiplexed-output-supported?' returns true. (bytevector-index, split-lines): New procedures. (build-event-output-port)[%build-output-pid, %build-output] [%build-output-left]: New variables. [process-line]: Handle "@ build-output" traces. [process-build-output]: New procedure. [write!]: Add case for when %BUILD-OUTPUT-PID is true. Use 'bytevector-index' rather than 'string-index'. (compute-status): Add #:derivation-path->output-path. Use it. * tests/status.scm ("compute-status, multiplexed build output"): New test. ("build-output-port, UTF-8") ("current-build-output-port, UTF-8 + garbage"): Adjust to new 'build-log' output. * guix/scripts/build.scm (set-build-options-from-command-line): Pass #:multiplexed-build-output?. (%default-options): Add 'multiplexed-build-output?'. * guix/scripts/environment.scm (%default-options): Likewise. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/package.scm (%default-options): Likewise. * guix/scripts/pull.scm (%default-options): Likewise. * guix/scripts/system.scm (%default-options): Likewise.
2018-10-15daemon: Support multiplexed build output.Ludovic Courtès
This allows clients to tell whether output comes from the daemon or, if it comes from a builder, from which builder it comes. The latter is particularly useful when MAX-BUILD-JOBS > 1. * nix/libstore/build.cc (DerivationGoal::tryBuildHook) (DerivationGoal::startBuilder): Print the child's PID in "@ build-started" traces. (DerivationGoal::handleChildOutput): Define 'prefix', pass it to 'writeToStderr'. * nix/libstore/globals.cc (Settings:Settings): Initialize 'multiplexedBuildOutput'. (Settings::update): Likewise. * nix/libstore/globals.hh (Settings)[multiplexedBuildOutput]: New field. Update 'printBuildTrace' documentation. * nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0.163. * nix/nix-daemon/nix-daemon.cc (performOp) <wopSetOptions>: Special-case "multiplexed-build-output" and remove "use-ssh-substituter". * guix/store.scm (set-build-options): Add #:multiplexed-build-output? and honor it. (%protocol-version): Bump to #x163. * tests/store.scm ("multiplexed-build-output"): New test. fixlet
2018-10-14status: Avoid "sucessfully built" messages when in quiet mode.Ludovic Courtès
* guix/status.scm (print-build-event): Print "successfully built" messages only when PRINT-LOG? is true, like we do for 'substituter-started' events.
2018-10-14describe: Canonicalize the profile.Ludovic Courtès
Fixes a regression introduced in 795d430d90e41eb172315bfccf79c9f13fc0ebfa whereby 'guix describe' would no longer display the generation number of ~/.config/guix/current. * guix/scripts/describe.scm (guix-describe): Call 'canonicalize-profile'.
2018-10-12pull: Fix target of /var/guix/profiles/per-user/USER/current-guix.Ludovic Courtès
This is a followup to 8155a209071f981fbf359975f463be4bcf8fa23e. * guix/scripts/pull.scm (migrate-generations): Compute the right target for /var/guix/profiles/per-user/USER/current-guix. Previously we'd return "current-N-link" instead of "current-guix-N-link'.
2018-10-12pull: Don't use rename(2) across potentially different devices.Ludovic Courtès
Reported by Formbi on #guix. * guix/scripts/pull.scm (migrate-generations): Use 'symlink' and 'delete-file' instead of 'rename-file'. The latter could lead to EXDEV when $HOME and /var were different partitions.
2018-10-12profiles: 'user-friendly-profile' now recognizes ~/.config/guix/current.Ludovic Courtès
* guix/profiles.scm (%known-shorthand-profiles): New variable. (user-friendly-profile): Use it.
2018-10-12pull: Create /var/guix/profiles/per-user/USER/current-guix.Ludovic Courtès
Previously the migration code would fail to create that file, so ~/.config/guix/current would be dangling. * guix/scripts/pull.scm (migrate-generations): Create /var/guix/profiles/per-user/USER/current-guix.
2018-10-11pull: Turn ~/.config/guix/current into a symlink to /var/guix/profiles.Ludovic Courtès
This is more consistent with what 'guix package' does, more pleasant for users (we no longer clobber ~/.config/guix), and more cluster-friendly (since /var/guix/profiles is usually an NFS share already.) * guix/scripts/pull.scm (%current-profile, %user-profile-directory): New variables. (migrate-generations, ensure-default-profile): New procedures. (guix-pull): Use %CURRENT-PROFILE by default. Call 'ensure-default-profile'. * doc/guix.texi (Invoking guix pull): Adjust 'guix package -p ~/.config/guix/current' example. * guix/scripts.scm (warn-about-old-distro): Check %PROFILE-DIRECTORY "/current-guix".
2018-10-11profiles: Generalize 'canonicalize-profile'.Ludovic Courtès
* guix/profiles.scm (canonicalize-profile): Rewrite to work with any profile that lives under %PROFILE-DIRECTORY.
2018-10-11profiles: Add 'ensure-profile-directory'.Ludovic Courtès
* guix/scripts/package.scm (ensure-default-profile): Move /var/guix/profiles/per-user handling to... * guix/profiles.scm (ensure-profile-directory): ... here. New procedure. * po/guix/POTFILES.in: Add 'guix/profiles.scm'.
2018-10-10self: Use Guile 2.2 unconditionally for recent 'guix pull'.Ludovic Courtès
Fixes <https://bugs.gnu.org/32929>. Reported by Michael Bowcutt <mwb71@case.edu>. * guix/self.scm (guix-derivation)[guile]: Use "2.2" when PULL-VERSION >= 1. Likewise for the #:guile-version argument.
2018-10-09guix build: '-f' accepts file-like objects.Ludovic Courtès
* guix/scripts/build.scm (options->things-to-build)[validate-type]: Check for 'file-like?'. (options->derivations): Accept 'file-like?'. * tests/guix-build.sh: Add a test with 'computed-file'. * doc/guix.texi (Additional Build Options): Mention file-like objects.
2018-10-09profiles: Make Geiser happy.Ludovic Courtès
* guix/profiles.scm (manual-database)[config.scm]: Use ungexp/quote trick to placate Geiser, which otherwise thinks it's in (guix config).
2018-10-09pull: '-l' now honors '-p'.Ludovic Courtès
* guix/scripts/pull.scm (process-query): Add 'profile' parameter and remove 'profile' local variable. (guix-pull): Adjust caller.
2018-10-09status: Gracefully handle invalid UTF-8 in build logs.Ludovic Courtès
* guix/status.scm (maybe-utf8->string): New procedure. (build-event-output-port): Use it in lieu of 'utf8->string'. * tests/status.scm ("build-output-port, UTF-8") ("current-build-output-port, UTF-8 + garbage"): New tests.
2018-10-07build-system/glib-or-gtk: Build 'in-source' by default.Leo Famulari
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Change to 'out-of-source? #f'. * gnu/packages/audio.scm (audacity)[arguments]: Use the default 'out-of-source?' setting. * gnu/packages/libreoffice.scm (libreoffice): Likewise.
2018-10-05progress: Fix total size in "@ download-succeeded" traces.Ludovic Courtès
Fixes a regression introduced in 1d0be47ab680db938ac8da1ee65e1de91e198f67 whereby the total size for directories (coming from substitutes) would be 4KiB. This led the progress bar to go back to the start, typically. * guix/progress.scm (progress-reporter/trace): Add 'total'. In 'start', initialize it. Adjust 'report' to update it. Adjust 'stop' to prefer SIZE as the actual size and then TOTAL. Do not use the size of FILE as the total since that could be 4KiB when FILE is a directory.
2018-10-04progress: Generate valid 'download-progress' traces when the size is unknown.Ludovic Courtès
Fixes <https://bugs.gnu.org/32895>. Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>. * guix/progress.scm (progress-reporter/trace): In 'stop', make sure SIZE is an integer. Previously we'd generate a "@ download-progress" trace with #f for the 'transferred' number when downloading files whose size is not known in advance.
2018-10-02build-system/asdf: Properly handle dependency specification casing.Andy Patterson
* guix/build/lisp-utils.scm (normalize-dependency): Modify match clauses to match the upper-case symbols that lisp produces. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-10-01guix: import: stackage: Fix JSON accessors.Timothy Sample
* guix/import/stackage.scm (lts-info-ghc-version, lst-info-packages): Use assoc-ref for accessing parsed JSON.
2018-10-01build-system: haskell: Add #:cabal-revision argument.Timothy Sample
Add a #:cabal-revision argument for specifying which Cabal file revision from Hackage should be used. * guix/build-system/haskell.scm (source-url->revision-url): New function. (lower): Accept a cabal-revision keyword argument, convert it to an origin record, and add it to the resulting bag's host-inputs. (haskell-build): Pass the cabal-revision input to the builder as an argument. * guix/build/haskell-build-system.scm (patch-cabal-file): New phase. (%standard-phases): Add it.
2018-09-30status: Always print the daemon's "waiting for locks" messages.Ludovic Courtès
Reported by Ricardo Wurmus <rekado@elephly.net>. * guix/status.scm (print-build-event) <build-log>: Let "waiting for locks" messages through.
2018-09-28status: Tweak colorization.Ludovic Courtès
* guix/status.scm (colorize-log-line): Add "\<" before "FAIL" (to distinguish from "XFAIL". Use MAGENTA instead of ORANGE, which doesn't exist.
2018-09-28status: Be more defensive when looking for a log file.Ludovic Courtès
* guix/store.scm (derivation-log-file): New procedure.o (log-file): Use it. * guix/status.scm (print-build-event): Use 'derivation-log-file' instead of 'log-file'. Check wheter the return value is #f.
2018-09-27perform-download: Optionally report a "download-progress" trace.Ludovic Courtès
* guix/scripts/perform-download.scm (perform-download): Add #:print-build-trace? and pass it to 'url-fetch'. (guix-perform-download): Define 'print-build-trace?' and pass it to 'perform-download'. * guix/build/download.scm (ftp-fetch): Add #:print-build-trace? and honor it. (url-fetch): Likewise. * nix/libstore/builtins.cc (builtinDownload): Set _NIX_OPTIONS environment variable.
2018-09-27Add (guix status) and use it for pretty colored output.Ludovic Courtès
* guix/progress.scm (progress-reporter/trace): New procedure. (%progress-interval): New variable. (progress-reporter/file): Use it. * guix/scripts/build.scm (set-build-options-from-command-line): Pass #:print-extended-build-trace?. (%default-options): Add 'print-extended-build-trace?'. (guix-build): Parameterize CURRENT-TERMINAL-COLUMNS. Use 'build-status-updater'. * guix/scripts/environment.scm (%default-options): Add 'print-extended-build-trace?'. (guix-environment): Wrap body in 'with-status-report'. * guix/scripts/pack.scm (%default-options): Add 'print-build-trace?' and 'print-extended-build-trace?'. (guix-pack): Wrap body in 'with-status-report'. * guix/scripts/package.scm (%default-options, guix-package): Likewise. * guix/scripts/system.scm (%default-options, guix-system): Likewise. * guix/scripts/pull.scm (%default-options, guix-pull): Likewise. * guix/scripts/substitute.scm (progress-report-port): Don't call STOP when TOTAL is zero. (process-substitution): Add #:print-build-trace? and honor it. (guix-substitute)[print-build-trace?]: New variable. Pass #:print-build-trace? to 'process-substitution'. * guix/status.scm: New file. * guix/store.scm (set-build-options): Add #:print-extended-build-trace?; pass it into PAIRS. (%protocol-version): Bump. (protocol-version, nix-server-version): New procedures. (current-store-protocol-version): New variable. (with-store, build-things): Parameterize it. * guix/ui.scm (build-output-port): Remove. (colorize-string): Export. * po/guix/POTFILES.in: Add guix/status.scm. * tests/status.scm: New file. * Makefile.am (SCM_TESTS): Add it. * nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x162. * nix/libstore/build.cc (DerivationGoal::registerOutputs) (SubstitutionGoal::finished): Print a "@ hash-mismatch" trace before throwing.
2018-09-27progress: Add 'display-download-progress'.Ludovic Courtès
* guix/progress.scm (display-download-progress): New procedure. (progress-reporter/file)[render]: Rewrite in terms of 'display-download-progress'.
2018-09-26guix system: Load all services on reconfigure, not just stopped ones.Carlo Zancanaro
This uses the 'replacement' service slot introduced in the Shepherd version 0.5.0. * gnu/services/shepherd.scm (shepherd-service-upgrade): Return a list of services that need to be restarted to complete their upgrade. * guix/scripts/system.scm (call-with-service-upgrade-info): Rename an internal variable to reflect the change to shepherd-service-upgrade. (upgrade-shepherd-services): Call 'load-services/safe' instead of 'load-services'. Print a message about services that need to be manually restarted. * gnu/services/herd.scm (load-services/safe): New procedure. * doc/guix.texi (Invoking guix system): Document the new behaviour. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2018-09-26git-download: Don't assume the working directory is the parent of ".git".Marius Bakke
This makes it do the right thing w.r.t. git worktrees. * guix/git-download.scm (git-file-list): Use REPOSITORY-WORKING-DIRECTORY to locate checkout. Rename from "top" to "workdir".
2018-09-25pull: Try harder to use the host's X.509 certificates.Ludovic Courtès
* guix/scripts/pull.scm (honor-x509-certificates): Use commonly-found certificate bundles.
2018-09-25substitute: Progress port really closes underlying port.Ludovic Courtès
* guix/scripts/substitute.scm (progress-report-port): Use 'close-port' instead of 'close-connection'. Move 'stop' call first.
2018-09-25progress: 'progress-reporter-report!' takes any number of arguments.Ludovic Courtès
* guix/progress.scm (progress-reporter-report!): Accept an arbitrary number of arguments and pass them to REPORT.
2018-09-25gnupg: Change default keyserver.Ludovic Courtès
* guix/gnupg.scm (%openpgp-key-server): Change default to "pool.sks-keyservers.net".
2018-09-23database: Register each store item only once.Ludovic Courtès
Fixes <https://bugs.gnu.org/32600>. Reported by Leo Famulari. * guix/store/database.scm (register-items): Check whether TO-REGISTER is in DB by calling 'path-id', and skip the reset-timestamps, registration, and deduplication phases when it is.
2018-09-23database: 'register-items' shows a progress bar.Ludovic Courtès
* guix/store/database.scm (register-items): Add #:log-port. Use 'progress-reporter/bar' to show a progress report. (register-path): Pass #:log-port to 'register-items'.