summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* deduplication: Leave the store permissions unchanged.Ludovic Courtès2020-06-25
| | | | | | | Suggested by Caleb Ristvedt <caleb.ristvedt@cune.org>. * guix/store/deduplication.scm (call-with-writable-file): Call THUNK directly when FILE is (%store-directory).
* deduplication: Fix default value of #:store in 'deduplicate'.Ludovic Courtès2020-06-25
| | | | | * guix/store/deduplication.scm (deduplicate): Change #:store default value to (%store-directory).
* deduplication: Use 'dynamic-wind' when changing permissions of the parent.Ludovic Courtès2020-06-25
| | | | | | | | Suggested by Caleb Ristvedt <caleb.ristvedt@cune.org>. * guix/store/deduplication.scm (call-with-writable-file): New procedure. (with-writable-file): New macro. (replace-with-link): Use it.
* openpgp: Use Libgcrypt's crc24 implementation.Ludovic Courtès2020-06-23
| | | | | | | | This gives an 18% speedup on the wall-clock time of: guile -c '(use-modules (git) (guix git-authenticate)) (load-keyring-from-reference (repository-open ".") "keyring")' * guix/openpgp.scm (crc24): Rewrite by calling out to 'bytevector-hash'.
* self: Parallelize translation of the manual.Ludovic Courtès2020-06-23
| | | | | | | | The guix-translated-texinfo.drv execution time goes from 1mn42s with 1 core to 1mn8s with 4 cores. * guix/self.scm (translate-texi-manuals)[build]: Use 'n-par-for-each' instead of 'for-each' for translation.
* self: Move statements after definitions in translation derivation.Ludovic Courtès2020-06-23
| | | | | * guix/self.scm (translate-texi-manuals)[build]: Move statements after definitions.
* po: Micro-optimize 'read-po-file'.Ludovic Courtès2020-06-23
| | | | | * guix/build/po.scm (parse-tree->assoc): Use dot instead of ellipsis in 'match' clause to avoid repeated calls to 'list?'.
* po: Avoid regexps when interpreting '\n' sequences.Ludovic Courtès2020-06-23
| | | | | | | | | | | This reduces the execution time of: (call-with-input-file "po/doc/guix-manual.de.po" read-po-file) from 4.7s to 4.0s. * guix/build/po.scm (interpret-newline-escape): New procedure. (parse-tree->assoc): Use it instead of 'regexp-substitute/global'.
* self: Speed up Texinfo cross-reference translation.Ludovic Courtès2020-06-23
| | | | | | | | | | | Building guix-translated-texinfo.drv goes from 11mn to 1mn50s, most of which is taken by po4a. * guix/self.scm (translate-texi-manuals)[build](make-ref-regex): Remove. (canonicalize-whitespace): New procedure. (xref-regexp): New variable. (translate-cross-references): Rewrite to iterate over the cross-references rather than iterating over the msgids. Update caller.
* deduplicate: Avoid traversing directories twice.Ludovic Courtès2020-06-22
| | | | | | | | | | | | | Until now, we'd call (nar-sha256 file) unconditionally. Thus, if FILE was a directory, we would traverse it for no reason, and then call 'deduplicate' on FILE, which would again traverse it. This change also removes redundant (mkdir-p store) calls from the loop, and avoids 'lstat' calls by using 'scandir*'. * guix/store/deduplication.scm (deduplicate): Add named loop. Move 'mkdir-p' outside the loop. Use 'scandir*' instead of 'scandir'. Do not call 'nar-sha256' when FILE has type 'directory.
* compile: Build gnu/{packages,tests}/* with '-O1'.Ludovic Courtès2020-06-22
| | | | | * guix/build/compile.scm (optimization-options): Use '-O1' for the simple case.
* channels: 'authenticate-channel' doesn't check relation with intro commit.Ludovic Courtès2020-06-21
| | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/41908>. Reported by Jan Nieuwenhuizen <janneke@gnu.org>. The relation check imposed an extra restriction that was unnecessary: it's enough to authenticate the set difference between the closure of START-COMMIT and that of END-COMMIT. Any attempt to jump to an unrelated commit would lead to the authentication failure of one commit on the way. * guix/channels.scm (authenticate-channel): Remove extra 'commit-relation' check when (null? commits).
* git-authenticate: Ignore authenticated commit cache when it's not #o600.Ludovic Courtès2020-06-21
| | | | | * guix/git-authenticate.scm (previously-authenticated-commits): Stat PORT; return the empty list if it's no #o600 and change it to #o600.
* build-system/gnu: Cross builds properly handle #:allowed-references & co.Ludovic Courtès2020-06-20
| | | | | | | Fixes <https://bugs.gnu.org/41775>. * guix/build-system/gnu.scm (gnu-cross-build)[canonicalize-reference]: Pass TARGET and SYSTEM to 'package-cross-derivation'.
* tests: Actually run 'tests/guix-environment-container.sh'.Ludovic Courtès2020-06-20
| | | | | | | | | This test was skipped since the switch to Guile 3 because 'assert-container-features' would be inlined and thus accessing it with @@ would fail with an unbound-variable error. * guix/scripts/environment.scm (assert-container-features): Export. * tests/guix-environment-container.sh: Use single '@'.
* build-system/asdf: Add support for component-less systems.Pierre Neidhardt2020-06-18
| | | | | | | * guix/build/lisp-utils.scm (make-asd-file): Ensure lib directory exists and check if prebuilt bundle system was generated. (generate-system-definition): Add :class and :components only if prebuilt system was generated.
* profiles: 'linux-module-database' hooks gracefully handles module-less kernels.Ludovic Courtès2020-06-18
| | | | | | | | | | Fixes <https://bugs.gnu.org/41924>. * guix/profiles.scm (linux-module-database)[build]: Arrange so 'directory-entries' always returns a list. Add 'match' clause for the empty list. Co-authored-by: Ivan Kozlov <kanichos@yandex.ru>
* profiles: Reindent 'linux-module-database'.Ludovic Courtès2020-06-18
| | | | * guix/profiles.scm (linux-module-database): Reindent.
* nar: Use (guix i18n).Ludovic Courtès2020-06-18
| | | | * guix/nar.scm: Use (guix i18n) instead of (guix ui).
* nar: Avoid opening the database an additional time.Ludovic Courtès2020-06-18
| | | | | | * guix/nar.scm (finalize-store-file): Call 'register-items' and pass it DB. This avoids opening the database a second time and hopefully reduces contention on 'db.sqlite-shm'.
* database: 'register-items' takes an open database.Ludovic Courtès2020-06-18
| | | | | | | | | | | | * guix/store/database.scm (store-database-directory) (store-database-file): New procedures. (call-with-database): Add call to 'mkdir-p'. (register-items): Add 'db' parameter and remove #:state-directory and #:schema. (register-path): Use 'store-database-file' and 'with-database', and parameterize SQL-SCHEMA. * gnu/build/image.scm (register-closure): Likewise. * gnu/build/vm.scm (register-closure): Likewise. * guix/scripts/pack.scm (store-database)[build]: Likewise.
* build-system/gnu: Fix 'install' phase of 'gnu-dist'.Ludovic Courtès2020-06-18
| | | | | * guix/build/gnu-dist.scm (install-dist): Fix 2nd argument to 'for-each'.
* repl: Fix typo that would lead ~/.guile to be used when running scripts.Ludovic Courtès2020-06-18
| | | | | | | This is a followup to c924e541390f9595d819edc33c19d979917c15ec. * guix/scripts/repl.scm (guix-repl)[opts]: Set 'ignore-dot-guile?', with question mark.
* channels: Warn when pulling from a mirror.Ludovic Courtès2020-06-17
| | | | | | | | | * guix/channels.scm (<channel-metadata>)[url]: New field. (read-channel-metadata): Initialize it. (read-channel-metadata-from-source): Likewise. (channel-instance-primary-url): New procedure. (latest-channel-instances): Compare CHANNEL's URL against it. * doc/guix.texi (Channels)[Primary URL]: New subsection.
* build-system/gnu: Rename "make dist" phase to 'build-dist'.Ludovic Courtès2020-06-17
| | | | | * guix/build/gnu-dist.scm (%dist-phases): Add BUILD under the name 'build-dist'.
* build-system/gnu: Simplify 'dist-package'.Ludovic Courtès2020-06-17
| | | | | * guix/build-system/gnu.scm (dist-package): Use default keyword arguments in 'substitute-keyword-arguments'.
* build-system/gnu: Remove redundant 'unpack' phase from 'gnu-dist'.Ludovic Courtès2020-06-17
| | | | | | | | This has become redundant with the standard 'unpack' phase since 17919a58012c38052133ed029450fdb98d01fb5c. * guix/build/gnu-dist.scm (copy-source): Remove. (%dist-phases): Remove 'unpack' phase.
* build-system/gnu: Remove Hydra-specific code from 'gnu-dist'.Ludovic Courtès2020-06-17
| | | | | * guix/build/gnu-dist.scm (install-dist): Remove code for 'hydra-build-products'.
* build-system/gnu: Remove 'autoreconf' phase from 'gnu-dist'.Ludovic Courtès2020-06-17
| | | | | | | | This has been superseded by the 'bootstrap' phase added in 189be331acfda1c242a9c85fca8d2a0356742f48. * guix/build/gnu-dist.scm (autoreconf): Remove. (%dist-phases): Remove it.
* build-system/gnu: Adjust 'dist-package' to current 'autoconf-wrapper' API.Ludovic Courtès2020-06-17
| | | | | | This is a followup to 464f5447396fcec9b43f7eab71d5d42b522a157f. * guix/build-system/gnu.scm (dist-package): Do not call 'autoconf-wrapper'.
* profiles: Add comment at the top of 'manifest' file.Ludovic Courtès2020-06-17
| | | | | * guix/build/profiles.scm (build-profile): Add comment at the top of MANIFEST-FILE.
* time-machine: Add '--disable-authentication'.Ludovic Courtès2020-06-16
| | | | | | | | | * guix/inferior.scm (cached-channel-instance): Add #:authenticate? and pass it to 'latest-channel-instances'. * guix/scripts/time-machine.scm (show-help, %options): Add '--disable-authentication'. (%default-options): Add 'authenticate-channels?'. (guix-time-machine): Honor it.
* pull: Add '--disable-authentication'.Ludovic Courtès2020-06-16
| | | | | | | | | | * guix/channels.scm (latest-channel-instance): Add #:authenticate? and honor it. (latest-channel-instances): Likewise. * guix/scripts/pull.scm (%default-options): Add 'authenticate-channels?'. (show-help, %options): Add '--disable-authentication'. (guix-pull): Pass #:authenticate? to 'latest-channel-instances'. * doc/guix.texi (Invoking guix pull): Document it.
* channels: Automatically add introduction for the official 'guix' channel.Ludovic Courtès2020-06-16
| | | | | | | | | | This is useful when people run "guix time-machine -C channels.scm", where 'channels.scm' misses channel introductions. * guix/channels.scm (%default-channel-url): New variable. (%default-channels): Use it. (ensure-default-introduction): New procedure. (latest-channel-instance): Call it.
* channels: Make 'validate-pull' call right after clone/pull.Ludovic Courtès2020-06-16
| | | | | | | | | | | | | | This should come before patching, authentication, etc. * guix/channels.scm (latest-channel-instance): Add #:validate-pull parameter and honor it. Return a single value: the instance. (ensure-forward-channel-update): Change 'instance' parameter to 'commit' and adjust accordingly. (latest-channel-instances): Adjust to 'latest-channel-instance' changes. * guix/scripts/pull.scm (warn-about-backward-updates): Change 'instance' parameter to 'commit' and adjust accordingly. * tests/channels.scm ("latest-channel-instances #:validate-pull"): Likewise.
* channels: 'latest-channel-instance' authenticates Git checkouts.Ludovic Courtès2020-06-16
| | | | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/22883>. * guix/channels.scm (<channel>)[introduction]: New field. (<channel-introduction>): New record type. (%guix-channel-introduction): New variable. (%default-channels): Use it. (<channel-metadata>)[keyring-reference]: New field. (%default-keyring-reference): New variable. (read-channel-metadata, read-channel-metadata-from-source): Initialize the 'keyring-reference' field. (commit-short-id, verify-introductory-commit) (authenticate-channel): New procedures. (latest-channel-instance): Call 'authenticate-channel' when CHANNEL has an introduction. * tests/channels.scm (gpg+git-available?, commit-id-string): New procedures. ("authenticate-channel, wrong first commit signer"): ("authenticate-channel, .guix-authorizations"): New tests. * doc/guix.texi (Invoking guix pull): Mention authentication.
* tests: Move OpenPGP helpers to (guix tests gnupg).Ludovic Courtès2020-06-16
| | | | | | | | * tests/git-authenticate.scm (key-id): Remove. (%ed25519-public-key-file, %ed25519-secret-key-file) (%ed25519bis-public-key-file, %ed25519bis-secret-key-file) (read-openpgp-packet, key-fingerprint): Move to... * guix/tests/gnupg.scm: ... here.
* git-authenticate: 'authenticate-commits' takes a #:keyring parameter.Ludovic Courtès2020-06-16
| | | | | * guix/git-authenticate.scm (authenticate-commits): Add #:keyring parameter.
* git-authenticate: Cache takes a key parameter.Ludovic Courtès2020-06-16
| | | | | | | | * guix/git-authenticate.scm (authenticated-commit-cache-file) (cache-authenticated-commit, previously-authenticated-commits): Add 'key' parameter and honor it. * build-aux/git-authenticate.scm (git-authenticate): Pass "channels/guix" as the key.
* build-system: cmake: Add substitutable keyword.Efraim Flashner2020-06-16
| | | | | * guix/build-system/cmake.scm (cmake-build, cmake-cross-build): Add substitutable keyword.
* pack: Add zstd compressor.Tobias Geerinckx-Rice2020-06-16
| | | | | * guix/scripts/pack.scm (%compressors): Add zstd. * doc/guix.texi (Invoking guix pack): Document it.
* ui: Use package-description-string.Arun Isaac2020-06-15
| | | | | * guix/ui.scm (package->recutils): Use package-description-string instead of package-description and P_.
* ui: Do not translate package synopsis a second time.Arun Isaac2020-06-15
| | | | | * guix/ui.scm (package->recutils): package-synopsis-string already returns a translated string. Do not attempt to translate it again.
* ui: Cut off search early if any regexp does not match.Arun Isaac2020-06-15
| | | | | * guix/ui.scm (relevance): When one of the regexps does not match, cut off early and return 0. Do not try to match the remaining regexps.
* ci: Add build-products id field and export accessors.Mathieu Othacehe2020-06-15
| | | | | | | * guix/ci.scm (build-product?, build-product-id, build-product-type, build-product-file-size, build-product-path): Export them, [id]: new field.
* ci: Add status option to "latest-builds".Mathieu Othacehe2020-06-15
| | | | * guix/ci.scm (latest-builds): Add "status" option.
* download: Remove usa-mirror.go-parts.com mirror.Tobias Geerinckx-Rice2020-06-15
| | | | | | It incorrectly redirects 404s (at least) to the commercial home page. * guix/download.scm (%mirrors): Remove usa-mirror.go-parts.com URLs.
* ci: Fix buildproducts reading.Mathieu Othacehe2020-06-15
| | | | | | | This is a follow-up of 4e05bbb093a17145fcabd48ea1d2c9cd7559084d. * guix/ci.scm (<build>)[products]: Test for vector type, as products can be "null".
* ci: Add job option to "latest-builds".Mathieu Othacehe2020-06-15
| | | | * guix/ci.scm (latest-builds): Add "job" option.
* ci: Add build products support.Mathieu Othacehe2020-06-15
| | | | | * guix/ci.scm (<build-product>): New json mapping, (<build)[products]: new field.