summaryrefslogtreecommitdiff
path: root/guix/scripts
AgeCommit message (Collapse)Author
2023-10-17scripts: remove: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/remove.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: refresh: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/refresh.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: pull: Handle EPIPE errors when displaying help.Simon Tournier
Reported by Mathieu Othacehe <othacehe@gnu.org>. * guix/scripts/pull.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: publish: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/publish.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: processes: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/processes.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: package: Handle EPIPE errors when displaying help.Simon Tournier
Reported by Mathieu Othacehe <othacehe@gnu.org>. * guix/scripts/package.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: pack: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/pack.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: offload: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/offload.scm (guix-offload): Handle EPIPE errors when displaying help.
2023-10-17scripts: locate: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/locate.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: lint: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/lint.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: install: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/install.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: import: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/import.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: home: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/home.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: hash: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/hash.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: graph: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/graph.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: git: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/git.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: gc: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/gc.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: edit: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/edit.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: download: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/download.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: discover: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/discover.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: describe: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/describe.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: deploy: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/deploy.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: copy: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/copy.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: container: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/container.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: challenge: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/challenge.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: build: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/build.scm (%options): Handle EPIPE errors when displaying help.
2023-10-17scripts: archive: Handle EPIPE errors when displaying help.Simon Tournier
* guix/scripts/archive.scm (%options): Handle EPIPE errors when displaying help.
2023-10-16pack: Allow setting a custom image tag for Docker imagesSören Tempel
Previously, the image repository name was automatically computed from the packages in the manifest without allowing the user to set a custom one. As such, changing the packages in the manifest would result in a new image name. Thereby requiring updating documentation et cetera when using `docker load` directory on the resulting image. Inspired by `docker build -t`, this commit adds a new Docker-specific option to `guix pack` which allows setting a custom repository name for the resulting image. If this option is not specified, pack falls back to computing the name from the manifest. Therefore, this change is entirely backwards compatible. Documentation has been added with: 373ec2cf8ce97d5f89191c3d9211ee3a5c2067dc. * guix/scripts/pack.scm (guix-pack): Add --image-tag option. (%docker-format-options): New constant. (show-docker-format-options): New procedure. (show-docker-format-options/detailed): New procedure. (docker-image): Allow setting a custom repository name for the created docker image via extra-options. Signed-off-by: Sören Tempel <soeren@soeren-tempel.net> Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2023-10-12shell: Take grafting into account when caching.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/64856>. * guix/scripts/shell.scm (profile-file-cache-key) (profile-spec-cache-key): Take (%graft?) into account. Reported-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-10-05perform-download: Set PATH before invoking ‘git’.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/66305>. Reported by Guillaume Le Vaillant <glv@posteo.net>. * guix/scripts/perform-download.scm (perform-git-download): Add call to ‘setenv’.
2023-10-05refresh: Fix sorting of updates by file and line number.Ricardo Wurmus
* guix/scripts/refresh.scm (guix-refresh): Add cascade-sort procedure and use it to sort specs by package location.
2023-09-28archive: Fix ‘--version’ typo.Nikolaos Chatzikonstantinou
* guix/scripts/archive.scm (%options): Replace 'build' by 'archive'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-09-26perform-download: Use the ‘git’ command captured at configure time.Ludovic Courtès
* guix/scripts/perform-download.scm (perform-git-download): Pass #:git-command to ‘git-fetch-with-fallback’.
2023-09-26daemon: Add “git-download” built-in builder.Ludovic Courtès
The new builder makes it possible to break cycles that occurs when the fixed-output derivation for the source of a dependency of ‘git’ would itself depend on ‘git’. * guix/scripts/perform-download.scm (perform-git-download): New procedure. (perform-download): Move fixed-output derivation check to… (guix-perform-download): … here. Invoke ‘perform-download’ or ‘perform-git-download’ depending on what ‘derivation-builder’ returns. * nix/libstore/builtins.cc (builtins): Add “git-download”. * tests/derivations.scm ("built-in-builders"): Update. ("'git-download' built-in builder") ("'git-download' built-in builder, invalid hash") ("'git-download' built-in builder, invalid commit") ("'git-download' built-in builder, not found"): New tests.
2023-09-26perform-download: Remove unused one-argument clause.Ludovic Courtès
Code in ‘builtins.cc’ only ever invokes ‘guix perform-download’ with two arguments. * guix/scripts/perform-download.scm (guix-perform-download): Remove unused one-argument clause. (perform-download): Make ‘output’ parameter mandatory; remove ‘output*’ variable.
2023-09-20image: Introduce the mbr-hybrid-raw image type.Mathieu Othacehe
Until 209204e23b39af09e0ea92540b6fa00a60e6a0ae and d57cab764122af69d52d8cc9c843456044e5d7bc, the default image type used by "guix system image" was an MBR image with an ESP partition. Having both an MBR image and an ESP partition is handy because the image will boot on most x86 based systems using legacy BIOS and/or UEFI. We now have a distinction between MBR images and EFI images. Introduce a new MBR hybrid image type and default to it to restore the default behaviour. This also fixes the images section of (gnu ci) that was trying to install a BIOS bootloader on an EFI, GPT image and failing to do so. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2023-09-08guix: shell: Don't whitelist / by typo in `shell-authorized-directories'.Janneke Nieuwenhuizen
Fixes <https://issues.guix.gnu.org/65832>. * guix/scripts/shell.scm (authorized-shell-directory?): After warning, continue LOOP to return valid query result for DIRECTORY.
2023-09-05time-machine: Also validate the reference from a channels file.Maxim Cournoyer
* guix/scripts/time-machine.scm (guix-time-machine) <validate-guix-channel>: Update doc. Fall-back to use the Guix channel reference when REF is #f. Reported-by: Simon Tournier <zimon.toutoune@gmail.com> Co-authored-by: Simon Tournier <zimon.toutoune@gmail.com>
2023-08-29scripts: pull: Teach 'channels-list' to use 'tag' git references.Simon Tournier
* guix/scripts/pull.scm (channel-list): Add support for 'tag' references, to honor the various possible references types as defined in the documentation of the update-cached-checkout procedure. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-08-25image: Add mbr-raw-image-type and use by default.Josselin Poiret
* gnu/system/image.scm (mbr-disk-image, mbr-raw-image-type): New variables. (qcow2-image-type): Inherit mbr-disk-image. * guix/scripts/system.scm (%default-options): Use mbr-raw-image-type by default. * gnu/tests/install.scm (run-install): Use mbr-raw in the tests. * doc/guix-cookbook.texi (Guix System Image API): Update the list of image types. * doc/guix.texi (Invoking guix system, System Images, image-type Reference): Add mbr-raw and switch documented default to it.
2023-08-17pull, time-machine: Add '-q' to ignore channel files.Ludovic Courtès
This also fixes <https://issues.guix.gnu.org/63726>. * guix/scripts/pull.scm (show-help, %options): Add '-q'. (channel-list): Honor it. * guix/scripts/time-machine.scm (show-help, %options): Add '-q'. * doc/guix.texi (Invoking guix pull, Invoking guix time-machine): Document it. Reported-by: Simon Tournier <zimon.toutoune@gmail.com>
2023-08-16scripts: time-machine: Error when attempting to visit too old commits.Maxim Cournoyer
* doc/guix.texi (Invoking guix time-machine): Document limitation. * guix/inferior.scm (cached-channel-instance): New VALIDATE-CHANNELS argument. Use it to validate channels when there are no cache hit. * guix/scripts/time-machine.scm (%options): Tag the given reference with 'tag-or-commit instead of 'commit. (%oldest-possible-commit): New variable. (guix-time-machine) <validate-guix-channel>: New nested procedure. Pass it to the 'cached-channel-instance' call. * tests/guix-time-machine.sh: New test. * Makefile.am (SH_TESTS): Register it. Suggested-by: Simon Tournier <zimon.toutoune@gmail.com> Reviewed-by: Ludovic Courtès <ludo@gnu.org> Reviewed-by: Simon Tournier <zimon.toutoune@gmail.com>
2023-08-16pull: Tag commit argument with 'tag-or-commit.Maxim Cournoyer
For compatibility with (guix git) procedures. * guix/scripts/pull.scm (channel-list): Also accept tag-or-commit tagged refspec.
2023-08-16guix home: Create /tmp in container if needed.Ludovic Courtès
Previously 'guix home container' would create a container without /tmp, which would prevent 'least-authority-wrapper' programs from starting, for example. * guix/scripts/home.scm (spawn-home-container): Create /tmp if it doesn't exist yet.
2023-08-15refresh: Add --target-version option.Maxim Cournoyer
* guix/scripts/refresh.scm (%options): Register 'target-version' long version. (update-specification->update-spec): Add a fallback-version argument. (options->update-specs): Honor target-version option. * tests/guix-refresh.sh: Test it. * doc/guix.texi (Invoking guix refresh): Document it. Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-08-12reconfigure: Use let* from srfi-71.Nicolas Graves
* guix/scripts/system/reconfigure.scm (upgrade-shepherd-services): Merge 'let' + 'let*' in just 'let*'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-08-08system: Do not check initrd modules for pseudo file systems.Ludovic Courtès
Reported by hako on #guix. * gnu/machine/ssh.scm (machine-check-initrd-modules): Filter out pseudo file systems from 'file-systems'. * guix/scripts/system.scm (check-initrd-modules): Likewise.
2023-07-28scripts: system: Remove duplicated "--target=TRIPLET" in help messages.Hilton Chain
It's already included in (show-cross-build-options-help). * guix/scripts/system.scm (show-help): Remove "--target=TRIPLET". Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2023-07-18pack: Move common build code to (guix build pack).Maxim Cournoyer
The rationale is to reduce the number of derivations built per pack to ideally one, to minimize storage requirements. The number of derivations had gone up with 68380db4 ("pack: Extract populate-profile-root from self-contained-tarball/builder.") as a side effect to improving code reuse. * guix/scripts/pack.scm (guix): Add commentary comment. (populate-profile-root, self-contained-tarball/builder): Extract to... * guix/build/pack.scm (populate-profile-root): ... this, and... (build-self-contained-tarball): ... that, adjusting for use on the build side. (assert-utf8-locale): New procedure. (self-contained-tarball, debian-archive, rpm-archive): Adjust accordingly. Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2023-07-17scripts/refresh: Remove column from spec line before sorting.Ricardo Wurmus
We want to sort by file and line number, but the column number messes everything up. This is a follow-up to commit b43841c124d15eaecc41b3928f08a26dbd5c653a. * guix/scripts/refresh.scm (guix-refresh): Trim the digits on the right of the location string before comparing them.