Commit Graph

7705 Commits

Author SHA1 Message Date
Ludovic Courtès
d921c742b7
cache: Avoid cache cleanup storms from concurrent processes.
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
2024-08-21 00:52:39 +02:00
Ludovic Courtès
96cd163c14
syscalls: Add ‘mode’ parameter to ‘lock-file’.
* guix/build/syscalls.scm (lock-file): Add ‘mode’ parameter and honor it.
* tests/syscalls.scm ("lock-file + unlock-file"): New test.

Change-Id: I113fb4a8b35dd8782b9c0991574e39a4b4393333
2024-08-21 00:52:38 +02:00
Danny Milosavljevic
53e3619d92
import: pypi: make-pypi-sexp: Detect 'null description.
* guix/import/pypi.scm (make-pypi-sexp): Detect 'null description.

Change-Id: I8b2704852ecbd8de1bf7bf5598727e7a3a43932c
2024-08-17 13:23:57 +02:00
Christopher Baines
b4206a08ba
guix: tests: Increase timeout for test store connection.
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
2024-08-01 10:32:31 +01:00
Ludovic Courtès
9db34c41ac
build-system/meson: #:test-options can be a gexp.
* guix/build-system/meson.scm (meson-build, meson-cross-build): Accept
gexps for #:test-options.

Change-Id: I9cfec616f067a5c9928f65892e370f90f23f4352
2024-07-26 19:21:33 +02:00
Efraim Flashner
56395b12f6
graft: Only create directory when needed.
* guix/build/graft.scm (rewrite-directory)[rewrite-leaf]: Only create
the parent directories when they don't already exist.

Change-Id: I802aac4d6090ed07effddde3eb3195f64aca31d3
2024-07-23 20:26:59 +03:00
Efraim Flashner
c74401749a
graft: Perform grafts with guile-final.
* guix/build/graft.scm (rewrite-directory): Rewrite store directories in
individual files sequentially.
(exit-on-exception): Remove procedure.
* guix/packages.scm (guile-for-grafts): Switch to guile-final.

Change-Id: I50f7b23a3ceff8bb1495dc1f4bc772746147d924
2024-07-23 18:09:35 +03:00
Efraim Flashner
20c4e778a9
graft: Remove work-around for old guile.
* guix/build/graft.scm (mkdir-p*): Remove function.
(rewrite-directory): Switch from mkdir-p* to mkdir-p.

Change-Id: Ib6a80648d271c19093c05af84acb967e069ccc19
2024-07-23 17:54:53 +03:00
Simon Tournier
d007b64356
scripts: hash: Handle repository with different VCS folders.
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
2024-07-23 16:27:27 +02:00
Simon Tournier
ffdcef5f36
ci: Catch error for unreachable channel with substitutes.
* 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
2024-07-23 16:24:38 +02:00
Efraim Flashner
c885902f56
build-system/cargo: Use system zstd by default.
* guix/build/cargo-build-system.scm (configure): Add an environment
variable to use pkg-config to find the zstd library.

Change-Id: Id53296c4a18fffd8aa2f2b9e4d52d98ff3486293
2024-07-19 00:44:54 +03:00
Ludovic Courtès
e3dfed59d3
modules: ‘file-name->module-name’ strips leading “./”.
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
2024-07-18 17:31:19 +02:00
Ludovic Courtès
58e268c2e3
git: Remove untracked files from cached checkouts.
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
2024-07-18 17:31:19 +02:00
Ludovic Courtès
0553c44471
guix build: Take ‘--system’ into account together with ‘-S’.
* 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
2024-07-18 17:31:18 +02:00
Christopher Baines
f3e17f9ff1
inferior: Use the host built-in-builders with inferior.
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
2024-07-18 11:18:29 +01:00
Christopher Baines
d82ac48b07
guix: channels: Enable specifiying available builtin builders.
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
2024-07-18 11:18:29 +01:00
Christopher Baines
f002371767
guix: store: Enable specifying the builtin builders.
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
2024-07-18 11:18:25 +01:00
Christopher Baines
32eda73966
build-system: go: Properly handle when a target is unsupported.
* guix/build-system/go.scm (go-target): Properly handle when a target is
unsupported.

