aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
AgeCommit message (Collapse)Author
2022-02-25Remove std::string alias (for real this time)Eelco Dolstra
Also use std::string_view in a few more places.
2022-02-25refactor: remove verbose-build from docsKevin Amado
- From what I see it is an implementation detail but is no longer configurable from the settings
2022-02-21Remove std::string aliasEelco Dolstra
2022-02-21Remove std::set aliasEelco Dolstra
2022-02-21Remove std::list aliasEelco Dolstra
2022-02-19path-info: use full store paths when we have themLinus Heckemann
Fixes #5645
2022-02-16addToStoreFromDump(): Take std::string_viewEelco Dolstra
2022-02-12Fix using sandbox without user namespacesSebastian Ullrich
2022-02-07Fix 'basic_string::_M_construct null not valid' in interrupted downloadEelco Dolstra
Fixes #5985.
2022-02-02Merge branch 'more-stringviews' of https://github.com/pennae/nixEelco Dolstra
2022-01-30fix spelling mistakes reported by Debian's lintian toolThomas Koch
2022-01-27return string_views from forceString*pennae
once a string has been forced we already have dynamic storage allocated for it, so we can easily reuse that storage instead of copying.
2022-01-27convert a for more utilities to string_viewpennae
2022-01-25nix store ping: Report Nix daemon versionEelco Dolstra
Fixes #5952.
2022-01-24Merge pull request #5875 from hercules-ci/fix-large-drv-field-stack-overflowEelco Dolstra
Fix segfault or stack overflow caused by large derivation fields
2022-01-21derivations.cc: Use larger buffer in printString Robert Hensing
If we want to be careful about hitting the stack protector page, we should use `-fstack-check` instead. Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-01-21Merge pull request #5949 from obsidiansystems/old-copyClosureEelco Dolstra
Add back `copyClosure` for plain `StorePath`s
2022-01-20Add back `copyClosure` for plain `StorePath`sJohn Ericson
This was removed in 2e199673a523fa81de31ffdd2a25976ce0814631 when `copyPath` transitioned to use `RealisedPath`. But then in e9848beca704d27a13e28b4403251725bd485bb2 we added it back just for `realisedPath`. I think it is a good utility function --- one can easily imagine it becoming optimized in the future, and copying paths *violating* the closure is a very niche feature. So if we have `copyPaths` for both sorts of paths, I think we should have `copyClosure` for both sorts too.
2022-01-19Replace withBuffer by boost small_vectorRobert Hensing
Although this will leave gaps in the stack, the performance impact of those should be insignificant and we get a simpler solution this way.
2022-01-19withBuffer: avoid allocating a std::functionRobert Hensing
2022-01-19Add withBufferRobert Hensing
... to avoid non-standard, unidiomatic alloca.
2022-01-19Fix segfault or stack overflow caused by large derivation fieldsRobert Hensing
This removes a dynamic stack allocation, making the derivation unparsing logic robust against overflows when large strings are added to a derivation. Overflow behavior depends on the platform and stack configuration. For instance, x86_64-linux/glibc behaves as (somewhat) expected: $ (ulimit -s 20000; nix-instantiate tests/lang/eval-okay-big-derivation-attr.nix) error: stack overflow (possible infinite recursion) $ (ulimit -s 40000; nix-instantiate tests/lang/eval-okay-big-derivation-attr.nix) error: expression does not evaluate to a derivation (or a set or list of those) However, on aarch64-darwin: $ nix-instantiate big-attr.nix ~ zsh: segmentation fault nix-instantiate big-attr.nix This indicates a slight flaw in the single stack protection page approach that is not encountered with normal stack frames.
2022-01-19Fix the build with nlohmann/json 3.10.4+regnat
2022-01-18allow modifying lockfile commit msg with nix config optionlincoln auster [they/them]
This allows setting the commit-lockfile-summary option to a non-empty string to override the commit summary while leaving the body unchanged.
2022-01-18BinaryCacheStore: Implement addBuildLog()Eelco Dolstra
2022-01-18Add command 'nix store copy-log'Eelco Dolstra
Fixes #5222.
2022-01-18DohEelco Dolstra
2022-01-18DohEelco Dolstra
2022-01-18Get rid of std::shared_ptr<std::string> and ref<std::string>Eelco Dolstra
These were needed back in the pre-C++11 era because we didn't have move semantics. But now we do.
2022-01-17serialise.hh: Use std::string_viewEelco Dolstra
2022-01-11Merge pull request #5898 from layus/repair-path-linksEelco Dolstra
Make --repair-path also repair corrupt optimised links
2022-01-11Prefer RepairFlag over bool when applicableGuillaume Maudoux
2022-01-11Make --repair-path also repair corrupt optimised linksGuillaume Maudoux
There already existed a smoke test for the link content length, but it appears that there exists some corruptions pernicious enough to replace the file content with zeros, and keeping the same length. --repair-path now goes as far as checking the content of the link, making it true to its name and actually repairing the path for such coruption cases.
2022-01-10'target' points to 'source'Eelco Dolstra
2022-01-10Merge branch 'recursive-nix-fix' of https://github.com/L-as/nixEelco Dolstra
2022-01-07DerivationGoal::loadDerivation(): Don't use derivationFromPath()Eelco Dolstra
This causes a recursive call to ensurePath(), which is not a good idea.
2022-01-06Merge pull request #5749 from GavinRay97/patch-1Domen Kožar
Better diagnostics if no valid signature found
2021-12-22Remove CPU lockingEelco Dolstra
This was already accidentally disabled in ba87b08. It also no longer appears to be beneficial, and in fact slow things down, e.g. when evaluating a NixOS system configuration: elapsed time: median = 3.8170 mean = 3.8202 stddev = 0.0195 min = 3.7894 max = 3.8600 [rejected, p=0.00000, Δ=0.36929±0.02513]
2021-12-16Ignore EPERM when unsharing FS stateEelco Dolstra
On Docker (but not podman), unshare(CLONE_FS) fails with EPERM. So let's ignore it and hope nothing bad happens. Attempted fix for #5777.
2021-12-14Merge pull request #5769 from NixOS/ca/get-build-statsEelco Dolstra
Add a crude tracing mechansim for the build results
2021-12-14Merge pull request #5702 from baloo/baloo/hide-non-reproducible-settingsThéophane Hufschmitt
reproducibility: hide non-reproducible settings from manual
2021-12-14Merge pull request #5366 from trofi/speedup-ca-queryThéophane Hufschmitt
ca-specific-schema.sql: add index on RealisationsRefs(referrer)
2021-12-13queryMissing(): Use a bigger thread poolEelco Dolstra
This is a temporary hack until we make queryMissing() async. Closes #5324.
2021-12-13SimplifyEelco Dolstra
2021-12-13Merge branch 'arm32-personality' of https://github.com/cleverca22/nixEelco Dolstra
2021-12-13More debug infoEelco Dolstra
2021-12-13Retry on ECONNREFUSEDEelco Dolstra
https://hydra.nixos.org/build/161439235
2021-12-13Explicitly make GC roots client sockets blockingEelco Dolstra
On macOS / BSD, these sockets inherit the non-blocking flag of the server soocket, which is not what we want. https://github.com/dotnet/runtime/issues/25069 https://bugs.python.org/issue7995 https://hydra.nixos.org/build/161439304
2021-12-13Add a crude tracing mechansim for the build resultsregnat
Add a `_NIX_TRACE_BUILT_OUTPUTS` environment variable that can be set to a filename in which the result of each build will be logged. This is intentionally crude and undocumented as it’s only meant to be a temporary thing to assess the usefulness of CA derivations. Any other use would need a cleaner re-implementation first.
2021-12-13More properly track the status of CA buildsregnat
Make the build of unresolved derivations return the same status as the resolved one, except in the case of an `AlreadyValid` in which case it will return `ResolvesToAlreadyValid` to mean that the outputs of the unresolved derivation weren’t known, but the resolved one is.