aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
AgeCommit message (Collapse)Author
2021-08-25Don't overwrite user provided `lib*_LDFLAGS`Pamplemousse
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-08-13Install pkg-config files in the correct locationPiotr Szubiakowski
Use `$(libdir)` while installing .pc files looks like a more generic solution. For example, it will work for distributions like RHEL or Fedora where .pc files are installed in `/usr/lib64/pkgconfig`.
2021-08-1015f4d4f follow upPamplemousse
* libstore: `bz2` should not be linked * libutil: `zlib.h` should not be included Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-08-09Merge pull request #5111 from Pamplemousse/cleanEelco Dolstra
Minor maintenance cleaning
2021-08-09Expand docstring of `Store::querySubstitutablePathInfos`Sebastian Ullrich
2021-08-09Merge pull request #5104 from andir/refscan-raceEelco Dolstra
Fix potential race-condition in reference scanning code
2021-08-08libstore: use set instead of list for waiter listAndreas Rammhold
This replaces the O(n) search complexity in our insert code with a lookup of O(log n). It also makes removing waitees easier as we can use the extract method provided by the set class.
2021-08-08Short-circuit querying substituters on successSebastian Ullrich
2021-08-07Fix potential race-condition in reference scanning codeAndreas Rammhold
Previously the code ensures that the isBase32 array would only be initialised once in a single-threaded context. If two threads happen to call the function before the initialisation was completed both of them would have completed the initialization step. This allowed for a race-condition where one thread might be done with the initialization but the other thread sets all the fields to false again. For a brief moment the base32 detection would then produce false-negatives.
2021-07-30Remove unused struct in `libstore`Pamplemousse
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-07-30Don’t send the experimental-features to the daemonregnat
The experimental features are, well, experimental, and shouldn’t be carelessly and transparently enabled. Besides, some (`ca-derivations` at least) need to be enabled at startup in order to work properly. So it’s better to just require that daemon be started with the right `experimental-features` option. Fix #5017
2021-07-26Revert no longer necessary changeEelco Dolstra
2021-07-26Low-latency closure copyEelco Dolstra
This adds a new store operation 'addMultipleToStore' that reads a number of NARs and ValidPathInfos from a Source, allowing any number of store paths to be copied in a single call. This is much faster on high-latency links when copying a lot of small files, like .drv closures. For example, on a connection with an 50 ms delay: Before: $ nix copy --to 'unix:///tmp/proxy-socket?root=/tmp/dest-chroot' \ /nix/store/90jjw94xiyg5drj70whm9yll6xjj0ca9-hello-2.10.drv \ --derivation --no-check-sigs real 0m57.868s user 0m0.103s sys 0m0.056s After: real 0m0.690s user 0m0.017s sys 0m0.011s
2021-07-22RemoteStore::buildPaths(): Handle evalStoreEelco Dolstra
2021-07-22Remove redundant RealisedPath::closure() callEelco Dolstra
2021-07-22buildPaths(): Add an evalStore argumentEelco Dolstra
With this, we don't have to copy the entire .drv closure to the destination store ahead of time (or at all). Instead, buildPaths() reads .drv files from the eval store and copies inputSrcs to the destination store if it needs to build a derivation. Issue #5025.
2021-07-22copyPaths: Pass store by referenceEelco Dolstra
2021-07-22Use eval-store in more placesEelco Dolstra
In particular, this now works: $ nix path-info --eval-store auto --store https://cache.nixos.org nixpkgs#hello Previously this would fail as it would try to upload the hello .drv to cache.nixos.org. Now the .drv is instantiated in the local store, and then we check for the existence of the outputs in cache.nixos.org.
2021-07-22DummyStore: Remove redundant methodEelco Dolstra
2021-07-22nix-build: Copy drv closure between eval store and build storeEelco Dolstra
2021-07-22Hacky fast closure copying mechanismEelco Dolstra
2021-07-22Downgrade warning messageEelco Dolstra
If a store doesn't support GC, then we don't need to warn about the inability to create roots.
2021-07-21Tweak --no/use-registries doc stringsEelco Dolstra
2021-07-21Merge branch 'balsoft/no-registries' of https://github.com/serokell/nixEelco Dolstra
2021-07-20Properly lock the builds of CA derivationsregnat
Make sure that we can’t build the same derivation twice at the same time. Fix https://github.com/NixOS/nix/issues/5029
2021-07-16Add use-registries config option (and deprecate --no-registries flag)Alexander Bantyev
Some people want to avoid using registries at all on their system; Instead of having to add --no-registries to every command, this commit allows to set use-registries = false in the config. --no-registries is still allowed everywhere it was allowed previously, but is now deprecated. Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2021-07-16Be more lenient when realisations have a conflicting dependency setregnat
- This can legitimately happen (for example because of a non-determinism causing a build-time dependency to be kept or not as a runtime reference) - Because of older Nix versions, it can happen that we encounter a realisation with an (erroneously) empty set of dependencies, in which case we don’t want to fail, but just warn the user and try to fix it.
2021-07-15Forward the whole Nix config to the post-build-hookregnat
Fill `NIX_CONFIG` with the value of the current Nix configuration before calling the post-build-hook. That way the whole configuration (including the possible `experimental-features`, a possibly `--store` option or whatever) will be made available to the hook
2021-07-13Merge pull request #5006 from illustris/nscdEelco Dolstra
fixed-output derivations: fix incorrect responses for getpwuid
2021-07-13fixed output derivations: fix incorrect responses for getpwuidillustris
Passing nscd socket into the build environment causes unexpected behavior in programs that make getpwuid and other related calls. relevant threads: - https://github.com/NixOS/nix/issues/4991 - https://discourse.nixos.org/t/haunted-nix-build-breaks-isolation/13869
2021-07-12StyleEelco Dolstra
2021-07-12Merge branch 'structured-attrs-shell' of https://github.com/Ma27/nixEelco Dolstra
2021-07-12Merge branch 'master' into structured-attrs-shellMaximilian Bosch
Conflicts: src/nix/develop.cc src/nix/get-env.sh tests/shell.nix
2021-07-12Error -> UsageErrorEelco Dolstra
2021-07-12Merge branch 'days' of https://github.com/nielsegberts/nixEelco Dolstra
2021-07-11Throw on unexpected input for --delete-older-thanNiels Egberts
'--delete-older-than 10' deletes the generations older than a single day, and '--delete-older-than 12m' deletes all generations older than 12 days. This changes makes it throw on those invalid inputs, and gives an example of a valid input.
2021-07-09FormattingEelco Dolstra
2021-07-08Merge pull request #4935 from alyssais/host_osEelco Dolstra
Apply OS checks to host platform, not build
2021-07-05Merge pull request #4938 from tomcur/store-uri-parsingEelco Dolstra
Improve machine store URI parsing
2021-06-28Merge pull request #4942 from NixOS/ca/remove-lock-filesEelco Dolstra
Eventually delete the CA paths lock files
2021-06-28Merge pull request #4937 from NixOS/ca/make-the-tests-usefulEelco Dolstra
Make the CA tests actually test something
2021-06-24Eventually delete the CA paths lock filesregnat
Mark the lockfiles as having to eventually be deleted so that they don’t stay laying around in the store at the end of the build Fix #4936
2021-06-24Perform input rewrites only in LocalDerivationGoalMaximilian Bosch
2021-06-24Make CA derivations compatible with recursive Nixregnat
Add an access-control list to the realisations in recursive-nix (similar to the already existing one for store paths), so that we can build content-addressed derivations in the restricted store. Fix #4353
2021-06-24Make the post-build-hook also run for unresolved CA derivationsregnat
Fix #4837
2021-06-23Improve machine store URI parsingThomas Churchman
2021-06-23Apply OS checks to host platform, not buildAlyssa Ross
Previously, the build system used uname(1) output when it wanted to check the operating system it was being built for, which meant that it didn't take into-account cross-compilation when the build and host operating systems were different. To fix this, instead of consulting uname output, we consult the host triple, specifically the third "kernel" part. For "kernel"s with stable ABIs, like Linux or Cygwin, we can use a simple ifeq to test whether we're compiling for that system, but for other platforms, like Darwin, FreeBSD, or Solaris, we have to use a more complicated check to take into account the version numbers at the end of the "kernel"s. I couldn't find a way to just strip these version numbers in GNU Make without shelling out, which would be even more ugly IMO. Because these checks differ between kernels, and the patsubst ones are quite fiddly, I've added variables for each host OS we might want to check to make them easier to reuse.
2021-06-23Assert that compatible realisations have the same dependenciesregnat
Should always hold, but that’s not necessarily obvious, so better enforce it
2021-06-23Display the diverging paths in case of a realisation mismatchregnat
2021-06-23Fix indentationregnat