Change-Id: Ibc0becb8eb0a712d21116112c44e2bbbb707ddf4
2024-07-15 22:34:24 +01:00
Christopher Baines
e661121e39
build-system: meson: Use a more specific exception.
This is handled by (guix ui).

* guix/build-system/meson.scm (make-machine-alist): Use a more specific
exception.

Change-Id: I842ba63739fdefe04460e938c7bc8aa54ea57b96
2024-07-15 22:34:24 +01:00
Christopher Baines
b6afc69605
guix: packages: Add &unsupported-cross-compilation-target-error.
* 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
2024-07-15 22:34:24 +01:00
Christopher Baines
4b85db10b1
guix: packages: Add new &package-unsupported-target-error.
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
2024-07-15 22:34:22 +01:00
Nicolas Graves
e24d9a36f2
build-system/composer: Do not try to delete-duplicates.
* 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>
2024-07-12 11:06:10 -05:00
Lars Bilke
7893b32ef6
pack: Create /tmp in Apptainer images.
Related to <https://bugs.gnu.org/37161> and
<https://git.savannah.gnu.org/cgit/guix.git/commit/?id=7979a287f8eb84cbbfa44629951572408939a756>.

* guix/scripts/pack.scm (squashfs-image)[build]: Add /tmp to the set of
directories created.
* tests/pack.scm ("squashfs-image + localstatedir"): Check for /tmp.

Change-Id: I576aaa6ba8cb8478acf4c3144d492ae5caf411ca
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-07-10 16:00:36 +02:00
Dariqq
1ace18d351
import: github: Honor upstream-name property.
* 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>
2024-07-06 12:07:11 +02:00
Christopher Baines
5f1e4e4c02
self: Remove reference to source.
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
2024-07-02 10:19:52 +02:00
Igor Goryachev
b3c8285127
build-sysem/mix: Preserve code paths.
* guix/build/mix-build-system.scm (build): Preserve code paths.

Change-Id: Ia43e79385a536de98ae026893e1bda2a8416562c
Signed-off-by: Andrew Tropin <andrew@trop.in>
2024-07-02 11:54:04 +04:00
Richard Sent
69089674bb
import: go: Fix indentation in help message.
* guix/scripts/import/go.scm (show-help) <recursive>: Indent second line.

