about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2020-04-10 Fix PR_SET_PDEATHSIG results in Broken pipe (#2395)Tobias Möst1-2/+8
The ssh client is lazily started by the first worker thread, that requires a ssh connection. To avoid the ssh client to be killed, when the worker process is stopped, do not set PR_SET_PDEATHSIG. (cherry picked from commit 3e347220c82d1537723f49aa03a93a6f9d294417)
2020-04-10 SimplifyEelco Dolstra1-5/+2
(cherry picked from commit d1b238ec3cd74d652af46f577f992c9a44ac8e32)
2020-04-10 libstore/ssh: Improve error message on failing `execvp`Profpatsch1-2/+6
If the `throw` is reached, this means that execvp into `ssh` wasn’t successful. We can hint at a usual problem, which is a missing `ssh` executable. Test with: ``` env PATH= ./result/bin/nix-copy-closure --builders '' unusedhost ``` and the bash version with ``` env PATH= ./result/bin/nix-copy-closure --builders '' localhost ``` (cherry picked from commit 38b29fb72ca4a07afbec1fd5067f59ca7d7f0fab)
2020-04-10 fix placeholder not substituted in passAsFilemlatus1-1/+1
(cherry picked from commit 12556e570924315eb25ad6057b6c2c5162955e4f) Signed-off-by: Domen Kožar <domen@dev.si>
2020-04-10 libexpr: show expression in assertion errorsDaiderd Jordan1-4/+7
Includes the expression of the condition in the assertion message if the assertion failed, making assertions much easier to debug. eg. error: assertion (withPython -> (python2Packages != null)) failed at pkgs/tools/security/nmap/default.nix:11:1 (cherry picked from commit 307bcb9a8e7a16bfc451e055a620b766df9d3f7d) Signed-off-by: Domen Kožar <domen@dev.si>
2020-04-10 Don't retry on "unsupported protocol" errorCole Helbling1-0/+1
When encountering an unsupported protocol, there's no need to retry. Chances are, it won't suddenly be supported between retry attempts; error instead. Otherwise, you see something like the following: $ nix-env -i -f git://git@github.com/foo/bar warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 335 ms warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 604 ms warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 1340 ms warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 2685 ms With this change, you now see: $ nix-env -i -f git://git@github.com/foo/bar error: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1) (cherry picked from commit c976cb0b8ab5d0f2c4ab8c9826fc7db56e2f1b3e) Signed-off-by: Domen Kožar <domen@dev.si>
2020-04-10 Downloader: Only write data to the sink on a 200 responseEelco Dolstra1-2/+9
Hopefully fixes #3278. (cherry picked from commit 1ab8d6ac1861e9405ae34af3deb681020c03e82d) Signed-off-by: Domen Kožar <domen@dev.si>
2020-02-18 DohEelco Dolstra1-1/+1
2020-02-18 Disable the progress bar if $TERM == dumb or unsetEelco Dolstra1-1/+3
Fixes #3363. (cherry picked from commit d8fd31f50ff55f7f334a2b9e58a82570e82ec28d)
2020-02-18 structured-attrs: chown .attrs.* files to builderRobin Gloster1-0/+2
Otherwise `chmod .`'ing the build directory doesn't work anymore, which is done in nixpkgs if sourceRoot is set to '.'. (cherry picked from commit f8dbde0813c4e8beed6dfd09b093589e027a6675)
2020-02-18 retry on HTTP status code 429Domen Kožar1-1/+2
(cherry picked from commit 48ddb8e481c0ba0b59b7193df4aa914ce83a9032)
2020-01-05 Move #includeEelco Dolstra3-2/+3
(cherry picked from commit 8beedd44861d1fe7208609ee8d231ca1c02dedf6) (cherry picked from commit 0678e4d56a839f940af8aa70059ced48b393e817)
2020-01-05 Hide FunctionCallTrace constructor/destructorEelco Dolstra3-15/+20
This prevents them from being inlined. On gcc 9, this reduces the stack size needed for nix-instantiate '<nixpkgs>' -A texlive.combined.scheme-full --dry-run from 12.9 MiB to 4.8 MiB. (cherry picked from commit cb90e382b5b6e177ea902b3909fd1897643ae3cd)
2020-01-05 function-trace: always show the tracezimbatm1-2/+2
If the user invokes nix with --trace-function-calls it means that they want to see the trace. (cherry picked from commit 619cc4af855fab7b0400586a4fd40745b23e72ad)
2020-01-04 Ensure enough space in attrset bindings when using both __overrides and ↵Puck Meerburg1-1/+1
dynamic attributes (cherry picked from commit cd55f91ad2075d5ebb506950dfbc4161cab22db5)
2020-01-04 builtins.toJSON: fix __toString usageRobin Gloster3-7/+27
(cherry picked from commit e583df52800b4baa1564b027fe3b83a21756c2cc)
2020-01-04 Move tmpDirInSandbox to initTmpDirMatthew Bauer1-8/+8
(cherry picked from commit 96c84937c49435525d0733437aa88902b2c8caf6)
2020-01-04 Fix sandbox fallback settingsMatthew Bauer1-26/+34
The tmpDirInSandbox is different when in sandboxed vs. non-sandboxed. Since we don’t know ahead of time here whether sandboxing is enabled, we need to reset all of the env vars we’ve set previously. This fixes the issue encountered in https://github.com/NixOS/nixpkgs/issues/70856. (cherry picked from commit 499b0388759db0f9f385da402a4bba551268aa99)
2020-01-04 ssh-ng: Don't set CPU affinity on the remoteEelco Dolstra3-1/+9
Fixes #3138. (cherry picked from commit 906d56a96b442d4dd8f924c1ce0d1eec0e214af3)
2020-01-04 SourceExprCommand::getSourceExpr(): Allocate more spaceEelco Dolstra1-1/+1
Fixes #3140. (cherry picked from commit 389a2cebed7cd72bda524ece0a56af2888cd80b6)
2020-01-04 include netinet/in.h in src/nix/main.ccng01-0/+1
Fixes #3186 (cherry picked from commit b811bd2172bc9796f42b87996f455d4e5e4382ba)
2020-01-04 Fix progress bar when nix-prefetch-url is piped.Harald van Dijk2-2/+2
The intent of the code was that if the window size cannot be determined, it would be treated as having the maximum possible size. Because of a missing assignment, it was actually treated as having a width of 0. The reason the width could not be determined was because it was obtained from stdout, not stderr, even though the printing was done to stderr. This commit addresses both issues. (cherry picked from commit c935ad3f025d5c3d8026711a1eb50b2917b61d59)
2020-01-04 Fix typosBrian Wignall2-2/+2
(cherry picked from commit 8737980e75bf14cae278f596ac26577bec94b3f9)
2020-01-04 EvalState::callFunction(): Make FunctionCallTrace use less stack spaceEelco Dolstra1-4/+3
The FunctionCallTrace object consumes a few hundred bytes of stack space, even when tracing is disabled. This was causing stack overflows: $ nix-instantiate '<nixpkgs> -A texlive.combined.scheme-full --dry-run error: stack overflow (possible infinite recursion) This is with the default stack size of 8 MiB. Putting the object on the heap reduces stack usage to < 5 MiB. (cherry picked from commit 98ef11677c43db9aa669768d9f0cbec704e8831c)
2019-10-10 nix verify: Fix uninitialized variableEelco Dolstra1-2/+2
(cherry picked from commit 95cf23ee7c5b0fd69b21811989a5668f4261fd51)
2019-10-10 nix-env: Ignore failures creating ~/.nix-profile and ~/.nix-defexprEelco Dolstra1-14/+20
https://hydra.nixos.org/build/102803093 (cherry picked from commit c3aaf3b8da1a925c569389f13a861816a781a3c8)
2019-10-10 DohEelco Dolstra1-1/+1
https://hydra.nixos.org/build/102803044 (cherry picked from commit bda64a2b0f79346012332ed18f5a76388e6d9bae)
2019-10-10 nix-env: Create ~/.nix-defexpr automaticallyEelco Dolstra1-7/+12
(cherry picked from commit c9159f86cc9a2fc07e2ab1217c2d8a8824123df4)
2019-10-10 nix-env: Create ~/.nix-profile automaticallyEelco Dolstra5-17/+29
(cherry picked from commit 9348f9291e5d9e4ba3c4347ea1b235640f54fd79)
2019-10-09 Force per-user group to a known valueEelco Dolstra1-1/+1
(cherry picked from commit 20eec802ff11dd2b152715cd5c81b756d318219d)
2019-10-09 Go back to 755 permission on per-user directoriesEelco Dolstra1-1/+1
700 is pointless since the store is world-readable anyway. And per-user/root/channels must be world-readable. (cherry picked from commit d7bae5680fc26303acb9a9ee1a202f537841a624)
2019-10-09 Remove world-writability from per-user directoriesEelco Dolstra4-7/+31
'nix-daemon' now creates subdirectories for users when they first connect. Fixes #509 (CVE-2019-17365). Should also fix #3127. (cherry picked from commit 5a303093dcae1e5ce9212616ef18f2ca51020b0d)
2019-10-09 Filter ANSI escape sequences in -L outputEelco Dolstra1-1/+1
Otherwise, builds like NixOS VM tests may leave the terminal in a weird state and do resets. (cherry picked from commit 4331eeb13d241dfe2d2e6a01c53915c556cac94f)
2019-10-09 Disable OpenSSL lock callback on OpenSSL >= 1.1.1Eelco Dolstra1-0/+4
(cherry picked from commit a56b51a0ba7b0d6fdff7fd0127a118185b146f4f)
2019-10-09 libstore: don't forward --show-tracezimbatm1-0/+1
(cherry picked from commit e63c9e73e3e5d1f31fa5065c9ff59f442dd07d0e)
2019-10-09 Don't catch exceptions by valueEelco Dolstra5-7/+7
(cherry picked from commit 893be6f5e36abb58bbaa9c49055a5218114dd514) (cherry picked from commit bd79c1f6f6391786772a8a79962abe22f374cca4)
2019-10-09 Shut up some warningsEelco Dolstra2-0/+4
(cherry picked from commit 99e8e58f2de9941353b47ed14fbe4ed76d635519) (cherry picked from commit 3a022d45993b6fa8c7bf03517a3a3d1a2ab15f4a)
2019-10-09 Fix fetchTarball with chroot storesEelco Dolstra1-3/+3
Fixes #2405. (cherry picked from commit 168a8879165dd0deab1a93d343a6003146f37031)
2019-10-09 nix search: remove verbose exampleSam Doshi1-4/+0
(cherry picked from commit 6f6cb5e3880d0c7a1dd2bc13c2e0be8ce0ae9fa1)
2019-10-09 Handle empty sandbox_shellMatthew Bauer1-1/+4
Previously, SANDBOX_SHELL was set to empty when unavailable. This caused issues when actually generating the sandbox. Instead, just set SANDBOX_SHELL when --with-sandbox-shell= is non-empty. Alternative implementation to https://github.com/NixOS/nix/pull/3038. (cherry picked from commit 199e888785bd23073e44e56f6c74b95dc7c10ffa)
2019-10-09 nix search: Don't quietly ignore errorsEelco Dolstra1-0/+1
(cherry picked from commit 7c74f075f4a7274ad38c90085cc269a19a977438)
2019-10-09 getSourceExpr(): Handle channelsEelco Dolstra1-15/+16
Fixes #1892. Fixes #1865. Fixes #3119. (cherry picked from commit e6e61f0a54dac0174df996e93fcfedcac7769ab4)
2019-09-03 Support allowSubstitutes attribute in structured attribute derivationsEelco Dolstra6-10/+11
Hopefully fixes #3081 (didn't test).
2019-09-03 Add some noexceptsEelco Dolstra11-18/+19
This is to assert that callback functions should never throw (since the context in which they're called may not be able to handle the exception).
2019-09-03 Ensure that Callback is called only onceEelco Dolstra5-17/+36
Also, make Callback movable but uncopyable.
2019-09-03 Downloader: Remove a possible double call to CallbackEelco Dolstra1-8/+2
2019-08-29 Merge pull request #3069 from matthewbauer/max-nameEelco Dolstra1-0/+4
Set maximum name length in Nix
2019-08-29 Don't rely on st_blocksEelco Dolstra2-5/+4
It doesn't seem very reliable on ZFS.
2019-08-29 CleanupEelco Dolstra1-2/+2
2019-08-28 Merge pull request #2921 from matthewbauer/handle-sigwinchEelco Dolstra1-0/+9
Handle SIGWINCH in main thread