~ruther/guix-local

ref: 1d0aa4d8c2dea7be2e249cc358c190622016da11 guix-local/tests d---------
ffa5e0a6 — Ludovic Courtès 8 years ago
publish: Fix narinfo rendering for already-compressed items.

Fixes <http://bugs.gnu.org/26975>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/scripts/publish.scm (bake-narinfo+nar): Pass #f as the 2nd
argument to 'stat' and properly handle #f.
* tests/publish.scm (wait-for-file): New procedure.
("with cache"): Remove 'wait-for-file' procedure.
("with cache, uncompressed"): New test.
22ef06b8 — Ludovic Courtès 8 years ago
union: Gracefully handle dangling symlinks in the input.

Fixes <http://bugs.gnu.org/26949>.
Reported by Pjotr Prins <pjotr.public12@thebird.nl>.

* guix/build/union.scm (file-is-directory?): Return #f when FILE does
not exist or is a dangling symlink.
(file=?): Pass #f as a second argument to 'stat'; return #f when both
ST1 or ST2 is #f.
* tests/profiles.scm (test-equalm): New macro.
("union vs. dangling symlink"): New test.
db427602 — Mathieu Othacehe 8 years ago
import: cran: Robustify cran-package?.

* guix/import/cran.scm (package->upstream-name): Return #f if url
  start and end index could not be determined.
  (cran-package?): Check if the upstream-name can be extracted from
  given package.
* tests/cran.scm: Add "r-minimal is not a cran package" to make sure that
  r-minimal is not detected as a cran package.

This fixes a failure of guix refresh on r-minimal because no
upsteam-name can be determined from ".../R-version.tar.gz" uri.
24b21720 — Ludovic Courtès 8 years ago
publish: Advertise a short TTL for "baking" 404s.

* guix/scripts/publish.scm (not-found): Add #:phrase and #:ttl
parameters and honor them.
* tests/publish.scm ("with cache"): Check the 'cache-control' header on
of the 404 response.
30d2397f — Ludovic Courtès 8 years ago
ui: 'string->duration' correctly handles hours.

* guix/ui.scm (string->duration): Add missing '=>' for hours.
* tests/ui.scm ("duration, 2 hours"): New test.
1a0adad8 — Ludovic Courtès 8 years ago
tests: Corrupt archive import test is robust against different store prefixes.

* tests/store.scm ("import corrupt path"): Set 'index' to #x70.
cd903ef7 — Ludovic Courtès 8 years ago
Add (guix discovery).

* guix/discovery.scm, tests/discovery.scm: New files.
* gnu/packages.scm (scheme-files, file-name->module-name)
(scheme-modules, all-package-modules): Remove.
(fold-packages): Rewrite in terms of 'fold-module-public-variables'.
* gnu/tests.scm: Use (guix discovery).
* Makefile.am (MODULES): Add guix/discovery.scm.
(SCM_TESTS): Add tests/discovery.scm.
dff3189c — Ludovic Courtès 8 years ago
publish: Produce a "FileSize" narinfo field when possible.

* guix/scripts/publish.scm (narinfo-string): Add #:file-size parameter.
Produce a "FileSize" field when COMPRESSION is eq? to '%no-compression'
or when FILE-SIZE is true.
(bake-narinfo+nar): Pass #:file-size.
* tests/publish.scm ("/*.narinfo")
("/*.narinfo with properly encoded '+' sign")
("with cache"): Check for "FileSize".
e30c2be1 — Ludovic Courtès 8 years ago
packages: Remove support for PACKAGE-VERSION deprecated syntax.

This syntax had been deprecated since 2016-02-28.

* gnu/packages.scm (%find-package): Remove #:fallback? parameter and handling.
* tests/guix-build.sh: Remove test for "time-1.7" syntax.
* doc/guix.texi (Invoking guix lint): Update 'guix lint' output in example.
1524851f — Leo Famulari 8 years ago
Merge branch 'master' into staging
25a49294 — Ludovic Courtès 8 years ago
cache: Work around 'time-monotonic' bug in Guile 2.2.2.

