Robert Hensing
ae486b2910
Merge pull request #11446 from NixOS/mergify/bp/2.24-maintenance/pr-11285
...
fetchers::downloadTarball(): Return a cacheable accessor (backport #11285 )
2024-09-09 18:05:32 +02:00
Eelco Dolstra
c5a4dfa660
nix flake {metadata,archive}: Fix chroot stores
...
Fixes
$ nix flake metadata --store /tmp/nix nixpkgs
error: path '/tmp/nix/nix/store/65xpqkz92d9j7k5ric4z8lzhiigxsfbg-source/flake.nix' is not in the Nix store
This has been broken since 598deb2b23
.
2024-09-09 15:41:38 +02:00
Eelco Dolstra
437f7a0042
fetchers::downloadTarball(): Return a cacheable accessor
...
downloadTarball() is used by `-I foo=<url>` etc. fetchToStore() needs
the accessor to have a fingerprint to enable caching.
Fixes #11271 .
(cherry picked from commit 9f6ee93f48
)
2024-09-09 12:46:07 +00:00
Eelco Dolstra
5ca2f58798
Improve use-case-hack description slightly
2024-09-09 14:29:05 +02:00
Eelco Dolstra
4cfa59fdb3
Typo
2024-09-09 14:11:35 +02:00
Eelco Dolstra
4c7a6ffee7
Merge pull request #11380 from roberth/eco-friendly-progress-bar
...
progress-bar: Only write when truly updated
2024-09-09 13:58:42 +02:00
Eelco Dolstra
5e337ee60d
Merge pull request #11412 from parkerhoyes/daemon-cgroup
...
Move daemon process into sub-cgroup
2024-09-09 13:49:31 +02:00
Robert Hensing
69e925640f
Merge pull request #11432 from fricklerhandwerk/docs-defexpr
...
docs: small fixups on the default expression
2024-09-08 12:31:23 +02:00
Robert Hensing
c955563b64
fix: Avoid deadlock in ProgressBar::redraw()
2024-09-08 11:44:24 +02:00
Robert Hensing
e10ea78f93
refact: Inline ProgressBar::draw(state, newOutput), inline local output
2024-09-08 01:23:01 +02:00
Robert Hensing
047d9643b5
refact: Extract ProgressBar::redraw(newOutput)
2024-09-08 01:23:01 +02:00
Robert Hensing
9df5236c46
progress-bar: Only write when truly updated
2024-09-08 01:04:14 +02:00
Robert Hensing
9ae7140beb
Merge pull request #11436 from fricklerhandwerk/reword-nix-expr-gloss
...
docs: reword glossary entry on Nix expression
2024-09-07 22:47:32 +01:00
Robert Hensing
791f943761
Merge pull request #11437 from fricklerhandwerk/default-nix-path-docs
...
docs: explain provenance of default `nix-path` values
2024-09-07 22:38:50 +01:00
Eelco Dolstra
52ba3cc5ea
Test that deserializing regular files / symlinks is exclusive
2024-09-06 16:28:09 +02:00
Eelco Dolstra
f15aef2a79
Merge pull request #11413 from cole-h/fixup-daemon-service
...
fixup: use the real bindir for systemd unit's bindir
2024-09-06 15:56:44 +02:00
Eelco Dolstra
644a034783
Merge pull request #11440 from fricklerhandwerk/fix-docs-build-instructions
...
update instructions to build the manual
2024-09-06 15:48:52 +02:00
Eelco Dolstra
bb1af0645e
Merge pull request #11439 from Mic92/revert-warning
...
Revert "fix: Error on malformed URI query parameter"
2024-09-06 15:48:18 +02:00
Valentin Gagarin
92be107c8e
update instructions to build the manual
2024-09-06 10:33:12 +02:00
Eelco Dolstra
9fcb588dd8
RestoreSink::createDirectory(): Use append()
...
On macOS, `mkdir("x/')` behaves differently than `mkdir("x")` if `x` is
a dangling symlink (the formed succeed while the latter fails). So make
sure we always strip the trailing slash.
2024-09-05 22:21:53 +02:00
Eelco Dolstra
21dcbd7e83
Fix test on macOS
2024-09-05 20:55:24 +02:00
Eelco Dolstra
7a765a6aaf
Test that deserializing NARs with names with equal Unicode normal forms fails on macOS
...
The test is based on the one by @puckipedia but with the file names
swapped to make them sorted.
2024-09-05 20:37:26 +02:00
Eelco Dolstra
3557587381
Detect NAR directory entries that collide with another path after case-hacking
...
The test was made by @puckipedia.
2024-09-05 19:26:10 +02:00
Eelco Dolstra
77c090cdbd
More tests
2024-09-05 16:54:12 +02:00
Eelco Dolstra
da1ad28912
Test that nix-store --restore fails if the output already exists
...
This restores the behaviour from before the std::filesystem
refactorings.
2024-09-05 16:48:43 +02:00
Eelco Dolstra
83d5b32803
Add test case for NARs with duplicate directory entries
...
This test was made by @puckipedia.
2024-09-05 16:41:15 +02:00
Jörg Thalheim
5a5a010120
Revert "fix: Error on malformed URI query parameter"
...
This reverts commit c9f45677b5
.
This now triggers on simple cases like `nix build .#nix`.
Reverting for now.
2024-09-05 15:18:16 +02:00
Jörg Thalheim
a81083d080
Revert "Update src/libutil/url.cc"
...
This reverts commit 9b1cefe27e
.
2024-09-05 15:18:16 +02:00
Jörg Thalheim
70c52d72f4
builtins.unpackChannel: wrap filesystem errors and sanitize channelName
...
Otherwise these errors are not caught correctly
2024-09-05 14:02:00 +02:00
Jörg Thalheim
05a1ffe236
repl: wrap std::filesystem error into SysError
...
/tmp/ecstatic-euler-mAFGV7
% /home/joerg/git/nix/build/subprojects/nix/nix repl
Nix 2.25.0
Type :? for help.
after doing rm /tmp/ecstatic-euler-mAFGV7 this will result in:
nix-repl> :lf .
error: cannot determine current working directory: No such file or directory
Before it would make the repl crash
/tmp/clever-hermann-MCm7A9
% /home/joerg/git/nix/build/subprojects/nix/nix repl
Nix 2.25.0
Type :? for help.
nix-repl> :lf .
error: filesystem error: cannot get current path: No such file or directory
2024-09-05 14:00:39 +02:00
Jörg Thalheim
22ba4dc78d
builtins.readDir: fix nix error trace on filesystem errors
...
Before:
nix-env % ./src/nix/nix eval --impure --expr 'let f = builtins.readDir "/nix/store/hs3yxdq9knimwdm51gvbs4dvncz46f9d-hello-2.12.1/foo"; in f' --show-trace
error: filesystem error: directory iterator cannot open directory: No such file or directory [/nix/store/hs3yxdq9knimwdm51gvbs4dvncz46f9d-hello-2.12.1/foo]
After:
error:
… while calling the 'readDir' builtin
at «string»:1:9:
1| let f = builtins.readDir "/nix/store/hs3yxdq9knimwdm51gvbs4dvncz46f9d-hello-2.12.1/foo"; in f
| ^
error: reading directory '/nix/store/hs3yxdq9knimwdm51gvbs4dvncz46f9d-hello-2.12.1/foo': No such file or directory
2024-09-05 14:00:39 +02:00
Valentin Gagarin
a1cc362d9d
fix broken link ( #11435 )
2024-09-05 08:34:07 +00:00
tomberek
5bfe198ad5
Merge pull request #11433 from abathur/fix_sequoia_migration_gid
...
use existing GID in sequoia migration script
2024-09-05 00:20:56 -04:00
Valentin Gagarin
17655ecfef
docs: explain provenance of default nix-path
values
...
this should make it more obvious how things are related to each other, and also
hopefully expose the historical context without having to say on every
corner that these details are accounting for legacy decisions.
2024-09-05 04:35:06 +02:00
Valentin Gagarin
48249e001a
docs: reword glossary entry on Nix expression
...
this makes it less cumbersome to read and puts the statements in
meaningful order.
2024-09-05 04:13:43 +02:00
Valentin Gagarin
38d9d536a8
docs: small fixups on the default expression
...
- highlighted example
- linked definitions to the glossary (this is a shorter read)
- fixed some artefact
2024-09-05 03:32:30 +02:00
Travis A. Everett
ef3d3c5682
use existing GID in sequoia migration script
...
I hardcoded the wrong GID (30001 instead of 30000), but it's
better to just pick up the GID from the existing group.
2024-09-04 20:26:50 -05:00
Eelco Dolstra
495d32e1b8
NAR parser: Fix check for duplicate / incorrectly sorted entries
...
"prevName" was always empty because it was declared in the wrong scope.
2024-09-04 21:43:59 +02:00
Parker Hoyes
bd6ae2f3b9
Use getCurrentCgroup() in getMaxCPU()
2024-09-04 19:10:31 +00:00
Eelco Dolstra
668d63d8dd
Merge pull request #11424 from kjeremy/lix-1462
...
Pull fut.get() out of the lock
2024-09-04 20:52:38 +02:00
Parker Hoyes
03484641a1
Simplify getRootCgroup()
...
Static local initializers are atomic in C++.
2024-09-04 18:11:16 +00:00
Jeremy Kolb
8152c5c828
Remote nullptr
...
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2024-09-04 12:55:32 -04:00
Eelco Dolstra
b53b07b30b
Merge pull request #11421 from NixOS/mergify/bp/2.24-maintenance/pr-10919
...
install-darwin: fix _nixbld uids for macOS sequoia (backport #10919 )
2024-09-04 18:55:18 +02:00
Jeremy Kolb
46f6505865
Pull fut.get() out of the lock
...
This is https://gerrit.lix.systems/c/lix/+/1462 by @jade_
see: https://git.lix.systems/lix-project/lix/issues/366
see: https://gerrit.lix.systems/c/lix/+/1462
2024-09-04 10:14:51 -04:00
Eelco Dolstra
9d24080090
Git fetcher: Ignore .gitmodules entries that are not submodules
...
Fixes #10739 .
2024-09-04 14:46:33 +02:00
Eelco Dolstra
357cec93b6
Merge pull request #11414 from parkerhoyes/cgroups-delegation
...
Enable cgroups delegation for systemd
2024-09-04 13:28:10 +02:00
Emily
8d0414d682
install-darwin: increment base UID by 1 ( #15 )
...
(cherry picked from commit 11cf29b15c
)
2024-09-03 23:59:16 +00:00
Travis A. Everett
c5a0e624d9
install-darwin: move nixbld gid to match first UID
...
(cherry picked from commit 75567423fb
)
2024-09-03 23:59:15 +00:00
Travis A. Everett
0679505d8c
install-darwin: fix _nixbld uids for macOS sequoia
...
Starting in macOS 15 Sequoia, macOS daemon UIDs are encroaching on our
default UIDs of 301-332. This commit relocates our range up to avoid
clashing with the current UIDs of 301-304 and buy us a little time
while still leaving headroom for people installing more than 32 users.
(cherry picked from commit df36ff0d1e
)
2024-09-03 23:59:15 +00:00
tomberek
a6e6da3b0c
Merge pull request #10919 from abathur/macos_sequoia_fixes
...
install-darwin: fix _nixbld uids for macOS sequoia
2024-09-03 19:55:55 -04:00