Change-Id: Iad096231e26ed4e0e1c584f92e43f2695a2d8682
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2024-07-01 21:57:13 +01:00
Ekaitz Zarraga
0df957eecc
build/go: Use trimpath go flag.
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>
2024-06-29 09:36:56 +01:00
Efraim Flashner
7e7e91b159
build/go: Don't use set!
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>
2024-06-29 09:36:56 +01:00
Lars-Dominik Braun
0bce74d458
gnu: Upgrade to Stackage 20.26.
* guix/import/stackage.scm (%default-lts-version): Upgrade to Stackage
20.26.
* gnu/packages/patches/ghc-aeson-encodeDouble.patch: New file.
* gnu/packages/patches/ghc-clock-realfrag.patch: New file.
* gnu/local.mk: Register them.
* gnu/packages/haskell-check.scm (ghc-tasty-hedgehog): Update.
(ghc-tasty-hspec): Update.
(ghc-tasty-expected-failure): Update.
(ghc-quickcheck-instances): Update.
(ghc-quickcheck-io): Update.
(ghc-hspec-contrib): Update.
* gnu/packages/haskell-crypto.scm (ghc-curve25519): Update.
(ghc-tls): Update.
* gnu/packages/haskell-web.scm (ghc-tagsoup): Update.
(ghc-http2): Update.
(ghc-wai-websockets): Update.
(ghc-aeson): Update.
(ghc-clientsession): Update.
(ghc-yesod-core): Update.
(ghc-yesod-persistent): Update.
(ghc-wai-cors): Update.
* gnu/packages/haskell-xyz.scm (ghc-abstract-par): Update.
(ghc-adjunctions): Update.
(ghc-aeson-diff): Update.
(ghc-base16-bytestring): Update.
(ghc-base-compat): Update.
(ghc-base-compat-batteries): Update.
(ghc-basement): Update.
(ghc-bencode): Update.
(ghc-bytestring-handle): Update.
(ghc-c2hs): Update.
(ghc-cassava-megaparsec): Update.
(ghc-cborg): Update.
(ghc-charset): Update.
(ghc-chasingbottoms): Update.
(ghc-clock): Update.
(ghc-cmark-gfm): Update.
(ghc-concurrent-extra): Update.
(ghc-concurrent-output): Update.
(ghc-conduit-extra): Update.
(ghc-constraints): Update.
(ghc-convertible): Update.
(ghc-csv): Update.
(ghc-data-accessor): Update.
(ghc-data-ordlist): Update.
(ghc-dense-linear-algebra): Update.
(ghc-diagrams-core): Update.
(ghc-diff): Update.
(ghc-dual-tree): Update.
(ghc-either): Update.
(ghc-errors): Update.
(ghc-esqueleto): Update.
(ghc-exactprint): Update.
(ghc-extensible-exceptions): Update.
(ghc-fail): Update.
(ghc-filepath-bytestring): Update.
(ghc-fingertree): Update.
(ghc-fmlist): Update.
(ghc-foldl): Update.
(ghc-free): Update.
(ghc-fsnotify): Update.
(ghc-generic-random): Update.
(ghc-genvalidity-property): Update.
(ghc-groups): Update.
(ghc-hackage-security): Update.
(ghc-half): Update.
(ghc-hashtables): Update.
(ghc-haskell-src): Update.
(ghc-haskell-src-exts-util): Update.
(ghc-hourglass): Update.
(ghc-hpack): Update.
(ghc-hslua): Update.
(ghc-hslua-module-system): Update.
(ghc-http-api-data): Update.
(ghc-ini): Update.
(ghc-inline-c): Update.
(ghc-inline-c-cpp): Update.
(ghc-interpolate): Update.
(ghc-intervals): Update.
(ghc-invariant): Update.
(ghc-io-streams): Update.
(ghc-ipynb): Update.
(ghc-kan-extensions): Update.
(ghc-lens): Update.
(ghc-libmpd): Update.
(ghc-libyaml): Update.
(ghc-lifted-async): Update.
(ghc-linear): Update.
(ghc-listlike): Update.
(ghc-logict): Update.
(ghc-lucid): Update.
(ghc-lzma-conduit): Update.
(ghc-magic): Update.
(ghc-microlens-ghc): Update.
(ghc-microlens-mtl): Update.
(ghc-microlens-platform): Update.
(ghc-missingh): Update.
(ghc-mmorph): Update.
(ghc-monad-control): Update.
(ghc-monad-logger): Update.
(ghc-monoid-extras): Update.
(ghc-murmur-hash): Update.
(ghc-ncurses): Update.
(ghc-network-info): Update.
(ghc-newtype-generics): Update.
(ghc-openglraw): Update.
(ghc-text-conversions): Update.
(ghc-text-icu): Update.
(ghc-text-short): Update.
(ghc-text-zipper): Update.
(ghc-parsers): Update.
(ghc-path): Update.
(ghc-peano): Update.
(ghc-persistent): Update.
(ghc-persistent-sqlite): Update.
(ghc-process-extras): Update.
(ghc-indexed-profunctors): Update.
(ghc-project-template): Update.
(ghc-psqueues): Update.
(ghc-random): Update.
(ghc-reducers): Update.
(ghc-refact): Update.
(ghc-regex-posix): Update.
(ghc-resourcet): Update.
(ghc-sdl): Update.
(ghc-sdl2-image): Update.
(ghc-sdl2-mixer): Update.
(ghc-sdl2-ttf): Update.
(ghc-sdl2-gfx): Update.
(ghc-semigroupoids): Update.
(ghc-semigroups): Update.
(ghc-shakespeare): Update.
(ghc-shelly): Update.
(ghc-simple-reflect): Update.
(ghc-size-based): Update.
(ghc-skylighting-format-latex): Update.
(ghc-skylighting-format-ansi): Update.
(ghc-skylighting): Update.
(ghc-sop-core): Update.
(ghc-split): Update.
(ghc-splitmix): Update.
(ghc-statevar): Update.
(ghc-statistics): Update.
(ghc-stm-conduit): Update.
(ghc-storable-complex): Update.
(ghc-storablevector): Update.
(ghc-svg-builder): Update.
(ghc-temporary-rc): Update.
(ghc-terminal-size): Update.
(ghc-text-manipulate): Update.
(ghc-th-abstraction): Update.
(ghc-th-expand-syns): Update.
(ghc-th-lift-instances): Update.
(ghc-th-orphans): Update.
(ghc-timezone-series): Update.
(ghc-timezone-olson): Update.
(ghc-tldr): Update.
(ghc-transformers-compat): Update.
(ghc-exception-transformers): Update.
(ghc-trifecta): Update.
(ghc-turtle): Update.
(ghc-unagi-chan): Update.
(ghc-unexceptionalio): Update.
(ghc-unicode-transforms): Update.
(ghc-unix-compat): Update.
(ghc-unix-time): Update.
(ghc-unliftio): Update.
(ghc-commutative-semigroups): Update.
(ghc-utf8-string): Update.
(ghc-void): Update.
(ghc-wl-pprint-text): Update.
(ghc-x11-xft): Update.
(ghc-xml): Update.
(ghc-xml-hamlet): Update.
(ghc-yaml): Update.
(ghc-zip-archive): Update.
(ghc-zlib): Update.
(ghc-zstd): Update.
(ghc-keys): Update.
(ghc-pointed): Update.
(ghc-lift-type): Update.
(ghc-unicode-collation): Update.
(ghc-citeproc): Update.
(ghc-commonmark): Update.
(ghc-commonmark-extensions): Update.
(ghc-genvalidity-hspec): Update.
(ghc-netlink): Update.
(ghc-doctest-driver-gen): Update.
(ghc-mysql): Update.
(ghc-persistent-qq): Update.
(ghc-persistent-mysql): Update.
(ghc-string-conversions): Update.
(ghc-postgresql-simple): Update.
(ghc-persistent-postgresql): Update.
(ghc-filtrable): Update.
(ghc-hsyaml-aeson): Update.
(ghc-singleton-bool): Update.
(ghc-git-lfs): Update.
(ghc-nothunks): Update.
(ghc-onetuple): Update.
(ghc-doctest-parallel): Update.
(ghc-ordered-containers): Update.
(ghc-hslua-marshalling): Update.
(ghc-gridtables): Update.
(ghc-should-not-typecheck): Update.
(ghc-servant-server): Update.
(ghc-recv): Update.
(ghc-glib): Update.
(ghc-pango): Update.
(ghc-monoidal-containers): Update.
(ghc-newtype): Update.
(ghc-random-shuffle): Update.
(ghc-ref-tf): Update.
* gnu/packages/irc.scm (glirc): Update.
* gnu/packages/purescript.scm (purescript): Update.
* gnu/packages/wm.scm (icewm): Update.
(ghc-xmobar): Update.

