summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
...
* | Merge branch 'master' into core-updatesLudovic Courtès2019-07-17
|\|
| * Use more guix.gnu.org.Tobias Geerinckx-Rice2019-07-16
| | | | | | | | | | | | * build-aux/build-self.scm (make-config.scm): Replace gnu.org/s/guix with guix.gnu.org. * guix/scripts/publish.scm (render-home-page): Likewise. * guix/self.scm (make-config.scm): Likewise.
| * lint: Separate checkers by dependence on the internet.Christopher Baines2019-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think there are a couple of potential uses for this. It's somewhat a separation in to what checkers are just checking the contents of the repository (line length for example), and other checkers which are bringing in external information which could change. I'm thinking particularly, about treating network dependent checkers differently when automatically running them, but this commit also adds a --no-network flag to guix lint, which selects the checkers that don't access the network, which could be useful if no network access is available. * guix/lint.scm (%checkers): Rename to %all-checkers. (%local-checkers, %network-dependent-checkers): New variables. * guix/scripts/lint.scm (run-checkers): Make the checkers argument mandatory. (list-checkers-and-exit): Handle the checkers as an argument. (%options): Adjust for changes to %checkers, add a --no-network option, and change how the --list-checkers option is handled. (guix-lint): Adjust indentation, and update how the checkers are handled.
| * lint: Move the linting code to a different module.Christopher Baines2019-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To try and move towards making programatic access to the linting code easier, this commit separates out the linting script, from the linting functionality that it uses. * guix/scripts/lint.scm (emit-warnings): Alter to to not use match-lambda, as <lint-warning> isn't accessible. (<lint-warning>, lint-warning, make-lint-warning, lint-warning?, lint-warning-message, lint-warning-message-text, lint-warning-message-data, lint-warning-location, package-file, %make-warning make-warning, <lint-checker>, lint-checker, make-lint-checker, lint-checker?, lint-checker-name, lint-checker-description, lint-checker-check, properly-starts-sentance?, starts-with-abbreviation?, %quoted-identifier-rx, check-description-style, package-input-intersection, check-inputs-should-be-native, check-inputs-should-not-be-an-input-at-all, package-name-regexp, check-synopsis-style, probe-uri, tls-certificate-error-string, validate-uri, check-home-page, %distro-directory, check-patch-file-names, escape-quotes, official-gnu-packages*, check-gnu-synopsis+description, origin-uris, check-source, check-source-file-name, check-source-unstable-tarball, check-mirror-url, check-github-url, check-derivation, check-license, call-with-networking-fail-safe, with-networking-fail-safe, current-vulnerabilities*, package-vulnerabilities, check-vulnerabilities, check-for-updates, report-tabulations, report-trailing-white-space, report-long-line, %hanging-paren-rx, report-lone-parantheses, %formatting-reporters, report-formatting-issues, check-formatting, %checkers): Move to… * guix/lint.scm: … here * po/guix/POTFILES.in: Add guix/lint.scm. * Makefile.am: Add guix/lint.scm. * tests/lint.scm: Change to import (guix lint), rather than (guix scripts lint).
| * scripts: lint: Separate the message warning text and data.Christopher Baines2019-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So that translations can be handled more flexibly, rather than having to translate the message text within the checker. * guix/scripts/lint.scm (lint-warning-message-text, lint-warning-message-data): New procedures. (lint-warning-message): Remove record field accessor, replace with procedure that handles the lint warning data and translating the message. (make-warning): Rename to %make-warning. (make-warning): New macro. (emit-warnings): Handle the message-text and message-data fields. (check-description-style): Adjust for changes to make-warning. [check-trademarks, check-end-of-sentence-space): Adjust for changes to make-warning. (check-inputs-should-be-native, check-inputs-should-not-be-an-input-at-all, check-synopsis-style, validate-uri, check-home-page, check-patch-file-names, check-gnu-synopsis+description, check-mirror-url, check-github-url, check-derivation, check-vulnerabilities, check-for-updates, report-tabulations, report-trailing-white-space, report-long-line, report-lone-parentheses): Adjust for changes to make-warning.
| * scripts: lint: Handle warnings with a record type.Christopher Baines2019-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than emiting warnings directly to a port, have the checkers return the warning or warnings. This makes it easier to use the warnings in different ways, for example, loading the data in to a database, as you can work with the <lint-warning> records directly, rather than having to parse the output to determine the package and location. * guix/scripts/lint.scm (<lint-warning>): New record type. (lint-warning): New macro. (lint-warning?, lint-warning-package, lint-warning-message, lint-warning-location, package-file, make-warning): New procedures. (call-with-accumulated-warnings, with-accumulated-warnings): Remove. (emit-warning): Rename to emit-warnings, and switch to displaying multiple warnings. (check-description-style)[check-not-empty-description, check-texinfo-markup, check-trademarks, check-quotes, check-proper-start, check-end-of-sentence-space]: Switch to generating a list of warnings, and using make-warning, rather than emit-warning. (check-inputs-should-be-native, check-inputs-should-not-be-an-input-at-all): Switch to generating a list of warnings, and using make-warning, rather than emit-warning. (check-synopsis): Switch to generating a list of warnings, and using make-warning, rather than emit-warning. [check-not-empty]: Remove, this is handled in the match clause to avoid other warnings being emitted. [check-final-period, check-start-article, check-synopsis-length, check-proper-start, check-start-with-package-name, check-texinfo-markup]: Switch to generating a list of warnings, and using make-warning, rather than emit-warning. [checks]: Remove check-not-empty. (validate-uri, check-home-page, check-patch-file-names, check-gnu-synopsis+description): Switch to generating a list of warnings, and using make-warning, rather than emit-warning. (check-source): Switch to generating a list of warnings, and using make-warning, rather than emit-warning. [try-uris]: Remove. [warnings-for-uris]: New procedure, replacing try-uris. (check-source-file-name, check-source-unstable-tarball, check-mirror-url, check-github-url, check-derivation, check-vulnerabilities, check-for-updates, report-tabulations, report-trailing-white-space, report-long-line, report-lone-parentheses, report-formatting-issues, check-formatting): Switch to generating a list of warnings, and using make-warning, rather than emit-warning. (run-checkers): Call emit-warnings on the warnings returned from the checker. * tests/lint.scm (string-match-or-error, single-lint-warning-message): New procedures. (call-with-warnings, with-warnings): Remove. ("description: not a string", "description: not empty", "description: invalid Texinfo markup", "description: does not start with an upper-case letter", "description: may start with a digit", "description: may start with lower-case package name", "description: two spaces after end of sentence", "description: end-of-sentence detection with abbreviations", "description: may not contain trademark signs: ™", "description: may not contain trademark signs: ®", "description: suggest ornament instead of quotes", "synopsis: not a string", "synopsis: not empty", "synopsis: valid Texinfo markup", "synopsis: does not start with an upper-case letter", "synopsis: may start with a digit", "synopsis: ends with a period", "synopsis: ends with 'etc.'", "synopsis: starts with 'A'", "synopsis: starts with 'a'", "synopsis: starts with 'an'", "synopsis: too long", "synopsis: start with package name", "synopsis: start with package name prefix", "synopsis: start with abbreviation", "inputs: pkg-config is probably a native input", "inputs: glib:bin is probably a native input", "inputs: python-setuptools should not be an input at all (input)", "inputs: python-setuptools should not be an input at all (native-input)", "inputs: python-setuptools should not be an input at all (propagated-input)", "patches: file names", "patches: file name too long", "patches: not found", "derivation: invalid arguments", "license: invalid license", "home-page: wrong home-page", "home-page: invalid URI", "home-page: host not found", "home-page: Connection refused", "home-page: 200", "home-page: 200 but short length", "home-page: 404", "home-page: 301, invalid", "home-page: 301 -> 200", "home-page: 301 -> 404", "source-file-name", "source-file-name: v prefix", "source-file-name: bad checkout", "source-file-name: good checkout", "source-file-name: valid", "source-unstable-tarball", "source-unstable-tarball: source #f", "source-unstable-tarball: valid", "source-unstable-tarball: package named archive", "source-unstable-tarball: not-github", "source-unstable-tarball: git-fetch", "source: 200", "source: 200 but short length", "source: 404", "source: 301 -> 200", "source: 301 -> 404", "mirror-url", "mirror-url: one suggestion", "github-url", "github-url: one suggestion", "github-url: already the correct github url", "cve", "cve: one vulnerability", "cve: one patched vulnerability", "cve: known safe from vulnerability", "cve: vulnerability fixed in replacement version", "cve: patched vulnerability in replacement", "formatting: lonely parentheses", "formatting: alright"): Change test-assert to test-equal, and adjust to work with the changes above. ("formatting: tabulation", "formatting: trailing white space", "formatting: long line"): Use string-match-or-error rather than string-contains.
* | Merge branch 'master' into core-updatesMarius Bakke2019-07-12
|\| | | | | | | | | | | | | | | | | Conflicts: gnu/local.mk gnu/packages/python-xyz.scm gnu/packages/xml.scm guix/gexp.scm po/guix/POTFILES.in
| * guix gc: Correctly handle '--delete-generations' with no arguments.Ludovic Courtès2019-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, 'guix gc --delete-generations' would crash: the "" pattern would be passed to 'matching-generations', which would return #f instead of returning a list. Reported by Raghav Gururajan <rvgn@disroot.org> in <https://bugs.gnu.org/36466>. * guix/ui.scm (matching-generations): Raise an error when passed an invalid pattern. * guix/scripts/gc.scm (delete-old-generations): Check if PATTERN is true. (%options): Leave ARG as-is for 'delete-generations'. (guix-gc): Use 'assq' instead of 'assoc-ref' for 'delete-generations'. * guix/scripts/package.scm (delete-matching-generations): Replace (string-null? pattern) with (not pattern). Remove 'else' clause. (%options): Leave ARG as-is for 'delete-generations'. * guix/scripts/pull.scm (%options): Leave ARG as-is for 'list-generations'. (process-query): Replace (string-null? pattern) with (not pattern). * guix/scripts/system.scm (list-generations): Likewise, and remove 'else' clause. (process-command): Use #f instead of "" when no pattern is given.
| * scripts: environment: Add --no-cwd.Carl Dong2019-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | * doc/guix.texi (Invoking guix environment): Add --no-cwd. * guix/scripts/environment.scm (show-help, %options): Add --no-cwd. (launch-environment/container): Add 'map-cwd?' param; only add mapping for cwd if #t. Only change to cwd within container if #t, otherwise home. (guix-environment): Error if --no-cwd without --container. Provide '(not no-cwd?)' to launch-environment/container as 'map-cwd?'. * tests/guix-environment.sh: Add test for no-cwd. Co-authored-by: Mike Gerwitz <mtg@gnu.org>
| * scripts: environment: Only rewrite user-specified mappings.Carl Dong2019-07-08
| | | | | | | | | | | | * guix/scripts/environment.scm (launch-environment/container): Only apply override-user-mappings to user-mappings and cwd. Do not apply to network configuration mapping and inputs.
| * Add 'guix deploy'.Jakob L. Kreuze2019-07-06
| | | | | | | | | | * guix/scripts/deploy.scm: New file. * Makefile.am (MODULES): Add it.
| * pack: 'squashfs' backend records the profile's search paths.Ludovic Courtès2019-07-04
| | | | | | | | | | | | | | | | | | * guix/scripts/pack.scm (singularity-environment-file): New procedure. (squashfs-image): Use it, and create /.singularity/env/90-environment.sh. * gnu/tests/singularity.scm (run-singularity-test)["singularity run, with environment"]: New test, currently skipped. * gnu/tests/singularity.scm (build-tarball&run-singularity-test): Add GUILE-JSON to the profile.
| * pack: 'docker' backend records the profile's search paths.Ludovic Courtès2019-07-04
| | | | | | | | | | | | | | | | | | | | | | | | * guix/docker.scm (config): Add #:environment parameter and honor it. (build-docker-image): Likewise, and pass it to 'config'. * guix/scripts/pack.scm (docker-image): Import (guix profiles) and (guix search-paths). Call 'profile-search-paths' and pass #:environment to 'build-docker-image'. * gnu/tests/docker.scm (run-docker-test)["Load docker image and run it"]: Add example that expects (json) to be available. * gnu/tests/docker.scm (build-tarball&run-docker-test): Replace %BOOTSTRAP-GUILE by GUILE-2.2 and GUILE-JSON in the environment.
| * Add (guix repl).Ludovic Courtès2019-07-04
| | | | | | | | | | | | | | * guix/scripts/repl.scm: Use (guix repl). (self-quoting?, machine-repl): Remove. * guix/repl.scm: New file. * Makefile.am (MODULES): Add it.
* | Merge branch 'master' into core-updatesLudovic Courtès2019-06-27
|\|
| * graph: Use 'derivation-input-derivation'.Ludovic Courtès2019-06-27
| | | | | | | | | | * guix/scripts/graph.scm (derivation-dependencies): Use 'derivation-input-derivation'.
| * ui: Add 'display-search-results' and use it.Ludovic Courtès2019-06-27
| | | | | | | | | | | | | | | | | | | | * guix/ui.scm (display-search-results): New procedure. * guix/scripts/package.scm (find-packages-by-description): Remove 'unzip2' call and return a list of pairs. (process-query): Change to use 'display-search-results'. * guix/scripts/system/search.scm (find-service-types): Remove 'unzip2' call and return a list of pairs. (guix-system-search): Use 'display-search-results'.
| * publish: Work around Guile 2.2.5 (web server) bug.Ludovic Courtès2019-06-24
| | | | | | | | | | * guix/scripts/publish.scm: Replace (@@ (web http) read-header-line) on Guile 2.2.5.
| * guix build: '--log-file' no longer returns several log files.Ludovic Courtès2019-06-23
| | | | | | | | | | | | | | | | | | | | | | | | Fixes a regression introduced in 9353b199c18caca4a429f20423e1a5e7bc26a8da whereby something like: guix build --log-file $(guix build -d guile) would return two log files. This led to a failure of 'tests/guix-build.sh'. * guix/scripts/build.scm (guix-build): Filter out derivation file names from ITEMS.
| * guix build: Use 'warning' for warnings.Ludovic Courtès2019-06-23
| | | | | | | | | | * guix/scripts/build.scm (options->derivations): Use 'warning' instead of 'format'.
* | Merge branch 'staging' into core-updatesMarius Bakke2019-06-20
|\|
| * guix build: '--log-file' looks for build logs of equivalent derivations.Ludovic Courtès2019-06-18
| | | | | | | | | | | | | | | | | | Previously, '--log-file' would look for log files only for the current derivation, and thus wouldn't find log files of equivalent derivations that produce the same output. * guix/scripts/build.scm (guix-build) <log-file?>: Replace 'derivation-file-name' by 'derivation->output-path'.
* | gnu: bootstrap: Download the bootstrap bash, mkdir, tar, and xz binaries.Ludovic Courtès2019-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/packages/bootstrap.scm (%bootstrap-executables): New variable. (bootstrap-executable-url, bootstrap-executable): New procedure. (raw-build)[->store]: Use 'run-with-store' and 'origin->derivation'. Add calls to 'derivation->output-path', and remove the list of references passed to 'add-text-to-store' for BUILDER. Augment the list of #:inputs passed to 'derivation'. (package-from-tarball): Use 'bootstrap-executable' instead of 'search-bootstrap-binary'. (%bootstrap-glibc, %bootstrap-gcc, %bootstrap-mescc-tools) (%bootstrap-mes): Likewise. * guix/scripts/environment.scm (environment-bash): Use 'bootstrap-executable' instead of 'search-bootstrap-binary'. (guix-environment): Adjust CONTAINER? case accordingly. * po/guix/POTFILES.in: Add gnu/packages/bootstrap.scm.
* | Merge branch 'master' into core-updatesLudovic Courtès2019-06-13
|\|
| * pack: Fix 'guix pack -f docker'.Ludovic Courtès2019-06-10
| | | | | | | | | | | | | | Regression introduced in a0f352b30f4869a7af7017b8a5011ac7602dd115. * guix/scripts/pack.scm (docker-image): Check whether ENTRY-POINT is true before returning (string-append #$profile ...).
| * pack: Add '--entry-point'.Ludovic Courtès2019-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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'.
| * syscalls: Add 'with-file-lock' macro.Ludovic Courtès2019-06-05
| | | | | | | | | | | | * guix/scripts/offload.scm (lock-file, unlock-file, with-file-lock): Move to... * guix/build/syscalls.scm: ... here.
| * guix package: Do not list environment variables that need to be set.Ludovic Courtès2019-06-05
| | | | | | | | | | | | | | | | | | | | 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'.
| * substitute: Select the best compression methods.Ludovic Courtès2019-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * publish: '--compression' can be repeated.Ludovic Courtès2019-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * publish: Factorize 'compress-nar'.Ludovic Courtès2019-05-29
| | | | | | | | | | * guix/scripts/publish.scm (compress-nar): New procedure. (bake-narinfo+nar): Use it.
| * publish: Remove outdated comment.Ludovic Courtès2019-05-29
| | | | | | | | * guix/scripts/publish.scm (make-request-handler): Remove outdated TODO.
| * publish: Display the compression method and level in use.Ludovic Courtès2019-05-27
| | | | | | | | | | | | * 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.
| * publish: Add support for lzip.Ludovic Courtès2019-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * publish: Maintain a hash-part-to-store-item mapping in cache.Ludovic Courtès2019-05-26
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'staging' into core-updatesMarius Bakke2019-05-25
|\|
| * weather: Accept package specs on the command line.Ludovic Courtès2019-05-22
| | | | | | | | | | | | | | | | | | 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.
| * pack: Warn when building an empty pack.Ludovic Courtès2019-05-22
| | | | | | | | | | * guix/scripts/pack.scm (guix-pack): Warn when MANIFEST has zero entries.
| * pack: Add '--root'.Ludovic Courtès2019-05-22
| | | | | | | | | | | | | | * 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.
| * guix system: Type-check the file or expression.Ludovic Courtès2019-05-16
| | | | | | | | | | | | | | | | | | 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.
| * guix build: Gracefully handle invalid '--with-git-url' specs.Ludovic Courtès2019-05-14
| | | | | | | | | | * guix/scripts/build.scm (transform-package-source-git-url): Add case for when 'string-split' does not return exactly two elements.
| * vm: Auto-detect if inputs should be registered.Maxim Cournoyer2019-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * linux-container: Support container network sharing.Arun Isaac2019-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * pull: Display 'hash guix' hint when the new and old 'guix' are different.Ludovic Courtès2019-05-09
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * ui: Make package outputs searchable.Chris Marusich2019-05-09
| | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * environment: Non ad-hoc mode also honors transformation options.Ludovic Courtès2019-05-07
| | | | | | | | | | | | | | | | | | 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.
| * build: Change default substitute server to "ci.guix.gnu.org".Ludovic Courtès2019-05-01
| | | | | | | | | | | | | | | | | | | | | | * 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".
| * processes: Gracefully handle daemons without clients.Ludovic Courtès2019-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'.
| * processes: 'process-open-files' ignores disappeared /proc/PID/fd entries.Ludovic Courtès2019-04-29
| | | | | | | | | | | | | | | | 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'.
* | Merge branch 'master' into core-updatesMarius Bakke2019-05-01
|\|