Age | Commit message (Expand) | Author |
2019-06-20 | import: hackage: Add two expected failing test cases....This adds failing test cases for two hackage import bugs:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25138
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35743
* tests/hackage.scm: Make comment style consistent. Add two
cabal parsing tests, marked as expected failures.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Robert Vollmert |
2019-06-20 | utils: canonical-newline-port: Fix handling of carriage return at buffer end....Prior to this change the added test fails for me locally at byte
1024. It might depend on some default buffer sizes.
Fixes <https://bugs.gnu.org/35863>.
* tests/utils.scm ("canonical-newline-port-1024"): Add test.
* guix/utils.scm (canonical-newline-port): Correct comments on CR/LF.
Remove CR even when they're at the end of the buffer.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Robert Vollmert |
2019-06-18 | tests: Avoid 'delete-paths' calls for 'derivation-prerequisites-to-build'....* tests/derivations.scm ("derivation-prerequisites-to-build when outputs
already present"): Insert random text in BUILDER, and remove two calls
to 'delete-paths'. Use 'derivation->output-path' for INPUT-PATH instead
of an old idiom.
| Ludovic Courtès |
2019-06-13 | import: hackage: Handle Hackage revisions....Hackage packages can have metadata revisions (Cabal file only) that are
not reflected in the source archive. The Haskell build system has
support for this, but until now the Hackage importer would create a
package based on the revised Cabal file which would then build using the
old Cabal file.
Fixes <https://bugs.gnu.org/35750>.
* guix/import/cabal.scm (<cabal-package>): Add 'revision' field.
(eval-cabal): Parse 'x-revision:' property.
* guix/import/hackage.scm (read-cabal-and-hash): New procedure.
(hackage-fetch-and-hash): New procedure.
(hackage-fetch): Rewrite using 'hackage-fetch-and-hash'.
(hackage-module->sexp): Add 'cabal-hash' argument and use it to populate
the '#:cabal-revision' argument.
(hackage->guix-package): Use the new '-and-hash' functions to get the
hash of the Cabal file and pass it to 'hackage-module->sexp'.
* guix/tests/hackage.scm: Test import of Cabal file revision.
Signed-off-by: Timothy Sample <samplet@ngyro.com>
| Robert Vollmert |
2019-06-11 | import: crate: Define dependencies as arguments....* guix/import/crate.scm:
(crate-fetch)[input-crates]: Rename to dev-crates.
[native-input-crates]: Rename to dev-dep-crates.
[inputs]: Rename to cargo-inputs.
[native-inputs]: Rename to cargo-development-inputs.
(maybe-cargo-inputs, maybe-cargo-development-inputs, maybe-arguments): Add
them.
(make-crate-sexp)[inputs]: Rename to cargo-inputs.
[native-inputs]: Rename to cargo-development-inputs.
[maybe-native-inputs, maybe-inputs]: Replace with maybe-arguments.
* guix/import/utils.scm: (package-names->package-inputs): Make public. Add
docstring.
* tests/crate.scm (crate->guix-package): Update the match pattern.
Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
| Ivan Petkov |
2019-06-10 | store: 'build-things' accepts derivation/output pairs....This allows callers to request the substitution of a single derivation
output.
* guix/store.scm (build-things): Accept derivation/output pairs among
THINGS.
* guix/derivations.scm (build-derivations): Likewise.
* tests/store.scm ("substitute + build-things with specific output"):
New test.
* tests/derivations.scm ("build-derivations with specific output"):
New test.
* doc/guix.texi (The Store): Adjust accordingly.
| Ludovic Courtès |
2019-06-07 | import: print: Honor the outputs of inputs (!)....Fixes <http://bugs.gnu.org/35893>.
Reported by Jesse Gibbons <jgibbons2357@gmail.com>.
* guix/import/print.scm (package->code)[package-lists->code]: Preserve
OUT in the result.
* tests/print.scm (define-with-source): New macro.
(pkg): Use it.
(pkg-source): New variable.
(pkg-with-inputs, pkg-with-inputs-source): New variables.
("simple package"): Refer to 'pkg-source'.
("package with inputs"): New test.
| Ludovic Courtès |
2019-06-02 | import: hackage: Parse braced properties....This adds partial support for Cabal properties that use curly
braces instead of the layout rule. See for example
https://hackage.haskell.org/package/cassava/
* guix/import/cabal.scm (read-braced-value): New procedure.
(is-property): Remove.
(is-layout-property, is-braced-property): New variables.
(lex-property): Rename to...
(lex-layout-property): ... this.
(lex-braced-property, lex-property): New procedures.
(lex-token): Add call to 'lex-property'.
* guix/tests/hackage.scm: Test braced description import.
* tests/hackage.scm (test-cabal-multiline-desc): Rename to...
(test-cabal-multiline-layout): ... this.
("hackage->guix-package test multiline desc"): Rename to...
("hackage->guix-package test multiline desc (layout)"): ... this.
(test-cabal-multiline-braced): New variable.
("hackage->guix-package test multiline desc (braced)"): New test.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Robert Vollmert |
2019-06-02 | tests: hackage: Test multiline cabal description....* tests/hackage.scm (test-cabal-multiline-desc): New variable.
("hackage->guix-package test multiline desc"): New test.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Robert Vollmert |
2019-06-02 | tests: Fix hackage tests....This is a followup to 1cc12357a65e4479c2f4735e915941382ef82d94.
* tests/hackage.scm: ghc-mtl is no longer added as an input.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Robert Vollmert |
2019-06-02 | substitute: Select the best compression methods....When a server publishes several URLs with different compression methods,
'guix substitute' can now choose the best one among the compression
methods that it supports.
* guix/scripts/substitute.scm (<narinfo>)[uri]: Replace with...
[uris]: ... this.
[compression]: Replace with...
[compressions]: ... this.
[file-size]: Replace with...
[file-sizes]: ... this.
[file-hash]: Replace with...
[file-hashes]: ... this.
(narinfo-maker): Adjust accordingly. Ensure 'file-sizes' and
'file-hashes' have the right length.
(assert-valid-signature, valid-narinfo?): Use the first element of
'narinfo-uris' in error messages.
(read-narinfo): Expect "URL", "Compression", "FileSize", and "FileHash"
to occur multiple times.
(display-narinfo-data): Call 'select-uri' to determine the file size.
(%compression-methods): New variable.
(supported-compression?, compresses-better?, select-uri): New
procedures.
(process-substitution): Call 'select-uri' to select the URI and
compression.
* guix/scripts/weather.scm (report-server-coverage): Account for all the
values returned by 'narinfo-file-sizes'.
* tests/substitute.scm ("substitute, narinfo with several URLs"): New
test.
| Ludovic Courtès |
2019-06-02 | publish: '--compression' can be repeated....This allows 'guix publish' to compress and advertise multiple
compression methods from which users can choose.
* guix/scripts/publish.scm (actual-compression): Rename to...
(actual-compressions): ... this. Expect REQUESTED to be a list, and
always return a list.
(%default-options): Remove 'compression.
(store-item->recutils): New procedure.
(narinfo-string): Change #:compression to #:compressions (plural).
Adjust accordingly.
(render-narinfo, render-narinfo/cached): Likewise.
(bake-narinfo+nar): Change #:compression to #:compressions.
[compressed-nar-size]: New procedure.
Call 'compress-nar' for each item returned by 'actual-compressions'.
Create a narinfo for each compression.
(effective-compression): New procedure.
(make-request-handler): Change #:compression to #:compressions.
Use 'effective-compression' to determine the applicable compression.
(guix-publish): Adjust handling of '--compression'.
Print a message for each compression that is enabled.
* tests/publish.scm ("/*.narinfo"): Adjust to new narinfo field
ordering.
("/*.narinfo with properly encoded '+' sign"): Likewise.
("/*.narinfo with lzip + gzip"): New test.
("with cache, lzip + gzip"): New test.
* doc/guix.texi (Invoking guix publish): Document it.
| Ludovic Courtès |
2019-06-01 | tests: Indent hackage tests...* tests/hackage.scm: Reindent using etc/indent-code.el.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Robert Vollmert |
2019-06-01 | tests: hackage: Don't mock hackage-fetch....* tests/hackage.scm: Pass a string input port to tests instead of
mocking hackage download.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Robert Vollmert |
2019-06-01 | tests: hackage: Factor out package pattern....* tests/hackage.scm: Import result pattern matching via helper.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Robert Vollmert |
2019-05-27 | 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.
| Ludovic Courtès |
2019-05-27 | 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.
| Ludovic Courtès |
2019-05-27 | utils: Test 'compressed-port' and 'decompressed-port' for both gzip and xz....* tests/utils.scm (test-compression/decompression): New procedure.
<top level>: Call it for both 'xz and 'gzip.
| Ludovic Courtès |
2019-05-27 | 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.
| Ludovic Courtès |
2019-05-26 | 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>
| Ludovic Courtès |
2019-05-26 | 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>
| Robert Vollmert |
2019-05-26 | 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.
| Ludovic Courtès |
2019-05-22 | 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.
| Ludovic Courtès |
2019-05-18 | pack: '--localstatedir' and '-R' tests gracefully handle missing /gnu/store....Fixes <https://bugs.gnu.org/35776>.
Reported by Ting-Wei Lan <lantw44@gmail.com>.
* tests/guix-pack-localstatedir.sh: Set 'storedir' before
'NIX_STORE_DIR'.
* tests/guix-pack-relocatable.sh: Likewise.
| Ludovic Courtès |
2019-05-18 | gremlin: Adjust tests for foreign distros....Fixes <https://bugs.gnu.org/35775>.
* tests/gremlin.scm ("elf-dynamic-info-needed, executable"): Expect only
libguile and libc among NEEDED.
("strip-runpath"): Pass '--enable-new-dtags' to get RUNPATH, not RPATH.
| Ting-Wei Lan |
2019-05-13 | tests: Fix guix-package.sh....GCC is now a hidden package, so cannot be installed.
* tests/guix-package.sh: Replace 'gcc' by 'zile' in a test that install
multiple packages.
| Maxim Cournoyer |
2019-05-09 | tests: Ensure 'unshare' works before relying on it....Fixes <https://bugs.gnu.org/35642>.
Reported by Josh Holland <josh@inv.alid.pw>.
* tests/guix-pack-relocatable.sh: Before invoking 'unshare' at the
bottom, add "if unshare -r true" condition.
* tests/guix-pack.sh: Likewise.
| Ludovic Courtès |
2019-05-09 | 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>
| Chris Marusich |
2019-05-07 | 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.
| Ludovic Courtès |
2019-05-07 | uuid: 'fat-uuid->string' preserves leading zeros....Fixes <https://bugs.gnu.org/35582>.
Reported by sirgazil <sirgazil@zoho.com>.
Previously, leading zeros would be removed, leading to an "invalid"
UUID:
(uuid->string (uuid "00CA-050E" 'fat32))
⇒ "CA-50E"
(string->uuid "CA-50E" 'fat32)
⇒ #f
* gnu/system/uuid.scm (fat-uuid->string): Pad digits with zeros.
* tests/uuid.scm ("uuid, FAT32, leading zeros preserved"): New test.
| Ludovic Courtès |
2019-05-06 | 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>
| Pierre Neidhardt |
2019-04-29 | tests: Adjust wildcard when testing OS examples....* tests/guix-system.sh: Use *.tmpl instead of *, to avoid catching
backup files, etc.
| Ludovic Courtès |
2019-04-29 | 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.
| Ludovic Courtès |
2019-04-29 | 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".
| Ludovic Courtès |
2019-04-27 | tests: Adjust accounts test to shell-as-config change....This is a followup to 504a0fc636ec591e65b4a229a37e522e425d8a0c.
* tests/accounts.scm ("allocate-passwd with previous state"): Change
expected 'shell' for "alice" to "/bin/sh".
| Ludovic Courtès |
2019-04-19 | 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.
| Ludovic Courtès |
2019-04-16 | tests: Gracefully skip zlib test when zlib is missing....* tests/zlib.scm: Use 'test-skip' instead of (exit 77)
when (zlib-available?) returns false.
| Ludovic Courtès |
2019-04-15 | 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.
| Ludovic Courtès |
2019-04-10 | 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.
| Ludovic Courtès |
2019-04-10 | 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.
| Ludovic Courtès |
2019-04-02 | environment: '-C' creates namespaces where the user is not root....* guix/scripts/environment.scm (launch-environment/container): Add UID
and GID. Use them in PASSWD and GROUPS. Pass them as #:guest-uid and
#:guest-gid to 'call-with-container'.
* tests/guix-environment-container.sh: Test the inner UID.
In '--user' test, replace hard-coded 0 with 1000.
* doc/guix.texi (Invoking guix environment): Adjust accordingly.
| Ludovic Courtès |
2019-04-02 | linux-container: Make the guest UID and GID a parameter....* gnu/build/linux-container.scm (initialize-user-namespace): Add
#:guest-uid and #:guest-gid parameters and honor them.
(run-container): Likewise.
(call-with-container): Likewise.
* tests/containers.scm ("call-with-container, user namespace, guest UID/GID"):
New test.
| Ludovic Courtès |
2019-03-30 | records: Support custom 'this' identifiers....This lets record users choose an identifier other than 'this-record'.
* guix/records.scm (make-syntactic-constructor): Add #:this-identifier.
[wrap-field-value]: Honor it.
(define-record-type*): Add form with extra THIS-IDENTIFIER and honor
it.
* tests/records.scm ("define-record-type* & thunked & inherit & custom this"):
New test.
| Ludovic Courtès |
2019-03-26 | environment: Create /etc/group in containers....Reported by Pierre Neidhardt <mail@ambrevar.xyz>.
* guix/scripts/environment.scm (launch-environment/container): Create
GROUPS and call 'write-group'.
* tests/guix-environment-container.sh: Test it.
| Ludovic Courtès |
2019-03-26 | environment: Use (gnu build accounts) for /etc/passwd handling....* guix/scripts/environment.scm (launch-environment/container): Remove
call to 'mock-passwd'; instantiate a <password-entry> instead. Call
'write-passwd' to write the pasword database instead of using custom
code.
(mock-passwd): Remove.
* tests/guix-environment-container.sh: Test 'getpwuid'.
| Ludovic Courtès |
2019-03-25 | accounts: Add default value for the 'home-directory' field of <user-account>....* gnu/system/accounts.scm (<user-account>)[home-directory]: Mark as
thunked and add a default value.
(default-home-directory): New procedure.
* doc/guix.texi (User Accounts): Remove 'home-directory' from example.
* gnu/system/examples/bare-bones.tmpl: Likewise.
* gnu/system/examples/beaglebone-black.tmpl: Likewise.
* gnu/system/examples/desktop.tmpl: Likewise.
* gnu/system/examples/docker-image.tmpl: Likewise.
* gnu/system/examples/lightweight-desktop.tmpl: Likewise.
* gnu/system/install.scm (installation-os): Likewise.
* gnu/tests.scm (%simple-os): Likewise.
* gnu/tests/install.scm (%minimal-os, %minimal-os-on-vda):
(%separate-home-os, %encrypted-root-os, %btrfs-root-os): Likewise.
* tests/accounts.scm ("allocate-passwd")
("allocate-passwd with previous state"): Likewise.
| Ludovic Courtès |
2019-03-25 | records: Allow thunked fields to refer to 'this-record'....* guix/records.scm (this-record): New syntax parameter.
(make-syntactic-constructor)[wrap-field-value]: When F is thunked,
return a one-argument lambda instead of a thunk, and parameterize
THIS-RECORD.
(define-record-type*)[thunked-field-accessor-definition]: Pass X
to (real-get X).
* tests/records.scm ("define-record-type* & thunked & this-record")
("define-record-type* & thunked & default & this-record")
("define-record-type* & thunked & inherit & this-record"): New tests.
| Ludovic Courtès |
2019-03-24 | tests: Adjust 'guix pack -f squashfs' test....This is a followup to 427c87d0bdc06cc3ee7fc220fd3ad36084412533.
* tests/pack.scm ("squashfs-image + localstatedir"): Expect "bin" to be
a relative symlink.
| Ludovic Courtès |
2019-03-24 | tests: Add missing import....This is a followup to 22f95e028f038cee342f455dfc55bd32b804907c.
* tests/scripts.scm: Use (guix tests).
| Ludovic Courtès |
2019-03-23 | graph: Add the 'reverse-bag' graph....Suggested by Julien Lepiller.
* guix/scripts/graph.scm (%reverse-bag-node-type): New variable.
(%node-types): Add it.
* tests/graph.scm ("reverse bag DAG"): New test.
* doc/guix.texi (Invoking guix graph): Document it.
| Ludovic Courtès |