1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 06:52:43 +01:00
Commit graph

6032 commits

Author SHA1 Message Date
Eelco Dolstra
d0699defd6
Process --option use-case-hack properly
Fixes https://github.com/NixOS/nix/issues/2009.

(cherry picked from commit 2b61c74922)
2018-04-11 11:47:43 +02:00
Eelco Dolstra
247630287b
ValidPathInfo::isContentAddressed(): Ensure there are no references
(cherry picked from commit 9d1220a01d)
2018-04-11 11:47:43 +02:00
Tuomas Tynkkynen
59c54f877c
release.nix: Use pkgs.closureInfo for binaryTarball
pathsFromGraph is legacy since Nix 2.0.

(cherry picked from commit cc6712ae90)
2018-04-11 11:47:43 +02:00
Eelco Dolstra
4a7b3d1f4c
Revert "Merge pull request #2027 from grahamc/backport-linux-multi-user"
This reverts commit a198670ab2,
reversing changes made to
a1cc741d9c. For the stable release
branch, we can't really change the fundamental behaviour of the
installer (i.e. by doing a multi-user install on Linux).
2018-04-11 11:47:43 +02:00
Shea Levy
33dc83821d
Document fetchGit.
Fixes #1981.

(cherry picked from commit 6856fe62b0)
2018-04-11 11:47:43 +02:00
Dmitry Kalinkin
26bc4b9557
doc: don't mention obsolete ssh-substituter-hosts
#1840

(cherry picked from commit e2f56c1333)
2018-04-11 11:47:42 +02:00
Corey O'Connor
7a35b10ade
manual: correct repeated "--deriver". Add missing single char option aliases.
(cherry picked from commit 22b144fea6)
2018-04-11 11:47:42 +02:00
Eelco Dolstra
ccb81b2622
Remove unused channel-cache directory
(cherry picked from commit 03d8136b02)
2018-04-11 11:47:42 +02:00
Eelco Dolstra
073dac149b
Don't retry on CURLE_SSL_CACERT_BADFILE
The certificates won't get any better if we retry.

(cherry picked from commit eb75bc5afb)
2018-04-11 11:47:42 +02:00
Eelco Dolstra
225ae5b62a
Filter ANSI colors when not writing to a terminal
Fixes https://github.com/NixOS/nixpkgs/issues/37114.

(cherry picked from commit 4868721506)
2018-04-11 11:47:42 +02:00
Will Dietz
434cdab511
nix-daemon: preserve errno in signal handler (thanks tsan)
(cherry picked from commit d98755b0c2)
2018-04-11 11:47:42 +02:00
Eelco Dolstra
ac5a36c2f3
build-remote: Don't substitute the build result
(cherry picked from commit 7afdc8d4a1)
2018-04-11 11:47:42 +02:00
Eelco Dolstra
25b24a5542
Typo
(cherry picked from commit 6e60141a80)
2018-04-11 11:47:42 +02:00
Guillaume Maudoux
4c737abe3e
fetchGit: Fix debug message
(cherry picked from commit 80735c4cc9)
2018-04-11 11:47:42 +02:00
Eelco Dolstra
dd214bb087
Fix double free in Store::queryPathInfo()
It was holding on to a Value* (i.e. a std::shared_ptr<ValidPathInfo>*)
outside of the pathInfoCache lock, so the std::shared_ptr could be
destroyed between the release of the lock and the decrement of the
std::shared_ptr refcount. This can happen if more than
'path-info-cache-size' paths are added in the meantime, *or* if
clearPathInfoCache() is called. The hydra-queue-runner queue monitor
thread periodically calls the later, so is likely to trigger a crash.

Fixes https://github.com/NixOS/hydra/issues/542.

(cherry picked from commit 24b739817f)
2018-04-11 11:47:42 +02:00
Eelco Dolstra
d306287abd
Fix #1957
(cherry picked from commit 16551f54c9)
2018-04-11 11:47:41 +02:00
Will Dietz
33bfcbdbdd
release.nix: don't try to use nix-2.0 branch, no longer exists
Probably should point at the 18.03 release branch once that's made.

