1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 06:21:14 +02:00
Commit graph

14477 commits

Author SHA1 Message Date
Eelco Dolstra
ec2baaaaac Add docs
(cherry picked from commit cab03fb779)
2023-10-19 19:00:13 +02:00
Eelco Dolstra
114ba0e363 Allow tarball URLs to redirect to a lockable immutable URL
Previously, for tarball flakes, we recorded the original URL of the
tarball flake, rather than the URL to which it ultimately
redirects. Thus, a flake URL like
http://example.org/patchelf-latest.tar that redirects to
http://example.org/patchelf-<revision>.tar was not really usable. We
couldn't record the redirected URL, because sites like GitHub redirect
to CDN URLs that we can't rely on to be stable.

So now we use the redirected URL only if the server returns the
`x-nix-is-immutable` or `x-amz-meta-nix-is-immutable` headers in its
response.

(cherry picked from commit 1ad3328c5e)
2023-10-19 18:59:57 +02:00
Eelco Dolstra
8ce966ee00 Add a generic check for rev attribute mismatches
(cherry picked from commit 3402b650cd)
2023-10-19 18:59:47 +02:00
Eelco Dolstra
15a3e6e282
Merge pull request #9083 from NixOS/backport-9079-to-2.16-maintenance
[Backport 2.16-maintenance] [Backport 2.18-maintenance] pathExists: isDir when endswith /.
2023-10-02 14:09:32 +02:00
Robert Hensing
7cebcde9cc pathExists: isDir when endswith /.
(cherry picked from commit f8a3893e8d)
(cherry picked from commit 860f64c345)
2023-10-02 12:08:45 +00:00
Eelco Dolstra
0529a89988
Merge pull request #8896 from NixOS/backport-8869-to-2.16-maintenance
[Backport 2.16-maintenance] Fix #8838, pathExists: isDir when ends with `/ `
2023-09-01 14:57:02 +02:00
Robert Hensing
6305ea6ad2 pathExists: isDir when endswith /
Fixes https://github.com/NixOS/nix/issues/8838

(cherry picked from commit 1e08e12d81)
2023-09-01 11:16:18 +00:00
Robert Hensing
9fcf142ee0 tests/lang/eval-okay-pathexists: Add cases
(cherry picked from commit d2e6cfa075)
2023-09-01 11:16:18 +00:00
Eelco Dolstra
24dd90e988
Merge pull request #8714 from NixOS/backport-8506-to-2.16-maintenance
[Backport 2.16-maintenance] Pass NIX_SSHOPTS when checking for an ssh master connection.
2023-07-20 17:15:48 +02:00
Théophane Hufschmitt
681c322f25
Merge pull request #8712 from NixOS/backport-8483-to-2.16-maintenance
[Backport 2.16-maintenance] restoreMountNamespace(): Restore the original root directory
2023-07-19 09:39:27 +02:00
David McFarland
52ddb32f4a Pass common ssh options in isMasterRunning
(cherry picked from commit d5e1eb20a2)
2023-07-18 13:48:57 +00:00
David McFarland
ba0400f918 Add test of explicit ssh control path in nix-copy test
This highlights a problem caused by SSHMaster::isMasterRunning returning
false when NIX_SSHOPTS contains -oControlPath.

(cherry picked from commit 5454fdcceb)
2023-07-18 13:48:57 +00:00
Eelco Dolstra
92e198f1db restoreMountNamespace(): Restore the original root directory
This is necessary when we're in a chroot environment, where the
process root is not the same as the root of the mount namespace
(e.g. in nixos-enter).

Fixes #7602.

