Commit Graph

4199 Commits

Author SHA1 Message Date
Ludovic Courtès 88bc3c89bf
progress: Provide the proper type for %PROGRESS-INTERVAL.
The (srfi srfi-19) module of Guile 2.9.2 catches the wrong type.

* guix/progress.scm (%progress-interval): Change type to TIME-DURATION.
2019-06-02 01:38:36 +02:00
Ludovic Courtès 87399dfc20
lzlib: 'make-lzip-input-port' better handles end of decompression.
Suggested by Pierre Neidhardt <mail@ambrevar.xyz>.

* guix/lzlib.scm (lzread!): Call 'lz-decompress-finish' when
'feed-decoder!' returns EOF.  Call 'lz-decompress-finished?' to
determine end of compression.
2019-06-01 15:26:30 +02:00
Robert Vollmert 1cc12357a6
import: hackage: Update list of ghc-included packages.
Update the list of excepted dependencies for current ghc-8.4, based on the
release notes at
https://downloads.haskell.org/~ghc/8.4.3/docs/html/users_guide/8.4.3-notes.html

Particularly, this adds `text` to the list, which is a dependency of `parsec`
which was already on the list before, causing build failures with updated
versions of the `text` package.

* guix/import/hackage.scm (ghc-standard-libraries): Update list.

Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
2019-06-01 06:22:57 +02:00
Ludovic Courtès 73bddab545
publish: Factorize 'compress-nar'.
* guix/scripts/publish.scm (compress-nar): New procedure.
(bake-narinfo+nar): Use it.
2019-05-29 23:16:49 +02:00
Ludovic Courtès e84e036943
publish: Remove outdated comment.
* guix/scripts/publish.scm (make-request-handler): Remove outdated TODO.
2019-05-29 23:16:49 +02:00
Ricardo Wurmus 531940d388
import: cran: Ignore invalid packages from the system requirements.
* guix/import/cran.scm (description->package): Filter invalid packages from
the list of system requirements.
2019-05-28 23:56:59 +02:00
Ricardo Wurmus fa86654824
self: Fix unquoting.
This is a follow-up to commit dfc69e4b6d.

* guix/self.scm (whole-package): Unquote %storedir in the daemon wrapper.
2019-05-28 23:21:27 +02:00
Ludovic Courtès 35d1354fe8
publish: Display the compression method and level in use.
* guix/scripts/publish.scm (guix-publish): Use 'info' instead of
'format' for the initial message.  When COMPRESSION is true, display the
method and level in use.
2019-05-27 22:47:24 +02:00
Ludovic Courtès c131bea276
lzlib: 'lzread!' never returns more than it was asked for.
Fixes a bug whereby 'lzread!' could return more than COUNT.

* guix/lzlib.scm (lzread!): Rewrite in a semi-functional style.
2019-05-27 22:47:24 +02:00
Ludovic Courtès 73ac9098b1
self: Add dependency on lzlib.
* guix/self.scm (compiled-guix): Pass #:lzlib to 'make-config.scm'.
(make-config.scm): Add #:lzlib and honor it.
(specification->package): Add "lzlib".
2019-05-27 22:47:24 +02:00
Ludovic Courtès 66229b04ae
publish: Add support for lzip.
* guix/scripts/publish.scm (show-help, %options): Support '-C METHOD'
and '-C METHOD:LEVEL'.
(default-compression): New procedure.
(bake-narinfo+nar): Add lzip.
(nar-response-port): Likewise.
(string->compression-type): New procedure.
(make-request-handler): Generalize /nar/gzip handler to handle /nar/lzip
as well.
* tests/publish.scm ("/nar/lzip/*"): New test.
("/*.narinfo with lzip compression"): New test.
* doc/guix.texi (Invoking guix publish): Document it.
(Requirements): Mention lzlib.
2019-05-27 22:47:24 +02:00
Ludovic Courtès 4e48923e75
utils: Support compression and decompression with lzip.
* guix/utils.scm (lzip-port): New procedure.
(decompressed-port, compressed-port, compressed-output-port): Add 'lzip
case.
* tests/utils.scm <top level>: Call 'test-compression/decompression' for
'lzip as well.
2019-05-27 22:47:24 +02:00
Ludovic Courtès 2a991f3ae4
lzlib: Add 'make-lzip-input-port/compressed'.
* guix/lzlib.scm (lzwrite!, make-lzip-input-port/compressed): New
procedures.
* tests/lzlib.scm ("make-lzip-input-port/compressed"): New test.
* guix/tests.scm (%seed): Export.
2019-05-27 22:47:24 +02:00
Ludovic Courtès e13354a7ca
lzlib: Adjust 'lz-compress-read' docstring.
* guix/lzlib.scm (lz-compress-read): The integer return can be zero;
adjust docstring accordingly.
2019-05-27 22:47:23 +02:00
Ludovic Courtès ad7466aafd
import: hackage: Fix Cabal test.
* guix/import/hackage.scm (hackage->guix-package): Remove call to 'memoize'.
(hackage->guix-package/m): New procedure.
(hackage-recursive-import): Use it.
* tests/hackage.scm ("hackage->guix-package test 6"): Adjust.

