summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
...
* guix system: Return two values when failing to talk to shepherd.Ludovic Courtès2016-10-06
| | | | | | | | | | | | 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.
* lint: 'cve' checker reports the replacement's vulnerabilities.Ludovic Courtès2016-10-03
| | | | | | | | | | | 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.
* guix build: Gracefully handle packages without source for '-S'.Ludovic Courtès2016-09-27
| | | | | | | | 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.
* system: grub.cfg uses correct file names when store is not in root partition.Carlos Sánchez de La Lama2016-09-24
| | | | | | | | | | | | | | | 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>
* ui: Do not shadow '_' where it's used as a literal syntax match.Ludovic Courtès2016-09-20
| | | | | | | | | | | | | | | | | | 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.
* guix hash: Add --exclude-vcs option.Jan Nieuwenhuizen2016-09-07
| | | | | | | | | | * 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>
* packages: Add 'package-superseded' and associated support.Ludovic Courtès2016-09-06
| | | | | | | | | | | | | | 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.
* guix package: Build up the transaction incrementally.Ludovic Courtès2016-09-06
| | | | | | | | | | | | | | * 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.
* guix package: Clarify upgrade code.Ludovic Courtès2016-09-06
| | | | | | | * 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.
* guix build: Rewrite '--with-input' in terms of 'package-input-rewriting'.Ludovic Courtès2016-09-01
| | | | | * guix/scripts/build.scm (transform-package-inputs): Rewrite in terms of 'package-input-rewriting'.
* services: shepherd: Add 'shepherd-service-upgrade', from 'guix system'.Ludovic Courtès2016-08-31
| | | | | | | | | | * 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.
* guix system: Do not unload services depended on.Ludovic Courtès2016-08-31
| | | | | | | | | | | | 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.
* guix system: Use 'shepherd-service-lookup-procedure' in 'service-upgrade'.Ludovic Courtès2016-08-31
| | | | | | | | | | | | * 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.
* guix system: Extract and test the service upgrade procedure.Ludovic Courtès2016-08-31
| | | | | | | | | * 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.
* services: herd: Provide <live-service> objects.Ludovic Courtès2016-08-31
| | | | | | | | | | * 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.
* guix: lint: Check descriptions for trademark signs.Eric Bavier2016-08-28
| | | | | | | * 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.
* guix scripts: Disable grafting on dry runs.Roel Janssen2016-08-28
| | | | | | * 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.
* system: Fix 'guix system' when root fs is named by UUID.Mark H Weaver2016-08-20
| | | | | | | | 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.
* edit: Do not honor 'GUIX_BUILD_OPTIONS'.Ludovic Courtès2016-08-19
| | | | | * guix/scripts/edit.scm (guix-edit)[parse-arguments]: New procedure. Use it.
* guix system: Fix the Shepherd error handling fix.Ludovic Courtès2016-08-02
| | | | | | | This is a followup to aa1e73a996ad170fecac848f203528aeb3d2173e. * guix/scripts/system.scm (with-shepherd-error-handling): Return two values when an exception is caught.
* guix system: Properly report Shepherd errors when upgrading services.Ludovic Courtès2016-08-02
| | | | | | | | 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.
* lint: 'inputs-should-be-native' checks for extra-cmake-modules and qttools.David Craven2016-08-02
| | | | | * guix/scripts/lint.scm (check-inputs-should-be-native): Warn when extra-cmake-modules or qttools isn't a native-input.
* gnu-maintenance: Add KDE updater.David Craven2016-08-02
| | | | | | | | * 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.
* publish: Do not compress already-compressed files.Ludovic Courtès2016-08-01
| | | | | | | * 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.
* size: Fix corner case with multiple items on the command line.Ludovic Courtès2016-07-29
| | | | | | | | 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.
* guix package: Suggest prefix search path settings.Ludovic Courtès2016-07-28
| | | | | * guix/scripts/package.scm (build-and-use-profile): Pass #:kind 'prefix to 'display-search-paths'.
* environment: Set 'GUIX_ENVIRONMENT' to the profile.Ludovic Courtès2016-07-26
| | | | | | | * 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.
* lint: 'inputs-should-be-native' checks for intltool, itstool and glib:bin.David Craven2016-07-24
| | | | | | | | * 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>
* publish: Handle '/file' URLs, for content-addressed files.Ludovic Courtès2016-07-20
| | | | | | | | | | * 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.
* publish: Keep compression disabled when zlib is missing.Ludovic Courtès2016-07-19
| | | | | | | Reported by David Thompson. * guix/scripts/publish.scm (%options)[--compression]: Warn if LEVEL > 0 and zlib is missing, and return RESULT.
* publish: Add '--compression'.Ludovic Courtès2016-07-19
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* guix gc: Display of saved space for garbage collection.Vincent Legoll2016-07-16
| | | | | | | | | 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>
* challenge: Disable grafting.Ludovic Courtès2016-07-14
| | | | * guix/scripts/challenge.scm (guix-challenge): Set %GRAFT? to #f.
* substitute: Gracefully handle trailing slashes in URLs.Ludovic Courtès2016-07-14
| | | | | | | | | | | | 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.
* lint: 'validate-uri' reports suspiciously small 200 responses.Ludovic Courtès2016-07-13
| | | | | | | | | | | | * 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.
* gexp: Remove more uses of #:modules.Ludovic Courtès2016-07-12
| | | | | | | | * 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.
* substitute: Use ~/.cache when invoked by an unprivileged user.Ludovic Courtès2016-06-22
| | | | | | | | 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'.
* publish: Add '--ttl'.Ludovic Courtès2016-06-09
| | | | | | | | * 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'.
* publish: Encore URIs that appear in narinfos.Ludovic Courtès2016-06-08
| | | | | | | | | | 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.
* offload: Use (guix build syscalls).Ludovic Courtès2016-05-31
| | | | | | This is a followup to 4e0ea3eb288c2143b44bf324c64047762c72d3b3. * guix/scripts/offload.scm: Use (guix build syscalls).
* guix package: Inherit the transformed version number.Ludovic Courtès2016-05-27
| | | | | | | | | | | 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.
* substitute: Internationalize the "Downloading" message.Ludovic Courtès2016-05-26
| | | | | * guix/scripts/substitute.scm (process-substitution): I18n "Downloading" message.
* size: Pass 'requisites' a list of items.Ludovic Courtès2016-05-24
| | | | | | | | * guix/scripts/size.scm (substitutable-requisites): Change 'item' to 'items' and adjust. (requisites*): Likewise. (mappend-map): Remove. (store-profile): Adjust accordingly.
* store: 'requisites' now takes a list of store items.Ludovic Courtès2016-05-24
| | | | | | | | | | | * 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.
* size: Accept several arguments.Ludovic Courtès2016-05-24
| | | | | | * 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.
* size: 'store-profile' takes a list of store items.Ludovic Courtès2016-05-24
| | | | | | | * 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.
* refresh: Make 'list-dependents' a monadic procedure.Ludovic Courtès2016-05-24
| | | | | | * 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.
* substitute: Gracefully handle invalid store file names.Ludovic Courtès2016-05-21
| | | | | | | | | | | 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.
* graph: Allow store file names for 'derivation' and 'references' graphs.Ludovic Courtès2016-05-21
| | | | | | | | | | | | | | * 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.
* graph: Use absolute file name canonicalization.Ludovic Courtès2016-05-21
| | | | * guix/scripts/graph.scm (guix-graph): Wrap in 'with-fluids'.