Age | Commit message (Collapse) | Author |
|
This fixes a regression introduced in
8aeccc6240ec45f0bc7bed655e0c8149ae4253eb whereby packages specified via
-e, -r, or -m, as well as packages *not* specified on the command line,
would all lead to a wrong-type error.
Reported by Ricardo Wurmus <rekado@elephly.net> at
<https://lists.gnu.org/archive/html/guix-devel/2022-12/msg00311.html>.
* guix/scripts/refresh.scm (<update-spec>): Move above. Rename
constructor to '%update-spec' and add separate 'update-spec' procedure
with optional #:version parameter.
(options->update-specs): Always return a list of <update-spec> and
update docstring accordingly. Rename 'args-packages' to 'update-specs'
and ensure it's a list of <update-spec>; handle 'manifest' arguments
here.
|
|
Previously, 'guix refresh guile=3.0.0' would print:
3.0.8 is already the latest version of guile
With this change, it prints:
guile would be downgraded from 3.0.8 to 3.0.0
This is a followup to 8aeccc6240ec45f0bc7bed655e0c8149ae4253eb.
* guix/scripts/refresh.scm (check-for-package-update): Take an
<update-spec> instead of a <package>. Report downgrades as such when
UPDATE-SPEC specifies a target version.
(guix-refresh): Adjust caller.
|
|
* guix/import/cran.scm (string-licenses): Add license-prefix argument.
(string->license): Ditto.
(description->package): Ditto.
(cran->guix-package): Ditto.
(cran-recursive-import): Ditto.
* guix/scripts/import/cran.scm (%options): Add new option -p/--license-prefix.
(show-help): Document it.
(parse-options): Pass it to importer.
* doc/guix.texi (Invoking guix import): Document it.
|
|
* guix/scripts/refresh.scm (options->packages)[args-packages]: Handle version
specification in package name arguments.
(update-package): Add #:version argument and pass it on to called functions.
(guix-refresh): When updating, pass the specified version (if any) to
update-package.
[package-list-without-versions, package-list-with-versions]: New functions.
|
|
These options are callable and documented in the manual but not
shown by --help.
* guix/scripts/shell.scm: Make --help show --system and
--list-systems.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
* guix/scripts/system.scm (perform-action): Do not call CHECK-INITRD-MODULES
when the %current-target-system parameter is set.
|
|
Previously, if the name service switch was dysfunctional, as can happen
on foreign distros lacking nscd, "guix shell -C" would crash with a
backtrace on the uncaught 'getpwuid' exception. To address that, catch
the exception and deal with it gracefully.
Reported by remsd1 on #guix.
* guix/scripts/environment.scm (launch-environment/container): Wrap
'getpwuid' call in 'false-if-exception'.
|
|
* guix/scripts/substitute.scm (open-connection-for-uri/cached):
Fix docstring.
|
|
When offloading to a single machine, the previous default value would
lead 'guix offload' to wait possibly for several minutes between
subsequent builds until normalized load would finally go below 0.6.
Increasing it mitigates that.
* guix/scripts/offload.scm (<build-machine>)[overload-threshold]: Bump
to 0.8.
* doc/guix.texi (Daemon Offload Setup): Likewise.
|
|
* guix/scripts/system/reconfigure.scm (upgrade-shepherd-services)
(channel-relations): Use SRFI-71.
|
|
Fixes <https://issues.guix.gnu.org/59447>.
Reported by Mathieu Othacehe <othacehe@gnu.org>.
Previously, if a machine had a buggy 'guix repl', 'guix offload' would
crash with a backtrace instead of just ignoring the machine.
* guix/scripts/offload.scm (remote-inferior*): New procedure.
(check-machine-availability)[if-true]: New procedure.
Use 'remote-inferior*' and 'if-true'.
(check-machine-status): Use 'remote-inferior*'.
|
|
Reported by mirai on #guix.
* guix/scripts/style.scm (format-whole-file): Wrap body in
'with-fluids'. Pass #:guess-encoding to 'call-with-input-file'.
|
|
Previously, service descriptions appeared in both guix.pot and
packages.pot, but only translations of packages.pot were used.
Now, translations are only done with guix.pot.
This is better, because translators are more likely to translate
guix.pot, and is also easier, because files in gnu/{home/,}services
need to be in po/guix/POTFILES.in anyway and po/guix/Makevars
already acts on the 'description' keyword because of lint checkers.
* guix/scripts/home.scm (service-type-description-string):
Use translations from guix.pot.
* guix/scripts/system/search.scm (service-type-description-string)
(service-type->recutils): Likewise.
* po/packages/POTFILES.in: Move files in gnu/services to ...
* po/guix/POTFILES.in: ... here.
|
|
* guix/scripts/describe.scm (channel->recutils): Add branch information.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
* guix/scripts/describe.scm (channel->json): Add branch information.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
* guix/scripts/pack.scm (debian-archive)[build]: Remove use of (oop goops).
Introduce 'keyword-ref' and use it instead of 'get-keyword'.
|
|
* guix/scripts/pack.scm (symlink-spec-option-parser): Remove extraneous
char-set. Raise an exception when the target is an absolute file name.
(guix-pack): Move with-error-handler earlier.
* guix/scripts/shell.scm (guix-shell): Likewise.
* guix/scripts/environment.scm (guix-environment): Wrap the whole
guix-environment* call with the with-error-handling handler.
* tests/guix-environment-container.sh: Add tests.
* tests/guix-pack.sh: Adjust symlink spec.
|
|
* guix/scripts/pack.scm (%options): Extract symlink parsing logic to...
(symlink-spec-option-parser): ... here.
(self-contained-tarball/builder): Add a comment mentioning why a relative file
name is used for the link target.
* guix/scripts/environment.scm (show-environment-options-help): Document new
--symlink option.
(%default-options): Add default value for symlinks.
(%options): Register new symlink option.
(launch-environment/container): Add #:symlinks argument and extend doc, and
create symlinks using evaluate-populate-directive.
(guix-environment*): Pass symlinks arguments to launch-environment/container.
* doc/guix.texi (Invoking guix shell): Document it.
* tests/guix-shell.sh: Add a --symlink (negative) test.
* tests/guix-environment-container.sh: Add tests.
|
|
* guix/scripts/gc.scm (show-help, %options): Add '--vacuum-database'.
* guix/store/database.scm (vacuum-database): New procedure.
* doc/guix.texi (Invoking guix gc): Document the option.
|
|
Fixes <https://issues.guix.gnu.org/58861>.
Previously the order of the options giving to 'guix shell' could mean that the
'glibc-for-fhs' package included with the '--emulate-fhs' option would not
appear in the container. For example, using the development option with a
package using the 'gnu-build-system', e.g. 'guix shell -CFD hello', would
include the regular 'glibc' package. The option ordered mattered: 'guix shell
-CD hello -F' would include the expected 'glibc-for-fhs'. We fix this by
having 'glibc-for-fhs' added to the package list just before calling
'options-with-caching' so the option order given by the user does not matter.
* guix/scripts/shell.scm (%options): Move the '--emulate-fhs' (expression
. ...) component from here...
(parse-args): ... to here.
* tests/guix-environment-container.sh: Add a test to check that
'glibc-for-fhs' is in the container even when 'glibc' is included in the 'guix
shell' package list.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
These modules would use (guix grafts) just to access '%graft?' and
related bindings, which are now in (guix store).
* gnu/ci.scm,
guix/gexp.scm,
guix/lint.scm,
guix/scripts.scm,
guix/scripts/archive.scm,
guix/scripts/build.scm,
guix/scripts/challenge.scm,
guix/scripts/deploy.scm,
guix/scripts/environment.scm,
guix/scripts/home.scm,
guix/scripts/pack.scm,
guix/scripts/package.scm,
guix/scripts/pull.scm,
guix/scripts/size.scm,
guix/scripts/system.scm,
guix/scripts/weather.scm,
tests/builders.scm,
tests/channels.scm,
tests/cpan.scm,
tests/derivations.scm,
tests/gexp.scm,
tests/graph.scm,
tests/guix-daemon.sh,
tests/monads.scm,
tests/pack.scm,
tests/packages.scm,
tests/profiles.scm,
tests/system.scm: Remove #:use-module (guix grafts).
|
|
This is a followup to 78d55b703d155d36520e1c93dc08a6502c56bd55.
Reported by Maxim Cournoyer.
* guix/scripts/environment.scm (launch-environment): Update docstring.
|
|
These typos were found and reported through weblate.
* gnu/packages/audio.scm (wildmidi)[description]: Fix typo.
* gnu/packages/games.scm (cgoban)[description]: Fix typo.
* gnu/services/version-control.scm (gitolite-service-type)[description]:
Fix typo.
* gnu/installer/newt/substitutes.scm (run-substitutes-page): Remove full
stop at end of title.
* gnu/machine/ssh.scm (machine-ssh-configuration-system): Move
punctuation outside of quotes.
* guix/scripts/home.scm (process-action): Remove trailing space before
newline.
* guix/scripts/system.scm (show-help): Fix typo.
* guix/scripts/environment.scm (with-store/maybe): Fix typo.
|
|
Previously, using 'guix shell -CF coreutils' twice (such that the
profile is cache) would result in:
guix shell: error: '--profile' cannot be used with package options
This patch fixes it by moving argument handling to (guix scripts shell),
before 'options-with-caching' is called.
* guix/scripts/environment.scm (show-environment-options-help)
(%options): Remove '--emulate-fhs'.
(guix-environment*): Pass OPTS as-is to 'options/resolve-packages'.
* guix/scripts/shell.scm (show-help, %options): Add '--emulate-fhs'.
Add the (expression . ...) component to RESULT right from the argument
handler.
* tests/guix-environment-container.sh: Change '--emulate-fhs' tests to
use 'guix shell' instead of 'guix environment'.
|
|
* guix/scripts/environment.scm (show-environment-options-help, %options): Add
'--emulate-fhs'.
(setup-fhs): New procedure. Setup for the Filesystem Hierarchy Standard (FHS)
container. Defines and uses FHS-SYMLINKS and LINK-CONTENTS to create FHS
expected directories and creates /etc/ld.so.conf.
(launch-environment): Add 'emulate-fhs?' key and implement it to set $PATH and
generate /etc/ld.so.cache before calling COMMAND.
(launch-environment/container): Add 'emulate-fhs?' and 'setup-hook' keys and
implement them. Define and use FHS-MAPPINGS, to set up additional bind mounts
in the container to follow FHS expectations.
(guix-environment*): Add glibc-for-fhs to the container packages when
'emulate-fhs?' key is in OPTS.
* doc/guix.texi (Invoking guix shell): Document '--emulate-fhs'.
(Invoking guix environment): Document '--emulate-fhs'.
* tests/guix-environment-container.sh: Add tests for '--emulate-fhs'.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
|
|
This reverts commit d11a432adffe9308eafec6b77cddd3145029109e.
The 'read-operating-system' is used in Emacs-Guix.
|
|
Starting from commit 371a83b764c4993d198666e1674454eecbefcdf1, 'guix
import crate -r' (or similar) would no longer print a blank line in
between definitions. This patch fixes it.
Reported by jgart <jgart@dismail.de>.
* guix/scripts/import.scm (guix-import): Add second 'newline' call.
|
|
* guix/scripts/deploy.scm (guix-deploy): Fix error message.
|
|
* guix/scripts/build.scm(%standard-cross-build-options): Format hint string.
%standard-cross-build-options: Ditto.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
|
|
Fixes <https://issues.guix.gnu.org/57978>
Reported by Attila Lendvai <attila@lendvai.name>.
Previously, if a narinfo was available but its corresponding nar was
missing (for instance because the narinfo was cached and the server
became unreachable in the meantime), 'guix substitute --substitute'
would try to download the nar from its preferred location and abort when
that fails. This change forces one retry with each of the URLs.
* guix/scripts/substitute.scm (download-nar): Do not catch
'http-get-error?' exceptions.
(system-error?, network-error?, process-substitution/fallback): New
procedures.
(process-substitution): Call 'process-substitution/fallback' upon
'network-error?'.
* tests/substitute.scm ("substitute, first URL has narinfo but lacks nar, second URL unauthorized")
("substitute, first URL has narinfo but nar is 404, both URLs authorized")
("substitute, first URL has narinfo but nar is 404, one URL authorized")
("substitute, narinfo is available but nar is missing"): New tests.
|
|
* guix/scripts/substitute.scm (download-nar): New procedure, with most
of the code moved from...
(process-substitution): ... here. Call it.
|
|
Move the compression record to a dedicated module so that it can be used
outside (guix scripts pack) module.
* guix/scripts/pack.scm (<compressor>, %compressors, lookup-compressor): Move
it to ...
* gnu/compression.scm: ... this new file.
* gnu/ci.scm: Adapt it.
* local.mk (GNU_SYSTEM_MODULES): Add it.
|
|
* guix/scripts/home/import.scm (manifest+configuration-files->code):
Insert calls to 'comment' and 'vertical-space'.
(import-manifest): Use 'pretty-print-with-comments/splice' instead of a
loop on 'pretty-print'.
* tests/home-import.scm (remove-recursively): New procedure.
(eval-test-with-home-environment): Use it.
|
|
* guix/scripts/weather.scm (report-server-coverage): Show a weather icon.
|
|
* guix/import/gem.scm: (rubygems-fetch, gem->guix-package)
(gem-recursive-import): Fix to fetch the specified version of the gem.
* guix/scripts/import/gem.scm (show-help): Update the help message.
(guix-import-gem): Modify so the version number to be passed to subsequent
procedures.
* tests/gem.scm: Add tests.
* doc/guix.texi (Invoking guix import): Document.
Signed-off-by: Christopher Baines <mail@cbaines.net>
|
|
This makes the profile readable by older Guix instances. This is a
followup to c9fbd40785a99e13a59d8e530830ce85220a9871.
Fixes <https://issues.guix.gnu.org/57306>.
Reported by Arun Isaac <arunisaac@systemreboot.net>.
* guix/profiles.scm (%manifest-format-version): Export.
* guix/scripts/package.scm (build-and-use-profile): Add #:format-version
and pass it to 'profile-derivation'.
* guix/scripts/pull.scm (build-and-install): Pass #:format-version 3.
|
|
This reinstates a modified version of
b08439809f0868a74d0bd0e14d45cb3e5dd46a8c, which contained a thinko.
Previously, build-time metadata from (guix config) would be ignored when
available--e.g., when running /run/current-system/profile/bin/guix.
This is a followup to 316fc2acbb112bfa572ae30f95a93bcd56621234.
* guix/scripts/system/reconfigure.scm (check-forward-update): Use
'current-channels' rather than 'current-profile' + 'profile-channels'.
|
|
* guix/scripts/system.scm (process-action): Check that the provided image has
a defined operating-system.
|
|
This change prevents guix system from erroring out with an ugly backtrace
when it's passed an invalid value to the “--system” or “--target”
option. It also adds the “--list-systems” and “--list-targets” options.
The manual section about guix system doesn't mention the “--target” option,
so add it there.
* guix/scripts/system (show-help): Call show-cross-build-options-help and
show-native-build-options-help.
(%options): Remove own implementation of “system” and “target” options and
use the ones in %standard-cross-build-options and
%standard-native-build-options.
* doc/guix.texi (Invoking guix system): Document “--target” option.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
|
|
This fixes <https://issues.guix.gnu.org/57480>.
This reverts commit b08439809f0868a74d0bd0e14d45cb3e5dd46a8c.
|
|
Previously, build-time metadata from (guix config) would be ignored when
available--e.g., when running /run/current-system/profile/bin/guix.
This is a followup to 316fc2acbb112bfa572ae30f95a93bcd56621234.
* guix/scripts/system/reconfigure.scm (check-forward-update): Use
'current-channels' rather than 'current-profile' + 'profile-channels'.
|
|
* guix/channels.scm (repository->guix-channel): New procedure.
* guix/scripts/describe.scm (display-checkout-info): Use it instead of
the (git) interface, and adjust accordingly.
|
|
* guix/scripts/style.scm (format-whole-file): New procedure.
(%options, show-help): Add '--whole-file'.
(guix-style): Honor it.
* tests/guix-style.sh: New file.
* Makefile.am (SH_TESTS): Add it.
* doc/guix.texi (Invoking guix style): Document it.
|
|
* guix/read-print.scm (<vertical-space>, vertical-space?)
(vertical-space, vertical-space-height): New variables.
(combine-vertical-space, canonicalize-vertical-space)
(read-vertical-space): New procedures.
(read-with-comments): Use it in the #\newline case.
(pretty-print-with-comments): Add #:format-vertical-space and honor it.
Add case for 'vertical-space?'.
* guix/scripts/style.scm (format-package-definition): Pass
#:format-vertical-space to 'object->string*'.
* tests/read-print.scm ("read-with-comments: list with blank line")
("read-with-comments: list with multiple blank lines")
("read-with-comments: top-level blank lines")
("pretty-print-with-comments, canonicalize-vertical-space"): New tests.
Add a couple of additional round-trip tests.
|
|
* guix/read-print.scm (<blank>, blank?): New record type.
(<comment>): Redefine using the record interface.
(read-with-comments, pretty-print-with-comments): Change some uses of
'comment?' to 'blank?'.
* guix/scripts/style.scm (simplify-inputs)[simplify-expressions]: Use
'blank?' instead of 'comment?'.
|
|
* guix/scripts/style.scm (<comment>, read-with-comments)
(vhashq, %special-forms, %newline-forms, prefix?)
(special-form-lead, newline-form?, escaped-string)
(string-width, canonicalize-comment, pretty-print-with-comments)
(object->string*): Move to...
* guix/read-print.scm: ... here. New file.
* guix/scripts/import.scm: Adjust accordingly.
* tests/style.scm: Move 'test-pretty-print' and tests to...
* tests/read-print.scm: ... here. New file.
* Makefile.am (MODULES): Add 'guix/read-print.scm'.
(SCM_TESTS): Add 'tests/read-print.scm'.
|
|
* guix/scripts/lint.scm (show-help, %options): Add '-e'.
(guix-lint): Call 'specification->package' while traversing OPTS. Add
case for 'expression pair. Adjust 'for-each' loop to expect packages.
* doc/guix.texi (Invoking guix lint): Document it.
|
|
* guix/scripts/system.scm (read-operating-system): Remove.
* gnu/ci.scm: Remove unused (guix scripts system) import.
|
|
Fixes a bug whereby, for example:
guix shell bash -- bash -c xyz
would erroneously print:
guix shell: error: bash: command not found
simply because the parent process could not distinguish that 127 from a
"genuine" 127 used by convention for "command not found".
* guix/scripts/environment.scm (launch-environment): Before exiting,
report a "command not found" error and suggest a command name.
(validate-exit-status): Remove.
(launch-environment/fork): Remove call
(launch-environment/container)[exit/status*]: Remove.
Call 'exit/status' instead of it.
|
|
* guix/scripts/build.scm (%standard-cross-build-options)
(%standard-native-build-options): Print hints when the target/system is
not found.
|