Commit graph

16898 commits

Author SHA1 Message Date
Théophane Hufschmitt
845b2a9256
Merge pull request #10363 from obsidiansystems/is-root-user
Factor out `isRootUser` function
2024-03-30 07:15:56 +01:00
Théophane Hufschmitt
c864e3b871
Merge pull request #10341 from xokdvium/xokdvium/fix-double-decompression
fix(libutil): apply only the specified filter to decompress archive
2024-03-30 07:13:09 +01:00
Sergei Zimmerman
a66b5a1526
test(nixos): add integration test for doubly-compressed content
Add an integration test with a compressing proxy (nginx is used).
This test verifies that fetched archives do not get decompressed
excessively.
2024-03-30 01:29:34 +03:00
Sergei Zimmerman
500683a949
fix(libutil): apply only the specified filter to decompress archive
This patch makes `makeDecompressionSink` strip only a single layer
of compression specified via method. This fixes erroneous decompression
of doubly-compressed NARs fetched with curl.
2024-03-30 01:29:29 +03:00
Sergei Zimmerman
6d9bafb3b8
nfc(libutil): reformat files
Run clang-format on compression.{cc,hh} and tarfile{cc,hh}.
This way follow-up patches will be formatted properly and have
easier to read diffs.
2024-03-30 01:29:22 +03:00
John Ericson
e4d9b207c2 Factor out isRootUser function 2024-03-29 16:33:01 -04:00
John Ericson
8be347afca Factor out nix::maybeLstat
This function is nice for more than `PosixSourceAccessor`. We can make a
few things simpler with it.

Note that the error logic slightly changes in some of the call sites, in
that we also count `ENOTDIR` and not just `ENOENT` as not having the
file, but that should be fine.
2024-03-29 16:32:53 -04:00
John Ericson
eeecbb9c36
Merge pull request #10361 from obsidiansystems/fix-exception-type
`throwExceptionSelfCheck` throw `Error`
2024-03-29 16:31:39 -04:00
John Ericson
555181c3fd throwExceptionSelfCheck throw Error
`SysError` is not appropriate because there is no (Unix) syscall involved.

The catch block in `initLibUtil` is already for `Error` and still works.
2024-03-29 16:05:05 -04:00
Yuxuan Shui
0be87c023f Fix "include" directive in config files 2024-03-29 16:33:13 +00:00
Théophane Hufschmitt
b72e1c79da
Merge pull request #10299 from detroyejr/remove-repl-flake
flakes: remove experimental repl-flake
2024-03-29 15:06:23 +01:00
José Luis Lafuente
926fbadcc3
C API: add more tests 2024-03-29 14:00:19 +01:00
Jonathan De Troye
a09d0e19c1
flakes: Reword doc/manual/rl-next/remove-repl-flake.md
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2024-03-29 08:57:41 -04:00
Eelco Dolstra
00ce36fafe Add test 2024-03-29 13:38:55 +01:00
Eelco Dolstra
46d9e70c20 Add trust-tarballs-from-git-forges setting
If enabled, GitHub flakerefs don't require a content hash, a Git
revision is enough.

