summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Expand)Author
2019-06-07pack: Add '--entry-point'....* guix/scripts/pack.scm (self-contained-tarball): Add #:entry-point and warn when it's true. (squashfs-image): Add #:entry-point and honor it. (docker-image): Add #:entry-point and honor it. (%options, show-help): Add '--entry-point'. (guix-pack): Honor '--entry-point' and pass #:entry-point to BUILD-IMAGE. * gnu/tests/docker.scm (run-docker-test): Test 'docker run' with the default entry point. (build-tarball&run-docker-test): Pass #:entry-point to 'docker-image'. * doc/guix.texi (Invoking guix pack): Document it. * gnu/tests/singularity.scm (run-singularity-test)["singularity run"]: New test. (build-tarball&run-singularity-test): Pass #:entry-point to 'squashfs-image'. Ludovic Courtès
2019-06-06guix: git-download: Remove explicit import....With guile-git version 0.2, repository-working-directory is no longer private. * guix/git-download.scm (git-file-list): Refer to public repository-working-directory. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Robert Vollmert
2019-06-05nar: Really lock store files....Previously, 'lock-store-file' would immediately close the file descriptor of the '.lock' file, and thus it would immediately release the lock. * guix/nar.scm (lock-store-file, unlock-store-file): Remove. (finalize-store-file): Use 'lock-file' and 'unlock-file' instead. Ludovic Courtès
2019-06-05syscalls: 'with-lock-file' catches ENOSYS....* guix/build/syscalls.scm (call-with-file-lock): Catch ENOSYS raised by 'lock-file'. Ludovic Courtès
2019-06-05syscalls: 'with-file-lock' expands to a call to 'call-with-file-lock'....* guix/build/syscalls.scm (call-with-file-lock): New procedure. (with-file-lock): Expand to a call to 'call-with-file-lock'. Ludovic Courtès
2019-06-05syscalls: Add 'with-file-lock' macro....* guix/scripts/offload.scm (lock-file, unlock-file, with-file-lock): Move to... * guix/build/syscalls.scm: ... here. Ludovic Courtès
2019-06-05guix package: Do not list environment variables that need to be set....Fixes <https://bugs.gnu.org/35942>. * guix/scripts/package.scm (display-search-paths): Rename to... (display-search-path-hint): ... this. Adjust callers. Remove #:kind parameter. Replace the list of environment variables with an invitation to source $GUIX_PROFILE/etc/profile or run 'guix package --search-paths'. Ludovic Courtès
2019-06-03deprecation: Use the 'warning' procedure for diagnostics....Until now, (guix deprecation) had its own warning mechanism, which was inconsistent (it did not use colors, etc.) * guix/deprecation.scm (deprecation-warning-port): Remove (source-properties->location-string): Remove. (warn-about-deprecation): Use 'warning' instead of 'format'. (define-deprecated, define-deprecated/alias): Adjust docstring. * guix/channels.scm (build-from-source): Refer to 'guix-warning-port' instead of 'deprecation-warning-port'. Ludovic Courtès
2019-06-03Add (guix diagnostics)....* guix/ui.scm (warning, info, report-error, leave) (location->string, guix-warning-port, program-name) (highlight-argument, %highlight-argument, define-diagnostic) (%warning-color, %info-color, %error-color) (print-diagnostic-prefix): Move to... * guix/diagnostics.scm: ... here. New file. * Makefile.am (MODULES): Add it. Ludovic Courtès
2019-06-03services: guix-publish: Allow for multi-compression....This is a followup to b8fa86adfc01205f1d942af8cb57515eb3726c52. * guix/deprecation.scm (warn-about-deprecation): Make public. * gnu/services/base.scm (<guix-publish-configuration>)[compression]: New field. [compression-level]: Default to #f. Add '%' to getter name. (guix-publish-configuration-compression-level): Define as deprecated. (default-compression): New procedure. (guix-publish-shepherd-service)[config->compression-options]: New procedure. Use 'match-record' instead of 'match'. * doc/guix.texi (Base Services): Remove 'compression-level' and document 'compression'. Ludovic Courtès
2019-06-03guix: import: simplify recursive import...This simplifies the logic of recursive-import, intending no major functional changes. The package import function is no longer called twice per package. Failed imports now make it to the package stream as '() instead of #f. * guix/import/utils.scm (recursive-import): Simplify. Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com> Robert Vollmert
2019-06-02import: 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-02substitute: 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-02publish: '--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-02build-system/guile: Display progress report as expected by (guix status)....* guix/build/guile-build-system.scm (report-build-progress): Use a format string suitable for (guix status). Ludovic Courtès
2019-06-02build-system/guile: Add #:not-compiled-file-regexp....* guix/build/guile-build-system.scm (build): Add #:not-compiled-file-regexp and honor it. * guix/build-system/guile.scm (guile-build): Likewise. (guile-cross-build): Likewise. Ludovic Courtès
2019-06-02build-system/guile: Improve reporting of 'guild compile' failures....* guix/build/guile-build-system.scm (invoke-each)[processes]: New variable. [wait-for-one-process]: Check PROCESSES and update it. [fork-and-run-command]: Update PROCESSES. Ludovic Courtès
2019-06-02compile: Adjust for Guile 3....* guix/build/compile.scm (%default-optimizations): Adjust to the new names in Guile 2.9.2. Ludovic Courtès
2019-06-02progress: 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. Ludovic Courtès
2019-06-01lzlib: '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. Ludovic Courtès
2019-06-01import: 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> Robert Vollmert
2019-05-29publish: Factorize 'compress-nar'....* guix/scripts/publish.scm (compress-nar): New procedure. (bake-narinfo+nar): Use it. Ludovic Courtès
2019-05-29publish: Remove outdated comment....* guix/scripts/publish.scm (make-request-handler): Remove outdated TODO. Ludovic Courtès
2019-05-28import: cran: Ignore invalid packages from the system requirements....* guix/import/cran.scm (description->package): Filter invalid packages from the list of system requirements. Ricardo Wurmus
2019-05-28self: Fix unquoting....This is a follow-up to commit dfc69e4b6d4bbc41a4d37b3cc6ea12adb34aaafa. * guix/self.scm (whole-package): Unquote %storedir in the daemon wrapper. Ricardo Wurmus
2019-05-27publish: 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. Ludovic Courtès
2019-05-27lzlib: '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. Ludovic Courtès
2019-05-27self: 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". Ludovic Courtès
2019-05-27publish: 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-27utils: 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-27lzlib: 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-27lzlib: Adjust 'lz-compress-read' docstring....* guix/lzlib.scm (lz-compress-read): The integer return can be zero; adjust docstring accordingly. Ludovic Courtès
2019-05-26import: 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-26discovery: '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-26self: '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. Ludovic Courtès
2019-05-26import: hackage: Recognize "BSD-3-Clause" and "PublicDomain"....* guix/import/hackage.scm (string->license): Add two licenses. Signed-off-by: Marius Bakke <mbakke@fastmail.com> Robert Vollmert
2019-05-26store: Fix 'hash-part->path' docstring....* guix/store.scm (hash-part->path): Adjust docstring to match reality. Ludovic Courtès
2019-05-26publish: 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-23import: cran: Ignore invalid packages....* guix/import/cran.scm (invalid-packages): New variable. (description->package): Use it. Ricardo Wurmus
2019-05-22weather: 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. Ludovic Courtès
2019-05-22pack: Warn when building an empty pack....* guix/scripts/pack.scm (guix-pack): Warn when MANIFEST has zero entries. Ludovic Courtès
2019-05-22pack: 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-20self: Remove unused variables....* guix/self.scm (info-manual)[po4a, gettext]: Remove. Ludovic Courtès
2019-05-16guix 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. Ludovic Courtès
2019-05-15docker: 'build-docker-image' accepts an optional #:entry-point....* guix/docker.scm (config): Add #:entry-point and honor it. (build-docker-image): Likewise. Ludovic Courtès
2019-05-15import: 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. Arun Isaac
2019-05-15import: github: Improve readability....* guix/import/github.scm (latest-released-version)[release->version]: Separate out release->version as a new function. Arun Isaac
2019-05-14guix 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. Ludovic Courtès
2019-05-13vm: 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. Maxim Cournoyer
2019-05-14linux-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> Arun Isaac