This distinguishes them from manually added ones. When committing changes,
these ‘TODO REVIEW’ comments should be addressed and removed first.
If you're working with Rust packaging, please update your local Guix to this
commit to apply the change.
* guix/import/crate.scm (cargo-lock->expressions): Generate comments with
‘TODO REVIEW:’ prefix.
* tests/import/crate.scm ("crate-lockfile-import"): Don't check the exact
comment string.
* doc/guix-cookbook.texi (Common Workflow for Rust Packaging),
* gnu/packages/rust-crates.scm: Adjust accordingly.
Change-Id: I76b914b49be46d04cc61b101b6bc9e31cadb7f07
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Merges: #4567
Previously, when failing to load a signing key, ‘guix authenticate’ would
print a backtrace and exit with a non-zero code. That, in turn, would lead
the guix-daemon child process to crash with:
nix/libutil/serialise.cc:15: virtual nix::BufferedSink::~BufferedSink(): Assertion `!bufPos' failed.
This patch fixes it by reporting the error to the daemon as was intended.
* guix/scripts/authenticate.scm (guix-authenticate): Arrange to call
‘load-key-pair’ from within ‘with-reply’.
* tests/guix-authenticate.sh: Test it.
Fixes: guix/guix#4928
Reported-by: Rutherther <rutherther@ditigal.xyz>
Change-Id: I8654ad6fdfbe18c55e1e85647d0c49f408d0574a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #4961
Fixes a regression introduced in d66e9698a1.
* tests/import/pypi.scm ("pypi->guix-package, no wheel")
("pypi->guix-package, no wheel, no requires.txt, but pyproject.toml")
("pypi->guix-package, no wheel, but requires.txt and pyproject.toml")
("pypi->guix-package, no requires.txt, but wheel.")
("pypi->guix-package, no usable requirement file, no wheel.")
("pypi->guix-package, package name contains \"-\" followed by digits"): Change
‘home-page’ to ‘https://’.
Fixes: guix/guix#4646
Reported-by: Rutherther <rutherther@ditigal.xyz>
Change-Id: Id3ddac832d9688f2eb8a055c13f62a9642a20766
https://codeberg.org/guix/guix/issues/3925 raised the inabilityy of the
subordinate IDs service of handling externally managed sub{u,g}id file
entries. This patch relaxes the checks in place for existing ranges,
by allowing subid-range records lower than %subordinate-id-min, leaving
all the space from subid 0 to %subordinate-id-min - 1 to external
users. Generic ranges are still allocated within %subordinate-id-min and
%subordinate-id-max.
* gnu/build/accounts.scm (<unused-id-range>)[min]: Change default value
to 0, allowing subid-ranges with a start lesser than
%subordinate-id-min.
(allocate-generic-range): Allocate generic ranges starting from
%subordinate-id-min, leaving ranges starting before %subordinate-id-min.
(allocate-specific-range): Move bounds check to...
(allocate-subids): ...here. Now bound validation is applied only to user
provided ranges.
* tests/accounts.scm: Test new behavior.
Fixes: guix/guix#3925
Change-Id: Id923b122c97a20f148684f5fb144fd9422810612
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #4235
When running `make dist`, it is checked that there are no store paths in
the resulting dist folder. Specifically through the
`assert-no-store-file-names` target.
I think that this target makes sense and this commit has workarounds for
currently embedded store paths. Two of those are comments. Maybe the
target could be changed to ignore those in the future. But the hash is
not important, so just replace it with <hash>.
As for crate tests, I decided to split the string instead of removing
it, although it seems to me it might safely be removed, but I am not
completely sure about the intent here.
* gnu/packages/astronomy.scm (python-jplephem-2.22): Remove store hash
from comment.
* gnu/packages/golang-build.scm (golang-org-x-exp): Likewise.
* tests/import/crate.scm (temp-file): Split store path's hash.
Change-Id: I709f29a9dfab626d194c41d12e53e0380a148217
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
* gnu/packages/ssh.scm (lsh): Delete and redefine as deprecated and
replaced by openssh.
* gnu/packages/patches/lsh-fix-x11-forwarding.patch: Remove file.
* gnu/packages/ssh.scm (dist_patch_DATA): Unregister file.
* tests/guix-gc.sh: Use hello instead of lsh.
Change-Id: Ic2a31dc79a777f9b6569e220620ecfc14fb75722
Quoted keys are treated by the specification like ordinary strings,
so escape codes must be handled as well.
* guix/build/toml.scm (eval-value): Move string escape handling…
(eval-value): …here.
(eval-toml-file): Un-escape quoted keys.
* tests/toml.scm ("parse-toml: Quoted keys with escapes"): New testcase.
Fixes: guix/guix#2414
Change-Id: I612e415cc93207bbdd18b6ec8279255fee16670a
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
* guix/gnu-maintenance.scm (package-release-file?): New procedure.
(tarball->version): Add optional parameter and honor it.
(import-html-release): Use ‘package-release-file?’ and pass second argument to
‘tarball->version’.
* tests/gnu-maintenance.scm ("latest-html-release, 'release-file-regexp' property")
("latest-html-release, invalid 'release-file-regexp' property"): New tests.
* doc/guix.texi (Invoking guix refresh): Document it.
Change-Id: Ia9328418fdd2faf118e4ec9d5fbde4a279e100ed
Reviewed-by: Maxim Cournoyer <maxim@guixotic.coop>
* tests/style.scm ("url-fetch->git-fetch, preserved field"):
The 9th line of origin, where the patches field is located,
was never read. (broken test since a1b0fde434)
This fixes a regression introduced with commit 7752580a33 ("guix: lint: Check
end of sentences for a period.").
* guix/lint.scm (check-description-style): Do not emit warning when the
description is empty or ends with trailing whitespace.
* tests/lint.scm ("description: invalid Texinfo markup")
("description: may start with texinfo markup")
("description: may not contain trademark signs: ™")
("description: may not contain trademark signs: ®"): Add period.
Fixes: #4222
Change-Id: Ib10bcf324cb55b39a88c0c67875a40a59c1d4c18
* guix/lint.scm (check-description-style): Check that sentences end with a period.
Change-Id: Ic10161f8093351dce440e19802a71f03bc849638
Signed-off-by: jgart <jgart@dismail.de>
The new Rust packaging model moves sources to inputs and there'll be
possiblity to have sources in propagated-inputs as well.
* guix/profiles.scm (package->manifest-entry): Filter packages.
* tests/profiles.scm ("package->manifest-entry, origin in propagated inputs"):
New test.
Change-Id: Id5b9ceb693a35760289b04cd9b8f208b4cbf2e35
The `file->bytevector' new procedure uses a memory mapped bytevector, so
parsing the ELF file reads only the sections needed, not the whole file.
* guix/scripts/pack.scm (wrapped-package): Use file->bytevector.
* guix/build/gremlin.scm (file-dynamic-info): Likewise.
(validate-needed-in-runpath): Likewise.
(strip-runpath): Likewise, and write to bytevector directly, avoiding a port.
(set-file-runpath): Likewise.
* tests/gremlin.scm (read-elf): Delete procedure.
("elf-dynamic-info-needed, executable"): Use file-dynamic-info.
("strip-runpath"): Likewise.
("elf-dynamic-info-soname"): Likewise.
guix/build/debug-link.scm (set-debuglink-crc): Use file->bytevector.
* tests/debug-link.scm (read-elf): Delete procedure.
("elf-debuglink"): Rename to...
("elf-debuglink, no .gnu_debuglink section"): ... this.
("elf-debuglink", "set-debuglink-crc"): Use external store, and adjust to use
file->bytevector.
* gnu/packages/gnuzilla.scm (icecat-minimal) [#:phases]
{build-sandbox-whitelist}: Use `file-runpath'.
* gnu/packages/librewolf.scm (librewolf): Likewise.
Fixes: <https://issues.guix.gnu.org/59365>
Fixes: #1262
Change-Id: I43b77ed0cdc38994ea89d3d401e0d136aa6b187a
This procedure tries to generate a <origin> sexp from a single url and
version.
* guix/import/utils.scm (generate-git-source): Add procedure.
* tests/import/utils.scm: Add tests for generate-git-source.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This function was missing one argument.
* guix/import/utils.scm (default-git-error): Add and document location
argument.
* tests/import/utils.scm: Add tests for default-git-error.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Ignore "guile: warning: failed to install locale" lines
in the examined build log file. They are irrelevant for
this particular test and cause unexpected errors.
This commit contains the following changes:
M tests/guix-daemon.sh
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Rigid build time limits let some unit tests fail on slow hardware.
Set default timeout to 5 minutes and make it configurable via
`GUIX_TESTS_BUILD_TIMEOUT` environment variable.
* guix/tests.scm (%tests-build-timeout): New variable.
(open-connection-for-tests, call-with-external-store): Use it.
* tests/guix-environment-container.sh, tests/guix-home.sh,
tests/guix-pack-localstatedir.sh, tests/guix-pack-relocatable.sh: Use it to
define ‘GUIX_BUILD_OPTIONS’.
Change-Id: Iab63c2dcf4a3ad311a0cf2f39d7ea2ec158ddbb4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Fixes <https://issues.guix.gnu.org/77862>.
Previously, the ‘guix-daemon’ account (for unprivileged execution) would
typically have “kvm” as a supplementary group, but that group would not
be mapped in the build user namespace. Consequently, attempts to
‘chown’ a file to that supplementary group would fail with EINVAL.
The test suites of Coreutils, Python, and Go (among others) exercise
this chown-to-supplementary-group behavior, so they would all fail when
started by the unprivileged ‘guix-daemon’ even though they succeed when
started by ‘guix-daemon’ running as root.
Thanks to keinflue <keinflue@posteo.net> and Reepca Russelstein
<reepca@russelstein.xyz> for helping out.
* nix/libstore/build.cc (initializeUserNamespace): Add ‘extraGIDs’ and
‘haveCapSetGID’ parameters. Invoke ‘newgidmap’ when ‘extraGIDs’ is
non-empty and ‘haveCapSetGID’ is false. Honor ‘extraGIDs’ when
‘haveCapSetGID’ is true.
(maxGroups, guestKVMGID): New variables.
(kvmGIDMapping): New function.
(DerivationGoal::startBuilder): Set ‘ctx.lockMountsMapAll’ in the
CLONE_NEWUSER case. Pass ‘extraGIDs’ to ‘initializeUserNamespace’.
* tests/store.scm ("kvm GID is mapped"): New test.
Change-Id: I10ba710fc1b9ca1e3cd3122be1ec8ede5df18b40
This reverts commits 437bb9ece5 and
a57ed987ff, which were reported in
guix/guix#1169 to occasionally cause errors like:
guix shell: error: unshare : 268566528: Invalid argument
While 'url-fetch*' in (guix download) special-cases these URIs, 'git-fetch'
does not. Consequently, the recent changes to (guix scripts perform-download)
that disallow these URIs cause tests that use builtin:git-download to fail.
* guix/tests/git.scm (serve-git-repository, call-with-served-git-repository):
new procedures.
(with-served-git-repository, with-served-temporary-git-repository): new
syntax.
* .dir-locals.el (scheme-mode): add indentation information for
'with-served-git-repository'.
* tests/builders.scm ("git-fetch, file URI"): use git:// URI with
'with-served-temporary-git-repository'.
* tests/derivations.scm ("'git-download' build-in builder, invalid hash",
"'git-download' built-in builder, invalid commit", "'git-download' built-in
builder, not found"): same.
("'git-download' built-in builder"): same, and use a nonce in the repo
contents so that success isn't cached.
Change-Id: Id3e1233bb74d5987faf89c4341e1d37f09c77c80
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Fixes <https://issues.guix.gnu.org/74862>.
In particular, this makes it possible to build guix on Asahi, whose tmpfs has
16KiB blocks by default.
* tests/store-deduplication.scm
("copy-file/deduplicate, sparse files (holes: ~a/~a/~a)"): Scale hole sizes so
the test works with blocks bigger than 4KiB.
Change-Id: I92fee04f6f69d4e5bfea7443991303ad68da7b2c
Signed-off-by: Ludovic Courtès <ludo@gnu.org>