Co-authored-by: Robert Vollmert <rob@vllmrt.net>
2019-05-26 23:20:30 +02:00
Robert Vollmert 002d17dcaa
discovery: 'all-modules' returns modules in path order.
A particular effect of this is that if there are ambiguous
packages in a directory specified with `-L module_dir` and the
distribution, the version from `module_dir` will be loaded,
which is usually what would be expected. (E.g. for `guix build`
or `guix package -i`.)

* guix/discovery.scm (all-modules): Return modules in path order.
* tests/guix-package.sh: Test local definitions take precedence.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-05-26 23:02:02 +02:00
Ludovic Courtès dfc69e4b6d
self: 'guix-daemon' honors %localstatedir, %sysconfdir, and %storedir.
Fixes <https://bugs.gnu.org/35874>.
Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.

Previously, the 'guix-daemon' program provided by 'guix pull' would
systematically use default directory locations for these.

* guix/self.scm (whole-package)[wrap]: Set GUIX_STATE_DIRECTORY,
GUIX_CONFIGURATION_DIRECTORY, and NIX_STORE_DIR.
2019-05-26 22:01:42 +02:00
Robert Vollmert 0607f89088
import: hackage: Recognize "BSD-3-Clause" and "PublicDomain".
* guix/import/hackage.scm (string->license): Add two licenses.

Signed-off-by: Marius Bakke <mbakke@fastmail.com>
2019-05-26 10:22:05 +02:00
Ludovic Courtès 7fcb86da2b
store: Fix 'hash-part->path' docstring.
* guix/store.scm (hash-part->path): Adjust docstring to match reality.
2019-05-26 01:34:17 +02:00
Ludovic Courtès 493375cdb2
publish: Maintain a hash-part-to-store-item mapping in cache.
Fixes <https://bugs.gnu.org/33897>.

* guix/scripts/publish.scm (hash-part-mapping-cache-file)
(hash-part->path*): New procedures.
* guix/scripts/publish.scm (render-narinfo/cached)[delete-entry]: Delete
the 'hash-part-mapping-cache-file'.
Use 'hash-part->path*' instead of 'hash-part->path'.
* tests/publish.scm ("with cache, vanishing item"): New test.
2019-05-26 01:34:17 +02:00
Marius Bakke 57df83e07d
Merge branch 'staging' into core-updates 2019-05-25 00:25:15 +02:00
Ricardo Wurmus e96619baf7
import: cran: Ignore invalid packages.
* guix/import/cran.scm (invalid-packages): New variable.
(description->package): Use it.
2019-05-23 16:10:32 +02:00
Ludovic Courtès b1903b99e0
weather: Accept package specs on the command line.
Previously, non-option arguments would be ignored.  Now it puts them to
good use.

* guix/scripts/weather.scm (guix-weather)[package-list]: New procedure.
Use it.
* doc/guix.texi (Invoking guix weather): Adjust accordingly.
2019-05-22 00:09:42 +02:00
Ludovic Courtès 3f8326237d
pack: Warn when building an empty pack.
* guix/scripts/pack.scm (guix-pack): Warn when MANIFEST has zero
entries.
2019-05-22 00:09:41 +02:00
Ludovic Courtès fd214f1522
pack: Add '--root'.
* guix/scripts/pack.scm (%options, show-help): Add "--root".
(guix-pack): Honor it.
* tests/guix-pack.sh: Test it.
* doc/guix.texi (Invoking guix pack): Document it.
2019-05-22 00:09:41 +02:00
Ludovic Courtès a901574727
self: Remove unused variables.
* guix/self.scm (info-manual)[po4a, gettext]: Remove.
2019-05-20 23:23:00 +02:00
Ludovic Courtès ce10e6053b
guix system: Type-check the file or expression.
Previously, users would get a wrong-type-arg exception down the road
with an intimidating backtrace.

* guix/scripts/system.scm (process-action)[ensure-operating-system]: New
procedure.
Use it.
2019-05-16 13:24:06 +02:00
Ludovic Courtès 7ff4fde257
docker: 'build-docker-image' accepts an optional #:entry-point.
* guix/docker.scm (config): Add #:entry-point and honor it.
(build-docker-image): Likewise.
2019-05-15 16:36:21 +02:00
Arun Isaac 06c7b1f614
import: github: Sort releases before picking the latest one.
* guix/import/github.scm (latest-released-version): Sort releases before
picking the first one as the latest.
2019-05-15 13:29:50 +05:30
Arun Isaac c558772b0f
import: github: Improve readability.
* guix/import/github.scm (latest-released-version)[release->version]: Separate
out release->version as a new function.
2019-05-15 13:29:50 +05:30
Ludovic Courtès 45d41c035e
guix build: Gracefully handle invalid '--with-git-url' specs.
* guix/scripts/build.scm (transform-package-source-git-url): Add case
for when 'string-split' does not return exactly two elements.
2019-05-14 12:11:05 +02:00
Maxim Cournoyer d03de6be0a
vm: Auto-detect if inputs should be registered.
The default value of the argument REGISTER-CLOSURE? of the ISO9660-IMAGE,
QEMU-IMAGE and SYSTEM-DOCKER-IMAGE procedures can be computed automatically,
since the operating-system definition is available in its context.  When the
operating-system definition does not contain the GUIX-SERVICE-TYPE, do not
register the closure in the database of Guix, as it takes time and doesn't
serve a purpose.

