Reported by Christopher Baines <guix@cbaines.net>.
* guix/cache.scm (maybe-remove-expired-cache-entries): Define
‘expiry-port’; create it with ‘lock-file’. Change ‘last-expiry-date’
accordingly. Write timestamp straight to ‘expiry-port’.
* tests/cache.scm ("maybe-remove-expired-cache-entries, cleanup needed
but lock taken"): New test.
Change-Id: I22441d9d2c4a339d3d3878de131864db5a0ae826
THe gexp->derivation, store copy test involves building derivations which
compile a bunch of Guile code, which can be quite slow on slow platforms like
riscv64-linux.
* guix/tests.scm (open-connection-for-tests): Increase #:timeout to 10
minutes.
Change-Id: Iccfd976ce21a8902d776b36f17f5fb91b957d90d
* guix/build/graft.scm (rewrite-directory)[rewrite-leaf]: Only create
the parent directories when they don't already exist.
Change-Id: I802aac4d6090ed07effddde3eb3195f64aca31d3
Fixes <https://issues.guix.gnu.org/issue/65979>.
* guix/hash.scm (%vcs-directories): New variable.
(vcs-file?): Add optional argument for passing VCS kind of the
file/repository.
(file-hash*): Adjust accordingly.
(vcs-file-predicate): New procedure and export it.
* guix/scripts/hash.scm (guix-hash)[file-hash]: Use it.
Change-Id: I8e286c3426ddefd664dc3a471d5a09e309824faa
* guix/ci.scm (channel-with-substitutes-available): Catch all error when
running 'find-latest-commit-with-substitutes'. Move the warning when failing.
Change-Id: I352e07f14417f77c7ebf0f40a01c6a2e58b15d78
* guix/build/cargo-build-system.scm (configure): Add an environment
variable to use pkg-config to find the zstd library.
Change-Id: Id53296c4a18fffd8aa2f2b9e4d52d98ff3486293
Fixes <https://issues.guix.gnu.org/71979>.
* guix/modules.scm (file-name->module-name): Strip leading “.” component
from FILE.
* tests/modules.scm ("file-name->module-name")
("file-name->module-name, leading dot"): New tests.
Reported-by: Tomas Volf <~@wolfsden.cz>
Change-Id: I3d1b9f3f21448050cac4f3b1aed5f8f03758d4c9
Cached checkouts could end up with stale untracked files, for example
because the checkout was interrupted. As a result, when this happens
for the Guix checkout, users would not get substitutes for ‘guix pull’.
* guix/git.scm (delete-untracked-files): New procedure.
(switch-to-ref): Use it.
* tests/git.scm ("update-cached-checkout, untracked files removed"): New
test.
Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
Change-Id: Iccbe644ade396ad27a037db7e0ef1c2a68ef91ce
* guix/scripts/build.scm (options->derivations)[compute-derivation]:
Pass ‘system’ to ‘package-source-derivation’.
* tests/guix-build.sh: Test ‘-S’ together with ‘-s’.
Change-Id: If35f116285dd9caaf939221163ad0ba831eea993
Rather than querying the built-in-builders from the inferior, as using the
host value allows specifying it when opening the connection.
* guix/inferior.scm (port->inferior): Have cached-store-connection take the
built-in-builders.
(inferior-eval-with-store): Call cached-store-connection with the store
connection built-in-builders.
Change-Id: I27c20732355c0c6aa646748a02df39db302cd568
When computing channel instance derivations.
This is useful when you want to generate compatible derivations that can be
run with a daemon that potentially doesn't support builtin builders that the
daemon you're using to generate the derivations has.
I'm looking at this in particular because I want to use this in the data
service, since it provides substitutes for derivations, and since these can be
built on other machines, it's useful to control which builtin builders they
depend on.
Fixes: <https://issues.guix.gnu.org/67250>.
* build-aux/build-self.scm (build-program): Accept
#:built-in-builders and pass along to port->connection or
open-connection as approriate.
(build): Accept and pass on #:built-in-builders.
* guix/channels.scm (build-from-source, build-channel-instance,
channel-instance-derivations, channel-instances->manifest,
channel-instances->derivation): Accept and pass on
#:built-in-builders.
Change-Id: I315c990de66c6f7dca25a859165a5568abe385ea
To open-connection and port->connection. This overrides the discovered
builtin builders that the daemon says it provides.
This is useful when you want to generate compatible derivations that can be
run with a daemon that potentially doesn't support builtin builders that the
daemon you're using to generate the derivations has.
I'm looking at this in particular because I want to use this in the data
service, since it provides substitutes for derivations, and since these can be
built on other machines, it's useful to control which builtin builders they
depend on.
* guix/store.scm (open-connection, port->connection): Accept
#:built-in-builders and use this instead of %built-in-builders.
Fixes: <https://issues.guix.gnu.org/67250>.
Change-Id: I45d58ab93b6d276d280552858fc81ebc2b58828a
This is handled by (guix ui).
* guix/build-system/meson.scm (make-machine-alist): Use a more specific
exception.
Change-Id: I842ba63739fdefe04460e938c7bc8aa54ea57b96
* guix/packages.scm (&unsupported-cross-compilation-target-error): New
variable.
* guix/ui.scm (call-with-error-handling): Handle this new condition type.
Change-Id: I9e7782ee4799b5fecb3c890a75008c35c003f55d
Some packages don't support cross building to specific targets, so add a error
type to signal this.
* guix/packages.scm (&package-unsupported-target-error): New condition type.
[package-unsupported-target-error? package-unsupported-target-error-target):
New procedures.
* guix/ui.scm (call-with-error-handling): Handle this new condition type.
Change-Id: Ib47813399e04b20d616a95f545b6aabe25736e92
* guix/build-system/composer.scm (create-autoload):
Do not use the delete-duplicates function, stale code that should have
been removed in an earlier cleanup.
Change-Id: I778c1cfba7ef8de16a1ba297b583595b391b7e00
Signed-off-by: jgart <jgart@dismail.de>
* guix/import/github.scm (import-release): Use package-upstream-name instead
of package-name.
Change-Id: I9a4999a01156ce02584270837ceab70996b49106
Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
A regression was introduced in 368e58afcb which
led to the guix-translated-texinfo derivation including a source file for the
entire checkout.
I'm not sure what the --srcdir option does, but the derivation still seems to
build when it's removed.
* guix/self.scm (translate-texi-manuals): Remove #$source reference.
Change-Id: Icfe1eaf7600f5708c9b3408d59d760b1edb3237b
Go 1.13 introduced[1] a new "trimpath" flag in charge of removing the
references to the go toolchain in the produced ELFs. We used to remove
these references using the "remove-go-reference" function. This function
was executed after go install. By using this new trimpath flag, we don't
have to remove any store path from the ELFs produced by go install.
We're not using any go older than 1.13 anymore, it's safe to remove
these functions.
[1] https://go.dev/doc/go1.13
-trimpath
remove all file system paths from the resulting executable.
Instead of absolute file system paths, the recorded file names
will begin either a module path@version (when using modules),
or a plain import path (when using the standard library, or
GOPATH).
* guix/build/go-build-system.scm (build): Add -trimpath
(%standard-phases): Remove remove-go-references.
(remove-go-references): Remove.
Change-Id: Idcae366d226da5ce095693f81fd33133fd1d70d6
Co-authored-by: Picnoir <picnoir@alternativebit.fr>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This causes build failures on powerpc-linux.
* guix/build/go-build-system.scm (unpack): When the unpack-path is unset
use the import-path but don't redefine the unpack-path.
Change-Id: I2b5a36eb738abb14307941d388038139dbaf2bdf
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Remove the inner connect procedure, as now that #:non-blocking? needs passing
on, this just makes things more difficult. This commit also fixes not passing
#:non-blocking? on in the case where open-unix-domain-socket is called as
connect.
* guix/store.scm (connect-to-daemon): Refactor and fix non-blocking
connections to sockets with a filename.
Change-Id: I61cd99920df91baba95567d670bec6fa94043875
There is no reason to have this diverge from the underlying cmake build
system.
* guix/build-system/qt.scm (qt-build) <#:parallel-tests?>: Default to #t.
Change-Id: I65db3d6c6727bd24549af4a44940e7362064aed6
Experience has shown that keeping too many entries increases disk usage
and, more importantly, leads to long delays when cleaning up the cache,
measured in minutes on slow or busy HDDs with hundreds of thousands of
cache entries, as is common on build machines. In those cases, the cost
of the cache outweighs its benefit.
* guix/scripts/substitute.scm (%narinfo-expired-cache-entry-removal-delay):
Reduce to 5 days.
(cached-narinfo-expiration-time)[max-ttl]: Reduce to 2 days.
Change-Id: Iab212f572ee9041be61716423a3c014f93fe81ed
Fixes a regression introduced in
275f279891.
* guix/hg-download.scm (hg-fetch-builder): Remove calls to
‘string->symbol’.
Change-Id: I2e049d1ecb8860b6f946ca51358aaba22bdc9e2e
Rather than creating a different builder in the store for every different
download (by hash), remove the hash from the builder and pass it in via an
environment variable. This means that when git-fetch is used by two different
package sources, the derivations will still differ but the builder will be
shared.
It used to be this way, but changed with
264fdbcaff. I noticed this through looking at
the same problem with svn-multi-fetch.
To try and make the effects of introducing variance in to the builder script
more obvious, separate it out in to it's own procedure, so that it's clearer
when there's new data going in that could cause variance.
* guix/git-download.scm (git-fetch/in-band*): Extract out builder script,
include hash in the derivation as an environment variable and update the
comment to be more directive.
(git-fetch-builder): New procedure.
Change-Id: I59c9fc445667c0e7dc44bcb706818300c394a1e5
Rather than creating a different builder in the store for every different
download (by hash), remove the hash from the builder and pass it in via an
environment variable. This means that when hg-fetch is used by two different
package sources, the derivations will still differ but the builder will be
shared.
Looking at the code, becuase the ref is also in the builder, the builders have
been duplicated for a while. The overhead is probably limited though since
hg-reference isn't used much compared to say svn-multi-reference.
To try and make the effects of introducing variance in to the builder script
more obvious, separate it out in to it's own procedure, so that it's clearer
when there's new data going in that could cause variance.
* guix/hg-download.scm (hg-fetch): Extract out builder script and include
hash, hg ref url, and hg ref changeset in the derivation as an environment
variables.
(hg-fetch-builder): New procedure.
Change-Id: I3c3a0b4963ea1b208bf1d5137ef98666458ae2d7
Rather than creating a different builder in the store for every different
download (by hash), remove the hash from the builder and pass it in via an
environment variable. This means that when svn-fetch is used by two different
package sources, the derivations will still differ but the builder will be
shared.
It used to be this way, but changed with
0e73f933b2. I noticed the hash in the builder
script when wondering why the build coordinator on bayfront was substituting
svn-multi-download files over and over again.
To try and make the effects of introducing variance in to the builder script
more obvious, separate it out in to it's own procedure, so that it's clearer
when there's new data going in that could cause variance.
* guix/svn-download.scm (svn-fetch): Extract out builder script, include hash
in the derivation as an environment variable and update the comment to be more
directive.
(svn-fetch-builder): New procedure.
Change-Id: I256b94666296ad747f494f0b497ca209b77fbfb4
Rather than creating a different builder in the store for every different
download (by hash), remove the hash from the builder and pass it in via an
environment variable. This means that when svn-multi-fetch is used by two
different package sources, the derivations will still differ but the builder
will be shared.
It used to be this way, but changed with
0e73f933b2. I noticed the hash in the builder
script when wondering why the build coordinator on bayfront was substituting
svn-multi-download files over and over again.
To try and make the effects of introducing variance in to the builder script
more obvious, separate it out in to it's own procedure, so that it's clearer
when there's new data going in that could cause variance.
* guix/svn-download.scm (svn-multi-fetch): Extract out builder script, include
hash in the derivation as an environment variable and update comment to be
more directive.
(svn-multi-fetch-builder): New procedure.
Change-Id: I83c60140ae09e189ee5e5428038a9428ecb8e281
* guix/transformations.scm (tuning-compiler): Adjust the wrapper script
when building for powerpc* architectures to pass the correct flags.
Change-Id: I9d809ac9b707eb8d6afa7b843c95bce29862a752
* guix/import/utils.scm (beautify-description): Append period to last
words which do not end with one.
* tests/crate.scm: Append period to descriptions.
* tests/elm.scm: Append period to descriptions.
* tests/gem.scm: Append period to descriptions.
* tests/hexpm.scm: Append period to descriptions.
* tests/minetest.scm: Append period to descriptions.
* tests/pypi.scm: Append period to descriptions.
* tests/import-utils.scm ("beautify-description: transform fragment into
sentence"): Likewise.
Change-Id: I0b12c4d94cb26cf62fab5b7cbf7885e66ff6c10f
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix/self.scm (translate-tmp-texi): Use po4a instead of po4a-translate.
This eliminates the po4a-translate warning; "po4a-translate is deprecated.
The unified po4a(1) program is more convenient and less error prone."
Change-Id: Id85c7478b1b237f31010994fcd2d38765993c1ad
Signed-off-by: Florian Pelz <pelzflorian@pelzflorian.de>
This brings the on disk size of the kernel from 164 MiB to 144 MiB, or about
12%.
* gnu/packages/linux.scm (default-extra-linux-options)
[version>=5.13]: Enable CONFIG_MODULE_COMPRESS_ZSTD, else
CONFIG_MODULE_COMPRESS_GZIP.
(make-linux-libre*) [phases] {set-environment}: Set ZSTD_CLEVEL environment
variable to 19.
[native-inputs]: Add zstd.
* gnu/build/linux-modules.scm (module-regex): Add .zst to regexp. Update doc.
(modinfo-section-contents): Extend support to Zstd compressed module.
(dot-ko): Register the 'zstd compression type.
(ensure-dot-ko, file-name->module-name, load-linux-module*)
(module-name->file-name/guess, write-module-name-database)
(write-module-alias-database, write-module-device-database): Update doc.
(module-name-lookup): Also consider zstd-compressed modules.
* gnu/installer.scm (installer-program): Add guile-zstd extension to gexp.
* gnu/system/linux-initrd.scm (flat-linux-module-directory): Likewise.
Decompress zstd-compressed modules for use in initrd.
* guix/profiles.scm (linux-module-database): Add guile-zstd extension to gexp.
Change-Id: Ide899dc5c58ea5033583b1a91a92c025fc8d901a
This reduces disk usage of sparse files that are substituted such as
Guile object files (ELF files). As of Guile 3.0.9, .go files are sparse
due to ELF sections being aligned on 64 KiB boundaries.
This reduces disk usage reported by “du -sh” by 9% for the ‘guix’
package, by 23% for ‘guile’, and by 35% for ‘guile-git’.
* guix/store/deduplication.scm (hole-size, find-holes): New procedures.
(tee)[seekable?]: New variable.
[read!]: Add case when SEEKABLE? is true.
* tests/store-deduplication.scm (cartesian-product): New procedure.
("copy-file/deduplicate, sparse files (holes: ~a/~a/~a)"): New test set.
Change-Id: Iad2ab7830dcb1220e2026f4a127a6c718afa8964