Commit Graph

7088 Commits

Author SHA1 Message Date
Eelco Dolstra
cc565be4bc
Merge pull request #4890 from alyssais/2.3-libatomic
[2.3] Backport libatomic fixes
2021-06-04 14:54:08 +02:00
Puck Meerburg
feb8267257
configure.ac: fix use of unread LIBS variable
This fixes both the SunOS/Solaris check, and the libatomic check, which
reference $LIBS, which has not been used since automake was stripped
out of the code.

(cherry picked from commit 196b77b686)
2021-06-04 12:28:34 +00:00
Matthew Bauer
f1688f2136
Use more robust test for libatomics
Taken from Mesa configure script:

https://github.com/mesa3d/mesa/blob/17.2/configure.ac#L405-L427
(cherry picked from commit b1c34152fe)
2021-06-04 12:28:19 +00:00
Matthew Bauer
7375b0b58c
Add libatomic for 32-bit ARM
Fixes #3113

(cherry picked from commit 74b4737d8f)
2021-06-04 12:26:36 +00:00
Eelco Dolstra
456bffbbe5
Merge pull request #4888 from alyssais/backport-static
[2.3] Pass --static flag to pkg-config when necessary
2021-06-04 14:19:13 +02:00
Matthew Bauer
fe679310a7
Pass --static flag to pkg-config when necessary
(cherry picked from commit 3e85c57a6c)
2021-06-04 11:04:30 +00:00
Domen Kožar
7b279eb798
Merge pull request #4877 from alyssais/2.3-freenode
[2.3] backport contact info changes (including getting rid of Freenode)
2021-06-02 11:14:51 +02:00
Alyssa Ross
a25f0a8730
install-multi-user.sh: add link to forum
Introduced in master in eab14a642c.
2021-06-02 08:32:47 +00:00
Patrick Hilhorst
c9dcfa50f8
throw freenode down the memory hole
(cherry picked from commit 822e338e5c)
2021-06-02 08:10:59 +00:00
Eelco Dolstra
59acbc5220 Fix evaluation on 20.03 2021-06-01 15:27:32 +02:00
regnat
3dbd83b9a1 Check the CA hash when importing stuff in the local store
When adding a path to the local store (via `LocalStore::addToStore`),
ensure that the `ca` field of the provided `ValidPathInfo` does indeed
correspond to the content of the path.
Otherwise any untrusted user (or any binary cache) can add arbitrary
content-addressed paths to the store (as content-addressed paths don’t
need a signature).
2021-06-01 15:21:01 +02:00
Eelco Dolstra
5713ff48c3 Bump version 2021-06-01 15:20:51 +02:00
Eelco Dolstra
702d707fb1
Merge pull request #4863 from jonringer/fix-2.3-build-stable
Fix pure build of 2.3
2021-06-01 11:22:28 +02:00
Jonathan Ringer
5e5013e2f6
Fix pure build of 2.3 2021-05-31 17:14:33 -07:00
Domen Kožar
406a70159a
Merge pull request #4805 from YorikSar/zsh-nix-profiles-2.3
Fix iterating over $NIX_PROFILES in Zsh (backport to 2.3)
2021-05-14 12:22:27 +02:00
Eelco Dolstra
2e12b28fc5
Bump version 2021-05-14 11:59:01 +02:00
Yuriy Taraday
419797128d Fix iterating over $NIX_PROFILES in Zsh
NIX_PROFILES is space separated list of directories, and passing it into
for as is is considered to be 1-element list with the whole string. With
shwordsplit option Zsh emulates other shells in this regard ans
implicitely splits unquoted strings into words.

Fixes #4167.
2021-05-14 12:09:58 +04:00
Travis A. Everett
dd50221e8a
fix nixbld user name/uid for macOS
(cherry picked from commit 0431cf6d09)
Signed-off-by: Domen Kožar <domen@dev.si>
2021-03-26 09:24:10 +01:00
Eelco Dolstra
dac86f84c3
Merge pull request #4634 from ianthehenry/backport-user-env-assertion-fix
backport #4411
2021-03-15 16:34:33 +01:00
David McFarland
2fe57daadd Fix insufficent attribute capacity in user profile 2021-03-13 17:32:47 +00:00
Eelco Dolstra
2a19287b8f
Merge pull request #4616 from lovesegfault/backport-4601
Backport #4601
2021-03-08 13:36:55 +01:00
Bernardo Meurer
da1629d744
nix-build: set execfail
When starting a nix-shell with `-i` it was previously possible for it to
silently fail in the scenario where the specified interpreter didn't
exist. This happened due to the `exec` call masking the issue.

With this change we enable `execfail`, which causes the script using
`nix-shell` as interpreter to correctly exit with code 127.