* gnu/system/vm.scm (has-guix-service-type): Add predicate.
(iso9660-image)[register-closures?]: Use it to compute the argument's default
value.
(qemu-image)[register-closures?]: Likewise, and update docstring.
(system-docker-image)[register-closures?]: Likewise.
(system-disk-image): Do not explicit a value for the REGISTER-CLOSURES?
argument of the ISO9660-IMAGE and QEMU-IMAGE procedure calls, so that its
default value is used instead.
* guix/scripts/system.scm (system-derivation-for-action): Do not explicit a
value for the REGISTER-CLOSURES? argument of the SYSTEM-DOCKER-IMAGE
procedure call, so that its default value is used instead.
2019-05-13 22:59:09 -04:00
Arun Isaac b33454ae0b
linux-container: Support container network sharing.
* gnu/system/linux-container.scm (container-essential-services): If network is
to be shared with the host, remove network configuration files from etc
service.
(containerized-operating-system): If network is to be shared with the host,
remove nscd service and map host's /var/run/nscd if it exists.
(container-script): If network is to be shared with the host, do not create
network namespace.
* guix/scripts/system.scm (system-derivation-for-action): Add
#:container-shared-network? argument.
(perform-action): Add #:container-shared-network? argument.
(show-help): Add "-N, --network" help information.
(%options): Add network option.
(process-action): Call perform-action with #container-shared-network? argument.
* doc/guix.texi (Invoking guix system): Document the "-N, --network" option.

Co-authored-by: Christopher Baines <mail@cbaines.net>
2019-05-14 02:54:58 +05:30
宋文武 9bc8175cfa
download: Support 'https_proxy'.
* guix/build/download.scm (setup-http-tunnel): New procedure.
(open-connection-for-uri): Honor the 'https_proxy' environment variable.
2019-05-13 21:36:03 +08:00
Ludovic Courtès 637a2a23ea
gnu-maintenance: Update URL for package databases.
The databases migrated away from the Womb a couple of days ago.

* guix/gnu-maintenance.scm (%gnumaint-base-url): Update URL.
2019-05-12 23:15:13 +02:00
Ivan Petkov e88735b45f
build/cargo-utils: Remove "src-name" parameter.
* gnu/packages/gnuzilla.scm (icecat)[arguments]<#:phases>
[patch-cargo-checksums]: Delete "null-file" variable.
* gnu/packages/rust.scm (%cargo-reference-project-file): Delete variable.
* gnu/packages/rust.scm (rust-1.19): Remove reference to
"%cargo-reference-project-file".
* guix/build/cargo-utils.scm (generate-checksums): Remove "src-name"
parameter.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2019-05-10 00:44:08 +02:00
Marius Bakke 5f5499d684
syscalls: Add 'arp-network-interface?'.
* guix/build/syscalls.scm (IFF_NOARP): New variable.
(arp-network-interface?): New public procedure.
2019-05-09 20:00:21 +02:00
Ludovic Courtès a0dc97a517
pull: Display 'hash guix' hint when the new and old 'guix' are different.
Fixes <https://bugs.gnu.org/35601>.
Reported by Diego Nicola Barbato <dnbarbato@posteo.de>.

Previously we were calling (which "guix") after the new profile had been
built and symlinked, so in most cases the hint would not be triggered,
even though it should have been triggered.

* guix/scripts/pull.scm (build-and-install)[guix-command]: New variable.
Compare PROFILE/bin/guix against GUIX-COMMAND.
2019-05-09 17:42:31 +02:00
Chris Marusich 387e6b9e34
ui: Make package outputs searchable.
* guix/ui.scm (relevance): Allow the "field" procedure of a metric to
return a list, and handle that case appropriately.  Update docstring.
(%package-metrics): Add a metric for package outputs.
* guix/scripts/package.scm (find-packages-by-description): Update
docstring.
* tests/guix-package.sh: Add a test case to verify that package outputs are
included in search results.

Co-authored-by: Tobias Geerinckx-Rice <me@tobias.gr>
2019-05-09 00:10:34 -07:00
Maxim Cournoyer 4ac69ea10f
Add (guix bzr-download).
* guix/bzr-download.scm, guix/build/bzr.scm,
etc/snippets/scheme-mode/guix-bzr-reference: New files.
* Makefile.am (MODULES): Add them.
* etc/snippets/scheme-mode/guix-origin: Add "bzr-fetch" to the origin choices.
2019-05-09 00:22:37 -04:00
Pierre Neidhardt ecfc54403e
guix: Simplify and robustify lzread!.
* guix/lzlib.scm (lzread!): Do it.

Previously lzread! would fail if COUNT was bigger
than (lz-decompress-write-size).  This is possible if a previous call to
lzread! didn't empty the LZ_decompress input buffer (e.g. BV was too small to
fit all the data).
2019-05-07 18:40:40 +02:00
Ludovic Courtès d108f59761
environment: Non ad-hoc mode also honors transformation options.
Fixes <https://bugs.gnu.org/35618>.
Reported by Florent Pruvost <florent.pruvost@inria.fr>.

