aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
AgeCommit message (Collapse)Author
2021-11-23Merge pull request #5628 from matthewbauer/rosetta2-new-pathEelco Dolstra
Set new rosetta 2 path in sandbox
2021-11-22Set new rosetta 2 path in sandboxMatthew Bauer
see: https://github.com/NixOS/nix/pull/5388 and https://github.com/NixOS/nix/pull/5251
2021-11-22Unify #if linuxAlex Shabalin
2021-11-19Fix build warnings on MacOSAlex Shabalin
2021-11-18Merge branch 'accept_conf' of https://github.com/tomberek/nixEelco Dolstra
2021-11-18SimplifyEelco Dolstra
2021-11-18Fix stack buffer overflowFarid Zakaria
Fix a stack buffer overflow found by running MemorySanitizer.
2021-11-16Merge pull request #5472 from NixOS/async-realisation-substitutionEelco Dolstra
async realisation substitution
2021-11-12Adds an accept-flake-config flagTom Bereknyei
2021-11-12TypoEelco Dolstra
2021-11-09Merge pull request #5494 from tweag/balsoft/allow-references-in-addPathEelco Dolstra
Allow references in addPath
2021-11-09addToStore, addToStoreFromDump: refactor: pass refs by const referenceAlexander Bantyev
Co-Authored-By: Eelco Dolstra <edolstra@gmail.com>
2021-11-08Unshare mount namespace in main()Eelco Dolstra
Doing it as a side-effect of calling LocalStore::makeStoreWritable() is very ugly. Also, make sure that stopping the progress bar joins the update thread, otherwise that thread should be unshared as well.
2021-11-08Merge branch 'fix-writable-shell' of https://github.com/yorickvP/nixEelco Dolstra
2021-11-05addPath: allow paths with referencesAlexander Bantyev
Since 4806f2f6b0fd2cae401b89fe19d8c528ffd88b5f, we can't have paths with references passed to builtins.{path,filterSource}. This prevents many cases of those functions called on IFD outputs from working. Resolve this by passing the references found in the original path to the added path.
2021-11-05Make the flake options work when using the daemonregnat
When setting flake-local options (with the `nixConfig` field), forward these options to the daemon in case we’re using one. This is necessary in particular for options like `binary-caches` or `post-build-hook` to make sense. Fix <https://github.com/NixOS/nix/commit/343239fc8a1993f707a990c2cd54a41f1fa3de99#r44356843>
2021-11-03libstore: Use unix-dotfile vfs if useSQLiteWAL is falseDoron Behar
2021-11-03Make the DrvOutputSubstitutionGoal more asyncregnat
2021-11-03Make the realisation fetching from binary caches asyncregnat
That way we can fetch several realisations from the same cache in parallel
2021-11-03Expose an async interface for `queryRealisation`regnat
Doesn’t change much so far because everything is still using it synchronously, but should allow the binary cache to fetch stuff in parallel
2021-10-29StyleEelco Dolstra
2021-10-29Merge branch 'master' of https://github.com/alekswn/nixEelco Dolstra
2021-10-28Use nix::connect() to connect to the garbage collectorEelco Dolstra
2021-10-28Remove unused variableEelco Dolstra
2021-10-28Merge remote-tracking branch 'origin/master' into non-blocking-gcEelco Dolstra
2021-10-27If max-jobs == 0, do preferLocalBuild on remote buildersEelco Dolstra
2021-10-27daemon: Accept 'repeat' setting from untrusted usersEelco Dolstra
Fixes #5352.
2021-10-26Make experimental-features a proper typeregnat
Rather than having them plain strings scattered through the whole codebase, create an enum containing all the known experimental features. This means that - Nix can now `warn` when an unkwown experimental feature is passed (making it much nicer to spot typos and spot deprecated features) - It’s now easy to remove a feature altogether (once the feature isn’t experimental anymore or is dropped) by just removing the field for the enum and letting the compiler point us to all the now invalid usages of it.
2021-10-23addToStore, addToStoreFromDump: add references argumentAlexander Bantyev
Allow to pass a set of references to be added as info to the added paths.
2021-10-17Add error reporting to machine spec paserAlexey Novikov
Currently machine specification (`/etc/nix/machine`) parser fails with a vague exception if the file had incorrect format. This commit adds verbose exceptions and unit-tests for the parser.
2021-10-15Add a test for the non-blocking GCEelco Dolstra
2021-10-15Fix main GC thread exitingEelco Dolstra
2021-10-15Restore parent mount namespace in restoreProcessContextYorick van Pelt
This ensures any started processes can't write to /nix/store (except during builds). This partially reverts 01d07b1e, which happened because of #2646. The problem was only happening after nix downloads anything, causing me to suspect the download thread. The problem turns out to be: "A process can't join a new mount namespace if it is sharing filesystem-related attributes with another process", in this case this process is the curl thread. Ideally, we might kill it before spawning the shell process, but it's inside a static variable in the getFileTransfer() function. So instead, stop it from sharing FS state using unshare(). A strategy such as the one from #5057 (single-threaded chroot helper binary) is also very much on the table. Fixes #4337.
2021-10-15Fix crash when a GC client disconnectsEelco Dolstra
The client thread can't just delete its own thread object from connections, it has to detach it.
2021-10-15Memoize queryReferrers()Eelco Dolstra
2021-10-15Add another path where a Rosetta 2 configuration file is possibly locatedyvt
2021-10-14Speed up GC by marking entire closures as liveEelco Dolstra
2021-10-14Remove GCStateEelco Dolstra
2021-10-14Move deleteFromStore()Eelco Dolstra
2021-10-14pathInfoCache: Use the entire base name as the cache keyEelco Dolstra
This fixes a bug in the garbage collector where if a path /nix/store/abcd-foo is valid, but we do a isValidPath("/nix/store/abcd-foo.lock") first, then a negative entry for /nix/store/abcd is added to pathInfoCache, so /nix/store/abcd-foo is subsequently considered invalid and deleted.
2021-10-14Make the canReachRoots() traversal non-recursiveEelco Dolstra
2021-10-14CleanupEelco Dolstra
2021-10-13Fix GC when there are cycles in the referrers graphEelco Dolstra
(where "referrers" includes the reverse of derivation outputs and derivers). Now we do a full traversal to look if we can reach any root. If not, all paths reached can be deleted.
2021-10-13SimplifyEelco Dolstra
2021-10-13Use a thread per connectionEelco Dolstra
2021-10-13Fix auto-gcEelco Dolstra
2021-10-13Non-blocking garbage collectorEelco Dolstra
The garbage collector no longer blocks other processes from adding/building store paths or adding GC roots. To prevent the collector from deleting store paths just added by another process, processes need to connect to the garbage collector via a Unix domain socket to register new temporary roots.
2021-10-13Remove syncWithGC()Eelco Dolstra
2021-10-13Remove trash directoryEelco Dolstra
2021-10-13Merge branch 'feature/comp-level' of https://github.com/tomberek/nixEelco Dolstra