Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
The install-multi-user script uses blue, green, and red colors, as
well as bold and underline, to add helpful formatting that helps
structure its rather voluminous output.
Unfortunately, the terminal escape sequences it uses are not quite
well-formed. The relevant information is all there, just obscured
by some extra noise, a leading parameter `38`. Empirically, the
result is:
* On macOS, in both Terminal.app and iTerm2, the spurious `38` is
ignored, the rest of the escape sequence is applied, and the colors
show up as intended.
* On Linux, in at least gnome-terminal and xterm, the spurious `38`
and the next parameter after it are ignored, and what's left is
applied. So in the sequence `38;4;32`, the 4 (underline) is
ignored but the 32 (green) takes effect; in a more typical sequence
like `38;34`, the 34 (blue) is ignored and nothing happens.
These codes are all unchanged since this script's origins as a
Darwin-only script -- so the fact that they work fine in common macOS
terminals goes some way to explain how the bug arose.
Happily, we can make the colors work as intended by just deleting the
extra `38;`. Tested in all four terminals mentioned above; the new
codes work correctly on all of them, and on the two macOS terminals
they work exactly the same as before.
---
In a bit more technical detail -- perhaps more than anyone, me
included, ever wanted to know, but now that I've gone and learned it
I'll write it down anyway :) -- here's what's happening in these codes:
An ECMA-48 "control sequence" begins with `\033[` aka "CSI", contains
any number of parameters as semicolon-separated decimal numbers (plus
sometimes other wrinkles), and ends with a byte from 0x40..0x7e. In
our case, with `m` aka "SGR", "Select Graphic Rendition".
An SGR control sequence `\033[...m` sets colors, fonts, text styles,
etc. In particular a parameter `31` means red, `32` green, `34` blue,
`4` underline, and `0` means reset to normal. Those are all we use.
There is also a `38`. This is used for setting colors too... but it
needs arguments. `38;5;nn` is color nn from a 256-color palette, and
`38;2;rr;gg;bb` has the given RGB values.
There is no meaning defined for `38;1` or `38;34` etc. On seeing a
parameter `38` followed by an unrecognized argument for it, apparently
some implementations (as seen on macOS) discard only the `38` and
others (as seen on Linux) discard the argument too before resuming.
(cherry picked from commit 7313aa267b5be1e5264e4577e7bc3daec2fef282)
|
|
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)
|
|
(cherry picked from commit d1b238ec3cd74d652af46f577f992c9a44ac8e32)
|
|
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)
|
|
(cherry picked from commit 12556e570924315eb25ad6057b6c2c5162955e4f)
Signed-off-by: Domen Kožar <domen@dev.si>
|
|
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>
|
|
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>
|
|
Hopefully fixes #3278.
(cherry picked from commit 1ab8d6ac1861e9405ae34af3deb681020c03e82d)
Signed-off-by: Domen Kožar <domen@dev.si>
|
|
This file is licensed under the GPL. Originally, Nix was also
GPL-licensed so that was fine. However, we later changed the license
to the LGPL but missed the fact that style.css has an incompatible
license.
Since the Nix manual at nixos.org uses its own styling, we can remove
this file.
Fixes #3392.
(cherry picked from commit 9c7e90f414067eb59170bde952d5b8ac03c8f46c)
|
|
The make-rules repo is not maintained.
(cherry picked from commit cc5c81822d298544489ea0861d266c3a5137759a)
|
|
|
|
Fixes #3363.
(cherry picked from commit d8fd31f50ff55f7f334a2b9e58a82570e82ec28d)
|
|
(cherry picked from commit 583d06385de82ab5c7fc77d26cd138d3c6d5f4b5)
|
|
(cherry picked from commit f46bc0e8eb079f7d2613bfabfbcff31f4401b42c)
|
|
It's broken at the moment: https://hydra.nixos.org/build/105746055
Also it pulls in GHC which is a pretty big dependency.
(cherry picked from commit b4e260d887441fde9ab568dff7c21a77d7cff904)
|
|
- At the top of the release notes, we announce sandboxing is now enabled by default,
then at the bottom it says it's now disabled when missing kernel support. These
can be merged into one point for clarity.
- The point about `max-jobs` defaulting to 1 appears unrelated to sandboxing.
(cherry picked from commit 5d24e18e29ea1fff8fa316701fd95be6941da770)
|
|
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)
|
|
(cherry picked from commit 48ddb8e481c0ba0b59b7193df4aa914ce83a9032)
|
|
|
|
(cherry picked from commit 8beedd44861d1fe7208609ee8d231ca1c02dedf6)
(cherry picked from commit 0678e4d56a839f940af8aa70059ced48b393e817)
|
|
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)
|
|
If the user invokes nix with --trace-function-calls it means that they
want to see the trace.
(cherry picked from commit 619cc4af855fab7b0400586a4fd40745b23e72ad)
|
|
|
|
(cherry picked from commit 4e70652ee33641a6cfddbfb9b7d741515f1bf98a)
|
|
(cherry picked from commit cdadbf770855e828a0f64d70a47db43e920ad137)
|
|
dynamic attributes
(cherry picked from commit cd55f91ad2075d5ebb506950dfbc4161cab22db5)
|
|
(cherry picked from commit 52ffe2797a6a943bac968e92ad443a567dfdf80e)
|
|
(cherry picked from commit cea05e5ee758daad40047db0b861980d80da2e85)
|
|
(cherry picked from commit e583df52800b4baa1564b027fe3b83a21756c2cc)
|
|
https://hydra.nixos.org/build/104119659
(cherry picked from commit 2f96a89646c6e55e2f1bbb80805dcbbe60fa94ae)
|
|
`s3:ListObjects` isn't a real IAM action, but _is_ the name of an S3 API method. `s3:ListBucket` is the relevant action for that method.
https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html
(cherry picked from commit c92ea927e508f3c06b6b3ee68e1f0565264cac2c)
|
|
(cherry picked from commit f107a270026596e525bdf8df0e2d331783ec4a10)
|
|
(cherry picked from commit b7a936224ee6e1ad9c842f618bbd5bc1864ebd54)
|
|
This reverts commit d8730fb86facadbef22d3df7f8a743a56e7ed53c.
(cherry picked from commit 9be7787ec04d604a4e65a22a6b9ae56567aaf618)
|
|
(cherry picked from commit f0ec4b4ce478a8d2760203e8192275b88c770e1c)
|
|
We're calling `wait4path` on the full, resolved `@bindir@/nix-daemon` path.
That means we're hardcoding something like:
/bin/wait4path /nix/store/zs9c5xhp3zv9p23qnjxp87nl5injsi1i-nix-2.3/bin/nix-daemon && /nix/var/nix/profiles/default/bin/nix-daemon
That seems unnecessarily fragile.
It might be better to wait4path on the path we intend to call.
(cherry picked from commit 8c4a5e7ba1990348b9497c0fc4dc236dda3e7986)
|
|
On Catalina, the /nix filesystem might not be mounted at start time.
To avoid this service not starting, we need to keep the launch agent
outside of the Nix store. A wait4pid will hold for our /nix dir to be
mounted.
Fixes #3125.
(cherry picked from commit 0847f2f1b3145a62dc34707ba788275ce6b6fc57)
|
|
|
|
It also OOMs.
https://hydra.nixos.org/build/105942679
(cherry picked from commit 99af822004418b25b6d04eca67949c62e770c16b)
|
|
It constantly OOMs.
https://hydra.nixos.org/build/105784912
(cherry picked from commit 35732a95bcdc0a4b4492845205e6283fcc88fd0d)
|
|
(cherry picked from commit 96c84937c49435525d0733437aa88902b2c8caf6)
|
|
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)
|
|
Fixes #3138.
(cherry picked from commit 906d56a96b442d4dd8f924c1ce0d1eec0e214af3)
|
|
Fixes #3140.
(cherry picked from commit 389a2cebed7cd72bda524ece0a56af2888cd80b6)
|
|
(cherry picked from commit d8730fb86facadbef22d3df7f8a743a56e7ed53c)
|
|
Fixes #3186
(cherry picked from commit b811bd2172bc9796f42b87996f455d4e5e4382ba)
|
|
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)
|
|
(cherry picked from commit 8737980e75bf14cae278f596ac26577bec94b3f9)
|
|
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)
|