* guix/scripts/environment.scm (options/resolve-packages): Add call to
TRANSFORM in non "ad-hoc" case.
* tests/guix-environment.sh: Add test.
2019-05-07 15:46:53 +02:00
Pierre Neidhardt fea338c6ca
Add (guix lzlib).
* guix/lzlib.scm, tests/lzlib.scm: New files.
* Makefile.am (MODULES): Add guix/lzlib.scm.
(SCM_TESTS): Add tests/lzlib.scm.
* m4/guix.m4 (GUIX_LIBLZ_LIBDIR): New macro.
* configure.ac (LIBLZ_LIBDIR): Use it.  Define and substitute
'LIBLZ'.
* guix/config.scm.in (%liblz): New variable.
* guix/self.scm (make-config.scm): Add TODO comment.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2019-05-06 23:21:33 +02:00
Maxim Cournoyer a321312e3a
build: go-build-system: Follow-up to commit f42e4ebb56.
This follows commit f42e4ebb56, which made it so that the unpack phase return
value could be left unspecified.

* guix/build/go-build-system.scm (unpack): Ensure that the value returned upon
a successful completion of the phase is #t.
2019-05-05 23:01:03 -04:00
Maxim Cournoyer 2edec51c5e
build: go-build-system: Follow-up commit.
There was an extraneous pair of parens in commit 7e84d3eef7.  Thanks for Mark
Weaver for reporting the issue.

