summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2024-06-04file-systems: Add support for mounting CIFS file systemsRichard Sent
* 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-03import: utils: End package descriptions with period.Herman Rimm
* 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-03import: crate: Include a main verb in crate importer descriptions.Herman Rimm
* 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-03import: crate: Beautify crate importer synopses.Herman Rimm
* guix/import/crate.scm (make-crate-sexp): Use beautify-synopsis. Change-Id: I4e30e043d34da7a3c355e098f155c0c75b619063 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-06-03style: Fix conversion of ‘unquote-splicing’ by ‘-S arguments’.Ludovic Courtès
* 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-03self: Use po4a instead of po4a-translate.gemmaro
* 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-05-29gnu: linux-libre: Enable Zstd compression of kernel modules.Maxim Cournoyer
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-25deduplication: Detect holes and create sparse files.Ludovic Courtès
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-25environment: Fix type error with ‘-C’ when ‘getpwuid’ fails.Ludovic Courtès
Fixes a bug with ‘guix shell -C …’ in cases where ‘getpwuid’ returns #f (for example because nscd isn’t running) and ‘user’ is #f. * guix/scripts/environment.scm (launch-environment/container): Use ‘name’ when building the ‘directory’ value, not ‘user’ since it can be #f. Change-Id: I5da807d982a1edbb4122ac29b5a1e5fc4b0ce1b7
2024-05-22import/elpa: Add proper file-name to origin.Nicolas Graves via Guix-patches via
This avoids the lint "the source file name should contain the package name" with generated packages. Change-Id: I61c81203d9f3cdd035e2b64a4c7a8d86d1f3dd50 Signed-off-by: Zheng Junjie <zhengjunjie@iscas.ac.cn>
2024-05-19import: Add binary npm importer.Jelle Licht
* guix/scripts/import.scm: (importers): Add "npm-binary". * doc/guix.texi (Invoking guix import): Document npm-binary importer. * guix/import/npm-binary.scm: New file. * guix/scripts/import/npm-binary.scm: New file. * tests/npm-binary.scm: New file. * Makefile.am: Add them. Co-authored-by: Timothy Sample <samplet@ngyro.com> Co-authored-by: Lars-Dominik Braun <lars@6xq.net> Change-Id: I98a45068cf5b9c42790664cc743feaa7ac76f807
2024-05-13store: Add with-store/non-blocking.Christopher Baines
For some applications, it's important to establish a non-blocking connection rather than just making the socket non-blocking after the connection is established. This is because there is I/O on the socket that will block during the handshake. I've noticed this blocking during the handshake causing issues in the build coordinator for example. This commit adds a new with-store variant to avoid changing the behaviour of with-store/open-connection to ensure that this change can't break anything that depends on the blocking nature of the socket. * guix/store.scm (open-unix-domain-socket, open-inet-socket): Take #:non-blocking? and use SOCK_NONBLOCK when calling socket if appropriate. (connect-to-daemon, open-connection, call-with-store): Take #:non-blocking? and pass it on. (with-store/non-blocking): New syntax rule. * .dir-locals.el (scheme-mode): Add entry for with-store/non-blocking. Change-Id: I8225762b78448bc1f7b698c8de5d736e13f577bf
2024-05-13Use po4a-minimal for guix.Christopher Baines
As this avoids the indirect dependency on nss, which has a testsuite that takes a long time to run. * gnu/packages/package-management.scm (guix)[native-inputs]: Use po4a-minimal. * guix/self.scm (%packages, translate-texi-manuals): Use po4a-minimal. Change-Id: Iac7555cc850c1618d3d54f1b290faa4f9cfb4f8a
2024-05-13guix: channels: Handle single case with authenticating message.Rostislav Svoboda
* guix/channels.scm (authenticate-channel): Handle single case with authenticating message. Change-Id: I7759607f37405e6d3bd4b7f5958fd11d908db204 Reviewed-by: Dale Mellor <guix-devel-0brg6a@rdmp.org> Signed-off-by: Christopher Baines <mail@cbaines.net>
2024-05-09import/cran: Use CRAN mirrors.Ricardo Wurmus
* guix/import/cran.scm (%cran-url): Use mirror URL instead of primary project domain name. Change-Id: I23a51147d785d6cb645f953ca5ce0ff72f8bd367
2024-05-08guix: Update Bioconductor version to 3.19.Ricardo Wurmus
* guix/build-system/r.scm (bioconductor-uri): Use 3.19 URL. * guix/import/cran.scm (%bioconductor-version): Set to 3.19. Change-Id: I7a2c4dfcdb2c4cdfef581f823d87e73acc163549
2024-05-05packages: ‘sanitize-inputs’ does not add labels when unnecessary.Ludovic Courtès
Fixes a bug introduced in 402d0a9b9d290a2e3c549932c8d7262622c58ce1 whereby labels would be added in cases like: (inputs (list `("label" ,whatever))) This idiom is found for example in the ‘nmon’ package. * guix/packages.scm (add-input-labels): Call ‘maybe-add-input-labels’ instead of (map add-input-label …). Change-Id: I3e86d4607f19482a4e461ef8e7a20cde2a41ead7
2024-05-04packages: Reduce code bloat due to list allocation in input fields.Ludovic Courtès
* guix/packages.scm (add-input-labels): New procedure. (sanitize-inputs): Add case for (list …). Change-Id: Ice8241508ded51efd38867b97ca19c262b8c4363
2024-05-04packages: ‘define-public’ replacement calls ‘module-export!’ directly.Ludovic Courtès
This reduces code bloat and loading overhead for package modules, which use ‘define-public’ extensively. * guix/packages.scm (define-public*): Use ‘define’ followed by ‘module-export!’ directly instead of ‘define-public’. Change-Id: I7f56d46b391c1e3eeeb0b9a08a9d34b5de341245
2024-05-04records: Do not inline the constructor.Ludovic Courtès
Struct initialization uses one instruction per field, which contributes to code bloat in the case of package modules. With this change, the ‘.rtl-text’ section of ‘gnu/packages/tex.go’ goes from 7,334,508 B to 6,356,592 B (-13%; -7% on the whole file size), which alone is still larger than the source file (4,2 MB). * guix/records.scm (make-syntactic-constructor)[record-inheritance]: Use CTOR instead of ‘make-struct/no-tail’. Pass ABI-COOKIE as the first argument to CTOR. (define-record-type*): Define CTOR-PROCEDURE and pass it to ‘make-syntactic-constructor’. Change-Id: Ifd7b4e884e9fbf21c43fb4c3ad963126ef5cb476
2024-05-04packages: Reduce bloat induced by ‘sanitize-inputs’.Ludovic Courtès
At -O1, peval does the bulk of the optimization work and it cannot reduce things like (null? (list 1 2)), unlike what happens in CPS at -O2. Thus, reduce the part of ‘sanitize-inputs’ that’s inlined. * guix/packages.scm (maybe-add-input-labels): New procedure. (sanitize-inputs): Turn into a macro; use ‘maybe-add-input-labels’. Change-Id: Id2283bb5a2f5d714722200bdcfe0b0bfa606923f
2024-05-04records: Do not inline throws for ABI mismatches.Ludovic Courtès
* guix/records.scm (record-abi-mismatch-error): New procedure. (abi-check): Use it. Change-Id: I49936599716e117b8fbf26fb9d8f462bbbb8e88b
2024-05-01git authenticate: Install pre-push and post-checkout hooks.Ludovic Courtès
* guix/scripts/git/authenticate.scm (install-hooks): New procedure. (guix-git-authenticate): Use it. * doc/guix.texi (Invoking guix git authenticate): Document it. Change-Id: I4464a33193186e85b476a12740e54412bd58429c
2024-05-01git authenticate: Print something upon success.Ludovic Courtès
Until now the command would be silent and exit with 0. * guix/scripts/git/authenticate.scm (guix-git-authenticate): Print something upon success. Change-Id: I08d086c35df6ac74ee847df0479660293c68987d
2024-05-01git authenticate: Discover the repository.Ludovic Courtès
This allows one to run ‘guix git authenticate’ from a sub-directory of the checkout. * guix/scripts/git/authenticate.scm (%default-options): Remove ‘directory’ key. (guix-git-authenticate): Use ‘repository-discover’ when ‘directory’ option is missing. Change-Id: Ifada00d559254971ed7eeb8c0a8d4ae74ff3defc
2024-05-01git authenticate: Record introduction and keyring in ‘.git/config’.Ludovic Courtès
* guix/scripts/git/authenticate.scm (%default-options): Remove ‘keyring-reference’. (config-value, configured-introduction, configured-keyring-reference) (configured?, record-configuration, current-branch): New procedures. (guix-git-authenticate)[missing-arguments]: New procedure. Use ‘configured-introduction’ when zero arguments are given. Use ‘configured-keyring-reference’ when ‘-k’ is not passed. Add call to ‘record-configuration’. * doc/guix.texi (Invoking guix git authenticate): Document it. Change-Id: I66e111a83f50407b52da71662629947f83a78bbc
2024-05-01svn-download: Add dependency on tar+gzip for SWH retrieval.Ludovic Courtès
Fixes a bug whereby ‘swh-download-directory-by-nar-hash’ would fail due to ‘tar’ not being found in $PATH: $ GUIX_DOWNLOAD_METHODS=swh guix build -S texlive-geometry --check In execvp of tar: No such file or directory SWH: found directory with nar-sha256 hash 217e1c8d33aa6fd063f205453a946509b059b85fa7e8d32b7e80054d5e6e5c26 at 'swh:1:dir:ccb56476fb36b2ba0298e57f2b2e69c735ac0a2f' […] * guix/svn-download.scm (svn-fetch)[tar+gzip]: New variable. [build]: Use it. (svn-multi-fetch): Likewise. Change-Id: I37ba9824a5feb6d38f85743519cbd2b2c3e1a9e8
2024-04-29import: beautify-description: Fix ". ." case.Nicolas Graves
* guix/import/utils.scm (beautify-description): Ensure the matched string pre is long enough not to fail. Change-Id: I3172d9a41350b98222cd9ab758487485f26650b3 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-04-29pack: ‘-R’ (once) does not include fakechroot fallback.Ludovic Courtès
Previously, ‘guix pack -R’ would build a wrapper containing both the “userns” and “fakechroot” engines, instead of providing nothing but the “userns” engine as the manual says. This patch fixes it. * guix/scripts/pack.scm (wrapped-package): Add #:fakechroot? [build]: When FAKECHROOT? is false, ‘elf-loader-compile-flags’ always returns '(). Change-Id: Ic75cc8c36bf0a3881f299b274d78bd9fc2d4e2bb
2024-04-28publish: Catch all compression errors.Ludovic Courtès
* guix/scripts/publish.scm (swallow-zlib-error): Remove. (exception-with-kind-and-args?): New variable. (swallow-compression-error): New macro. (http-write): Use it instead of ‘swallow-zlib-error’. Change-Id: I835a1eddd9686741d48365ed37f82b1e1d6f6bdd
2024-04-17guix: Add xtensa-ath9k-elf platform.Jean-Pierre De Jesus DIAZ
* Makefile.am (MODULES): Add guix/platforms/xtensa.scm. * guix/platforms/xtensa.scm (xtensa-ath9k-elf): New variable. * doc/guix.texi: Add xtensa-ath9k-elf documentation. Change-Id: I51eef245142ed58613340c16d4bf7266e6bf6adb Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-04-17import: github: Recognize more URLs.Giacomo Leidi
Fixes <https://issues.guix.gnu.org/66396>. This allows more packages to be refreshed, such as launchmon, love, retux, preseq, edgar, antlr3, and runc. * guix/import/github.scm (updated-github-url)[updated-url]: Add additional heuristics to Github url updater. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Change-Id: I6409b3f61872a954f53480afd63b307d16d0b9c0
2024-04-15Autoload (gcrypt hash).Ludovic Courtès
* guix/derivations.scm: Autoload (guix utils) and (gcrypt hash). * guix/git.scm, guix/store.scm: Autoload (gcrypt hash). Change-Id: I6145231d41c61f2d8c36e28f29e91074910bdd15
2024-04-15Autoload (guix build syscalls).Ludovic Courtès
* guix/discovery.scm, guix/git.scm, guix/nar.scm, guix/scripts.scm, guix/scripts/build.scm: Autoload (guix build syscalls). * guix/packages.scm: Autoload (guix build utils). Change-Id: Ia7703b5f46e55fbfadff63b13c35bfe097ce2220
2024-04-15ui: Delay use of (guix build syscalls).Ludovic Courtès
This ensures (guix build syscalls) is loaded only when needed. * guix/ui.scm (%text-width): Unconditionally alias ‘*line-width*’. Remove initialization. <top level>: Remove code for Guile < 2.2.7. (package->recutils): Change default #:width to (terminal-columns). Change-Id: I990a1b5b0f20a6243e47e314d1d3d4f8298b7151
2024-04-15guix: Delay loading of (gnutls).Ludovic Courtès
(web …) modules pull in (gnutls) indirectly. Arrange to load them lazily, thereby reducing I/O and allocations when GnuTLS is not needed such as when running ‘guix describe’ or ‘guix shell’ on a cache hit. * guix/download.scm: Autoload (web uri). * guix/scripts/describe.scm: Likewise. * guix/store.scm: Likewise. (%default-substitute-urls): Remove ‘resolve-interface’ call and use https URLs unconditionally. Change-Id: Ide470c556a14866e8740966d25821df487a79859
2024-04-15utils: Don’t re-export ‘call-with-temporary-output-file’.Ludovic Courtès
* guix/utils.scm: Remove re-export of ‘call-with-temporary-output-file’. Autoload a number of modules. * guix/download.scm, guix/import/hackage.scm, guix/import/hexpm.scm, guix/import/opam.scm, guix/import/pypi.scm, tests/cpio.scm, tests/egg.scm, tests/opam.scm, tests/publish.scm, tests/store-database.scm, tests/utils.scm: Adjust imports accordingly. Change-Id: I3f5e94631397996a30be2ea4ff8b50a3371e8ee7
2024-04-15guix system: Autoload some more.Ludovic Courtès
* guix/scripts/system.scm: Autoload more modules. Change-Id: I665857109bbfd1e3755135daacc01affcb3eb2eb
2024-04-15channels: Autoload (git …) modules.Ludovic Courtès
Autoloading Guile-Git is important in cases where (guix channels) is used for little more than the <channel> definition. This is the case, for example, of ‘guix describe’ or ‘guix shell’. This reduces from 177 to 121 the number of .go files loaded when running: ./pre-inst-env strace -e openat -o /tmp/log.strace \ guix describe -p /var/guix/profiles/per-user/$USER/current-guix grep 'openat.*\.go.* = [0-9]' < /tmp/log.strace |wc -l Likewise, it reduces the max RSS (as measured by ‘time -f %M guix describe -p …’) from 54 to 37 MiB. * guix/channels.scm: Autoload (git …) modules. Change-Id: Ia58a99c865bf0f6fe461a1e71390d075e760f8d6
2024-04-15git: Add ‘tag->commit’ and use it in (guix channels).Ludovic Courtès
* guix/git.scm (tag->commit): New procedure, taken from… (resolve-reference): … here. Use it in the ‘tag’ case. * guix/channels.scm (resolve-channel-news-entry-tag): Use ‘tag->commit’ instead of custom code. Change-Id: I46ea387345dc1b695ce0702991a52d0cde29e2f0
2024-04-15channels: Move ‘commit-short-id’ to (guix git).Ludovic Courtès
* guix/channels.scm (commit-short-id): Move to… * guix/git.scm (commit-short-id): … here. Change-Id: If4b34b1d82b1aa5068d157f26e57e8aecc967061
2024-04-15git: Add ‘repository-info’ and use it in (guix channels).Ludovic Courtès
* guix/git.scm (repository-info): New procedure. * guix/channels.scm (repository->guix-channel): Use it instead of local code. Change-Id: I74c758c73a22e16031571ca4271cc9cab0492f6e
2024-04-15channels: Use SRFI-71 instead of SRFI-11.Ludovic Courtès
* guix/channels.scm (latest-channel-instance): Use SRFI-71. Change-Id: I73531c98b3034e228006ed91518cc7bfedc784fd
2024-04-08gexp: Add #:guile parameter to ‘gexp->file’ and ‘scheme-file’.Ludovic Courtès
This brings ‘gexp->file’ in line with its documentation and mirrors what’s done for ‘gexp->script’ and ‘program-file’. Fixes <https://issues.guix.gnu.org/69401>. * guix/gexp.scm (gexp->file): Add #:guile, as was already documented. (<scheme-file>)[guile]: New field. (scheme-file): Add #:guile. (scheme-file-compiler): Honor ‘guile’ field. * tests/gexp.scm ("gexp->file") ("gexp->file + file-append", "gexp->file + #:splice?") ("gexp->file, cross-compilation") ("gexp->file, cross-compilation with default target") Add #:guile to ‘gexp->file’ calls. ("gexp-modules deletes duplicates") ("gexp->derivation & with-imported-module & computed module") ("gexp->derivation & with-extensions", "scheme-file"): Likewise for ‘scheme-file’ calls. Change-Id: I47536063d5e411e561ec321e535267e92dd06044 Reported-by: Efraim Flashner <efraim@flashner.co.il> Change-Id: I58d653c7fbe65c665bafcbd332ac9b264ddeab64
2024-04-08reconfigure: /run/current-system points to generation.Ludovic Courtès
* guix/scripts/system/reconfigure.scm (switch-system-program): Set ‘GUIX_NEW_SYSTEM’ to GENERATION rather than OS, for consistency with what ‘boot-system’ does. * gnu/tests/reconfigure.scm (run-switch-to-system-test) ["script activated the new generation"]: Adjust accordingly. Change-Id: I57b693606a41b8c952df32bbdc2b9120c6dbfd6a
2024-04-07gnu: open-ssh-session: Don’t require public key.Ian Eure
Public keys aren’t required for client connections, and this binding is unused. The behavior of assuming a ".pub"-suffixed file exists in the same directory as the secret key is undocumented and surprising. * guix/scripts/offload.scm (open-ssh-session): Delete `public' binding. Signed-off-by: Christopher Baines <mail@cbaines.net> Change-Id: I9b532be2abe68dae0323e4ef6e1ceab1e5603359
2024-04-07guix: nar: Update path-id to valid-path-id.Christopher Baines
To match the change in (guix store database). * guix/nar.scm (finalize-store-file): Update path-id to valid-path-id. Change-Id: I69255c7acc1ea4e4855a4621bfcec54f595dd24d
2024-04-07store: database: Use correct function name in assertion.Wojtek Kosior
* guix/store/database.scm (register-valid-path): Replace "sqlite-register" with "register-valid-path" as argument to `assert-integer'. Change-Id: Id93687e90d0a806d715006ca0b2498a1d10cfba6 Signed-off-by: Christopher Baines <mail@cbaines.net>
2024-04-07scripts: system: Rename `sqlite-register'.Wojtek Kosior
* guix/scripts/system.scm (define-module): #:autoload `register-valid-path' instead of `sqlite-register'. (copy-item): Call it with the new name. Change-Id: I24f71f822a5f400a47adee43f61184a4fbcb9741 Signed-off-by: Christopher Baines <mail@cbaines.net>
2024-04-06build: qt-utils: Use QML_IMPORT_PATH2 for Qt 5 (fixup).Zheng Junjie
This follows a499d1772df63784e7df1767e58ca1dd5a4b1124 ("build: qt-utils: Use QML_IMPORT_PATH for Qt 6."). * guix/build/qt-utils.scm (variables-for-wrapping): Use QML_IMPORT_PATH2 when the Qt major version is <= 6, QML_IMPORT_PATH otherwise. Change-Id: I2dd1d426aef117105708cc4004078deaa28c15cd Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>