* guix/cache.scm (time-monotonic) [guile-2.2]: New variable.
* tests/cache.scm (time-monotonic) [guile-2.2]: Likewise.
* guix/build/download.scm (time-monotonic) [guile-2.2]: Adjust comment:
it's a 2.2.2 bug.
8a8e2d2e — Ludovic Courtès 8 years ago
derivations: Adjust builder encoding test.

This is a followup to 9231ef12f2a595b8f1e677dbe50cc499555302b6.

* tests/derivations.scm ("build-expression->derivation and builder
encoding"): Set '%default-port-encoding' to "UTF-8".
904c6c42 — Ludovic Courtès 8 years ago
tests: Adjust to the addition of a new Coreutils version.

* tests/scripts-build.scm ("options->transformation, with-input"): Use
'specification->package' rather than refer to Coreutils by its
variable.  This is a followup to e162050dfc0dee708a7ac5bfcf37d2afd6081604.
9231ef12 — Ludovic Courtès 8 years ago
derivations: Restore UTF-8 encoding of build scripts.

Reported by Mark H Weaver <mhw@netris.org>
at <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00457.html>.

* guix/derivations.scm (build-expression->derivation): Use a string
output port for the expression.  This reverts part of
2dce88d5bbe7a65e101c0734d1c6db44ecc8c299.
* tests/derivations.scm ("build-expression->derivation and builder
encoding"): New test.
1397b422 — Ludovic Courtès 8 years ago
store: 'GUIX_DAEMON_SOCKET' can now be a URI.

* guix/store.scm (%daemon-socket-file): Rename to...
(%daemon-socket-uri): ... this.
(connect-to-daemon): New procedure.
(open-connection): Rename 'file' to 'uri'.  Use 'connect-to-daemon'
instead of 'open-unix-domain-socket'.
* guix/tests.scm (open-connection-for-tests): Rename 'file' to 'uri'.
* tests/guix-build.sh: Add tests.
* tests/store.scm ("open-connection with file:// URI"): New tests.
2363bdd7 — Ludovic Courtès 8 years ago
gexp: 'gexp-modules' accepts plain Scheme objects.

* guix/gexp.scm (gexp-modules): Return '() when not (gexp? GEXP).
* tests/gexp.scm ("gexp-modules and literal Scheme object"): New test.
2ea2aac6 — Ludovic Courtès 8 years ago
Add (guix cache) and use it in (guix scripts substitute).

* guix/cache.scm, tests/cache.scm: New files.
* Makefile.am (MODULES, SCM_TESTS): Add them.
* guix/scripts/substitute.scm (obsolete?): Remove.
(remove-expired-cached-narinfos): Rename to...
(cached-narinfo-expiration-time): ... this.  Remove the removal part and
only keep the expiration time part.
(narinfo-cache-directories): Add optional 'directory' parameter and
honor it.
(maybe-remove-expired-cached-narinfo): Remove.
(cached-narinfo-files): New procedure.
(guix-substitute): Use 'maybe-remove-expired-cache-entries' instead of
'maybe-remove-expired-cached-narinfo'.
00753f70 — Ludovic Courtès 8 years ago
publish: Add '--cache' and '--workers'.

Fixes <http://bugs.gnu.org/26201>.
Reported by <dian_cecht@zoho.com>.

These options allow nars to be "baked" off-line and cached instead of
being compressed on the fly.  As a side-effect, this allows us to
provide a 'Content-Length' header for nars.

* guix/scripts/publish.scm (show-help, %options): Add '--cache' and
'--workers'.
(%default-options): Add 'workers'.
(nar-cache-file, narinfo-cache-file, run-single-baker): New procedures.
(single-baker): New macro.
(render-narinfo/cached, bake-narinfo+nar)
(render-nar/cached): New procedures.
(make-request-handler): Add #:cache and #:pool parameters and honor
them.
(run-publish-server): Likewise.
(guix-publish): Honor '--cache' and '--workers'.
* tests/publish.scm ("with cache"): New test.
* doc/guix.texi (Invoking guix publish): Document it.
1563d6c7 — Ludovic Courtès 8 years ago
Add (guix workers).

* guix/workers.scm, tests/workers.scm: New files.
* Makefile.am (MODULES, SCM_TESTS): Add them.
* .dir-locals.el: Add rule for 'eventually'.
8c4b4b65 — Marius Bakke 8 years ago
Merge branch 'master' into staging
Next