1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-10 20:46:01 +01:00
Commit graph

21098 commits

Author SHA1 Message Date
github-actions[bot]
ab327e7fd6
Set .version-determinate to 3.7.0 2025-07-03 17:41:38 +00:00
github-actions[bot]
87dccde0aa
Prepare release v3.7.0 2025-07-03 17:41:35 +00:00
Eelco Dolstra
42351656c3
Merge pull request #127 from DeterminateSystems/eelcodolstra/fh-865-add-nix-flake-prefetch-inputs-command-to-fetch-inputs-in
nix flake prefetch-inputs: Add
2025-06-30 18:01:47 +00:00
Eelco Dolstra
e809a5626e
Merge pull request #130 from DeterminateSystems/improve-nix-store-delete-errors
nix store delete: Show why deletion fails
2025-06-30 15:04:19 +00:00
Eelco Dolstra
572c938a55 nix flake prefetch-inputs: Keep going if an input fails 2025-06-30 14:52:25 +02:00
Eelco Dolstra
71aecfc481 Fix test 2025-06-30 11:30:24 +02:00
Eelco Dolstra
842b8846c5
Merge pull request #131 from DeterminateSystems/path-fingerprint
Fix eval caching for path flakes
2025-06-30 07:38:55 +00:00
Eelco Dolstra
38a73203a4 Fix eval caching for path flakes
This fix is somewhat hacky since the accessor/input fingerprint
situation is a bit of a mess.
2025-06-27 20:02:18 +02:00
Eelco Dolstra
51acb1d4bc Path fetcher: Only show "copying to store" when actually copying 2025-06-27 17:59:15 +02:00
Eelco Dolstra
31b00218fe Show which PID is causing a temp root
Example:

  error: Cannot delete path '/nix/store/klyng5rpdkwi5kbxkncy4gjwb490dlhb-foo.drv' because it's in use by Nix process '{nix-process:3605324}'.
2025-06-27 16:50:48 +02:00
Eelco Dolstra
cae732f7a1 Don't censor root info for trusted users 2025-06-27 15:09:19 +02:00
Eelco Dolstra
83a9b9287d nix store delete: Show the first root that prevents deletion
Examples:

  error: Cannot delete path '/nix/store/6fcrjgfjip2ww3sx51rrmmghfsf60jvi-patchelf-0.14.3' because it's referenced by the GC root '/home/eelco/Dev/nix-master/build/result'.

  error: Cannot delete path '/nix/store/rn0qyn3kmky26xgpr2n10vr787g57lff-cowsay-3.8.4' because it's referenced by the GC root '/proc/3600568/environ'.
2025-06-27 15:08:17 +02:00
Eelco Dolstra
9f4d80519f nix store delete: Give a more specific error message 2025-06-27 14:33:18 +02:00
Eelco Dolstra
e04aa2b13b Move FlakeCommand into a header, allow separate registration of subcommands
This allows us to start splitting up src/nix/flake.cc.
2025-06-26 17:05:40 +02:00
Eelco Dolstra
7bb167d58f
Merge pull request #108 from DeterminateSystems/fix-deep-overrides
Fix deep overrides
2025-06-25 20:05:24 +00:00
Eelco Dolstra
0e352a6cec Merge remote-tracking branch 'detsys/detsys-main' into fix-deep-overrides 2025-06-25 21:53:23 +02:00
Eelco Dolstra
1ef1675300 Merge remote-tracking branch 'detsys/detsys-main' into eelcodolstra/fh-865-add-nix-flake-prefetch-inputs-command-to-fetch-inputs-in 2025-06-25 21:52:26 +02:00
detsys-spaghetti[bot]
3a8bd3b108
Merge pull request #128 from DeterminateSystems/release-v3.6.8/754738A2-A724-420B-A33B-FFC8C2CD8356
Release v3.6.8
2025-06-25 10:32:25 +00:00
github-actions[bot]
4ba66db9f6
Generate release notes for 3.6.8 2025-06-25 03:32:40 +00:00
github-actions[bot]
fd8b327060
Set .version-determinate to 3.6.8 2025-06-25 03:32:35 +00:00
github-actions[bot]
c2baff64f7
Prepare release v3.6.8 2025-06-25 03:32:32 +00:00
Graham Christensen
c224b8359c
Merge pull request #126 from DeterminateSystems/release-v3.6.7/84df8907-9f0b-49ea-826a-e1f36408f399
Release v3.6.7
2025-06-24 14:09:18 +00:00
Graham Christensen
404d824194 Update changelogs 2025-06-24 09:31:45 -04:00
Eelco Dolstra
e8f145ae69 nix flake prefetch-inputs: Add
This command fetches all inputs of a flake in parallel.

Example runtime for

  $ chmod -R u+w /tmp/nix2; rm -rf /tmp/nix2; rm ~/.cache/nix/fetcher-cache-v3.sqlite*; rm -rf ~/.cache/nix/tarball-cache/ ~/.cache/nix/gitv3/; time nix flake prefetch-inputs --store /tmp/nix2 https://api.flakehub.com/f/pinned/informalsystems/cosmos.nix/0.3.0/018ce9ed-d0be-7ce5-81b6-a3c6e3ae1187/source.tar.gz

