janestreet reversionned its packages and prefixed them with "v". Let the
importer know about that and choose "v" versions first.
* guix/import/opam.scm (find-latest-version): Work around version
rewrite from janestreet.
(opam->guix-package): Do not pass "v" to version number.
* guix/status.scm (<build>)[phase]: New field.
(%phase-start-rx): New variable.
(update-build): Add clause to match %PHASE-START-RX and adjust the
'phase' field accordingly.
* tests/status.scm ("compute-status, build phase"): Add test
* guix/status.scm (<build>): Define using
'define-immutable-record-type', and add 'set-build-completion' binding.
(update-build)[set-completion]: Remove.
Use 'set-build-completion' instead.
Previously the progress bar wouldn't be erased by the time the next
"building foo" line would be printed.
* guix/status.scm (print-build-event)[erase-current-line*]: New
procedure.
Call it instead of (display "\r").
Previously it would refer to
/var/guix/profiles/per-user/root/current-guix/bin/guix, which would fail
when that profile does not exist. This is notably the case when using
'channel-instance->package' as done in commit
7e6d8d366a.
* gnu/packages/package-management.scm (guix-daemon)[arguments]: In
'install phase, honor environment variable 'GUIX'.
* guix/self.scm (whole-package)[wrap]: New procedure.
Use it.
Fixes a regression introduced in
0ea939fb79.
* guix/scripts/package.scm (process-query) <'list-available>: Change
#:superseded? to #:deprecated? since that's what
'fold-available-packages' passes.
* guix/status.scm (print-build-event)[report-build-progress]: New
procedure.
[print-log-line]: Add ID parameter. Call 'report-build-progress' when
appropriate.
Adjust callers.
* guix/status.scm (<build>): New record type.
(build, matching-build): New procedures.
(compute-status): Adjust to manipulate <build> records instead of
derivation file names in 'build-status-builds-completed' and
'build-status-building'.
(build-event-output-port)[process-line]: Use 'string-split' to preserve
spaces.
* tests/status.scm ("compute-status, builds + substitutes")
("compute-status, missing events"): Adjust to expect <build> records.
Produce complete "build-started" events.
("compute-status, multiplexed build output"): Likewise, and remove
"bar.drv" from 'builds-completed'.
Previously if ~/.config/guix/current/bin was in $PATH, we'd still
suggest to run 'hash guix' because we'd compare (which "guix") against
/var/guix/profiles/per-user/….
* guix/scripts/pull.scm (build-and-install): Check whether (which
"guix") matches PROFILE or its user-friendly variant.
* guix/packages.scm (package-input-rewriting): Allow REPLACEMENTS to be
a promise.
* gnu/packages/guile.scm (package-for-guile-2.0): Delay the first
argument to 'package-input-rewriting'.
Works around <https://bugs.gnu.org/34102>.
Reported by Marius Bakke <mbakke@fastmail.com>.
* guix/build/download.scm (tls-wrap): Add "-VERS-TLS1.3" to the priority
string when (gnutls-version) is not prefixed by "3.5".
Until now, private and generated packages (e.g., those created by
'texlive-union') we missing from the list passed to 'node-back-edges',
which would lead to inaccurate dependent counts.
Previously we'd get:
$ guix refresh -l texlive-fonts-cm
Building the following 80 packages would ensure 116 dependent packages
are rebuilt: …
Now we have:
$ Building the following 240 packages would ensure 597 dependent
packages are rebuilt: …
* guix/scripts/refresh.scm (list-dependents): Call 'package-closure'.
The skip "~*" argument was misplaced, leading the number of dependents
to be skipped (instead of the number of covering packages.) Thus, we'd
get:
$ guix refresh -l ocaml4.02-ppx-deriving@4.1
Building the following package would ensure 1 dependent packages are rebuilt: bap@1.3.0
instead of:
Building the following package would ensure 26 dependent packages are rebuilt: bap@1.3.0
* guix/scripts/refresh.scm (list-dependents): Move "~*" in the right
place, to skip (length covering) rather than (length dependents).
Fixes a regression in 'guix pack -R' introduced with commit
c2dcff41c2. The imported modules of
'c-compiler' would be compiled in this order: first (guix records),
then (guix search-paths). Consequently,
'report-duplicate-field-specifier' would be reported as unbound while
compiling (guix search-paths), leading to a build failure.
* guix/records.scm (report-invalid-field-specifier)
(report-duplicate-field-specifier): Move within 'eval-expand'.
Fixes a regression introduced in
c2dcff41c2, whereby many tests in
'tests/packages.scm' would trigger a syntax error due to duplicate field
intializers in forms like:
(dummy-package "foo" (version "0"))
* guix/tests.scm (dummy-package, dummy-origin): Rewrite to inherit from
a base record. This restores the semantics from before
c2dcff41c2.
* tests/services.scm ("instantiate-missing-services, indirect"): Remove
duplicate 'extensions' field.
Until now we'd get things like:
guix build: error: build failed: build of `/gnu/store/….drv' failed
or:
$ guix gc -d /sdf
guix gc: error: build failed: path `/sdf' is not in the store
which is kinda ridiculous.
* guix/ui.scm (call-with-error-handling): Remove "build failed:" prefix
for 'store-protocol-error?'.
This is because (gnu tests docker) depends on (guix scripts pack).
* guix/self.scm (compiled-guix)[*system-test-modules*]: Add dependency
on *CLI-MODULES*.
* guix/records.scm (report-duplicate-field-specifier): New procedure.
(make-syntactic-constructor): Call it.
* tests/records.scm ("define-record-type* & duplicate initializers"):
New test.
Co-authored-by: Mark H Weaver <mhw@netris.org>
Previous warnings and errors such as those raised by (guix records)
would not be displayed during the load phase.
* guix/build/compile.scm (load-files): Remove 'parameterize' around
'resolve-interface' call.
(compile-files)[build]: Move 'with-fluids' for *CURRENT-WARNING-PREFIX*
to...
<top level>: ... here.
This fixes a regression introduced in 9a5091d0c1
whereby packages with git origin URIs not hosted on GitHub would be wrongly
detected as being covered under the github updater.
Reported by Efraim Flashner <efraim@flashner.co.il>.
* guix/import/github.scm (updated-github-url): Check if git URIs are GitHub
URIs.
This ensures that channel modules are compiled with the right Guile,
that they get to see the right modules, and so on. IOW, it avoids bugs
such as those addressed by commits
3c0e16391e and
cb341c1219.
* guix/channels.scm (standard-module-derivation): Add 'core'
parameter. Rewrite in terms of 'gexp->derivation-in-inferior'.
(build-from-source): Add #:core parameter and pass it to
'standard-module-derivation'.
(build-channel-instance): Add 'core' parameter and pass it on.
(channel-instance-derivations)[dependencies]: Remove.
Adjust 'build-channel-instance' call.
Previously the imported modules and extensions of EXP would be missing
from the load path of 'guix repl'.
* guix/inferior.scm (gexp->derivation-in-inferior)[script]: New
variable.
[trampoline]: Write (primitive-load #$script) to PIPE. Add #$output.
* tests/channels.scm ("channel-instances->manifest")[depends?]: Check
for requisites rather than direct references.
Adjust callers accordingly.
Previous 'channel-instance->manifest' would call
'latest-channel-derivation', which could trigger another round of
'latest-repository-commit' for no good reason.
* guix/channels.scm (resolve-dependencies): New procedure.
(channel-instance-derivations)[edges]: New variable.
[instance->derivation]: New procedure.
* tests/channels.scm (make-instance): Use 'checkout->channel-instance'
instead of 'channel-instance'.
("channel-instances->manifest"): New test.
* guix/build/profiles.scm (build-etc/profile): When 'OUTPUT/etc/profile'
already exists, delete it first.
(build-profile): Likewise for 'OUTPUT/manifest'.
* tests/profiles.scm ("profile in profile"): New test.
Fixes <https://bugs.gnu.org/33647>.
Suggested by Diego Nicola Barbato <dnbarbato@posteo.de>.
* guix/scripts/pull.scm (build-and-install): Before returning, display a
hint if (which "guix") is not in PROFILE.
Fixes <https://bugs.gnu.org/33603>.
Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>.
* guix/serialization.scm (port-conversion-strategy): New variable.
(restore-file): Parameterize it.
* tests/nar.scm ("restore-file with non-UTF8 locale"): New test.
It is possible to generate a profile where this hook will crash, as the
texmf.cnf file does not exist to be patched by substitute*. A simple example
is the profile just containing texlive-fonts-txfonts.
* guix/profiles.scm (texlive-configuration): Check that the texmf.cnf file
exists before trying to change it.
This new procedure uses BLKRRPART to determine whether or not a device is
busy. It is useful when a device does not appear as mounted but is maybe used
by the kernel. This is the case with overlayfs lowerdir backend device for
example.
* guix/build/syscalls.scm (device-in-use?): New exported procedure.
* gnu/installer.scm: Rename to ...
* gnu/installer/record.scm: ... this.
* gnu/installer/build-installer.scm: Move everything to the build side and
rename to gnu/installer.scm.
* gnu/installer/newt.scm: Remove all the gexps and add depencies to newt
modules as this code will only be used on the build side by now.
* gnu/local.mk (GNU_SYSTEM_MODULES): Adapt it,
(dist_installer_DATA): New rule to install installer's aux-files.
* gnu/system/install.scm (%installation-services): Use only
'installer-program' from (gnu installer). The installer is now choosen on the
build side.
* guix/self.scm (*system-modules*): Restore previous behaviour and add all
installer files to #:extra-files field of the scheme-node.
* po/guix/POTFILES.in: Adapt it.
As we do not want to add a dependency to newt and the graphical installer
in (guix self), do not install (gnu system install).
* guix/self.scm (*system-modules*): Remove (gnu system install) from
"guix-system" scheme-node.
* guix/import/github.scm (updated-github-url): Return the unchanged source URI
for packages using git-fetch.
[updated-url]: Do not handle URIs which end with ".git".
* gnu/packages.scm (fold-available-packages): New procedure.
* guix/scripts/package.scm (process-query): Use it instead of
'fold-packages'.
* tests/packages.scm ("fold-available-packages with/without cache"):
New test.
That way 'guix edit' doesn't need to load any package module.
* gnu/packages.scm (find-package-locations, specification->location):
New procedures.
* guix/scripts/edit.scm (package->location-specification): Rename to...
(location->location-specification): ... this. Expect a location object
instead of a package.
(guix-edit): Use 'specification->location' instead of
'specification->package'.
* tests/packages.scm ("find-package-locations")
("find-package-locations with cache")
("specification->location"): New tests.
* gnu/packages.scm (cache-is-authoritative?, load-package-cache)
(cache-lookup, generate-package-cache): New procedures.
(%package-cache-file): New variable.
(find-packages-by-name): Rename to...
(find-packages-by-name/direct): ... this.
(find-packages-by-name): Rewrite to use the package cache when
'cache-is-authoritative?' returns true.
* tests/packages.scm ("find-packages-by-name + version, with cache")
("find-packages-by-name with cache"): New tests.
* guix/channels.scm (package-cache-file): New procedure.
(%channel-profile-hooks): New variable.
(channel-instances->derivation): Use it in #:hooks.
* guix/scripts/package.scm (build-and-use-profile): Add #:hooks and
honor it.
* guix/scripts/pull.scm (build-and-install): Pass #:hooks to
UPDATE-PROFILE.
Fixes <https://bugs.gnu.org/31142>.
Reported by Chris Marusich <cmmarusich@gmail.com>.
* guix/scripts/package.scm (options->installable)[upgraded]: Use 'fold'
instead of 'fold-right'. This reverts
eca16a3d1d.
* tests/guix-package-net.sh: Add 'guix package u' test.
This fixes a regression introduced in
f1de676ea8 since %DEFAULT-OPTIONS was
missing the 'debug key that 'set-build-options-from-command-line'
expects.
* guix/scripts/copy.scm (show-help, %options): Add '--verbosity'.
(%default-options): Rename 'verbosity' to 'debug'. Add
'print-build-trace?', 'print-extended-build-trace?',
'multiplexed-build-output?', and 'verbosity'.
(guix-copy): Wrap body in 'with-status-verbosity'.
The previous '--verbosity' option was misleading and rarely what users
were looking for. The new option provides a consistent way to choose
whether or not to display the build log.
* guix/scripts/build.scm (show-build-options-help): Remove "--verbosity"
and add "--debug".
(set-build-options-from-command-line): Use the 'debug key of OPTS for
#:verbosity.
(%standard-build-options): Change "verbosity" to "debug". Use
'string->number*' instead of 'string->number'.
(%default-options): Change 'verbosity to 'debug and add a 'verbosity
key.
(show-help): Add '--verbosity'.
(%options): Likewise, and change '--quiet' to set the 'verbosity key of
RESULT.
(guix-build): Use 'with-status-verbosity' instead of parameterizing
CURRENT-BUILD-OUTPUT-PORT, honor the 'verbosity key of OPTS, and remove
'quiet?'.
* guix/scripts/environment.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug'.
(guix-environment): Honor the 'verbosity key of OPTS.
* guix/scripts/pack.scm (%default-options): Add 'debug.
(%options, show-help): Add '--verbosity'.
(guix-pack): Honor the 'verbosity key of OPTS.
* guix/scripts/package.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'. Mark '--verbose' as
deprecated and change it to set 'verbosity.
(guix-package): Honor the 'verbosity key of OPTS and remove 'verbose?'.
* guix/scripts/pull.scm (%default-options): Add 'debug.
(show-help, %options): Add '--verbosity'.
(guix-pull): Honor the 'verbosity key of OPTS.
* guix/scripts/system.scm (show-help, %options): Add '--verbosity'.
(%default-options): Add 'debug.
(guix-system): Honor the 'verbosity key of OPTS.
* guix/scripts/archive.scm (%default-options): Add 'debug,
'print-build-trace?, 'print-extended-build-trace?, and
'multiplexed-build-output?.
(show-help, %options): Add '--verbosity'.
(export-from-store): Remove call to 'set-build-options-from-command-line'.
(guix-archive): Wrap body in 'with-status-verbosity'. Add call to
'set-build-options-from-command-line.
* doc/guix.texi (Common Build Options): Document '--verbosity' and
'--debug'.
(Additional Build Options): Adjust description of '--quiet'.
This allows us to combine '--recursive' with other options (-u, -m,
etc.), turns off warnings when '--recursive' is used, and avoids the
hazards of I/O in the presence of multithreading.
* guix/scripts/refresh.scm (options->packages): New procedure, with code
formerly in 'guix-refresh'.
(refresh-recursive): Remove.
(guix-refresh)[keep-newest, core-package?, args-packages, packages]:
Remove.
[warn?]: Set to #f when RECURSIVE? is true.
Call 'options->packages' in monadic context.
* guix/scripts/lint.scm (check-github-url): Warn only if the GitHub URI
obtained after following redirects is not same as the original URI.
* tests/lint.scm ("github-url: already the correct github url"): New test.
Fixes a bug whereby we would, at the top-level (while evaluation
lisp.scm package definitions), attempt to access package inputs.
Because of circular dependencies, this could lead to unbound variables
as reported by Arun Isaac <arunisaac@systemreboot.net> at
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33801#56>.
* guix/build-system/asdf.scm (package-with-build-system)[transform]
(new-propagated-inputs): Turn into a procedure.
Adjust user accordingly.
Fixes <https://bugs.gnu.org/34010>.
Reported by Alex Kost <alezost@gmail.com>.
This is a followup to 5923102f7b.
* guix/scripts/pull.scm (show-help): Add '--system'.
This removes two elements from %LOAD-PATH and %LOAD-COMPILED-PATH of the
'guix' command and thus further reduces the number of 'stat' calls it
makes.
* guix/gexp.scm (load-path-expression): Return #f when MODULES and
EXTENSIONS are both empty.
(gexp->script): Don't emit anything when SET-LOAD-PATH is #f.
This halves the number of elements in %LOAD-PATH and %LOAD-COMPILED-PATH
and halves the number of 'stat' calls as reported by:
env -i $(type -P guix) build -e '(@ (gnu packages base) coreutils)' -nd
* guix/self.scm (node-source+compiled, guile-module-union): New
procedures.
(guix-command): Remove 'compiled-modules' parameter. Remove
'source-directories' and 'object-directories' variables and add
'module-directory'. Change command so that it adds nothing but
MODULE-DIRECTORY to %LOAD-PATH and %LOAD-COMPILED-PATH.
(whole-package): Remove #:compiled-modules. Assume MODULES contains
'share/guile/site' and 'lib/guile' and adjust code accordingly.
(compiled-guix): When PULL-VERSION is 1, use 'node-source+compiled'
only. Remove #:compiled-modules argument to 'whole-package'.
* guix/channels.scm (whole-package-for-legacy): Add 'module+compiled'
and pass it to 'whole-package'.
Previously we would rely on auto-compilation of all the Guix modules.
The complete evaluation would take ~15mn on berlin.guixsd.org and
require lots of RAM. This approach should be faster since potentially
only part of the modules are rebuilt. Furthermore, as a side-effect, it
builds the derivations that 'guix pull' uses.
* build-aux/hydra/gnu-system.scm: Remove 'eval-when' form.
(hydra-jobs): New procedure.
* gnu/ci.scm (package->alist, qemu-jobs, system-test-jobs)
(tarball-jobs): Return strings for the 'license' field.
* guix/self.scm (compiled-guix)[*cli-modules*]: Add (gnu ci).
This allows the fallback code in (guix git-download) to actually run.
Regression introduced in commit 329dabe13b.
Fixes <https://bugs.gnu.org/33911>.
Reported by Björn Höfling <bjoern.hoefling@bjoernhoefling.de>.
* guix/build/git.scm (git-fetch): Guard against 'invoke-error?' and
really return #f upon failure.
Fixes a bug whereby "guix build -f file.scm -s SYSTEM" would not honor
SYSTEM when 'file.scm' returns a gexp or a file-like object.
* guix/scripts/build.scm (options->derivations): Pass #:system to
'run-with-store' in the 'file-like?' and 'gexp?' cases.
* guix/import/github.scm (updated-github-url): Respond with the repository url
for the 'git-fetch' fetch method.
(github-package?): Simplify boolean expression.
(github-repository, github-user-slash-repository): Strip trailing ".git" from
project if present.
(latest-release)<origin-github-uri>: Recognize a 'git-reference'.
This extra level of locking turned out to be unnecessary.
* guix/scripts/offload.scm (with-machine-lock): Remove.
(machine-lock-file): Remove.
(acquire-build-slot): Remove surrounding 'with-machine-lock'.
This lock was unnecessary and it led to a contention when many 'guix
offload' processes are polling for available machines.
* guix/scripts/offload.scm (machine-choice-lock-file): Remove.
(choose-build-machine): Remove surrounding 'with-file-lock (machine-lock-file)'.
This is a followup to ed7b44370f71126087eb953f36aad8dc4c44109f;
following that commit, 'guix offload test' and 'guix offload status'
would abort with a backtrace instead of clearly diagnosing a missing
'guix' command on the build machine.
* guix/scripts/offload.scm (assert-node-has-guix): Call 'leave' when
NODE is not an inferior. Remove 'catch' blocks for 'node-repl-error'.
(check-machine-availability): Invoke 'assert-node-has-guix' first.
(check-machine-status): Print a warning when 'remote-inferior' returns #f.
Using inferiors and thus 'guix repl' simplifies setup on build
machines (no need to worry about GUILE_LOAD_PATH etc.)
Furthermore, the 'guix repl -t machine' protocol running in a remote
pipe addresses several issues with the current implementation of nodes
and RREPLs in Guile-SSH: fewer round trips, doesn't leave a 'guile
--listen' process behind it, stateless (since a new process is started
each time), more efficient (the SSH channel can be reused), more
reliable (no 'pgrep', 'pkill', and shellology; see
<https://github.com/artyom-poptsov/guile-ssh/issues/11> as an example.)
* guix/ssh.scm (inferior-remote-eval): New procedure.
(send-files): Use it instead of 'make-node' and 'node-eval'.
* guix/scripts/offload.scm (node-guile-version): New procedure.
(node-free-disk-space, transfer-and-offload, node-load)
(choose-build-machine, assert-node-has-guix): Use 'remote-inferior'
instead of 'make-node' and 'inferior-eval' instead of 'node-eval'.
(assert-node-can-import, assert-node-can-export): Likewise, and add
'session' parameter.
(check-machine-availability): Likewise, and add calls to
'close-inferior' and 'disconnect!'.
(check-machine-status): Likewise.
* doc/guix.texi (Daemon Offload Setup): Remove bit related to 'guile' in
$PATH and $GUILE_LOAD_PATH; mention 'guix' alone.
* guix/scripts/refresh.scm (refresh-recursive, list-transitive): New
procedures.
(show-help): Document it.
(guix-refresh): Add flags and checks for new options.
* doc/guix.texi (Invoking guix refresh): Document new options.
* guix/scripts/lint.scm (check-github-uri): New procedure.
(%checkers): Add it.
* doc/guix.texi (Invoking guix lint): Document it.
* tests/lint.scm ("github-url", "github-url: one suggestion"): New tests.
Fixes a regression introduced in
bbe66a530a whereby the actual
load (non-normalized) would be displayed.
* guix/scripts/offload.scm (check-machine-status): Add call to
'normalized-load'.
This should avoid "database is locked" errors when there's a lot of
concurrency, for instance when offloading simultaneously a lot of
builds.
* guix/store/database.scm (call-with-database): Add two 'sqlite-exec'
calls to set 'journal_mode' and 'busy_timeout'.
Previously, if a remote build would fail due to lack of disk space, this
would be considered a permanent failure and thus cached as a build
failure if the local daemon runs with '--cache-failures'.
* guix/scripts/offload.scm (transfer-and-offload): Upon
'nix-protocol-error?' call 'node-free-disk-space' and return 1 instead
of 100 if the result if lower than 10 MiB.
Fixes <https://bugs.gnu.org/33378>.
* guix/scripts/offload.scm (node-free-disk-space): New procedure.
(%minimum-disk-space): New variable.
(choose-build-machine): Call 'node-free-disk-space' and take it into
account in addition to LOAD.
(check-machine-status): Display the free disk space.
* guix/scripts/offload.scm (machine-load): Remove.
(node-load, normalized-load): New procedures.
(choose-build-machine): Call 'open-ssh-session' and 'make-node' from
here; pass the node to 'node-load'.
(check-machine-status): Use 'node-load' instead of 'machine-load'. Call
'disconnect!' on SESSION.
* guix/import/cran.scm (fetch-description): Return #F on failure.
(cran->guix-package): Retry from CRAN on failure to fetch description from
bioconductor.
The previous caching strategy, which used STORE as an 'eq?' key, would
no longer work when the functional cache is used because subsequent
store values are not 'eq?'.
* guix/download.scm (built-in-builders*): Rewrite in terms of
'mcached'.
Previously we'd use the (sequence M (map P L)) idiom just because 'mapm'
was slower (not specialized for the given monad). This is no longer the
case since commit dcb95c1fc9.
* guix/gexp.scm (lower-inputs): Use (mapm M P L) instead of (sequence
M (map P L)).
(lower-references, gexp->sexp, imported-files): Likewise.
* guix/profiles.scm (profile-derivation): Likewise.
* guix/scripts/environment.scm (inputs->requisites): Likewise.
* guix/scripts/system.scm (copy-closure): Likewise.
* guix/scripts/system.scm (show-help): Clarify the three choices.
* doc/guix.texi (Invoking guix system): Add 3 @cindex to make on-error=strategy
easier to find.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Fixes <https://bugs.gnu.org/33721>.
Reported by Chris Marusich <cmmarusich@gmail.com>.
* guix/scripts/publish.scm (render-nar/cached): Add #:ttl and honor it.
(make-request-handler): Pass #:ttl to 'render-nar/cached'.
* tests/publish.scm ("with cache, uncompressed"): Pass "--ttl=42h" to
'guix publish'. Check 'Cache-Control' on narinfo response and on nar
response.
Reported by Andreas Enge <andreas@enge.fr>
in <https://bugs.gnu.org/33676>.
* guix/store/deduplication.scm (replace-with-link): Catch ENOSPC around
'get-temp-link'. Do nothing when 'get-temp-link' throws ENOSPC. Move
code to restore PARENT's permissions outside of 'catch'.
* tests/store-deduplication.scm ("deduplicate, ENOSPC"): New test.
Fixes <https://bugs.gnu.org/33733>.
Fixes a bug whereby 'guix substitute' would accept narinfos whose
signature does not cover the StorePath/NarHash/References tuple.
* guix/scripts/substitute.scm (narinfo-sha256)[%mandatory-fields]: New
variable.
Compute SIGNED-FIELDS; return #f unless each of the %MANDATORY-FIELDS
is among SIGNED-FIELDS.
* tests/substitute.scm ("query narinfo with signature over nothing")
("query narinfo with signature over irrelevant bits"): New tests.
* guix/channels.scm (<channel-metadata>): New record.
(read-channel-metadata, channel-instance-dependencies): New procedures.
(latest-channel-instances): Include channel dependencies; add optional
argument PREVIOUS-CHANNELS.
(channel-instance-derivations): Build derivation for additional channels and
add it as dependency to the channel instance derivation.
* doc/guix.texi (Channels): Add subsection "Declaring Channel Dependencies".
* tests/channels.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
Fixes <https://bugs.gnu.org/33623>.
Reported by Diego Nicola Barbato <dnbarbato@posteo.de>.
Regression introduced in commit
46c296dcc4.
* guix/scripts/system.scm (reinstall-bootloader): Add call to
'lower-object'.
Fixes <https://bugs.gnu.org/33580>.
Reported by <znavko@tutanota.com>.
* guix/self.scm (info-manual)[glibc-utf8-locales]: New variable.
[build]: Add call to 'setenv' for "GUIX_LOCPATH".
Fixes <https://bugs.gnu.org/33542>.
Reported by Mark H Weaver <mhw@netris.org>.
* guix/download.scm (%content-addressed-mirrors): Autoload (guix base16).
ca71942445 changes the name of the executable to
be displayed by the --version and --help commands of `guix hash` to
"gcrypt hash".
This is reverted by this commit.
* guix/scripts/hash.scm (show-help): Change string literals
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix/inferior.scm (inferior-eval-with-store): New procedure, with code
formerly in 'inferior-package-derivation'.
(inferior-package-derivation): Rewrite in terms of
'inferior-eval-with-store'.
* tests/inferior.scm ("inferior-eval-with-store"): New test.
* guix/ui.scm (graft-derivation?): New procedure.
(show-what-to-build): Distinguish among BUILD derivations that match
'graft-derivation?'. Report them separately.
* guix/grafts.scm (graft-derivation/shallow): Pass #:properties to
'build-expression->derivation'.
* tests/grafts.scm ("graft-derivation, grafted item is a direct
dependency"): Check the value returned by 'derivation-properties'.
* guix/git-download.scm (git-fetch)[inputs]: Add gzip and tar when
'git-reference-recursive?' is false.
[guile-json, gnutls]: New variables.
[modules]: Add (guix swh).
[build]: Wrap in 'with-extensions'. Add call to 'swh-download'.
Fixes a regression introduced in
52ee4479ef, whereby 'install' would now be
passed a procedure instead of a lowerable object.
* guix/scripts/system.scm (perform-action): Pass BOOTLOADER-SCRIPT as
the #:bootloader-installer argument of 'install'.
Previously grafting could take place indirectly, for instance when
lowering origins.
* guix/scripts/lint.scm (check-derivation)[try]: Parameterize
'%graft?'.
This allows us to catch architecture-specific evaluation failures.
* guix/scripts/lint.scm (check-derivation): Move body into...
[try]: ... this. New procedure.
Call 'try' for each supported system of PACKAGE.
Fixes a regression introduced in
52ee4479ef, whereby 'install' would now be
passed a <computed-file> object instead of a derivation.
* guix/scripts/system.scm (install): Call 'lower-object' on BOOTCFG.
* guix/scripts/system.scm (bootloader-installer-derivation): Rename
to...
(bootloader-installer-script): ... this. Use 'scheme-file' instead of
'gexp->file'.
(perform-action): Adjust accordingly. Move 'lower-object' call to the
point where DRVS is computed.
* guix/scripts/system.scm (perform-action): Remove 'bootloader-package'
variable. Pass (bootloader-package bootloader) as the 2nd argument to
'bootloader-installer-derivation'. Remove BOOTLOADER-PACKAGE from DRVS
since it's redundant.
Bug <http://bugs.gnu.org/22774> is no longer relevant now that we use
"builtin:download" exclusively.
* guix/download.scm (%content-addressed-mirrors): Use "https", not
"http".
Fixes <https://bugs.gnu.org/33361>.
* guix/store/deduplication.scm (replace-with-link): Call 'set-file-time'
and 'chmod' after 'rename-file'.
* tests/nar.scm ("restore-file-set with directories (signed, valid)"):
New test.
* guix/tests.scm (canonical-file?): New procedure.
* tests/nar.scm ("restore-file-set (signed, valid)"): Check that every
item of FILES matches 'canonical-file?'.
* guix/store/database.scm (%default-database-file): New variable.
(path-id): Export.
* guix/nar.scm (finalize-store-file): Use 'with-database' instead of
'with-store', and use 'path-id' instead of 'valid-path?'.
This leads to ~25% improvements on things like:
guix system build desktop.tmpl --no-grafts -d
* guix/store.scm (<nix-server>)[object-cache]: New field.
* guix/store.scm (open-connection): Initialize it.
(cache-object-mapping, lookup-cached-object, %mcached): New procedures.
(mcached): New macro.
* guix/gexp.scm (lower-object): Use it.
* guix/grafts.scm (grafting?): New procedure.
This is a follow-up to commit a7e231a2a3.
Reported by Marius Bakke <mbakke@fastmail.com>.
* guix/build/haskell-build-system.scm (register): Use "when" instead of
"unless".
Fixes a bug whereby running 'guix system init config.scm /mnt' twice
would, on the second run, change timestamps in /mnt/gnu/store from the
Epoch to now. This is because the 'register-path' call would bypass the
'reset-timestamps' phase altogether in that case, as a consequence of
commit bb3b6ccb05.
Reported by Christopher Baines.
* guix/scripts/system.scm (install): When TARGET/var/guix exists, delete
it. As a side-effect, this ensures that later on, the 'register-path'
call invokes 'reset-timestamps' on all the copied store items.
Fixes <https://bugs.gnu.org/33323>.
Reported by swedebugia <swedebugia@riseup.net>.
* guix/scripts/package.scm (process-query): Call 'leave' when
'find-packages-by-name' returns the empty list.
* tests/guix-package.sh: Test it.
* guix/ci.scm (<checkout>, <evaluation>): New record types.
(latest-builds): Add #:evaluation and #:system and honor it. Define
'option'.
(json->checkout, json->evaluation, latest-evaluations)
(evaluations-for-commit): New procedures.
Partially fixes <https://bugs.gnu.org/28159>.
The FTP server at ftp.free.fr had become unable to produce directory
listings, effectively making the updater dysfunctional. Furthermore FTP
is considered obsolescent so HTTP + HTML looks more future-proof.
* guix/gnu-maintenance.scm (html->sxml, html-links)
(latest-html-release): New procedures.
(latest-kernel.org-release): Rewrite in terms of 'latest-html-release'.
Fixes a regression introduced in
5f7dd092ca where, upon completion, 'guix
pull' would fail (instead of printing the new/upgraded packages) with
ugly errors like:
successfully built /gnu/store/…-profile.drv
1 package in profile
Backtrace:
[…]
In guix/store.scm:
1605:24 1 (run-with-store _ _ #:guile-for-build _ #:system _ # _)
In unknown file:
0 (_ #<build-daemon 256.97 2476b40>)
ERROR: Wrong type to apply: #t
Reported by thorwil on #guix.
* guix/scripts/pull.scm (build-and-install): Add missing 'return' when
DRY-RUN? is wrong.
Fixes a bug whereby directories in the output of 'guix pack -f tarball'
would not be read-only.
* guix/build/store-copy.scm (reset-permissions): New procedure.
(populate-store): Pass #:keep-mtime? #t to 'copy-recursively'. Call
'reset-permissions'.
* tests/pack.scm ("self-contained-tarball"): In CHECK, define
'canonical?' and use it to check that every file has an mtime of 1 and
is read-only.
* tests/guix-pack.sh: Invoke "chmod -Rf +w" before "rm -rf" in trap.
* guix/scripts/pack.scm (squashfs-image)[database]: New variable.
[build]: Add (gnu build install) to the closure. Call
'install-database-and-gc-roots' when DATABASE is true, and invoke
mksquashfs once more.
* tests/pack.scm ("squashfs-image + localstatedir"): New test.
* guix/docker.scm (build-docker-image): Add #:database parameter.
Create /var/guix/db, /var/guix/profiles, etc. when DATABASE is true.
* guix/scripts/pack.scm (docker-image): Export. Remove #:deduplicate?
parameter. Define 'database' and pass it to 'docker-image'.
* tests/pack.scm (test-assertm): Recompile the derivation of
%BOOTSTRAP-GUILE.
("docker-image + localstatedir"): New test.
This is another way to address <https://bugs.gnu.org/32184>, which was
previously addressed in commit 19c924af4f.
* gnu/build/install.scm (register-closure): Move to...
* gnu/build/vm.scm (register-closure): ... here. New procedure.
* guix/scripts/pack.scm (self-contained-tarball)[build]: Remove
now unneeded 'with-extensions' form and custom (guix config) module.
* tests/guix-pack.sh: Revert the strategy from
commit 19c924af4f.
* tests/pack.scm ("self-contained-tarball"): Likewise.
* guix/scripts/pack.scm (store-database): New procedure.
(self-contained-tarball): Use it when LOCALSTATEDIR? is true.
Remove 'schema' and add 'database'.
[build]: Pass DATABASE to 'populate-single-profile-directory'.
(squashfs-image): Remove #:deduplicate? parameter.
[build]: Remove (gnu build install) and (guix config) from the imported
modules. Remove 'with-extensions'.
* gnu/build/install.scm (populate-single-profile-directory): Remove
#:deduplicate?, #:register?, and #:schema; add #:database. Remove call
to 'register-closure' and simply copy DATABASE instead.
* guix/self.scm (miscellaneous-files): New procedure.
(whole-package): Remove #:substitute-keys, add #:miscellany.
[build]: Remove code for SUBSTITUTE-KEYS and add code to copy MISCELLANY
to OUTPUT.
(compiled-guix): Adjust call to 'whole-package'.
* guix/self.scm (whole-package): Add #:substitute-keys and honor it.
(compiled-guix): Pass #:substitute-keys to 'whole-package' when
PULL-VERSION is one.
Otherwise the user might believe that git-fetch stalled, observing the lack of
output following a 'fatal' git error message (see:
https://debbugs.gnu.org/33100).
* guix/build/git.scm (git-fetch): Print message when falling back to a full
fetch.
* guix/import/hackage.scm (hackage-module->sexp): Do not repeat inputs again
in native-inputs. native-inputs should only contain packages that are not
already listed in inputs.
Fixes <https://bugs.gnu.org/32966>.
Reported by Clément Lassieur <clement@lassieur.org>.
* guix/gexp.scm (gexp-attribute): Add 'equal?' optional parameter; pass
it to 'delete-duplicates'.
(gexp-modules)[module=?]: New procedure.
Pass it to 'gexp-attribute'.
* tests/gexp.scm ("gexp-modules deletes duplicates"): New test.