Fixes #10297.
2024-03-29 13:38:47 +01:00
Théophane Hufschmitt
90f5189451
Merge pull request #10131 from intelfx/work/notty
`TERM=dumb` fixes
2024-03-29 13:38:37 +01:00
Eelco Dolstra
8930772864 Add regression test for #10331, #10267 2024-03-29 13:20:50 +01:00
Eelco Dolstra
dffc22f30f Rename local-store.sh -> chroot-store.sh 2024-03-29 12:51:14 +01:00
José Luis Lafuente
2d84433a3b
C API: update documentation 2024-03-29 10:05:21 +01:00
José Luis Lafuente
2bb609bce2
C API: rename nix_observe_string -> nix_get_string_callback 2024-03-29 10:01:16 +01:00
Théophane Hufschmitt
de101417eb
Merge pull request #10305 from hercules-ci/addErrorContext-is-great
Always print addErrorContext
2024-03-29 09:10:09 +01:00
Robert Hensing
ef26133df3
Merge pull request #10337 from Cyclic4179/patch-1
`nix shell` shebang: support O'Caml comments
2024-03-28 19:54:03 +01:00
José Luis Lafuente
061140fc8f
C API: remove unused argument 2024-03-28 19:38:12 +01:00
José Luis Lafuente
925a8fda6e
C API: Use new ListBuilder helper
See https://github.com/NixOS/nix/pull/10251
2024-03-28 19:02:01 +01:00
José Luis Lafuente
c57de60522
C API: Keep the structure flat
See https://github.com/NixOS/nix/pull/10329
2024-03-28 19:00:04 +01:00
Eelco Dolstra
7829caab49
Merge pull request #10347 from Atry/patch-2
docs: clarify that `builtins.stringLength` is counting bytes
2024-03-28 15:56:22 +01:00
José Luis Lafuente
d96b52bd8b
C api: nix_export_std_string -> nix_observe_string 2024-03-28 10:52:02 +01:00
José Luis Lafuente
940ff6535c
C API: update libstore tests 2024-03-28 10:52:02 +01:00
José Luis Lafuente
31fbb24329
C API: refactor nix_store_realise 2024-03-28 10:52:02 +01:00
José Luis Lafuente
1a574c6c60
C API: refactor ListBuilder 2024-03-28 10:52:01 +01:00
José Luis Lafuente
34d15e8f2f
C API: rename nix_store_build -> nix_store_realise 2024-03-28 10:52:01 +01:00
José Luis Lafuente
1093ab64a2
C API: add more tests 2024-03-28 10:52:01 +01:00
José Luis Lafuente
2e1dbbe307
C API: refactor test support 2024-03-28 10:52:01 +01:00
José Luis Lafuente
693e8ec8fe
C API: unify makefile after rebase 2024-03-28 10:52:01 +01:00
José Luis Lafuente
c49b88b066
C API: update docs based on PR feedback 2024-03-28 10:52:01 +01:00
José Luis Lafuente
7c602d9f01
C API: add tests for external values 2024-03-28 10:52:01 +01:00
José Luis Lafuente
2349185c96
C API: fix after rebase 2024-03-28 10:52:00 +01:00
José Luis Lafuente
6c231dcf68
C API: disable test 2024-03-28 10:52:00 +01:00
José Luis Lafuente
b9cd24a4a8
C API: fix api_expr tests 2024-03-28 10:52:00 +01:00
José Luis Lafuente
24c8f6864d
C API: if store doesn't have a version, return an empty string 2024-03-28 10:52:00 +01:00
José Luis Lafuente
dfdb90dc8e
C API: Consolidate initializers 2024-03-28 10:52:00 +01:00
José Luis Lafuente
51ff547d9a
C API: add more tests to nix_api_expr 2024-03-28 10:52:00 +01:00
José Luis Lafuente
415583a500
C API: use bool argument consistently 2024-03-28 10:52:00 +01:00
José Luis Lafuente
d5ec1d0617
C API: nix_store_open, check for empty strings 2024-03-28 10:51:59 +01:00
José Luis Lafuente
535694122e
C API: rename State to EvalState 2024-03-28 10:51:59 +01:00
José Luis Lafuente
24604d024a
C API: fix docs build after rebase 2024-03-28 10:51:59 +01:00
José Luis Lafuente
92dacec0e4
C API: Apply documentation suggestions
Co-authored-by: asymmetric <lorenzo@mailbox.org>
2024-03-28 10:51:59 +01:00
José Luis Lafuente
ac3a9c6605
C API: add nix_api_expr tests 2024-03-28 10:51:48 +01:00
José Luis Lafuente
55601963b3
C API: fix documentation build 2024-03-28 10:50:08 +01:00
José Luis Lafuente
41f1669dea
C API: add tests for libutil and libstore 2024-03-28 10:50:02 +01:00