Change-Id: I26ef7c2ef06e3075eba3da21947f16708c437f98
2024-06-29 08:56:16 +02:00
Simon Tournier
bd908af0c6
swh: Specify 'extid_version' when looking up by external ID.
Reported in <https://gitlab.softwareheritage.org/swh/meta/-/issues/5093>.

* guix/swh.scm (swh-url): Don't add trailing slash when URL contains
parameters.
(lookup-external-id): Specify 'extid_version' to avoid SWH bug from
previous erroneous nar hash computations with the initial SWH deployment
of this feature.

Change-Id: Iea2a5256e0612dae95567907bb11edb92a50df73
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2024-06-26 23:56:56 +02:00
Christopher Baines
ffdbf1f11e
store: Refactor connect-to-daemon.
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
2024-06-26 15:10:02 +01:00
Christopher Baines
56770f7d59
Revert "guix: Run check-synopsis-style with other local checks."
The synopsis lint checker is network dependent.

This reverts commit 4f63b4b86d.

Signed-off-by: Christopher Baines <mail@cbaines.net>
2024-06-26 15:08:51 +01:00
Maxim Cournoyer
831001c581
gnu: patch: Update to latest commit [security fixes].
* gnu/packages/base.scm (patch): Rename to...
(patch/pinned): ... this.  Hide package.
(patch): New variable.
* gnu/packages/commencement.scm (patch-mesboot): Inherit from patch/pinned.
(patch-boot0): Likewise.
(%final-inputs): Replace patch with patch/pinned.
* gnu/packages/lisp.scm (cl-asdf): Likewise.
* guix/packages.scm (%standard-patch-inputs): Replace patch with patch/pinned.