(cherry picked from commit e9a5ce9b07)
2018-04-11 11:47:41 +02:00
Eelco Dolstra
2bbea0d96f
Fix error message
(cherry picked from commit 939cf4cceb)
2018-04-11 11:47:41 +02:00
Michael Fiano
d64618de01
nix-channel grammar and punctuation
Minor changes to the nix-channel manpage for my first contribution

(cherry picked from commit ad97d1a786)
2018-04-11 11:47:41 +02:00
Will Dietz
5df25a35b7
fetchGit: use "HEAD" as default ref
(cherry picked from commit e89d02bf03)
2018-04-11 11:47:41 +02:00
Shea Levy
7e989da790
Actually fix nixDataDir in non-canonical path
(cherry picked from commit 14ca85688c)
2018-04-11 11:47:41 +02:00
Tuomas Tynkkynen
77a2cd2f5e
libexpr: Fix prim_replaceStrings() to work on an empty source string
Otherwise, running e.g.

nix-instantiate --eval -E --strict 'builtins.replaceStrings [""] ["X"] "abc"'

would just hang in an infinite loop.

Found by afl-fuzz.

First attempt of this was reverted in e2d71bd186 because it caused
another infinite loop, which is fixed now and a test added.

(cherry picked from commit 77e9e1ed91)
2018-04-11 11:47:41 +02:00
Eelco Dolstra
d0665a22cc
nix run: Fix segfault on macOS
Note that clearenv() is not available on macOS.

Fixes #1907.

(cherry picked from commit 24ec750003)
2018-04-11 11:47:41 +02:00
Will Dietz
bdd88cabd3
nix search: explicitly handle empty search string, fixes #1893
This is important since this is given as an example.
Other patterns containing "empty search string" will still
be handled differently on different platforms ("asdf|")
but that's less of an issue.

(cherry picked from commit 009cf9cd23)
2018-04-11 11:47:41 +02:00
Will Dietz
e9c5be6fe7
nix search: fix bug where we wrote to cache when shouldn't, breaking
This is exposed by the tests added previously,
and resolves the error reported in #1892:
"expected JSON value".

(cherry picked from commit 3cac8734ac)
2018-04-11 11:47:41 +02:00
Eelco Dolstra
0995763eb1
Fix downloadCached() with a chroot store
E.g.

  nix run --store ~/my-nix -f channel:nixos-17.03 hello -c hello

This problem was mentioned in #1897.

(cherry picked from commit 64e486ab63)
2018-04-11 11:47:41 +02:00
Eelco Dolstra
741a9e9ec3
Fix example in release notes
(cherry picked from commit 39b4177500)
2018-04-11 11:47:40 +02:00
Eelco Dolstra
af81bb7845
Doh
(cherry picked from commit 2691d51a33)
2018-04-11 11:47:40 +02:00
Linus Heckemann
3b9eb5385f
Fix #1762
nix-store --export, nix-store --dump, and nix dump-path would previously
fail silently if writing the data out failed, because
 a) FdSink::write ignored exceptions, and
 b) the commands relied on FdSink's destructor, which ignores
    exceptions, to flush the data out.

This could cause rather opaque issues with installing nixos, because
nix-store --export would happily proceed even if it couldn't write its
data out (e.g. if nix-store --import on the other side of the pipe
failed).

This commit adds tests that expose these issues in the nix-store
commands, and fixes them for all three.

(cherry picked from commit 78ac3eb4eb)
2018-04-11 11:47:40 +02:00
Daniel Peebles
d8141deebe
Merge pull request #2067 from LnL7/darwin-daemon-keepalive
launchd: enable keepalive for the nix-daemon service
2018-04-10 15:39:12 -04:00
Daiderd Jordan
3cc790bd20
launchd: enable keepalive for the nix-daemon service
Without this the daemon won't be restarted if the process ever dies, for
example when sending a SIGHUP to reload nix.conf.