with http-connections = 1:

real    4m11.859s
user    2m6.931s
sys     0m25.619s

and http-connections = 25 (the default):

real    0m57.146s
user    2m49.506s
sys     0m36.008s
2025-06-24 15:30:49 +02:00
Eelco Dolstra
731b630321 Fixes for GHSA-g948-229j-48j3
Squashed commit of the following:

commit 04fff3a637d455cbb1d75937a235950e43008db9
Author: Eelco Dolstra <edolstra@gmail.com>
Date:   Thu Jun 12 12:30:32 2025 +0200

    Chown structured attr files safely

commit 5417ad445e414c649d0cfc71a05661c7bf8f3ef5
Author: Eelco Dolstra <edolstra@gmail.com>
Date:   Thu Jun 12 12:14:04 2025 +0200

    Replace 'bool sync' with an enum for clarity

    And drop writeFileAndSync().

commit 7ae0141f328d8e8e1094be24665789c05f974ba6
Author: Eelco Dolstra <edolstra@gmail.com>
Date:   Thu Jun 12 11:35:28 2025 +0200

    Drop guessOrInventPathFromFD()

    No need to do hacky stuff like that when we already know the original path.

commit 45b05098bd019da7c57cd4227a89bfd0fa65bb08
Author: Eelco Dolstra <edolstra@gmail.com>
Date:   Thu Jun 12 11:15:58 2025 +0200

    Tweak comment

commit 0af15b31209d1b7ec8addfae9a1a6b60d8f35848
Author: Raito Bezarius <raito@lix.systems>
Date:   Thu Mar 27 12:22:26 2025 +0100

    libstore: ensure that temporary directory is always 0o000 before deletion

    In the case the deletion fails, we should ensure that the temporary
    directory cannot be used for nefarious purposes.

    Change-Id: I498a2dd0999a74195d13642f44a5de1e69d46120
    Signed-off-by: Raito Bezarius <raito@lix.systems>

commit 2c20fa37b15cfa03ac6a1a6a47cdb2ed66c0827e
Author: Raito Bezarius <raito@lix.systems>
Date:   Wed Mar 26 12:42:55 2025 +0100

    libutil: ensure that `_deletePath` does NOT use absolute paths with dirfds

    When calling `_deletePath` with a parent file descriptor, `openat` is
    made effective by using relative paths to the directory file descriptor.

    To avoid the problem, the signature is changed to resist misuse with an
    assert in the prologue of the function.

    Change-Id: I6b3fc766bad2afe54dc27d47d1df3873e188de96
    Signed-off-by: Raito Bezarius <raito@lix.systems>

commit d3c370bbcae48bb825ce19fd0f73bb4eefd2c9ea
Author: Raito Bezarius <raito@lix.systems>
Date:   Wed Mar 26 01:07:47 2025 +0100

    libstore: ensure that `passAsFile` is created in the original temp dir

    This ensures that `passAsFile` data is created inside the expected
    temporary build directory by `openat()` from the parent directory file
    descriptor.

    This avoids a TOCTOU which is part of the attack chain of CVE-????.

    Change-Id: Ie5273446c4a19403088d0389ae8e3f473af8879a
    Signed-off-by: Raito Bezarius <raito@lix.systems>

commit 45d3598724f932d024ef6bc2ffb00c1bb90e6018
Author: Raito Bezarius <raito@lix.systems>
Date:   Wed Mar 26 01:06:03 2025 +0100

    libutil: writeFile variant for file descriptors

    `writeFile` lose its `sync` boolean flag to make things simpler.

    A new `writeFileAndSync` function is created and all call sites are
    converted to it.

    Change-Id: Ib871a5283a9c047db1e4fe48a241506e4aab9192
    Signed-off-by: Raito Bezarius <raito@lix.systems>

commit 732bd9b98cabf4aaf95a01fd318923de303f9996
Author: Raito Bezarius <raito@lix.systems>
Date:   Wed Mar 26 01:05:34 2025 +0100

    libstore: chown to builder variant for file descriptors

    We use it immediately for the build temporary directory.

    Change-Id: I180193c63a2b98721f5fb8e542c4e39c099bb947
    Signed-off-by: Raito Bezarius <raito@lix.systems>

commit 962c65f8dcd5570dd92c72370a862c7b38942e0d
Author: Raito Bezarius <raito@lix.systems>
Date:   Wed Mar 26 01:04:59 2025 +0100

    libstore: open build directory as a dirfd as well

    We now keep around a proper AutoCloseFD around the temporary directory
    which we plan to use for openat operations and avoiding the build
    directory being swapped out while we are doing something else.

    Change-Id: I18d387b0f123ebf2d20c6405cd47ebadc5505f2a
    Signed-off-by: Raito Bezarius <raito@lix.systems>