Fixes: #4598
(cherry picked from commit 6e849e3b0a)
2021-03-08 02:09:12 -08:00
Eelco Dolstra
3cdd464212
Merge pull request #4475 from matthewbauer/fix-4469-backport-2-3
[backport 2.3] Fix #4469
2021-01-25 20:15:59 +01:00
Maximilian Bosch
85329cac35
scripts/install-nix-from-closure: only show progress if a terminal is used
While the progress dots during the copying of the store work fine on a
normal terminal, those look pretty off if the script is run inside a
provisioning script of e.g. `vagrant` or `packer` where `stderr` and
`stdout` are captured:

    default: .
    default: ..
    default: .
    default: .
    default: .

To work around this, the script checks with `-t 0` if it's
running on an actual terminal and doesn't show the progress if that's not
the case.

(cherry picked from commit d9367a2dd1)
2021-01-25 20:14:10 +01:00
Matthew Bauer
f95c320500 Handle missing etag in 304 Not Modified response
GitHub now omits the etag, but 304 implies it matches the one we
provided. Just use that one to avoid having an etag-less resource.

Fixes #4469

(cherry picked from commit a766824660)
2021-01-25 12:18:57 -06:00
Eelco Dolstra
3a6a2f88f2
Merge pull request #4404 from orivej/2.3-aws-sdk-cpp
Backport compatibility with newer AWS SDKs to 2.3 (#4316)
2020-12-28 13:14:47 +01:00
Stéphan Kochen
024c0eaad1 Fix compatibility with newer AWS SDKs (#4316)
Tested against AWS SDK 1.8.99. Fixes #3201.

(cherry picked from commit e20a3ec756)
2020-12-26 09:09:21 +00:00
Domen Kožar
0828ace09b
Merge pull request #4389 from hercules-ci/backport-issue-3964-substitution-loop
Backport issue 3964 substitution loop
2020-12-25 15:59:31 +00:00
Robert Hensing
8388e2ea48 Revert "Tests for #3964"
This reverts commit e90530e491.

It appears that this backported test relies on new functionality.

The error is:

    + nix copy --to file:///build/nix-test/binary-cache /build/nix-test/store/dckdy2xp7sn8qvyx8axxjq7clnxddri1-multi-output
    warning: you don't have Internet access; disabling some network-dependent features
    error: uploading to 'file:///build/nix-test/binary-cache/nar/0hpfhrig9h6fvbjmiwsb7zkaxr19vr2w048y4xb3nrs36bagf92n.nar.xz' is not supported
2020-12-22 11:57:31 +01:00
Robert Hensing
e90530e491 Tests for #3964
(cherry picked from commit ea8d32020e)
2020-12-22 11:50:57 +01:00
Robert Hensing
c29fffeaaa DerivationGoal: only retry if output closure incomplete is only problem
(cherry picked from commit bd9eb5c743)
2020-12-22 11:46:22 +01:00
Eelco Dolstra
8803753666
Merge pull request #4374 from NixOS/2.3-absolute-url-in-binary-caches
Allow HTTP binary cache to request absolute uris
2020-12-16 14:42:25 +01:00
Domen Kožar
6de15f722d
Allow HTTP binary cache to request absolute uris 2020-12-16 14:13:15 +01:00
Eelco Dolstra
359c07b9fd
Merge pull request #4368 from piegamesde/backport-json-unicode-escape
Backport json unicode escaping to 2.3
2020-12-16 12:48:14 +01:00
Nikola Knezevic
0f35904915 Add support for \u escape in fromJSON
As fromTOML supports \u and \U escapes, bring fromJSON on par. As JSON defaults
to UTF-8 encoding (every JSON parser must support UTF-8), this change parses the
`\u hex hex hex hex` sequence (\u followed by 4 hexadecimal digits) into an
UTF-8 representation.

Add a test to verify correct parsing, using all escape sequences from json.org.
2020-12-15 18:49:32 +01:00
Nikola Knezevic
b595df5423 Remove redundant check in parseJSONString 2020-12-15 18:48:49 +01:00
Eelco Dolstra
62f01d7ed3
Bump version 2020-12-04 12:23:09 +01:00
Matthew Bauer
f82490c561
Update config.guess for proper arm64 macOS detection
This fixes results for arm64 macOS so config.guess now reports:

  aarch64-apple-darwin20.1.0

instead of

  arm-apple-darwin20.1.0

(cherry picked from commit 94f359525e)
2020-12-04 12:22:31 +01:00
Eelco Dolstra
8d65ec5457
Merge pull request #4312 from lukegb/bug4295
When moving paths out of sandbox, ensure we have write permission
2020-12-04 12:22:06 +01:00
Luke Granger-Brown
2239953894 When moving paths out of sandbox, ensure we have write permission.
If we're a single-user installation of Nix, then we won't have root
superpowers to just ignore the permission bits. This means that we'll
need permission on the directory (if it's a directory) that we're moving
in order to move it with rename, because it must update the ".."
directory entry.

Fixes #4295.

This is already working in master, thanks to
e913a2989f (and followup cleanups).
2020-12-04 04:33:33 +00:00
Travis A. Everett
6456941993
enable Darwin.arm64 to install x86_64 binary
Throwing @thefloweringash under the bus if this doesn't work, but it
sounds like Apple Silicon devices can use the x86_64 binary for now.

Fixes #4058

(cherry picked from commit 4864df6d6b)
Signed-off-by: Domen Kožar <domen@dev.si>
2020-11-20 10:51:51 +01:00
Eelco Dolstra
c67264d218
Bump version 2020-10-29 14:45:37 +01:00
Eelco Dolstra
7f1de4d5ed
Merge pull request #3405 from hercules-ci/issue-3398-path-info-cache-ttls-backport-2.3
pathInfoCache: Respect disk cache TTLs #3398 (2.3 backport)
2020-10-29 12:44:16 +01:00
Marwan Aljubeh
a39798b64c
Fix the nix-daemon Mac OS SSL CA cert
Mac OS multi-user installations are currently broken because all requests
made by nix-daemon to the binary cache fail with:

```
unable to download ... Problem with the SSL CA cert (path? access rights?) (77).
```

This change ensures that the nix-daemon knows where to find the SSL CA cert file.

Fixes #2899 and #3261.

(cherry picked from commit b7c02232b2)
2020-10-21 12:19:53 +02:00
Travis A. Everett
51a4a5e1cf
adapt to apfs.util flag diff in catalina/big sur
Fixes #3957. Just runs both forms to minimize moving parts.

(cherry picked from commit fe807904e5)
Signed-off-by: Domen Kožar <domen@dev.si>
2020-10-20 12:21:45 +02:00
Travis A. Everett
613297a528
replace xpath with xmllint --xpath; simplify
As mentioned in previous commit, Big Sur changes the syntax for the
xpath command slightly.

In the process of testing out replacements for these, I noticed a few
small simplification wins.

(cherry picked from commit e736f8f6e4)
Signed-off-by: Domen Kožar <domen@dev.si>
2020-10-20 12:21:45 +02:00
Travis A. Everett
72b8673e06
fix xpath and conditional bugs; xpath -> xmllint
- xpath -> xmllint: xpath's cli interface changed in Big Sur
  rather than add conditional logic for picking the correct
  syntax for xpath, I'm changing to xmllint --xpath, which
  appears to be consistent across versions I've tested...

- /plist/dict/key[text()='Writable']/following-sibling::true[1]
  doesn't do quite what's expected. It was written to try to
  select a <true /> node paired with the Writable key, but it
  will also select the *next* <true /> node that appears even
  if it was paired with another key.

- I think there's also a logic bug in the conditionals here.
  I'm not sure anyone ever actuall saw it, thanks to the xpath
  bug, though. With the xpath fix, this conditional passes if /nix
  does not exist, / IS writable, and the version is Catalina+.

  I think it meant to test for /nix does not exist, / is NOT
  writable, and the version is Catalina+. I reworked this lightly
  to make it a little clearer at the code level.

(cherry picked from commit 1f02b65c59)
Signed-off-by: Domen Kožar <domen@dev.si>
2020-10-20 12:21:44 +02:00
Travis A. Everett
14c7e77bc4
update macOS version handling for Big Sur
Keeping this commit narrow for reviewability, but some of these
conditionals will change in subsequent commits in this PR.

Fixes #3852.

(cherry picked from commit 9c3dc9d7ca)
Signed-off-by: Domen Kožar <domen@dev.si>
2020-10-20 12:21:41 +02:00
Eelco Dolstra
00a52f61f4
Installer: Set a known umask
Fixes #1560, #2377.

(cherry picked from commit 924712eef1)
2020-10-12 16:57:26 +02:00
Eelco Dolstra
f09b375837
Prevent a deadlock when user namespace setup fails
Observed on Centos 7 when user namespaces are disabled:
DerivationGoal::startBuilder() throws an exception, ~DerivationGoal()
waits for the child process to exit, but the child process hangs
forever in drainFD(userNamespaceSync.readSide.get()) in
DerivationGoal::runChild(). Not sure why the SIGKILL doesn't get
through.

Issue #4092.

(cherry picked from commit d761485010)
2020-10-07 09:10:24 +02:00