(cherry picked from commit 05cb8e5c5a)
2018-04-10 21:35:51 +02:00
Graham Christensen
a198670ab2
Merge pull request #2027 from grahamc/backport-linux-multi-user
Backport #2026: Expand the multi-user installer to support Linuxes with systemd
2018-03-30 16:04:17 -04:00
Graham Christensen
b037be7e33
macos: Handle when a build user doesn't have a user ID
(cherry picked from commit 4eb40c72ed)
2018-03-30 15:17:03 -04:00
Graham Christensen
985f0dafe8
Use a looser comparison for the 'user note' check
We use grep instead of an equality check because it is difficult
to extract _just_ the user's note, instead it is prefixed with
some plist junk. This was causing the user note to always be set,
even if there was no reason for it.

(cherry picked from commit f06f8102bd)
2018-03-30 15:17:03 -04:00
Graham Christensen
1b493df892
Check for the existence of a profile target before seeing if it mentions Nix
Grep would ignore files that didn't exist, but would complain
about files in a directory if the directory didn't exist. Simply check
for the directory first, prior to grepping it.

(cherry picked from commit 4ba91f5bae)
2018-03-30 15:17:03 -04:00
Graham Christensen
fb6a41a227
Expand the multi-user installer to support Linuxes with systemd
- darwin installer: delete hardware report, not necessary
 - moves os-specific code from the darwin installer to to `poly_*`
   functions
 - adds profile.d support to the profile targets, which automatically
   handles many distros which don't have a /etc/bashrc but do have an
   /etc/profile.d
 - /bin/bash -> /usr/bin/env bash
 - document why each excluded shellcheck check is excluded
 - rename the multi-user to Daemon-based

(cherry picked from commit 2921165a9d)
2018-03-30 15:16:59 -04:00
Dmitry Kalinkin
a1cc741d9c
Fix a small typo in the release notes
(cherry picked from commit d9d8a84a96)
2018-02-24 10:26:27 -05:00
Michael Weiss
bc0899dcc1
doc: Fix a URL in the release notes for Nix 2.0
(cherry picked from commit bd94e63853)
2018-02-24 10:22:47 -05:00
Eelco Dolstra
179b896acb
Merge branch 'data-dir-non-canon' of https://github.com/shlevy/nix 2018-02-22 14:20:43 +01:00
Eelco Dolstra
e8d53bfdc9
Revert "Enable sandbox builds on Linux by default"
This reverts commit ddc58e7896.

https://hydra.nixos.org/eval/1435322
2018-02-22 14:20:07 +01:00
Shea Levy
ddbcd01c83
Fix restricted mode when installing in non-canonical data dir 2018-02-22 07:18:14 -05:00
Eelco Dolstra
eaa52c34b4
Set release date 2018-02-22 12:44:46 +01:00
Eelco Dolstra
ddc58e7896
Enable sandbox builds on Linux by default
The overhead of sandbox builds is a problem on NixOS (since building a
NixOS configuration involves a lot of small derivations) but not for
typical non-NixOS use cases. So outside of NixOS we can enable it.

Issue #179.
2018-02-22 12:27:25 +01:00
Eelco Dolstra
6964131cd7
Merge branch 'fix/sandbox-shell-features' of https://github.com/dtzWill/nix 2018-02-22 12:20:13 +01:00
Eelco Dolstra
de4c03d201
Merge branch 'fix/dry-run-partially' of https://github.com/dtzWill/nix 2018-02-22 12:18:20 +01:00
Eelco Dolstra
88c90d5e6d
Manual: Put configuration options in sorted order 2018-02-21 18:08:47 +01:00
Eelco Dolstra
0d54671b7b
Manual: Update chapter on remote builds
Alos add a command "nix ping-store" to make it easier to see if Nix
can connect to a remote builder (e.g. 'nix ping-store --store
ssh://mac').
2018-02-21 16:24:26 +01:00
Eelco Dolstra
e2d71bd186
Revert "libexpr: Fix prim_replaceStrings() to work on an empty source string"
This reverts commit 4ea9707591.

It causes an infinite loop in Nixpkgs evaluation,
e.g. "nix-instantiate -A hello" hung.

PR #1886.
2018-02-21 15:35:28 +01:00
Shea Levy
a6c497f526
Merge branch 'nix-copy' of git://github.com/Mic92/nix-1 2018-02-20 21:05:17 -05:00
Jörg Thalheim
fa7fd76c5e nix-copy: fix examples
maybe a left-over from nix-store -r ?
2018-02-21 01:13:46 +00:00