commit c9b42462b75b5a37ee6564c2b53cff186c8323da
Author: Raito Bezarius <raito@lix.systems>
Date:   Wed Mar 26 01:04:12 2025 +0100

    libutil: guess or invent a path from file descriptors

    This is useful for certain error recovery paths (no pun intended) that
    does not thread through the original path name.

    Change-Id: I2d800740cb4f9912e64c923120d3f977c58ccb7e
    Signed-off-by: Raito Bezarius <raito@lix.systems>
2025-06-24 09:27:39 -04:00
github-actions[bot]
098be10e28
Generate release notes for 3.6.7 2025-06-24 13:18:13 +00:00
github-actions[bot]
ff05659f8b
Set .version-determinate to 3.6.7 2025-06-24 13:18:08 +00:00
github-actions[bot]
58a878d846
Prepare release v3.6.7 2025-06-24 13:18:05 +00:00
Graham Christensen
5dea62be29
Merge pull request #124 from DeterminateSystems/sync-2.29.1
Sync 2.29.1
2025-06-23 21:41:37 +00:00
Eelco Dolstra
7059d2b58b Merge remote-tracking branch 'origin/2.29-maintenance' into sync-2.29.1 2025-06-23 15:02:22 +02:00
mergify[bot]
b3b137ec4a
Merge pull request #13392 from NixOS/mergify/bp/2.29-maintenance/pr-13348
Make the repl test more robust (backport #13348)
2025-06-22 19:41:08 +00:00
Eelco Dolstra
833406121c Make the repl test more robust
Seen in https://github.com/DeterminateSystems/nix-src/actions/runs/15590867877/job/43909540271:

  nix-functional-tests> grep: repl_output: No such file or directory
  nix-functional-tests> +(repl.sh:174) cat repl_output

This is because there is a small possibility that the `nix repl` child
process hasn't created `repl_output` yet. So make sure it exists.

(cherry picked from commit 9eb46e9cc0)
2025-06-22 19:09:38 +00:00
Eelco Dolstra
1d5e161755
Merge pull request #113 from DeterminateSystems/eelcodolstra/fh-851-lock-nar-hashes-by-default
Add lazy-locks setting
2025-06-19 17:01:14 +00:00
Eelco Dolstra
692dfb424a
Merge pull request #117 from DeterminateSystems/test-uncacheable
Fix fetchToStore() caching with --impure, improve testing
2025-06-19 16:51:11 +00:00
Vladimír Čunát
5d2986d3c5 tests: fixup with jq-1.8.0 2025-06-19 18:48:59 +02:00
mergify[bot]
075df0b446
Merge pull request #13380 from NixOS/mergify/bp/2.29-maintenance/pr-13376
Revert "Drop magic-nix-cache" (backport #13376)
2025-06-19 12:44:08 +00:00
Eelco Dolstra
2f6c758d3d Revert "Drop magic-nix-cache"
This reverts commit 9cc8be2674 since
magic-nix-cache works again (thanks @jchv).

(cherry picked from commit 9b57573bae)
2025-06-19 12:12:28 +00:00
mergify[bot]
4c7e5ce7a8
Merge pull request #13375 from NixOS/mergify/bp/2.29-maintenance/pr-13371
tests: fixup with jq-1.8.0 (backport #13371)
2025-06-18 15:51:12 +00:00
Vladimír Čunát
86fbaf3b14 tests: fixup with jq-1.8.0
(cherry picked from commit 77f6b6532f)
2025-06-18 15:18:06 +00:00
Graham Christensen
fc2d5a18d1
Merge pull request #121 from DeterminateSystems/release-v3.6.6/3dd48fe2-439e-4ecf-884f-aec379a22d28
Release v3.6.6
2025-06-17 23:08:38 +00:00
Graham Christensen
cd0128796a
Apply suggestions from code review 2025-06-17 18:21:01 -04:00
github-actions[bot]
f9b88e3229
Generate release notes for 3.6.6 2025-06-17 22:16:00 +00:00
github-actions[bot]
97af07180c
Set .version-determinate to 3.6.6 2025-06-17 22:15:55 +00:00
github-actions[bot]
1eab4236d4
Prepare release v3.6.6 2025-06-17 22:15:52 +00:00
Eelco Dolstra
3a4e6cadeb Improve regression testing for uncachable source paths
These now throw an error by default in the test suite.
2025-06-16 23:59:33 +02:00
Eelco Dolstra
a175c67def Fix rootFS fingerprint in the impure case 2025-06-16 23:59:33 +02:00
Eelco Dolstra
5329a45ade Git fetcher: Make dirty repos with no commits cacheable 2025-06-16 23:59:33 +02:00
Graham Christensen
7469e7aa57
Merge pull request #119 from DeterminateSystems/release-v3.6.5/c7ec4397-7427-42b1-87fb-1266bc444391
Release v3.6.5
2025-06-16 21:29:31 +00:00
Graham Christensen
0f3892185d Add a final newline in the generated release notes 2025-06-16 17:21:26 -04:00
Graham Christensen
c0e53f3312 Move the 3.6.4 notes over 2025-06-16 17:20:06 -04:00