Commit Graph

872 Commits (af3f64477cb1586a567268c4df85dbb3bf4362cf)

Author SHA1 Message Date
Ludovic Courtès c923f83116
size: Add test to multiple 'store-profile' arguments.
* tests/size.scm ("store-profile with multiple items"): New test.
2017-04-07 00:17:16 +02:00
Ludovic Courtès f37f2b83fa
packages: Add 'package-mapping' and base 'package-input-rewriting' on it.
* guix/packages.scm (package-mapping): New procedure.
(package-input-rewriting): Rewrite in terms of 'package-mapping'.
* tests/packages.scm ("package-mapping"): New test.
* doc/guix.texi (Defining Packages): Document it.
2017-04-05 22:45:41 +02:00
Ludovic Courtès f73bb91ebe
tests: Adjust search-paths test following the introduction of aarch64.
Fixes a regression introduced in
3b88f3767d.

* tests/search-paths.scm ("evaluate-search-paths, separator is #f"):
Change the expected result to "aarch64-linux".
2017-04-04 00:10:00 +02:00
Ludovic Courtès 76c486196f
packages: Catch invalid input errors for structs.
Reported by Thomas Sigurdsen <thomas.sigurdsen@gmail.com>
at <https://lists.gnu.org/archive/html/help-guix/2017-04/msg00007.html>.

* guix/packages.scm (expand-input): Add 'guard' form around call to
'package-source-derivation'.
* tests/packages.scm (dummy): New test.
2017-04-04 00:10:00 +02:00
Ludovic Courtès 3e43166ffc
gexp: 'lower-object' raises an exception when passed an invalid object.
* guix/gexp.scm (&gexp-error, &gexp-input-error): New error conditions.
(lower-object): Raise &gexp-input-error when 'lookup-compiler' returns #f.
* tests/gexp.scm ("lower-object & gexp-input-error?"): New test.
* guix/ui.scm (call-with-error-handling): Add case for 'gexp-input-error?'.
2017-04-04 00:10:00 +02:00
Marius Bakke 84157bb8bf
Merge branch 'master' into core-updates
Most conflicts are from 6fd52309b8.
2017-03-30 22:59:53 +02:00
Ludovic Courtès bdb59b331b
derivations: Do not fetch narinfos for non-substitutable items.
This avoids connections to substitute servers for derivations that are
not substitutable anyway, such as profiles.

Reported by Andy Wingo.

* guix/derivations.scm (substitution-oracle): Skip derivations that do
not pass 'substitutable-derivation?'.
* tests/derivations.scm ("substitution-oracle and #:substitute? #f"):
New test.
2017-03-28 10:00:05 +02:00
Leo Famulari c17383f400
Merge branch 'master' into core-updates 2017-03-27 21:19:38 -04:00
Alex Kost 689db38e34
ui: Support Texinfo markup in package synopses.
* guix/ui.scm (package-field-string): New procedure.
(package-description-string): Use it.
(package-synopsis-string): New procedure.
(package->recutils): Use it.
* guix/scripts/lint.scm (check-synopsis-style)[check-texinfo-markup]:
New procedure.  Use it in checks.
* tests/lint.scm: Test it.
* gnu/packages/perl.scm (perl-try-tiny)[synopsis]: Adjust for the
Texinfo markup.
2017-03-27 10:55:16 +03:00
Huang Ying addce19e2d
union: Add create-all-directories? parameter to 'union-build'.
* guix/build/union.scm (union-build): Add create-all-directories? keyword
parameter.
* tests/union.scm ("union-build #:create-all-directories? #t"): New test.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2017-03-26 12:53:48 +02:00
Efraim Flashner 0371b345e8
Merge remote-tracking branch 'origin/master' into core-updates 2017-03-23 14:53:33 +02:00
Ludovic Courtès 50b4d3ac26
tests: Skip 'guix pack' test when networking is unavailable.
* tests/pack.scm ("self-contained-tarball"): Skip unless (network-reachable?).
2017-03-22 15:02:33 +01:00
Ludovic Courtès ed407f3ccc
tests: Fix 'cond-expand' clause for 2.2/2.0.
Fixes a mistake in a9a0227c01.

