Age | Commit message (Collapse) | Author |
|
Break cached-channel-instance into two different procedures:
channels->cached-profile and instances->cached-profile operating respectively
on channels and channels instances.
* guix/inferior.scm (cached-channel-instance): Rename it into ...
(cached-profile): ... this new procedure.
(channels->cached-profile, instances->cached-profile): New procedures.
* guix/scripts/time-machine.scm (guix-time-machine): Adapt accordingly.
|
|
This means there's a useful progress bar when running guix weather.
* guix/scripts/weather.scm (report-server-coverage): Pass
#:make-progress-reporter to lookup-narinfos.
|
|
Rather than always outputting to (current-error-port) in
lookup-narinfos (which is called from within lookup-narinfos/diverse), take a
procedure which should return a progress reporter, and defer any output to
that.
As this is now general purpose code, make the default behaviour to output
nothing. Maintain the current behaviour of the substitute script by moving the
progress reporter implementation there, and passing it in when calling
lookup-narinfos/diverse.
These changes should be generally useful, but I'm particularly looking at
getting guix weather to do progress reporting differently, with this new
flexibility.
* guix/substitutes.scm (fetch-narinfos): Take a procedure to make a
progress-reporter, and use that rather than the hardcoded behaviour.
(lookup-narinfos): Add #:make-progress-reporter keyword argument, and pass
this through to fetch-narinfos.
(lookup-narinfos/diverse): Add a #:make-progress-reporter keyword argument,
and pass this through to lookup-narinfos.
* guix/scripts/substitute.scm (process-query): Pass a progress-reporter to
lookup-narinfos/diverse.
|
|
Fixes <https://bugs.gnu.org/38884>.
* guix/scripts/system.scm (switch-to-system-generation): Load the
activate script for that generation.
squash! scripts: system: Activate system when switching generations.
|
|
This means there's a module for working with substitutes, rather than all the
code sitting in the script. The need for this can be seen with the weather and
challenge scripts, that now don't have to use code from the substitute script,
but can instead use the substitute module.
The separation here between the actual functionality of the substitute script
and the underlying functionality used both there and elsewhere should make
maintenance easier moving forward.
This commit just moves code, none of the code should have been changed
significantly.
* guix/scripts/substitute.scm (%narinfo-cache-directory, %narinfo-ttl,
%narinfo-negative-ttl, %narinfo-transient-error-ttl, %unreachable-hosts): Move
variables to guix/substitutes.scm.
(narinfo-cache-file, cached-narinfo, cache-narinfo!, narinfo-request,
read-to-eof, call-with-connection-error-handling, fetch-narinfos,
lookup-narinfos, lookup-narinfos/diverse): Move procedures to
guix/substitutes.scm.
* guix/substitutes.scm: New file.
* Makefile.am: Add it.
* guix/narinfo.scm: Remove redundant module.
* guix/scripts/challenge.scm: Change (guix scripts substitute) to (guix
substitutes).
* guix/scripts/weather.scm: Change (guix scripts substitute) to (guix
substitutes).
|
|
* guix/scripts/pull.scm (show-help): Document that ‘--url’, ‘--commit’,
and ‘--branch’ affect only the ‘guix’ channel (for now?).
|
|
Previously, transformations applied from a manifest (rather than via
"guix install") would be lost. This change fixes that and simplifies
things.
Reported by zimoun at
<https://lists.gnu.org/archive/html/guix-devel/2021-02/msg00153.html>.
* guix/profiles.scm (default-properties): New procedure.
(package->manifest-entry): Use it for #:properties.
* guix/scripts/pack.scm (guix-pack)[with-transformations]: Remove.
Remove caller.
* guix/scripts/package.scm (transaction-upgrade-entry): Remove calls to
'manifest-entry-with-transformations'.
* tests/guix-package.sh: Add test.
* tests/transformations.scm ("options->transformation + package->manifest-entry"):
New test.
|
|
Fixes <https://bugs.gnu.org/46826>.
Reported by cage <cage-dev@twistfold.it>.
* guix/scripts/environment.scm (guix-environment): Move 'manifest'
definition before expression.
|
|
Fixes <https://bugs.gnu.org/46362>.
Reported by Zhu Zihao <all_but_last@163.com>.
Previously, backtraces due to uncaught exceptions would always to go
file descriptor 2; the daemon would read it and error out with something
like:
error: got unexpected path `Backtrace:' from substituter
This patch fixes that by ensuring backtraces are properly displayed on
file descriptor 4.
* guix/scripts/substitute.scm (with-redirected-error-port): New macro.
(guix-substitute): Use 'with-redirected-error-port' instead of 'parameterize'.
|
|
This is similar to commit a168c3e4f8d580f70e1c26bcdfc5b8378b2fa42d.
* guix/scripts/substitute.scm (with-networking): Use
'with-throw-handler' instead of 'catch'.
|
|
This is part of trying to reduce the interdependency of code within the
substitute module.
This commit addresses some of the error handling that was performed through
open-connection-for-uri/maybe. The new approach is to use
call-with-connection-error-handling, and wrap calls to http-multiple-get and
http-fetch with that procedure, which takes care of handling connection
errors.
I think this is even slightly more rigerous than the previous setup, because
this approach handles connection errors that occur when http-multiple-get
reconnects to a host.
* guix/scripts/substitute.scm (open-connection-for-uri/maybe): Transform in to
call-with-connection-error-handling.
(fetch-narinfos): Use call-with-connection-error-handling.
(process-query): Replace open-connection-for-uri/maybe with
open-connection-for-uri/cached.
(open-connection-for-uri/cached): Set a default timeout, matching the
behaviour in open-connection-for-uri/maybe.
(process-substitution): Use call-with-connection-error-handling.
|
|
At least by default. Instead, make the open-connection procedure a parameter,
and make the default guix:open-connection-for-uri. Do so similarly for
lookup-narinfos and lookup-narinfos/diverse which work towards calling
fetch-narinfos.
This means this code can be moved to a different module, without having
use/move the connection caching code.
* guix/scripts/substitute.scm (fetch-narinfos): Add #:open-connection
argument, and call http-multiple-get with it.
(lookup-narinfos) Add #:open-connection argument, and call fetch-narinfos with
it.
(lookup-narinfos/diverse): Add #:open-connection argument, and call
lookup-narinfos with it.
(process-query): Call lookup-narinfos/diverse with #:open-connection
open-connection-for-uri/maybe.
|
|
As it's only called in one place, and this should make the code easier to
read.
* guix/scripts/substitute.scm (fetch): Move procedure inside…
(process-substitution): …here.
|
|
It's just called in one place, with hardcoded argument values, so just inline
them.
* guix/scripts/substitute.scm (fetch): Remove arguments that don't vary, copy
the values from the call site in process-substitution.
(process-substitution): Remove unnecessary argument values from fetch call.
|
|
Failures now should be handled where they occur, and if there's a problem
that's symptomatic of an issue with the connection, the port should be closed.
* guix/scripts/substitute.scm (call-with-cached-connection): Remove procedure.
(with-cached-connection): Remove syntax rule.
|
|
Just pass open-connection-for-uri/maybe to http-fetch, this removes the need
for with-cached-connection and passing the port in.
* guix/scripts/substitute.scm (fetch): Don't take a port as an argument, and
pass open-connection-for-uri/maybe to http-fetch.
(process-substitution): Don't call fetch with with-cached-connection.
|
|
Instead, just pass open-connection-for-uri/maybe to http-multiple-get. This
code should be functionaly similar to the previous code. The eventual aim of
this is to make the connection caching not mandatory in fetch-narinfos.
* guix/scripts/substitute.scm (fetch-narinfos): Remove use of
call-with-cached-connection.
|
|
As this is used by http-fetch and http-multiple-get when they call the
specified open connection procedure.
* guix/scripts/substitute.scm (open-connection-for-uri/maybe): Support
#:verify-certificate?.
|
|
From (guix scripts substitute). This will make it easier to reuse this code.
* guix/scripts/substitute.scm (http-multiple-get): Remove, and move to…
* guix/http-client.scm (http-multiple-get): …here.
|
|
* guix/scripts/substitute.scm (fetch): Remove redundant let block.
|
|
http-fetch does this, so just use that code instead.
* guix/scripts/substitute.scm (fetch): Remove connection handling when the
port is closed.
|
|
http-fetch does this, so just set the right option.
* guix/scripts/substitute.scm (fetch): Remove buffering code, and pass
#:buffered? to http-fetch.
|
|
* guix/scripts/system.scm (system-derivation-for-action): Replace "os"
argument by "image". Remove "image-size", "image-type", "label" and
"volatile-root?" arguments.
(perform-action): Ditto.
(process-action): Construct the <image> record and pass it to "perform-action"
procedure.
* tests/guix-system.sh: Adapt accordingly.
* gnu/system/images/hurd.scm: Return the default image.
* gnu/system/images/novena.scm: Ditto.
* gnu/system/images/pine64.scm: Ditto.
* gnu/system/images/pinebook-pro.scm Ditto.
|
|
Remove the 'vm-image' command that has been superseded by the 'image'
command.
* gnu/system/vm.scm (system-qemu-image): Remove it.
* guix/scripts/system.scm (system-derivation-for-action): Mark 'vm-image'
command as deprecated and use the image API to produce the VM image.
(perform-action, show-help): Adapt accordingly.
* tests/guix-system.sh: Ditto.
* doc/guix.texi (Invoking guix system,
Running Guix in a VM): Ditto.
* etc/completion/fish/guix.fish: Ditto.
* etc/completion/zsh/_guix: Ditto.
|
|
This fixes <https://bugs.gnu.org/46269>.
* guix/scripts/pull.scm (ensure-default-profile): Add a 'mkdir-p' call before
'symlink'.
|
|
* guix/scripts/environment.scm (%options): Add -p/--profile switch.
(show-help): Document new switch.
(guix-environment): Handle new 'profile switch.
Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
|
|
Fixes a regression introduced in
316fc2acbb112bfa572ae30f95a93bcd56621234, whereby 'guix pull -l' would
always display channel information corresponding to the latest profile
generation.
Reported by Vagrant Cascadian.
* guix/scripts/describe.scm (profile-generation-channels): New
procedure.
(display-profile-content): Change default value of 'channels'.
|
|
Partially fixes <https://bugs.gnu.org/45896>.
* guix/config.scm.in (%channel-metadata): New variable.
* guix/describe.scm (channel-metadata): Use it.
(current-channels): New procedure.
(current-profile-entries): Clarify docstring.
* guix/self.scm (compiled-guix): Add #:channel-metadata and pass it to
'make-config.scm'.
(make-config.scm): Add #:channel-metadata and define '%channel-metadata'
in the generated file.
(guix-derivation): Add #:channel-metadata and pass it to 'compiled-guix'.
* guix/channels.scm (build-from-source): Replace 'name', 'source', and
'commit' parameters with 'instance'. Pass #:channel-metadata to BUILD.
(build-channel-instance): Adjust accordingly.
* build-aux/build-self.scm (build-program): Add #:channel-metadata
and pass it to 'guix-derivation'.
(build): Add #:channel-metadata and pass it to 'build-program'.
* guix/scripts/describe.scm (display-profile-info): Add optional
'channels' parameter. Pass it to 'display-profile-content'.
(display-profile-content): Add optional 'channels' parameter and honor
it. Iterate on CHANNELS rather than on the manifest entries of
PROFILE.
(guix-describe): When PROFILE is #f, call 'current-channels' and pass it
to 'display-profile-info', unless it returns the empty list.
|
|
* guix/channels.scm (sexp->channel): Export.
* guix/describe.scm: Use (guix channels).
(manifest-entry-provenance): New procedure.
* guix/scripts/package.scm (channel=?, export-channels): New
procedures.
(show-help, %options): Add '--export-channels'.
(process-query): Honor it.
* build-aux/build-self.scm (build-program)[select?]: Exclude (guix
channels) to account for the (guix describe) change above.
* doc/guix.texi (Invoking guix package): Document it.
|
|
* guix/channels.scm (channel->code): New procedure, taken from...
* guix/scripts/describe.scm (channel->sexp): ... here.
Adjust callers accordingly.
|
|
* guix/channels.scm (manifest-entry-channel): Export.
* guix/scripts/describe.scm (display-profile-content): Use it.
|
|
* guix/scripts/package.scm (export-manifest): New procedure.
(show-help, %options): Add '--export-manifest'.
(process-query): Honor it.
* guix/build/profiles.scm (build-profile): Mention it.
* tests/guix-package.sh: Test it.
* doc/guix.texi (Invoking guix package): Document it.
|
|
Fixes partially <https://bugs.gnu.org/44115>.
* guix/scripts/import/json.scm (guix-import-json): Handle error.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
* guix/channels.scm (find-latest-commit-with-substitutes,
channel-with-substitutes-available): New procedures.
* guix/scripts/pull.scm (guix-pull): Move "channel-list" call inside the
%current-system parameter scope.
* doc/guix.texi (Channels with substitutes): New section.
|
|
Fixes a regression introduced in 95f72dcd7aece05e9252c93bef5a831f96cb5393.
* guix/scripts/system/reconfigure.scm (upgrade-shepherd-services)[target-services]:
Add call to 'shepherd-configuration-services'.
|
|
* gnu/services/shepherd.scm (<shepherd-configuration>): New record.
(shepherd-boot-gexp, shepherd-root-service-type): Use it.
(scm->go, shepherd-configuration-file): Allow passing custom
shepherd package.
* gnu/system.scm (operating-system-shepherd-service-names): Use the new
record.
* guix/scripts/system.scm (export-shepherd-graph): Adjust accordingly.
* doc/guix.texi (Shepherd Services). Document it.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
|
|
This reverts commit d5a1b0e86f248edd53c785b910b5d51ee708b0fc.
This change turned out to be misguided; it would lead to "substitute:"
lines being printed on the client side, without anything beyond the
colon sign.
|
|
* guix/scripts/archive.scm (authorize-key): Mention guix-service-type.
|
|
The path normalization of `--root` option of `guix environment` was
buggy as it appended full argument after normalized directory. This
patch fixes it.
* guix/scripts/environment.scm (register-gc-root): Fix gc-root path
normalization.
* tests/guix-environment.sh: Add test.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
|
|
* guix/scripts/system.scm (system-derivation-for-action): Rename 'disk-image'
command 'image'. Warn when using the now deprecated 'disk-image' command.
(show-help): Adapt accordingly.
(guix-system): Ditto.
* tests/guix-system.sh: Ditto.
* gnu/system/examples/bare-hurd.tmpl: Ditto.
* doc/guix.texi (Building the Installation Image,
Building the Installation Image for ARM Boards,
Invoking guix pack,
Invoking guix system): Adapt documentation.
|
|
* gnu/system/image.scm (raw-image-type): Rename to "efi-raw-image-type".
* guix/scripts/system.scm (%default-options): Adapt accordingly.
* doc/guix.texi: Ditto.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
|
|
This separation between the code for dealing with narinfos from the code doing
that for a purpose should make things clearer, and better support components
other that the substitute script in using this code.
This is just moving the code around, no code should have been significantly
changed.
* guix/scripts/substitute.scm (<narinfo>): Move record type to (guix narinfo).
(fields->alist, narinfo-hash-algorithm+value, narinfo-hash->sha256,
narinfo-signature->canonical-sexp, narinfo-maker, read-narinfo,
narinfo-sha256, valid-narinfo?, write-narinfo, narinfo->string,
string->narinfo, equivalent-narinfo?, supported-compression?,
compresses-better?, narinfo-best-uri): Move procedures to (guix narinfo).
(%compression-methods): Move variable to (guix narinfo).
* guix/narinfo.scm: New file.
* Makefile.am (MODULES): Add it.
* po/guix/POTFILES.in: Add 'guix/narinfo.scm'.
|
|
Rather than having valid-narinfo? evaluate to #t if
%allow-unauthenticated-substitutes? is set to #t, just use (const #t) for
valid-narinfo? when %allow-unauthenticated-substitutes? is set to #t. This
will allow moving valid-narinfo? in to a (guix substitutes) module.
* guix/scripts/substitute.scm (process-query, process-substitution): Change
the authorized? argument to lookup-narinfo and lookup-narinfos/diverse based
on %allow-unauthenticated-substitutes?.
(valid-narinfo?): Remove use of %allow-unauthenticated-substitutes?.
|
|
* guix/scripts/substitute.scm (%compression-methods): Add zstd.
(compresses-better?): "lzip" always wins.
|
|
* guix/scripts/publish.scm (compress-nar)[write-compressed-file]: New
procedure.
Use it for 'gzip' and 'lzip'. Add 'zstd.
(nar-response-port, string->compression-type): Add case for 'zstd'.
* tests/publish.scm (zstd-supported?): New procedure.
("/nar/zstd/*"): New test.
* doc/guix.texi (Invoking guix publish): Document zstd compression.
(Base Services): Add cross-reference to the above node.
|
|
This led to extra "substitute:" lines since commit
79c6614f58a57b985daf8940766319e440311db0 or thereabouts.
* guix/scripts/substitute.scm (fetch-narinfos): Remove extra 'newline'
call, which can be traced back to
d3a652037ef879f9279bc056c43d15ba7afcbb25 (2015).
|
|
* guix/scripts/system.scm (lookup-backend): New procedure.
(export-extension-graph, export-shepherd-graph): Add #:backend parameter
and honor it.
(show-help, %options): Add "--graph-backend".
(%default-options): Add 'graph-backend'.
(process-action): Pass #:backend to 'export-extension-graph' and
'export-shepherd-graph'.
* doc/guix.texi (Invoking guix system): Document '--graph-backend'.
|
|
* guix/scripts/environment.scm: Do not use (ice-9 format) and (ice-9
rdelim).
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
Reported by Christopher Baines <mail@cbaines.net>
at <https://issues.guix.gnu.org/45323#2>.
* guix/scripts/substitute.scm (call-with-cached-connection): Handle
'gnutls-error and ERROR/INVALID-SESSION.
|
|
* guix/scripts/hash.scm (guix-hash): When 'recursive? is true, use
'open-hash-port' instead of 'open-sha256-port'.
* tests/guix-hash.sh: Add test for 'guix hash -r -H sha512'.
|