summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* substitute: Disable HTTPS certificate verification.Ludovic Courtès2016-11-12
| | | | | | | | | | | | | Fixes a regression introduced in 9e4e431e049fae3f1121c3be22cf13b174404ba8 as a consequence of bc3c41ce36349ed4ec758c70b48a7059e363043a. Reported by Marius Bakke <mbakke@fastmail.com>. * guix/scripts/substitute.scm (fetch): Pass #:verify-certificate? #f to 'open-connection-for-uri' and 'http-fetch'. (download-cache-info): Likewise. (http-multiple-get): Add #:verify-certificate? and honor it. (fetch-narinfos): Pass #:verify-certificate? #f.
* container: Pass a list of <file-system> objects as things to mount.Ludovic Courtès2016-11-10
| | | | | | | | | | | | | | | * gnu/build/linux-container.scm (mount-file-systems): 'mounts' is now a list of <file-system> objects instead of a list of lists ("specs"). Add call to 'file-system->spec' as the argument to 'mount-file-system'. (run-container, call-with-container): Adjust docstring accordingly. * gnu/system/file-systems.scm (spec->file-system): New procedure. * gnu/system/linux-container.scm (container-script)[script]: Call 'spec->file-system' inside gexp. * guix/scripts/environment.scm (launch-environment/container): Remove call to 'file-system->spec'. * tests/containers.scm ("call-with-container, mnt namespace") ("call-with-container, mnt namespace, wrong bind mount"): Pass a list of <file-system> objects.
* lint: 'cve' checker catches 'tls-certificate-error'.Ludovic Courtès2016-11-09
| | | | | | | | | Reported by Frederick Muriithi <fredmanglis@gmail.com>. * guix/scripts/lint.scm (tls-certificate-error-string): New procedure. (validate-uri): Use it. (current-vulnerabilities*): Catch 'tls-certificate-error' and print a warning.
* system: Use grub from bootloader configuration.Marius Bakke2016-11-08
| | | | | | | | * gnu/system/grub.scm (gnu): Export grub-configuration-grub. * guix/scripts/system.scm (perform-action): Use it. (define-module): Don't import (gnu packages grub). Co-authored-by: Danny Milosavljevic <dannym@scratchpost.org>
* guix download: Add '--no-check-certificate' option.Ludovic Courtès2016-11-07
| | | | | | | | | | * guix/download.scm (download-to-store): Add #:verify-certificate? parameter and honor it. * guix/scripts/download.scm (%default-options): Add 'verify-certificate?' key. (show-help, %options): Add '--no-check-certificate'. (guix-download): Pass #:verify-certificate to 'download-to-store'. * doc/guix.texi (Invoking guix download): Document it.
* download: Verify TLS certificates unless asked not to.Ludovic Courtès2016-11-07
| | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/24466>. Reported by Leo Famulari <leo@famulari.name>. * guix/build/download.scm (%x509-certificate-directory): New variable. (make-credendials-with-ca-trust-files, peer-certificate) (assert-valid-server-certificate, print-tls-certificate-error): New procedures. Add 'print-tls-certificate-error' as an exception printer for 'tls-certificate-error'. (tls-wrap): Add #:verify-certificate? parameter and honor it. (open-connection-for-uri): Likewise. (http-fetch): Likewise. (url-fetch): Likewise. * guix/download.scm (url-fetch)[builder]: Pass #:verify-certificate? #f. * guix/scripts/lint.scm (probe-uri): Add case for 'tls-certificate-error'. (validate-uri): Likewise. * doc/guix.texi (Invoking guix download): Mention 'SSL_CERT_DIR'.
* system: Add 'guix system' actions: switch-generation and roll-back.Chris Marusich2016-11-06
| | | | | | | | | | | | | * guix/scripts/system.scm (roll-back-system, switch-to-system-generation): new actions. (reinstall-grub): New procedure, used by switch-to-system-generation. (show-help, process-command, guix-system): Honor the new actions. * doc/guix.texi (Invoking guix system) <switch-generation, roll-back>: Add the new actions. <reconfigure>: In the footnote, mention that the new actions also only work on GuixSD. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* system: Optionally limit the entries returned by profile-grub-entries.Chris Marusich2016-11-06
| | | | | | | * guix/scripts/system.scm (profile-grub-entries): Add an optional parameter which allows the caller to limit the number of returned grub entries. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* system: Rename previous-grub-entries to profile-grub-entries.Chris Marusich2016-11-06
| | | | | | | | | * guix/scripts/system.scm (previous-grub-entries, profile-grub-entries): Rename previous-grub-entries to profile-grub-entries to indicate that it is stateful and returns the entries for all profile generations, not just the previous ones. Update all callers. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* profiles: Extract a procedure for getting relative generation numbers.Chris Marusich2016-11-06
| | | | | | | * guix/profiles.scm (relative-generation-spec->number): New procedure. * guix/scripts/package.scm (switch-generation-action): Use it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* system: Record store file system info in each generation.Chris Marusich2016-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/system.scm (<boot-parameters>)[store-device, store-mount-point]: New fields. (read-boot-parameters): Initialize them. (operating-system-grub.cfg): Likewise. Remove STORE-FS argument from call to 'grub-configuration-file'. (operating-system-parameters-file): Add 'store' element in 'boot-parameters'. * gnu/system/grub.scm (strip-mount-point): Replace 'store-fs' parameter by 'mount-point'; adjust accordingly. Adjust callers. (<menu-entry>)[device, device-mount-point]: New fields. (eye-candy): Replace 'root-fs' parameter by 'store-device'; add 'store-mount-point'. Use keyword arguments for 'system' and 'port'. (grub-root-search): Remove 'root-fs' by 'device' and adjust accordingly. (grub-configuration-file): Remove 'store-fs' parameter. Adjust accordingly. * guix/scripts/system.scm (previous-grub-entries): Initialize 'device' and 'device-mount-point' fields from PARAMS. * doc/guix.texi (GRUB Configuration): Document 'device' and 'device-mount-point'. Explain that 'linux' can be prefixed by a GRUB device name. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* guix hash: Interpret '-' as standard input.Ludovic Courtès2016-10-28
| | | | | | * guix/scripts/hash.scm (guix-hash)[file-hash]: Special-case "-". * tests/guix-hash.sh: Add test. * doc/guix.texi (Invoking guix hash): Document it.
* guix package: Display generation diffs.Roel Janssen2016-10-26
| | | | | | | * guix/ui.scm (display-profile-content-diff): New variable. * guix/scripts/package.scm (process-query): Use display-profile-content-diff. In collaboration with Benz Schenk.
* Use (ice-9 binary-ports) instead of (rnrs io ports).Ludovic Courtès2016-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces the closure of (guix ui) from 123 to 106 modules. * guix/derivations.scm: Use (ice-9 binary-ports) instead of (rnrs io ports). (map-derivation)[substitute-file]: Use 'read-string' instead of 'get-string-all'. * guix/ftp-client.scm: Likewise. * guix/hash.scm: Likewise. * guix/http-client.scm: Likewise. * guix/pki.scm (ensure-acl, current-acl): Likewise. * guix/scripts/archive.scm (authorize-key)[read-key]: Likewise. * guix/scripts/authenticate.scm (read-canonical-sexp) (read-hash-data): Likewise. * guix/scripts/download.scm: Likewise. * guix/scripts/offload.scm (register-gc-root, remove-gc-roots) (send-files): Likewise. * guix/scripts/publish.scm (lazy-read-file-sexp): Likewise. * guix/scripts/refresh.scm: Likewise. * guix/scripts/substitute.scm (check-acl-initialized): Likewise. * guix/serialization.scm (read-maybe-utf8-string): Likewise. * guix/scripts/hash.scm (guix-hash): Use 'force-output' instead of 'flush-output-port'. * guix/store.scm (process-stderr): Likewise. * guix/tests.scm: Likewise. * guix/utils.scm: Use (ice-9 binary-ports) and autoload (rnrs io ports) for 'make-custom-binary-input-port'.
* lint: Suggest @code instead of quotes.Ludovic Courtès2016-10-19
| | | | | | | | * guix/scripts/lint.scm (%quoted-identifier-rx): New variable. (check-description-style)[check-quotes]: New procedure. Use it. * tests/lint.scm ("description: suggest ornament instead of quotes"): New test.
* guix build: Add '--with-graft'.Ludovic Courtès2016-10-17
| | | | | | | | | | * guix/scripts/build.scm (transform-package-inputs/graft): New procedure. (%transformations): Add 'with-graft'. (%transformation-options): Likewise. (show-transformation-options-help): Document it. * tests/scripts-build.scm ("options->transformation, with-graft"): New test. * doc/guix.texi (Package Transformation Options): Document it.
* guix build: Factorize transformation option parsing.Ludovic Courtès2016-10-17
| | | | | * guix/scripts/build.scm (%transformation-options): Introduce 'parser' procedure and use it.
* guix build: Extract '--with-input' replacement spec parsing.Ludovic Courtès2016-10-17
| | | | | | * guix/scripts/build.scm (evaluate-replacement-specs): New procedure. (transform-package-inputs)[not-equal]: Remove. [replacements]: Define in terms of 'evaluate-replacement-specs'.
* graph: Add '%referrer-node-type'.Ludovic Courtès2016-10-15
| | | | | | | | | | * guix/scripts/graph.scm (ensure-store-items): New procedure. (%reference-node-type)[convert]: Use it. (non-derivation-referrers): New procedure. (%referrer-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("referrer DAG"): New test. * doc/guix.texi (Invoking guix graph): Document it.
* substitute: Make download messages more concise.Ludovic Courtès2016-10-10
| | | | | | | | | | '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.
* 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.