* tests/store.scm ("current-build-output-port, UTF-8 + garbage"):
Inverse the 'cond-expand' clauses since the 'guile-2.0' feature doesn't
exist.
2017-03-22 15:02:33 +01:00
Ludovic Courtès cdd7a7d210
publish: Make the nar URL prefix a parameter.
* guix/scripts/publish.scm (narinfo-string): Add #:nar-path and honor it.
(render-narinfo): Likewise.
(make-request-handler): Likewise.
(run-publish-server): Likewise.
* tests/publish.scm ("custom nar path"): New test.
2017-03-22 14:05:59 +01:00
Ludovic Courtès ab2a74e4db
publish: The public and private keys are now SRFI-39 parameters.
* guix/scripts/publish.scm (%default-options): Add 'public-key-file' and
'private-key-file'.
(lazy-read-file-sexp): Remove.
(%private-key, %public-key): Turn into SRFI-39 parameters.
(signed-string, render-narinfo): Adjust accordingly.
(guix-publish): Honor 'public-key-file' and 'private-key-file' from
OPTS.  Use 'parameterize'.
* guix/pk-crypto.scm (read-file-sexp): New procedure.
* tests/publish.scm: Initialize '%public-key' and '%private-key'.
2017-03-22 14:05:59 +01:00
Efraim Flashner 378de69c59
Merge remote-tracking branch 'origin/master' into core-updates 2017-03-22 12:57:37 +02:00
Ludovic Courtès 278d486b0c
file-systems: Do not use (gnu packages …).
Fixes a regression introduced in
7208995426 whereby (gnu system
file-systems) would pull in (gnu packages …) module, which in turn
breaks when importing things like (gnu build shepherd).