* guix/build/go-build-system.scm (unpack): Remove the extraneous pair of
  parentheses surrounding the `display' function call.
2019-05-05 22:41:11 -04:00
Maxim Cournoyer f42e4ebb56
build: go-build-system: Ensure uniform unpacking directory.
Depending on whether the source is a directory or an archive, we strip the
source directory or preserve it, respectively.  This change makes it so that
whether the type of the source, it is unpacked at the expected location given
by the IMPORT-PATH of the Go build system.

* guix/build/go-build-system.scm: Add the (ice-9 ftw) module.
(unpack): Add inner procedure to maybe strip the top level directory of an
archive, document it and use it.
2019-05-05 20:06:19 -04:00
Maxim Cournoyer 7e84d3eef7
build: go-build-system: Use WHEN for side-effect conditionals.
* guix/build/go-build-system.scm (unpack): Replace single branch `if' by
`when'.
2019-05-05 20:06:18 -04:00
Maxim Cournoyer b5f0528354
build: go-build-system: Re-ident.
* guix/build/go-build-system.scm (unpack): Fix indentation.
2019-05-05 20:06:18 -04:00
Ricardo Wurmus 6490cd31cc
guix: Update to Bioconductor 3.9.
* guix/build-system/r.scm (bioconductor-uri): Use 3.9 archive URL.
* guix/import/cran.scm (%bioconductor-version): Update to 3.9.
2019-05-06 00:14:27 +02:00
Ludovic Courtès 746ac457cc
Merge branch 'version-1.0.0' 2019-05-02 15:32:30 +02:00
Marius Bakke 3b458d5462
Merge branch 'master' into core-updates 2019-05-01 23:11:41 +02:00
Ludovic Courtès 757e633d57
build: Change default substitute server to "ci.guix.gnu.org".
* config-daemon.ac: Replace "ci.guix.info" with "ci.guix.gnu.org".
* doc/guix.texi (SUBSTITUTE-SERVER): Likewise.
* etc/substitutes/ci.guix.gnu.org.pub: New file.
* Makefile.am (dist_pkgdata_DATA): Add it.
* guix/scripts/build.scm (%default-log-urls): Update.
* guix/scripts/substitute.scm (%default-substitute-urls): Likewise.
* guix/store.scm (%default-substitute-urls): Likewise.
* guix/self.scm (miscellaneous-files): Add "ci.guix.gnu.org".
2019-05-01 11:05:47 +02:00
Tobias Geerinckx-Rice e13bd3088d
guix: Fix another typo in another docstring.
* guix/build/clojure-utils.scm (include-list\exclude-list)<docstring>:
Fix typo.
2019-04-30 14:13:50 +02:00
Tobias Geerinckx-Rice 88401314f9
guix: Fix typo in docstring.
* guix/build/syscalls.scm (device-in-use?)<docstring>: Fix typo.
2019-04-30 13:56:35 +02:00
Ludovic Courtès c20d4cac1f
processes: Gracefully handle daemons without clients.
Fixes <https://bugs.gnu.org/34716>.
Reported by Mark H Weaver <mhw@netris.org>.

The problem could be reproduced by running, on one hand:

  sh -c 'exec -a guix-daemon sleep 777'

and on the other hand:

  guix processes

If there is no process with PID 777, 'guix processes' would barf as it
stumbles upon a <daemon-session> record whose client is #f.

* guix/scripts/processes.scm (daemon-sessions)[child-process->session]:
New procedure, with lambda formerly passed to 'map'.  Handle #f returns
from 'lookup-process'.
Call 'child-process->session' within 'filter-map', not just 'map'.
2019-04-29 21:54:10 +02:00
Ludovic Courtès c21d912a02
processes: 'process-open-files' ignores disappeared /proc/PID/fd entries.
Previously, 'process-open-files' would throw ENOENT if an entry had
vanished after the 'scandir' call and before the 'readlink' call.

* guix/scripts/processes.scm (process-open-files): Catch ENOENT errors
from 'readlink'.
2019-04-29 21:39:38 +02:00
Ludovic Courtès da56f10971
guix package: Add 'guix search' alias.
* guix/scripts/search.scm: New file.
* Makefile.am (MODULES): Add it.
* po/guix/POTFILES.in: Add it.
* tests/guix-package-aliases.sh: Add test.
* doc/guix.texi (Invoking guix package): Document it and use it in a
couple of examples.
2019-04-29 12:19:24 +02:00
rendaw 9d3053819d
file-systems: Support the 'no-atime' flag.
* guix/build/syscalls.scm (MS_NOATIME): New variable.
* gnu/build/file-systems.scm (mount-flags->bit-mask): Support it.
* doc/guix.texi (File Systems): Document it and add cross-references to
the relevant documentation.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2019-04-29 12:19:03 +02:00
Ludovic Courtès d824cfbabe
guix package: Add 'install', 'remove', and 'upgrade' aliases.
* guix/scripts/install.scm, guix/scripts/remove.scm,
guix/scripts/upgrade.scm, tests/guix-package-aliases.sh: New files.
* Makefile.am (MODULES, SH_TESTS): Add them.
* po/guix/POTFILES.in: Add them.
* guix/scripts/package.scm (guix-package): Split with...
(guix-package*): ... this.  New procedure.
* doc/guix.texi (Invoking guix package): Document them.
(Binary Installation, Application Setup, Package Management)
(Packages with Multiple Outputs, Package Modules)
(X.509 Certificates, Installing Debugging Files): Use 'guix install' in
simple examples.
* etc/completion/bash/guix (_guix_complete): Handle "install", "remove",
and "upgrade".
2019-04-29 10:13:44 +02:00
Ludovic Courtès 0663302618
describe: Provide a hint when origin detection fails.
* guix/scripts/describe.scm (display-checkout-info): Add call to
'display-hint' in the error case.
2019-04-28 22:57:06 +02:00
Ludovic Courtès 7d62fa206b
Merge branch 'staging' 2019-04-28 14:45:35 +02:00
Julien Lepiller 554b30d2ac
self: Rebuild translated manuals.
* guix/self.scm (info-manual): Run po4a and related commands to generate
translated texi files before building translated manuals.
* guix/build/po.scm: New file.
* Makefile.am (MODULES_NOT_COMPILED): Add it.
2019-04-27 17:13:18 +02:00
Julien Lepiller c3634df2a4
gnu: ocaml@4.02: Remove the package, affected by a CVE, and its dependent
packages.

This fixes <https://bugs.gnu.org/27462>.

* gnu/packages/ocaml.scm (ocaml-4.02, camlp4-4.02, ocaml4.02-menhir)
(ocaml4.02-lablgtk, ocaml4.02-findlib, ocaml4.02-ounit)
(ocaml4.02-camlzip, ocaml4.02-ocamlmod, ocaml4.02-zarith)
(ocaml4.02-qcheck, ocaml4.02-qtest, ocaml4.02-stringext)
(ocaml4.02-bisect, ocaml4.02-bitstring, ocaml4.02-result)
(ocaml4.02-topkg, ocaml4.02-rresult, ocaml4.02-sqlite3, ocaml4.02-csv)
(ocaml4.02-mtime, ocaml4.02-cmdliner, ocaml4.02-fmt, ocaml4.02-astring)
(ocaml4.02-alcotest, ocaml4.02-ppx-tools, ocaml4.02-react, ocaml4.02-ssl)
(ocaml4.02-lwt, ocaml4.02-lwt-log, ocaml4.02-logs, ocaml4.02-fpath)
(ocaml4.02-bos, ocaml4.02-xmlm, ocaml4.02-ulex, ocaml4.02-uchar)
(ocaml4.02-uutf, ocaml4.02-jsonm, ocaml4.02-ocurl, ocaml4.02-base64)
(ocaml4.02-omake, ocaml4.02-batteries, ocaml4.02-pcre, ocaml4.02-oasis)
(ocaml4.02-js-build-tools, ocaml4.02-bin-prot, ocaml4.02-fieldslib)
(ocaml4.02-ppx-core, ocaml4.02-ppx-optcomp, ocaml4.02-ppx-driver)
(ocaml4.02-cppo, ocaml4.02-ppx-deriving, ocaml4.02-ppx-type-conv)
(ocaml4.02-ppx-inline-test, ocaml4.02-ppx-bench, ocaml4.02-ppx-compare)
(ocaml4.02-sexplib, ocaml4.02-typerep, ocaml4.02-variantslib)
(ocaml4.02-ppx-sexp-conv, ocaml4.02-ppx-variants-conv)
(ocaml4.02-ppx-here, ocaml4.02-ppx-assert, ocaml4.02-ppx-enumerate)
(ocaml4.02-ppx-let, ocaml4.02-ppx-typerep-conv, ocaml4.02-ppx-sexp-value)
(ocaml4.02-ppx-pipebang, ocaml4.02-ppx-bin-prot, ocaml4.02-ppx-fail)
(ocaml4.02-ppx-custom-printf, ocaml4.02-ppx-sexp-message)
(ocaml4.02-ppx-fields-conv, ocaml4.02-seq, ocaml4.02-re)
(ocaml4.02-ppx-expect, ocaml4.02-ppx-jane, ocaml4.02-core-kernel)
(ocaml4.02-async-kernel, ocaml4.02-async-rpc-kernel, ocaml4.02-core)
(ocaml4.02-async-unix, ocaml4.02-async-extra, ocaml4.02-async)
(ocaml4.02-ocplib-endian, ocaml4.02-easy-format, optcomp)
(ocaml4.02-piqilib, ocaml4.02-uuidm, ocaml4.02-graph, ocaml4.02-piqi)
(ocaml4.02-camomile, ocaml4.02-zed, ocaml4.02-lambda-term): Remove variables.
* guix/build-system/ocaml.scm (default-ocaml4.02)
(default-ocaml4.02-findlib, package-with-ocaml4.02)
(strip-ocaml4.02-variant): Remove variables.
2019-04-25 19:01:31 +02:00
Tobias Geerinckx-Rice 52beae7b8a
gnu, guix: Yearly ritual purging of the filesystems.
* gnu/packages/android.scm (android-ext4-utils)[synopsis]: Fix ‘file
system’ spelling.
* gnu/packages/disk.scm (rmlint)[synopsis, description]: Likewise.
* gnu/packages/golang.scm (go-github-com-kr-fs)[synopsis, description]:
Likewise & edit for grammar.
* gnu/packages/ipfs.scm (gx, go-ipfs)[description]: Likewise.
* /gnu/packages/java.scm (java-commons-vfs)[synopsis]: Likewise.
* gnu/packages/linux.scm (fuseiso)[description]: Likewise.
(genext2fs)[synopsis, description]: Likewise.
* gnu/packages/package-management.scm (libostree)[description]: Likewise.
* gnu/packages/python-xyz.scm (python-requests-file)[description]:
Likewise & mark up.
* gnu/packages/rails.scm (ruby-with-advisory-lock)[description]:
Likewise.
* gnu/packages/ruby.scm (ruby-rerun)[description]: Likewise.
* guix/build/go-build-system.scm (setup-go-environment)<docstring>:
Likewise.
* guix/store/deduplication.scm (get-temp-link)<docstring>: Likewise.
2019-04-25 04:42:16 +02:00
Ludovic Courtès 17503ea8a2
self: Install 'guix.zh_CN.info'.
Reported by Julien Lepiller.

* guix/self.scm (info-manual): Adjust file name regexp so that it
matches *.zh_CN.texi.
2019-04-25 00:45:34 +02:00
Ludovic Courtès af41e504cf
guix system: Compute 'bootcfg' only for 'init' and 'reconfigure'.
Previously, 'guix system vm' would start by computing the bootcfg
derivation, which itself depended on an incorrect OS derivation (for the
original OS instead of the one passed through
'virtualized-operating-system'.)  That added overhead and would force
the user's config file to define a root file system, for example, even
though it makes no sense in the case of a VM.

* guix/scripts/system.scm (perform-action)[bootcfg]: Limit to the 'init'
and 'reconfigure' actions.
2019-04-23 23:44:35 +02:00
Marius Bakke 37da4fbe15
Merge branch 'master' into staging 2019-04-23 19:43:59 +02:00
Ludovic Courtès a06a95baff
pull: Create profile after the store connection has been opened.
Fixes <https://bugs.gnu.org/35341>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

Previously, we'd call 'ensure-default-profile' before the connection to
the daemon has been opened.  On the first connection, the daemon ensures
that /var/guix/profiles/per-user is world-writable.  Since we were
calling 'ensure-default-profile' before that,
/var/guix/profiles/per-user was typically non-writable (555 and
root-owned), and thus 'guix pull' would error out.

* guix/scripts/pull.scm (guix-pull): Call 'ensure-default-profile'
within 'with-store'.
2019-04-22 12:01:32 +02:00
Ludovic Courtès c5265a0951
pull: Add '--news'.
Suggested by Tobias Geerinckx-Rice <me@tobias.gr>.

* guix/scripts/pull.scm (%options, show-help): Add '--news'.
(display-profile-news): Add #:current-is-newer? and #:concise?.
Honor them.
(build-and-install): Pass #:concise? #t.
(display-new/upgraded-packages)[concise/max-item-count]: New variable.
Add call to 'display-hint'.
(process-query): Add clause for 'display-news'.
* doc/guix.texi (Invoking guix pull): Add '--news'.
2019-04-22 12:01:32 +02:00
Ludovic Courtès ea261dea0c
guix build: Accept multiple '-s' options.
* guix/scripts/build.scm (%default-options): Remove 'system'.
(%options) <--system>: Keep previous occurrences of 'system in RESULT.
(options->derivations)[system]: Remove.
[systems, things-to-build]: New variables.
[compute-derivation]: New procedure.
Iterate on all of SYSTEMS to compute the derivations of THINGS-TO-BUILD.
* tests/guix-build.sh: Add test for one and multiple '-s' flags.
* doc/guix.texi (Additional Build Options): Document this behavior.
2019-04-19 17:46:40 +02:00
Christopher Baines 3fdb9a375f
guile-build-system: Support building in parallel.
* guix/build/guile-build-system.scm (build): Use invoke-each, instead of
for-each, to use multiple cores if available.
(invoke-each, report-build-process): New procedures.
2019-04-18 23:13:48 +01:00
Ludovic Courtès 702c3c7dab
lint: 'check-github-url' uses our own 'open-connection-for-uri'.
Fixes <https://bugs.gnu.org/35053>.
Reported by Efraim Flashner <efraim@flashner.co.il>.

Previously 'check-github-url' would let Guile 2.2's (web client) module
take care of opening the connection.  Consequently, it wouldn't use the
TLS priority strings that we use in (guix build download),
'open-connection-for-uri'.  In particular, it would not disable TLSv1.3,
which would trigger <https://bugs.gnu.org/34102> for github.com.

* guix/scripts/lint.scm (check-github-url): Add #:timeout parameter.
[follow-redirect]: Change parameter name to 'url' and pass it to
'string->uri'.  Call 'guix:open-connection-for-uri' to open the
connection and pass it to 'http-head' via #:port.
2019-04-18 17:43:56 +02:00
Maxim Cournoyer 6bbb37a545
build-system/python: Move the check phase after the install phase.
A reproducibility problem was discovered while packaging python-pygithub where
the bytecode produced by running the tests would interfere with the result of
the install phase byte compilation.  Moving the check phase after the install
phase solves the problem.

* guix/build/python-build-system.scm (%standard-phases): Add comment, move
the check phase after the install phase.
2019-04-18 00:04:26 -04:00
Ludovic Courtès 72f749dcb8
pull: '--url', '--commit', and '--branch' apply to the 'guix' channel.
Suggested by pkill9 <pkill9@runbox.com>.

* guix/scripts/pull.scm (channel-list): Apply REF and URL to the 'guix'
channel.
* doc/guix.texi (Invoking guix pull): Adjust accordingly.
2019-04-17 13:56:40 +02:00
Ludovic Courtès f2d86ed0b3
build: No longer substitute 'LIBGCRYPT'.
This had become useless since ca71942445.

* configure.ac (LIBGCRYPT): Remove.
* guix/config.scm.in (%libgcrypt): Remove.
2019-04-17 11:53:53 +02:00
Ludovic Courtès ab77b69eca
self: Remove unused variable.
This variable is unused since commit
45779fa676.

* guix/self.scm (%dependency-variables): Remove.
* build-aux/build-self.scm (%dependency-variables): Remove.
2019-04-17 11:53:53 +02:00
Marius Bakke f5961dd585
Merge branch 'master' into staging 2019-04-17 00:08:34 +02:00
Ludovic Courtès d1f7748a2e
store: Add "add-data-to-store-cache" profiling component.
* guix/store.scm (add-data-to-store): Define 'lookup' and use it instead
of 'hash-ref'.
2019-04-16 17:30:21 +02:00
Ludovic Courtès e856177597
derivations: Reduce 'valid-path?' RPCs in 'derivation-prerequisites-to-build'.
On a profile with 280 packages, this reduces the number of
'valid-paths?' RPCs made by 'guix package -nu' from 6K to 500.

* guix/derivations.scm (derivation-prerequisites-to-build)[built?]:
Memoize 'valid-path?' calls.
2019-04-16 17:30:21 +02:00
Ludovic Courtès 3961edf230
store: Memoize 'built-in-builders' call directly in <store-connection>.
The caching strategy introduced in
40cc850aeb was ineffective since we
regularly start from an empty object cache.  For example, "guix build
inkscape -n" would make 241 'built-in-builders' RPCs.

* guix/store.scm (<store-connection>)[built-in-builders]: New field.
(open-connection): Adjust '%make-store-connection' call accordingly.
(port->connection): Likewise.
(built-in-builders): Rename to...
(%built-in-builders):  ... this.
(built-in-builders): New procedure.
* guix/download.scm (built-in-builders*): Remove 'mcached' call.
2019-04-16 17:30:21 +02:00
Ludovic Courtès 4aea820f09
guix build: Fix relative file name canonicalization for '--root'.
Fixes <https://bugs.gnu.org/35271>.
Reported by rendaw <7e9wc56emjakcm@s.rendaw.me>.

* guix/scripts/build.scm (register-root): When ROOT is a relative file
name, append the basename of ROOT, not ROOT itself.
* tests/guix-build.sh: Add test.
2019-04-15 16:57:12 +02:00
Ludovic Courtès 3dae43a929
ui: Highlight heading of generation lists.
* guix/ui.scm (display-generation): Highlight the "Generation" heading.
2019-04-14 23:40:52 +02:00
Ludovic Courtès c1c5d68a94
colors: Add 'highlight'.
* guix/colors.scm (%highlight-color): New variable.
(highlight): New procedure.
* guix/ui.scm (%highlight-argument)[highlight]: Remove.
(%highlight-color): Remove.
2019-04-14 23:40:52 +02:00
Danny Milosavljevic 0b30a1a072
build-system/linux-module: Configure module like the kernel.
* guix/build/linux-module-build-system.scm (configure): New procedure.
(%standard-phases): Add "configure" phase.
2019-04-12 00:46:08 +02:00
Danny Milosavljevic 88e13c2587
build-system/linux-module: Support module source versioning.
* guix/build-system/linux-module.scm (make-linux-module-builder)
[native-inputs]: Add linux.
[arguments]<#:phases>[install]: Install "System.map" and "Module.symvers".
* guix/build/linux-module-build-system.scm (configure): Delete procedure.
(%standard-phases): Delete "configure" phase.
2019-04-12 00:13:34 +02:00
Ludovic Courtès 544265acba
colors: Add 'colorize-matches'.
* guix/colors.scm (colorize-matches): New procedure.
(color-rules): Rewrite in terms of 'colorize-matches'.
2019-04-11 18:18:13 +02:00
Ludovic Courtès 2569ef9dab
colors: Introduce a disjoint type and pre-compute ANSI escapes.
* guix/colors.scm (color-table, color): Remove.
(<color>): New record type.
(print-color): New procedure.
(define-color-table, color): New macros.
(color-codes->ansi): New procedure.
(%reset): New variable.
(colorize-string): Rewrite accordingly.
(color-rules): Adjust accordingly.
* guix/status.scm (print-build-event): Adjust to new 'colorize-string'
interface.
* guix/ui.scm (%highlight-argument): Likewise.
(%warning-colors, %info-colors, %error-colors, %hint-colors)
(%highlight-colors): Remove.
(%warning-color, %info-color, %error-color, %hint-color)
(%highlight-color): New variables.
2019-04-11 18:18:13 +02:00
Ludovic Courtès c1df77e215
guix gc: '-d' does not attempt to delete non-user-owned roots.
* guix/scripts/gc.scm (guix-gc)[delete-generations]: Limit to user-owned
roots, unless we're running as root.
2019-04-11 18:18:13 +02:00
Danny Milosavljevic ce6312999f
Add (guix build-system linux-module).
* guix/build/linux-module-build-system.scm: New file.
* guix/build-system/linux-module.scm: New file.
* doc/guix.texi (Build Systems): Document it.
* Makefile.am (MODULES): Add them.
2019-04-11 17:50:18 +02:00
Julien Lepiller 7b1c7ecdfb
import: opam: Use dune-build-system when possible.
* guix/import/opam.scm (opam->guix-package): Detect when dune can be used.
2019-04-10 21:39:04 +02:00
Julien Lepiller 3e159dd0a4
import: opam: Add more patterns to opam file parser.
* guix/import/opam.scm: Add more patterns to peg parser.
(choice-pat choice condition-not condition-paren): New patterns.
(ground-value condition-content condition-var): Update patterns.
2019-04-10 21:38:45 +02:00
Ludovic Courtès 9c074f61ef
scripts: GC hint suggests 'guix gc -d 1m'.
* guix/scripts.scm (warn-about-disk-space): Suggest 'guix gc -d'.
2019-04-10 17:09:47 +02:00
Ludovic Courtès 96b8c2e6e2
guix gc: Add '--delete-generations'.
* guix/scripts/gc.scm (show-help, %options): Add
'--delete-generations'.  Change '--delete' shorthand to '-D'.
(delete-old-generations): New procedure.
(guix-gc)[delete-generations]: New procedure.
Call it when ACTION is 'collect-garbage' and OPTS contains
'delete-generations.
* doc/guix.texi (Invoking guix gc): Document it.
2019-04-10 17:09:47 +02:00
Ludovic Courtès c872b952c5
profiles: Add 'generation-profile'.
* guix/profiles.scm (%profile-generation-rx): New variable.
(generation-profile): New procedure.
2019-04-10 17:09:47 +02:00
Ludovic Courtès bacf980c76
guix gc: Add '--list-roots'.
* guix/scripts/gc.scm (show-help, %options): Add '--list-roots'.
(guix-gc)[list-roots]: New procedure.
Handle '--list-roots'.
* tests/guix-gc.sh: Test it.
* doc/guix.texi (Invoking guix gc): Document it.
2019-04-10 17:09:47 +02:00
Ludovic Courtès 72eda0624b
Add (guix store roots).
* guix/store/roots.scm, tests/store-roots.scm: New files.
* Makefile.am (STORE_MODULES): Add guix/store/roots.scm.
(SCM_TESTS): Add tests/store-roots.scm.
2019-04-10 17:09:47 +02:00
Ludovic Courtès 08d0f950b3
pull: Remove duplicate '--dry-run' description.
Reported by pkill9.

* guix/scripts/pull.scm (show-help): Remove duplicate '--dry-run'
description.
2019-04-10 17:09:47 +02:00
Ludovic Courtès 238589e566
ui: Highlight diagnostic format string arguments.
* guix/ui.scm (highlight-argument): New macro.
(%highlight-argument): New procedure.
(define-diagnostic): Use 'highlight-argument'.
2019-04-10 17:09:47 +02:00
Ludovic Courtès a7ae18b1b9
ui: Colorize hints.
* guix/ui.scm (%info-colors): Remove CYAN.
(%hint-colors): New variable.
(display-hint): Adjust so that the "hint:" prefix is colorized.
2019-04-10 17:09:46 +02:00
Ludovic Courtès 9e1e046040
ui: Colorize diagnostics.
* guix/ui.scm (define-diagnostic): Add 'colors' parameter and pass it to
'print-diagnostic-prefix'.
(warning, info, report-error): Add extra argument.
(%warning-colors, %info-colors, %error-colors): New variables.
(print-diagnostic-prefix): Add #:colors parameter and honor it.
2019-04-10 12:40:59 +02:00