(cherry picked from commit e54538c461)
2023-07-17 20:25:23 +00:00
Eelco Dolstra
96aae7ac03
Merge pull request #8555 from NixOS/backport-8552-to-2.16-maintenance
[Backport 2.16-maintenance] GC server: Clear O_NONBLOCK on the right file descriptor
2023-06-20 13:00:38 +02:00
github-actions[bot]
afd1c095c8
redirect old platform uninstall instruction links (#8553)
Uninstall instructions were moved to their own page in #8267. The
overall section link was redirected in #8286, but platform-specific
links (which I give out frequently when I triage installer trouble)
weren't included.

(cherry picked from commit 33d3889831)

Co-authored-by: Travis A. Everett <travis.a.everett@gmail.com>
2023-06-20 12:14:56 +02:00
Eelco Dolstra
ac32609ed9 GC server: Clear O_NONBLOCK on the right file descriptor
The bug fix in 6d30f9e6fe erroneously
cleared O_NONBLOCK on the server rather than client FD (leaving both
in an incorrect state).

Fixes #8551.

(cherry picked from commit a6a75ecad8)
2023-06-20 10:13:13 +00:00
Eelco Dolstra
6906d1185e Bump version 2023-06-06 15:47:39 +02:00
Eelco Dolstra
84050709ea
Merge pull request #8460 from NixOS/backport-8391-to-2.16-maintenance
[Backport 2.16-maintenance] Remove old default from docs for `hashed-mirrors`
2023-06-06 12:55:23 +02:00
Aneesh Agrawal
567a5f0146 Remove old default from docs for hashed-mirrors
The `hashed-mirrors` option did use to have this default value,
but it was removed and re-added with an empty default value.
As the autogenerated docs show the (actual) default values from code,
remove this incorrect reference from the docs.

I was updating my nix.conf settings after a few years and noticed this.

(cherry picked from commit c694f1a2f3)
2023-06-06 10:54:46 +00:00
Eelco Dolstra
5ba5bdde36
Merge pull request #8458 from NixOS/backport-8452-to-2.16-maintenance
[Backport 2.16-maintenance] SourcePath::resolveSymlinks(): Fix handling of symlinks that start with '..'
2023-06-06 12:39:10 +02:00
Eelco Dolstra
5b1b25695c Fix SourcePath::resolveSymlinks()
This fixes handling of symlinks that start with '..', and symlink
targets that contain symlinks themselves.

(cherry picked from commit f5c6b29940)
2023-06-06 10:06:42 +00:00
Eelco Dolstra
39018fd42e Bump version 2023-05-31 17:08:37 +02:00
Eelco Dolstra
1ac5f9eac2 Mark official release 2023-05-31 14:06:00 +02:00
Eelco Dolstra
c7fa41563d
Merge pull request #8423 from NixOS/release-notes
2.16 release notes
2023-05-31 13:14:23 +02:00
Eelco Dolstra
afc24e6a66 Release notes 2023-05-31 12:38:05 +02:00
Eelco Dolstra
41b6665603
Merge pull request #8415 from NixOS/dependabot/github_actions/zeebe-io/backport-action-1.3.0
Bump zeebe-io/backport-action from 1.2.0 to 1.3.0
2023-05-31 12:10:55 +02:00
Eelco Dolstra
9a5b9c588f
Merge pull request #8421 from fricklerhandwerk/doc-replaceStrings
update documentation according to release notes
2023-05-31 12:10:32 +02:00
Eelco Dolstra
3849144303
Merge pull request #8418 from edolstra/fallback-paths
maintainers/upload-release.pl: Don't update nix-fallback-paths.nix
2023-05-31 12:09:52 +02:00
Valentin Gagarin
738c0d5064
Merge pull request #8318 from fricklerhandwerk/doc-currentTime
document `builtins.currentTime`
2023-05-31 03:15:54 +02:00
Valentin Gagarin
52004696c0
Merge pull request #8413 from doronbehar/doc/distributed-builds/clearer-warning
distributed-builds.md: Clarify warning ssh access requirements
2023-05-31 02:05:05 +02:00
Valentin Gagarin
e2f33e0df1 rewrap lines to use one line per sentence
this makes future reviews easier as it reduces diff noise
2023-05-31 01:32:03 +02:00
Doron Behar
76287a9207 distributed-builds.md: Clarify warning ssh access requirements 2023-05-31 01:28:15 +02:00
Valentin Gagarin
9afd525e18 update documentation according to release notes 2023-05-30 22:58:15 +02:00
Valentin Gagarin
7a5731aa07 link to mentioned builtin 2023-05-30 22:58:00 +02:00
Robert Hensing
bed2fe2312
Merge pull request #8398 from polykernel/perf/lazy-eval-replacements-replacestrings
primops: lazy evaluation of replaceStrings replacements
2023-05-30 22:49:42 +02:00
Eelco Dolstra
ecae62020b
Merge pull request #8406 from NixOS/fix-ca-attrs-false
Restore Nix 2.3 behaviour for {__impure,__contentAddressed} = false
2023-05-30 11:59:14 +02:00
Eelco Dolstra
a35e041ce2
Merge pull request #8414 from NixOS/dependabot/github_actions/cachix/install-nix-action-21
Bump cachix/install-nix-action from 20 to 21
2023-05-30 11:57:41 +02:00
Eelco Dolstra
f3a88857b4 maintainers/upload-release.pl: Don't update nix-fallback-paths.nix 2023-05-30 11:49:59 +02:00
dependabot[bot]
2e01a53a36
Bump zeebe-io/backport-action from 1.2.0 to 1.3.0
Bumps [zeebe-io/backport-action](https://github.com/zeebe-io/backport-action) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/zeebe-io/backport-action/releases)
- [Commits](https://github.com/zeebe-io/backport-action/compare/v1.2.0...v1.3.0)

---
updated-dependencies:
- dependency-name: zeebe-io/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 22:56:44 +00:00
dependabot[bot]
6b56376c89
Bump cachix/install-nix-action from 20 to 21
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 20 to 21.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v20...v21)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 22:56:41 +00:00
Eelco Dolstra
61ddfa154b
Merge pull request #8399 from tweag/fix-chrooted-stores-error-path
Properly report build errors on chrooted stores
2023-05-27 17:55:57 +02:00
Eelco Dolstra
e4aebccf20 Restore Nix 2.3 behaviour for {__impure,__contentAddressed} = false
Fixes #8405.
2023-05-27 17:53:30 +02:00
Théophane Hufschmitt
940e9eb8dd
Merge pull request #8240 from tweag/macos-sandbox
ci: Always run with sandbox, even on Darwin
2023-05-26 17:06:02 +02:00
Yorick van Pelt
2c462486fe
create pathAccessible, use it to infer default dirs 2023-05-26 15:36:47 +02:00
Yorick van Pelt
a6c78ba367
getDefaultNixPath: ignore EPERM 2023-05-26 15:36:46 +02:00
Yorick van Pelt
b7cde90c6b
Call getDefaultSSLCertFile() only when none is specified
This does pathExists on various paths, which crashes on EPERM in the
macOS sandbox.
2023-05-26 15:36:45 +02:00
Silvan Mosberger
be48907470
ci: Always run with sandbox, even on Darwin
And fix a test failure in the sandbox due to /home
existing on Darwin but not being accessible in the sandbox since it's a
symlink to /System/Volumes/Data/home, see
7297384658 (step):6:2127:

    C++ exception with description "error: getting status of /home/schnitzel/darmstadt/pommes: Operation not permitted" thrown in the test body.

On Linux this wasn't a problem because there /home doesn't exist in the sandbox
2023-05-26 15:36:44 +02:00
polykernel
a382919d7d
primops: lazy evaluation of replaceStrings replacements
The primop `builtins.replaceStrings` currently always strictly evaluates the
replacement strings, however time and space are wasted for their computation
if the corresponding pattern do not occur in the input string. This commit
makes the evaluation of the replacement strings lazy by deferring their
evaluation to when the corresponding pattern are matched and memoize the result
for efficient retrieval on subsequent matches.

The testcases for replaceStrings was updated to check for lazy evaluation
of the replacements. A note was also added in the release notes to
document the behavior change.
2023-05-25 18:35:23 -04:00
Théophane Hufschmitt
f41dd2c306
Merge pull request #7948 from mkenigs/ventura-diff
installer: don't assume GNU diff
2023-05-25 18:15:42 +02:00
Matthew Kenigsberg
367fcd9eb5
installer: don't assume GNU diff
macOS Ventura ships with it's own version of diff. Try to output a
similar diff with Apple diff as with GNU diff, instead of failing

Helps https://github.com/NixOS/nix/issues/7286
2023-05-25 08:59:05 -06:00