* gnu/system/file-systems.scm (file-system-type-predicate): Export.
(file-system-packages): Move to...
* gnu/system/linux-initrd.scm (file-system-packages): ... here.  Add
docstring.
* gnu/services/base.scm: Use it.
* tests/file-systems.scm ("does not pull (gnu packages …)"): New test.
2017-03-21 22:33:07 +01:00
Mark H Weaver f67337e23e
Merge branch 'master' into core-updates 2017-03-19 18:52:12 -04:00
Ludovic Courtès f6396d862f
gnu: Rename "guile-next" to "guile".
* gnu/packages/guile.scm (guile-next): Rename to...
(guile-2.2): ... this.  Update users.
[name]: Change to "guile".
[synopsis]: Remove.
[properties]: Remove 'upstream-name', 'ftp-server', and
'ftp-directory'.
* gnu/packages/bioinformatics.scm (rcas-web): Update accordingly.
* gnu/packages/tls.scm (gnutls/guile-2.2): Likewise.
* tests/guix-build.sh: Use 'guile@2.2' instead of 'guile-next'.
* doc/guix.texi (Package Transformation Options): Update examples that
referred to "guile-next".
2017-03-19 18:14:22 +01:00
Ludovic Courtès 36626c556e
build: Require Guile >= 2.0.9.
* configure.ac: Bump requirement to 2.0.9.
* doc/guix.texi (Requirements): Adjust accordingly.
* README (Requirements): Likewise.
* build-aux/download.scm: Remove workaround for <http://bugs.gnu.org/13095>.
* guix/build/download.scm: Likewise.
(http-fetch)[post-2.0.7?]: Remove.  Remove conditional code for not
POST-2.0.7?.
* guix/http-client.scm:  Remove workaround for <http://bugs.gnu.org/13095>.
(http-fetch)[post-2.0.7?]: Remove.  Remove conditional code for not
POST-2.0.7?.
* guix/serialization.scm (read-latin1-string): Remove mention of 2.0.9.
* tests/nar.scm: Use (ice-9 control).
(let/ec): Remove.
2017-03-18 00:39:49 +01:00
Ludovic Courtès 176febe377
profiles: Packages in a profile can be cross-compiled.
* guix/profiles.scm (profile-derivation): Add #:target parameter; pass
it to 'gexp->derivation'.
* tests/profiles.scm ("profile-derivation, cross-compilation"): New test.
2017-03-17 23:25:53 +01:00
Ludovic Courtès 48b444304e
pack: Move absolute file name to <compressor>.
* guix/scripts/pack.scm (<compressor>)[package]: Remove.
[command]: Document as being a gexp with an absolute file name.
(%compressors): Adjust accordingly.
(self-contained-tarball): Simplify PATH expression.  Move 'string-join'
for the compressor command on the build side.
(docker-image): Simplify PATH expression.
* tests/pack.scm (%gzip-compressor): Adjust accordingly.
2017-03-17 23:25:53 +01:00
Ludovic Courtès d938a58bee
gexp: Add '=>' syntax to import computed modules.
* guix/gexp.scm (imported-files)[file-pair]: Add case for pairs where
the cdr is not a string.
(imported-modules): Support '=>' syntax in MODULES.
* tests/gexp.scm ("imported-files with file-like objects")
("gexp->derivation & with-imported-module & computed module"): New tests.
* doc/guix.texi (G-Expressions): Document '=>' syntax for
'with-imported-modules'.
2017-03-16 22:50:14 +01:00
Ludovic Courtès 4c0c4db070
utils: Move base16 procedures to (guix base16).
* guix/utils.scm (bytevector->base16-string, base16-string->bytevector):
Move to...
* guix/base16.scm: ... here.  New file.
* tests/utils.scm ("bytevector->base16-string->bytevector"): Move to...
* tests/base16.scm: ... here.  New file.
* Makefile.am (MODULES): Add guix/base16.scm.
(SCM_TESTS): Add tests/base16.scm.
* build-aux/download.scm, guix/derivations.scm,
guix/docker.scm, guix/import/snix.scm, guix/pk-crypto.scm,
guix/scripts/authenticate.scm, guix/scripts/download.scm,
guix/scripts/hash.scm, guix/store.scm, tests/hash.scm,
tests/pk-crypto.scm: Adjust imports accordingly.
2017-03-16 22:50:14 +01:00
Marius Bakke 4b7e5c1131
Merge branch 'master' into core-updates 2017-03-15 17:52:26 +01:00
Ludovic Courtès 13159c68ef
tests: Expect less accurate location info in 2.2.0.
* tests/guix-system.sh: Work around inaccurate location info in 2.2.0.
2017-03-15 15:19:54 +01:00
Ludovic Courtès a9a0227c01
store: Adjust UTF-8 test to Guile 2.2.
* tests/store.scm ("current-build-output-port, UTF-8 + garbage"): On
Guile 2.2, expect REPLACEMENT CHARACTER instead of '?'.
2017-03-15 15:19:53 +01:00
Ludovic Courtès 81a0f1cdf1
zlib: Don't rely on EBADF being ignored by 'fport_close'.
In 2.2, 'fport_close' no longer swallows EBADF and instead raises a
'system-error' for this.  This commit adjusts for 2.2.

* guix/zlib.scm (close-procedure): Remove.
(make-gzip-input-port): Use 'port->fdes' instead of 'fileno'.
Use 'gzclose' instead of 'close-procedure'.
(make-gzip-output-port): Likewise.
* tests/zlib.scm ("compression/decompression pipe"): Don't check whether
PARENT is closed using 'port-closed?'.  Instead, use 'seek' on the
underlying FD and check for EBADF.
2017-03-15 15:19:53 +01:00
Ludovic Courtès 850edd77f9
pack: Add unit test.
* guix/scripts/pack.scm (self-contained-tarball): Add #:tar option.
[build](tar-supports-sort?): New variable.  Use it.
* tests/pack.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
2017-03-14 23:18:32 +01:00
Ludovic Courtès e90e0fad1b
Merge branch 'master' into core-updates 2017-03-09 16:35:41 +01:00
Ludovic Courtès 1062063a65
ui: Don't use '%default-port-encoding' to set the encoding of string ports.
* guix/ui.scm (right-arrow): Call 'set-port-encoding!' to set PORT's
encoding; remove use of 'with-fluids'.  This is for compatibility with
Guile 2.2 where the encoding of string ports is not influenced by
%DEFAULT-PORT-ENCODING.
* tests/ui.scm ("show-manifest-transaction"): Likewise.
2017-03-08 23:42:53 +01:00
Ludovic Courtès dd420bf343
tests: Avoid zero-expression 'begin' form.
* tests/cran.scm ("description->package"): Add body after the expected
pattern in 'match'.
2017-03-08 23:42:52 +01:00
Ludovic Courtès 6f38960055
hash: Close or flush sha256 output ports before calling their 'get' procedure.
Slightly different buffering of custom binary output ports in Guile 2.1.7
would lead tests missing 'close-port' or 'force-output' to fail.

