summaryrefslogtreecommitdiff
path: root/guix/scripts
AgeCommit message (Collapse)Author
2016-10-10substitute: Make download messages more concise.Ludovic Courtès
'guix substitute' now displays 2 lines per download instead of 4. Suggested by Ricardo Wurmus. * guix/scripts/substitute.scm (assert-valid-narinfo): Have #:verbose? default to #f. Remove leading newline in message. (process-substitution): Display the URI rather than the store file name. Display two newlines after the substitution.
2016-10-06guix system: Return two values when failing to talk to shepherd.Ludovic Courtès
Before that, when 'guix system reconfigure' failed to talk to shepherd and a 'system-error' was raised, we would get a "too few values returned to continuation" error, which would prevent GRUB from being installed. Reported by fps on #guix. * guix/scripts/system.scm (warn-on-system-error): Remove. (with-shepherd-error-handling): Inline former 'warn-on-system-error'. Return two values when 'system-error' is raised.
2016-10-03lint: 'cve' checker reports the replacement's vulnerabilities.Ludovic Courtès
Before, 'guix lint -c cve' would report the vulnerabilities of the original package while pretending they are the vulnerabilities of the replacement. * guix/scripts/lint.scm (check-vulnerabilities): Consider the package replacement before calling 'package-vulnerabilities'. * tests/lint.scm ("cve: vulnerability fixed in replacement version"): New test.
2016-09-27guix build: Gracefully handle packages without source for '-S'.Ludovic Courtès
Fixes <http://bugs.gnu.org/22836>. Reported by Ricardo Wurmus <rekado@elephly.net>. * guix/scripts/build.scm (options->derivations): Gracefully handle (package-source p) = #f.
2016-09-24system: grub.cfg uses correct file names when store is not in root partition.Carlos Sánchez de La Lama
Fixes <http://bugs.gnu.org/24346>. Reported by csanchezdll@gmail.com (Carlos Sánchez de La Lama). * guix/scripts/system.scm (previous-grub-entries): Get the initrd file name from PARAMS. * gnu/system.scm (operating-system-grub.cfg): Use 'operating-system-initrd-file' to retrieve the initrd file name. * gnu/system/grub.scm (strip-mount-point): New procedure. (grub-configuration-file)[entry->gexp]: Call 'strip-mount-point' for LINUX and INITRD. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2016-09-20ui: Do not shadow '_' where it's used as a literal syntax match.Ludovic Courtès
Fixes compilation with Guile 2.1. Reported by Mu Lei. * guix/ui.scm (report-load-error) (warn-about-load-error, read/eval-package-expression): Use 'rest' instead of '_' as the pattern variable name. * gnu/packages.scm (%find-package): Likewise. * guix/scripts/build.scm (transform-package-inputs): Likewise. * guix/scripts/hash.scm (guix-hash): Likewise. * guix/scripts/import/gnu.scm (%options, guix-import-gnu): Likewise. * guix/scripts/import/nix.scm (guix-import-nix): Likewise. * guix/scripts/offload.scm (build-machines): Likewise. * guix/scripts/refresh.scm (%options): Likewise. * guix/scripts/substitute.scm (narinfo-signature->canonical-sexp): Likewise.
2016-09-07guix hash: Add --exclude-vcs option.Jan Nieuwenhuizen
* guix/scripts/hash.scm (show-help): Add help text for --exclude-vcs option. (%options): Add --exclude-vcs option. (guix-hash): Handle exclude-vcs option. * doc/guix.texi ("Invoking guix hash"): Update doc. * tests/guix-hash.sh: Add test. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2016-09-06packages: Add 'package-superseded' and associated support.Ludovic Courtès
This provides a way to mark a package as superseded by another one. Upgrades replace superseded packages with their replacement. * guix/packages.scm (package-superseded, deprecated-package): New procedures. * gnu/packages.scm (%find-package): Check for 'package-superseded'. * guix/scripts/package.scm (transaction-upgrade-entry)[supersede]: New procedure. Call it when 'package-superseded' is true. * tests/guix-build.sh: Add test for a superseded package. * tests/packages.scm ("package-superseded") ("transaction-upgrade-entry, superseded package"): New tests.
2016-09-06guix package: Build up the transaction incrementally.Ludovic Courtès
* guix/scripts/package.scm (upgraded-manifest-entry): Rename to... (transaction-upgrade-entry): ... this. Add 'transaction' parameter and return a transaction. (options->installable): Likewise. [to-upgrade]: Rename to... [upgraded]: ... this, and change to be a transaction. Return a transaction. (options->removable): Likewise. (process-actions): Adjust accordingly. * tests/packages.scm ("transaction-upgrade-entry, zero upgrades") ("transaction-upgrade-entry, one upgrade"): New tests.
2016-09-06guix package: Clarify upgrade code.Ludovic Courtès
* guix/scripts/package.scm (upgradeable?): Rename to... (upgraded-manifest-entry): ... this. Change to take a <manifest-entry> and to return a <manifest-entry>. (options->installable)[to-upgrade]: Adjust accordingly.
2016-09-01guix build: Rewrite '--with-input' in terms of 'package-input-rewriting'.Ludovic Courtès
* guix/scripts/build.scm (transform-package-inputs): Rewrite in terms of 'package-input-rewriting'.
2016-08-31services: shepherd: Add 'shepherd-service-upgrade', from 'guix system'.Ludovic Courtès
* guix/scripts/system.scm (service-upgrade): Move to... * gnu/services/shepherd.scm (shepherd-service-upgrade): ... here. * tests/system.scm ("service-upgrade: nothing to do", "service-upgrade: one unchanged, one upgraded, one new", "service-upgrade: service depended on is not unloaded", "service-upgrade: obsolete services that depend on each other"): Move to... * tests/services.scm: ... here. Adjust to 'service-upgrade' rename.
2016-08-31guix system: Do not unload services depended on.Ludovic Courtès
Reported by Mark H Weaver <mhw@netris.org> at <https://lists.gnu.org/archive/html/guix-devel/2016-08/msg01470.html>. * guix/scripts/system.scm (service-upgrade)[live-service-required?]: New procedure. [obsolete?]: Use it. * tests/system.scm ("service-upgrade: service depended on is not unloaded", "service-upgrade: obsolete services that depend on each other"): New tests.
2016-08-31guix system: Use 'shepherd-service-lookup-procedure' in 'service-upgrade'.Ludovic Courtès
* guix/scripts/system.scm (service-upgrade)[essential?]: SERVICE is now a <live-service>. [lookup-target, lookup-live, running?, stopped, obsolete?]: New procedures. [to-load, to-unload]: Use them. TO-UNLOAD is now a list of <live-service>. (call-with-service-upgrade-info): Extract symbols from TO-UNLOAD. * tests/system.scm ("service-upgrade: one unchanged, one upgraded, one new"): Adjust accordingly.
2016-08-31guix system: Extract and test the service upgrade procedure.Ludovic Courtès
* guix/scripts/system.scm (service-upgrade): New procedure, with code from... (call-with-service-upgrade-info): ... here. Use it. * tests/system.scm (live-service, service-upgrade): New variables. ("service-upgrade: nothing to do", "service-upgrade: one unchanged, one upgraded, one new"): New tests.
2016-08-31services: herd: Provide <live-service> objects.Ludovic Courtès
* gnu/services/herd.scm (<live-service>): New record type. (current-services): Change to return a single value: #f or a list of <live-service>. * guix/scripts/system.scm (call-with-service-upgrade-info): Adjust accordingly. * gnu/tests/base.scm (run-basic-test)["shepherd services"]: Adjust accordingly.
2016-08-28guix: lint: Check descriptions for trademark signs.Eric Bavier
* guix/scripts/lint.scm (check-description-style): Emit a warning if trademark signs found in description. * tests/lint.scm (description: may not contain trademark signs): Add test.
2016-08-28guix scripts: Disable grafting on dry runs.Roel Janssen
* guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/environment.scm, guix/scripts/system.scm, guix/scripts/package.scm: Disable grafting when a dry-run parameter is given.
2016-08-20system: Fix 'guix system' when root fs is named by UUID.Mark H Weaver
Fixes <https://bugs.gnu.org/23881>. * guix/scripts/system.scm (previous-grub-entries) (display-system-generation): Handle the case where the root device is specified by UUID.
2016-08-19edit: Do not honor 'GUIX_BUILD_OPTIONS'.Ludovic Courtès
* guix/scripts/edit.scm (guix-edit)[parse-arguments]: New procedure. Use it.
2016-08-02guix system: Fix the Shepherd error handling fix.Ludovic Courtès
This is a followup to aa1e73a996ad170fecac848f203528aeb3d2173e. * guix/scripts/system.scm (with-shepherd-error-handling): Return two values when an exception is caught.
2016-08-02guix system: Properly report Shepherd errors when upgrading services.Ludovic Courtès
Fixes regression introduced in 8bf92e3904cb656d4c2160fc8befebaf21a65492. Reported by myglc2 <myglc2@gmail.com> in <http://bugs.gnu.org/24135>. * guix/scripts/system.scm (with-shepherd-error-handling): Rename 'body' to 'mbody'. Expand to a monadic procedure that runs MBODY.
2016-08-02lint: 'inputs-should-be-native' checks for extra-cmake-modules and qttools.David Craven
* guix/scripts/lint.scm (check-inputs-should-be-native): Warn when extra-cmake-modules or qttools isn't a native-input.
2016-08-02gnu-maintenance: Add KDE updater.David Craven
* guix/gnu-maintenance.scm (kde-package?, latest-kde-release): New private functions. (%kde-updater): New public variable. * guix/scripts/refresh.scm (list-updaters): Add %kde-updater. * doc/guix.texi (Invoking guix refresh): Mention the new updater.
2016-08-01publish: Do not compress already-compressed files.Ludovic Courtès
* guix/scripts/publish.scm (narinfo-string): Force %NO-COMPRESSION when STORE-PATH matches 'compressed-file?'. * guix/utils.scm (compressed-file?): New procedure. * tests/publish.scm ("/*.narinfo for a compressed file"): New test.
2016-07-29size: Fix corner case with multiple items on the command line.Ludovic Courtès
Fixes 'guix size foo bar' when 'foo' is in the local store and 'bar' isn't, which could lead to an incomplete requisite list. * guix/scripts/size.scm (requisites*): Partition ITEMS according to 'valid-path?'. Use 'substitutable-requisites' only on invalid items.
2016-07-28guix package: Suggest prefix search path settings.Ludovic Courtès
* guix/scripts/package.scm (build-and-use-profile): Pass #:kind 'prefix to 'display-search-paths'.
2016-07-26environment: Set 'GUIX_ENVIRONMENT' to the profile.Ludovic Courtès
* guix/scripts/environment.scm (create-environment): Set 'GUIX_ENVIRONMENT' to PROFILE. * tests/guix-environment.sh: Test it. * doc/guix.texi (Invoking guix environment): Document it.
2016-07-24lint: 'inputs-should-be-native' checks for intltool, itstool and glib:bin.David Craven
* guix/scripts/lint.scm (check-inputs-should-be-native): Warn when intltool, itstool or glib:bin isn't a native-input. * tests/lint.scm (inputs: glib:bin is probably a native input): Add test. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2016-07-20publish: Handle '/file' URLs, for content-addressed files.Ludovic Courtès
* guix/scripts/publish.scm (render-content-addressed-file): New procedure. (http-write): Add 'application/octet-stream' case. (make-request-handler): Add /file/NAME/sha256/HASH URLs. * tests/publish.scm ("/file/NAME/sha256/HASH") ("/file/NAME/sha256/INVALID-NIX-BASE32-STRING") ("/file/NAME/sha256/INVALID-HASH"): New tests. * doc/guix.texi (Invoking guix publish): Mention the /file URLs.
2016-07-19publish: Keep compression disabled when zlib is missing.Ludovic Courtès
Reported by David Thompson. * guix/scripts/publish.scm (%options)[--compression]: Warn if LEVEL > 0 and zlib is missing, and return RESULT.
2016-07-19publish: Add '--compression'.Ludovic Courtès
* guix/scripts/publish.scm (show-help, %options): Add '--compression'. (<compression>): New record type. (%no-compression, %default-gzip-compression): New variables. (%default-options): Add 'compression' key. (narinfo-string): Add #:compression parameter and honor it. (render-narinfo): Likewise. (render-nar): Likewise. <top level>: Add call to 'declare-header!'. (swallow-zlib-error): New macro. (nar-response-port): New procedure. (http-write): Add call to 'force-output'. Use 'nar-response-port' instead of 'response-port'. Use 'swallow-zlib-error'. (make-request-handler): Add #:compression parameter and honor it. Add "nar/gzip" URL handler. (run-publish-server): Add #:compression parameter and honor it. (guix-publish): Honor --compression. * tests/publish.scm (http-get-port, wait-until-ready): New procedures. <top level>: Run main server with "-C0". Call 'wait-until-ready'. ("/nar/gzip/*", "/*.narinfo with compression"): New tests. * doc/guix.texi (Invoking guix publish): Document it.
2016-07-16guix gc: Display of saved space for garbage collection.Vincent Legoll
Fixes <http://bugs.gnu.org/23979>. * guix/scripts/gc.scm (guix-gc): Display freed bytes. Signed-off-by: Vincent Legoll <vincent.legoll@idgrilles.fr> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-07-14challenge: Disable grafting.Ludovic Courtès
* guix/scripts/challenge.scm (guix-challenge): Set %GRAFT? to #f.
2016-07-14substitute: Gracefully handle trailing slashes in URLs.Ludovic Courtès
Previously, using something like "--substitute-urls=http://example.org///" would lead to a 'cache-narinfo!' call with #f as its second argument. It would also do the wrong thing for URLs with a non-empty initial path component, such as "http://example.org/foo/bar". * guix/scripts/substitute.scm (fetch-narinfos)[handle-narinfo-response]: Add call to 'basename' for PATH.
2016-07-13lint: 'validate-uri' reports suspiciously small 200 responses.Ludovic Courtès
* guix/scripts/lint.scm (validate-uri): Upon 200 http-response, check the 'response-content-length' and emit a warning when it is <= 1000. * tests/lint.scm (call-with-http-server): Add 'data' parameter. (with-http-server): Likewise. (%long-string): New variable. ("home-page: 200"): Pass %LONG-STRING to 'with-http-server'. ("home-page: 404", "source: 200", "source: 404"): Likewise. ("home-page: 200 but short length"): New test. ("source: 200 but short length"): New test.
2016-07-12gexp: Remove more uses of #:modules.Ludovic Courtès
* guix/scripts/system.scm (switch-to-system): Adjust comment. * tests/gexp.scm ("gexp->derivation #:references-graphs"): Use 'with-imported-modules' instead of #:modules. * tests/grafts.scm ("graft-derivation, preserve empty directories"): Likewise.
2016-06-22substitute: Use ~/.cache when invoked by an unprivileged user.Ludovic Courtès
This is a followup to ea0c6e0507a6997f12a4f29d0445b51cf53bd81e. * guix/scripts/substitute.scm (%narinfo-cache-directory): Use 'cache-directory' when (getuid) returns non-zero. (cache-narinfo!): Remove 'catch'.
2016-06-09publish: Add '--ttl'.Ludovic Courtès
* guix/scripts/publish.scm (show-help, %options): Add --ttl. (render-narinfo): Add #:ttl and honor it. (make-request-handler): Add #:narinfo-ttl and honor it. (run-publish-server): Likewise. (guix-publish): Honor --ttl, pass it to 'run-publish-server'.
2016-06-08publish: Encore URIs that appear in narinfos.Ludovic Courtès
Fixes <http://bugs.gnu.org/21888>. Reported by iyzsong@member.fsf.org (宋文武). * guix/scripts/publish.scm (narinfo-string): Use 'encode-and-join-uri-path' instead of 'string-append' to compute URL. * tests/publish.scm ("/*.narinfo with properly encoded '+' sign"): ("/nar/ with properly encoded '+' sign"): New tests.
2016-05-31offload: Use (guix build syscalls).Ludovic Courtès
This is a followup to 4e0ea3eb288c2143b44bf324c64047762c72d3b3. * guix/scripts/offload.scm: Use (guix build syscalls).
2016-05-27guix package: Inherit the transformed version number.Ludovic Courtès
Previously, 'guix package -i emacs --with-source=./emacs-42.tar.gz' would fail to use "42" as the version number in the manifest entry. Reported by piyo on #guix. * guix/scripts/package.scm (process-actions)[transform-entry]: Inherit the version number from the result of TRANSFORM when it's a package. * tests/guix-package.sh: Test it.
2016-05-26substitute: Internationalize the "Downloading" message.Ludovic Courtès
* guix/scripts/substitute.scm (process-substitution): I18n "Downloading" message.
2016-05-24size: Pass 'requisites' a list of items.Ludovic Courtès
* guix/scripts/size.scm (substitutable-requisites): Change 'item' to 'items' and adjust. (requisites*): Likewise. (mappend-map): Remove. (store-profile): Adjust accordingly.
2016-05-24store: 'requisites' now takes a list of store items.Ludovic Courtès
* guix/store.scm (fold-path): Change 'path' to 'paths' and adjust body accordingly. (requisites): Likewise. * guix/scripts/environment.scm (inputs->requisites): Adjust user accordingly. * guix/scripts/size.scm (requisites*): Likewise. * guix/scripts/gc.scm (guix-gc): Likewise. * tests/store.scm ("requisites"): Likewise.
2016-05-24size: Accept several arguments.Ludovic Courtès
* guix/scripts/size.scm (display-profile): Display WHOLE at then end. (guix-size): Accept several FILES. * doc/guix.texi (Invoking guix size): Add example with several items.
2016-05-24size: 'store-profile' takes a list of store items.Ludovic Courtès
* guix/scripts/size.scm (mappend-map): New procedure. (store-profile): Change 'item' to 'items' and adjust code accordingly. (guix-size): Update caller. * tests/size.scm ("store-profile"): Likewise.
2016-05-24refresh: Make 'list-dependents' a monadic procedure.Ludovic Courtès
* guix/scripts/refresh.scm (list-dependents): Remove use of 'with-store' and 'run-with-store'. (guix-refresh): Wrap body in with-store/run-with-store.
2016-05-21substitute: Gracefully handle invalid store file names.Ludovic Courtès
Before, something like: echo have /gnu/foo | ./test-env guix substitute --query would lead to an ugly backtrace. * guix/scripts/substitute.scm (narinfo-cache-file): Call 'leave' when 'store-hash-part' returns #f.
2016-05-21graph: Allow store file names for 'derivation' and 'references' graphs.Ludovic Courtès
* guix/scripts/graph.scm (%derivation-node-type)[convert]: Add 'derivation-path?' and catch-all clauses. (%reference-node-type)[convert]: Add 'store-path?' and catch-all clauses. (assert-package, nodes-from-package): New procedures. (%package-node-type, %bag-node-type,%bag-with-origins-node-type) (%bag-emerged-node-type): Add 'convert' field (guix-graph): Rename 'packages' to 'items' and allow 'store-path?' arguments. * guix/graph.scm (<node-type>)[convert]: Adjust comment. * doc/guix.texi (Invoking guix graph): Document it.