Fixes: https://issues.guix.gnu.org/47144
Reported-by: Mark H Weaver <mhw@netris.org>
Change-Id: I54ae41b735f5ba0ebad30ebdfaabe0ccdc3f9873
2024-06-24 08:51:45 -04:00
Maxim Cournoyer
d37614bed1
build-system: qt: Fix default parallel-tests? value to #t.
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
2024-06-24 08:51:41 -04:00
Ludovic Courtès
7e00fb9f31
substitute: Don’t keep cache entries more than a few days.
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
2024-06-13 11:38:24 +02:00
Ludovic Courtès
bb73faea02
hg-download: Pass strings to ‘hg-fetch’.
Fixes a regression introduced in
275f279891.

* guix/hg-download.scm (hg-fetch-builder): Remove calls to
‘string->symbol’.

Change-Id: I2e049d1ecb8860b6f946ca51358aaba22bdc9e2e
2024-06-12 09:45:44 +02:00
Christopher Baines
0daa72e34d
git-download: Reduce builder duplication.
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
2024-06-11 11:33:43 +01:00
Christopher Baines
275f279891
hg-download: Reduce builder duplication.
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
2024-06-11 11:33:31 +01:00
Christopher Baines
ad8d386168
svn-download: Reduce svn-fetch builder duplication.
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
2024-06-11 11:33:22 +01:00
Christopher Baines
04ca393b38
svn-download: Reduce svn-multi-fetch builder duplication.
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
2024-06-11 11:33:05 +01:00
Efraim Flashner
e542108f13
transformations: Fix powerpc64le support.
* guix/transformations.scm (tuning-compiler): Adjust the wrapper script
when building for powerpc* architectures to pass the correct flags.

Change-Id: I9d809ac9b707eb8d6afa7b843c95bce29862a752
2024-06-11 12:39:44 +03:00
Richard Sent
3e87b207ce
file-systems: Add support for mounting CIFS file systems
* gnu/build/file-systems (canonicalize-device-name): Do not attempt to resolve
CIFS formatted device specifications.
(mount-file-systems): Add mount-cifs nested function.
* gnu/machine/ssh.scm (machine-check-file-system-availability): Skip checking
for CIFS availability, similar to NFS.
* guix/scripts/system.scm (check-file-system-availability): Likewise.

Change-Id: I182e290eba64bbe5d1332815eb93bb68c01e0c3c
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-06-04 12:08:34 +02:00
Herman Rimm
510ad5d93c
import: utils: End package descriptions with period.
* 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>
2024-06-03 22:58:53 +02:00
Herman Rimm
e62fd9004b
import: crate: Include a main verb in crate importer descriptions.
* guix/import/crate.scm (make-crate-sexp): Start description with
'This package provides '.
* tests/crate.scm: Set descriptions to "This package provides summary".

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: If0f47a68f986b9e878fd5caa3e365c5ad863089a
2024-06-03 22:58:53 +02:00
Herman Rimm
1fa2b64ded
import: crate: Beautify crate importer synopses.
* guix/import/crate.scm (make-crate-sexp): Use beautify-synopsis.

Change-Id: I4e30e043d34da7a3c355e098f155c0c75b619063
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-06-03 22:58:53 +02:00
Ludovic Courtès
e8ab4ccaa7
style: Fix conversion of ‘unquote-splicing’ by ‘-S arguments’.
* guix/scripts/style.scm (unquote->ungexp): Add missing comma for
‘ungexp-splicing’.
* tests/style.scm ("gexpify arguments, substitute-keyword-arguments +
unquote-splicing"): New test.

Change-Id: I17dcdd9b4812d54ddba1137e369360706b137bb4
2024-06-03 22:58:52 +02:00
gemmaro
368e58afcb
self: Use po4a instead of po4a-translate.
* 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>
2024-06-03 00:27:11 +02:00
Maxim Cournoyer
afacfa33ec
gnu: linux-libre: Enable Zstd compression of kernel modules.
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
2024-05-29 22:01:23 -04:00
Ludovic Courtès
5a7cb59648
deduplication: Detect holes and create sparse files.
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
2024-05-25 16:44:42 +02:00