* tests/hash.scm ("open-sha256-port, hello"): Add call to 'force-output'
before call to 'get'.
* tests/nar.scm ("write-file puts file in C locale collation order"):
Call 'close-port' before calling 'get-hash'.
2017-03-08 23:42:52 +01:00
Efraim Flashner 3b88f3767d
gnu: Add bootstrap-binaries for 'aarch64-linux'.
These bootstrap-binaries were built against commit
8f8f250bdc.

* gnu/packages/bootstrap/aarch64-linux/bash,
gnu/packages/bootstrap/aarch64-linux/mkdir,
gnu/packages/bootstrap/aarch64-linux/xz,
gnu/packages/bootstrap/aarch64-linux/tar: New files.

* gnu/local.mk (bootstrap_aarch64_linuxdir)
(dist_bootstrap_aarch64_linux_DATA)
(nodist_bootstrap_aarch64_linux_DATA): New variables.
(DISTCLEANFILES): Add $(nodist_bootstrap_aarch64_linux_DATA).
(gnu/packages/bootstrap/aarch64-linux/guile-2.0.14.tar.xz): New target.
* build-aux/download.scm (filename->uri): Add aarch64-linux entry.
* gnu/packages/bootstrap.scm (raw-build): Use guile-2.0.14.tar.xz on
aarch64-linux.
(glibc-dynamic-linker, %bootstrap-coreutils&co, %boostrap-binutils)
(%bootstrap-glibc, %bootstrap-gcc): Add aarch64-linux cases.
* m4/guix.m4 (GUIX_SYSTEM_TYPE): Add aarch64 case.
(GUIX_ASSERT_SUPPORTED_SYSTEM): Add aarch64-linux to supported list.
* doc/guix.texi (GNU Distribution): Add aarch64-linux to the list of
supported systems.
* tests/packages.scm (package-search-derivation, snippet): Add aarch64
case.
2017-02-20 12:58:07 +02:00
Efraim Flashner d15432ca9e
Merge remote-tracking branch 'origin/master' into core-updates 2017-02-20 12:56:14 +02:00
Ludovic Courtès ce8963c5b7
tests: Adjust for 'http-fetch' change in (guix import json).
This is a followup to commit 81e0bc1834.

* tests/cpan.scm ("cpan->guix-package"): Add a 'rest' argument to the
lambda that mocks 'http-fetch'.
* tests/crate.scm ("crate->guix-package"): Likewise.
* tests/gem.scm ("gem->guix-package"): Likewise.
* tests/pypi.scm ("pypi->guix-package"): Likewise.
("pypi->guix-package, wheels"): Likewise.
2017-02-13 16:04:09 +01:00
Ludovic Courtès a1a8b7f2e2
tests: Relax test on utmpx entries.
Partly fixes <http://bugs.gnu.org/25476>.
Reported by Paul Garlick <pgarlick@tourbillion-technology.com>.

* tests/syscalls.scm ("utmpx-entries"): Check whether ENTRY is of type
'BOOT_TIME', in which case PID may be 0.
2017-02-11 22:28:37 +01:00
Ludovic Courtès 768f0ac9dd
Merge branch 'master' into core-updates 2017-02-10 17:40:25 +01:00
Ludovic Courtès 4eaac4b722
import: pypi: Correctly handle multiple-URL origins.
Fixes <https://bugs.gnu.org/25635>.
Reported by Sergei Trofimovich <slyfox@inbox.ru>.

* guix/import/pypi.scm (guix-package->pypi-name)[url->pypi-name]: New
procedure.
Rewrite body to match lists in addition to strings.
* tests/pypi.scm ("guix-package->pypi-name, several URLs"): New test.
2017-02-08 16:17:05 +01:00
Ludovic Courtès c90db25f4c
linux-container: Add 'container-excursion*'.
* gnu/build/linux-container.scm (container-excursion*): New procedure.
* tests/containers.scm ("container-excursion*")
("container-excursion*, same namespaces"): New tests.
2017-02-07 00:08:10 +01:00
Ludovic Courtès ad167d028e
file-systems: Remove dependency on (guix store).
(gnu system file-systems) is used on the "build" side since commit
5970e8e248.

* gnu/system/file-systems.scm: Remove dependency on (guix store).
(%store-prefix): New procedure.
* tests/file-systems.scm ("does not pull (guix config)"): New test.
2017-02-04 02:13:43 +01:00
Leo Famulari e8c83d04e1
Merge branch 'master' into core-updates 2017-02-02 10:52:24 -05:00
Paul Garlick f18eded8ec
tests: Really skip /var/run/utmpx test when needed.
* tests/syscalls.scm: Change 'test-ski' to 'test-skip'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-01-31 00:10:44 +01:00
Ludovic Courtès 0d268c5d70
store: Add 'add-data-to-store'.
* guix/serialization.scm (write-bytevector): New procedure.
(write-string): Rewrite in terms of 'write-bytevector'.
* guix/store.scm (write-arg): Add 'bytevector' case.
(add-data-to-store): New procedure, from former 'add-text-to-store'.
(add-text-to-store): Rewrite in terms of 'add-data-to-store'.
* tests/store.scm ("add-data-to-store"): New test.
2017-01-30 10:52:45 +01:00
Carlo Zancanaro b45dbfc990
tests: Adjust pypi test to recent importer change.
This is a followup to 2f977d92d3.

* tests/pypi.scm ("pypi->guix-package"): Don't expect 'python-setuptools' in
'propagated-inputs'.
("pypi->guix-package, wheels"): Likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-01-28 00:38:20 +01:00
Ricardo Wurmus 0db2ff65e7
bournish: Extend 'rm' command.
* guix/build/bournish.scm (rm-command): New procedure.
(%commands): Use it.
* tests/bournish.scm: Add tests for "rm" and "rm -r".
2017-01-26 13:49:56 +01:00
Leo Famulari d123f2f991
Merge branch 'master' into core-updates 2017-01-25 12:42:39 -05:00
Ludovic Courtès 482fda2729
grafts: Do not pull derivation outputs not depended on.
Fixes <http://bugs.gnu.org/24886>.

Previously, the grafting derivation of, say, brdf-explorer would pull in
qt:doc even though brdf-explorer depends only on qt:out, not qt:doc.

* guix/grafts.scm (with-cache): Use 'vhash-assoc' and 'vhash-cons'
instead of 'vhash-assq' and 'vhash-consq'.
(cumulative-grafts): Pass #:outputs to 'graft-derivation/shallow'.  Use
OUTPUTS instead of (derivation-output-names drv).
(graft-derivation): Add #:outputs parameter; pass it to
'cumulative-grafts'.
* tests/grafts.scm (make-derivation-input): New variable.
("graft-derivation, replaced derivation has multiple outputs"): Make
sure P2:zzz is not part of the outputs of P3D.
("graft-derivation with #:outputs")
("graft-derivation, unused outputs not depended on"): New tests.
2017-01-25 11:04:25 +01:00
Ludovic Courtès 3483f004a9
syscalls: Export 'read-utmpx'.
* guix/build/syscalls.scm (read-utmpx-from-port): New procedure.
* tests/syscalls.scm ("read-utmpx, EOF")
("read-utmpx"): New tests.
2017-01-24 00:46:37 +01:00
Ludovic Courtès 58ea4d407c
Merge branch 'master' into core-updates 2017-01-23 22:33:10 +01:00