1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 23:03:53 -04:00
Commit graph

17395 commits

Author SHA1 Message Date
Eelco Dolstra 53a5266220 Bump version 2024-06-27 13:14:43 +02:00
tomberek 20ac781190
Merge pull request from GHSA-q82p-44mg-mgh5
Fix sandbox escape 2.23
2024-06-26 18:49:22 -04:00
Eelco Dolstra d7f018041e
Merge pull request #10950 from NixOS/backport-10943-to-2.23-maintenance
[Backport 2.23-maintenance] Accept response from gitlab api with more than one entry in json
2024-06-24 14:24:53 +02:00
Shogo Takata fd14479103 accept response from gitlab with more than one entry
(cherry picked from commit 0468061dd2)
2024-06-24 12:24:06 +00:00
Eelco Dolstra 07b9fae361 Fix --no-sandbox
When sandboxing is disabled, we cannot put $TMPDIR underneath an
inaccessible directory.

(cherry picked from commit d54590fdf3)
2024-06-21 17:07:59 +02:00
Eelco Dolstra 71af23ff18 Formatting
(cherry picked from commit 58b7b3fd15)
2024-06-21 17:07:55 +02:00
Eelco Dolstra 0882b75ceb Put the chroot inside a directory that isn't group/world-accessible
Previously, the .chroot directory had permission 750 or 755 (depending
on the uid-range system feature) and was owned by root/nixbld. This
makes it possible for any nixbld user (if uid-range is disabled) or
any user (if uid-range is enabled) to inspect the contents of the
chroot of an active build and maybe interfere with it (e.g. via /tmp
in the chroot, which has 1777 permission).

To prevent this, the root is now a subdirectory of .chroot, which has
permission 700 and is owned by root/root.

(cherry picked from commit ede95b1fc1)
2024-06-21 17:07:51 +02:00
Théophane Hufschmitt a156c597ff Add a release note for the build-dir hardening
(cherry picked from commit d99c868b04)
2024-06-21 17:07:46 +02:00
Théophane Hufschmitt 930bb21893 Run the builds in a daemon-controled directory
Instead of running the builds under
`$TMPDIR/{unique-build-directory-owned-by-the-build-user}`, run them
under `$TMPDIR/{unique-build-directory-owned-by-the-daemon}/{subdir-owned-by-the-build-user}`
where the build directory is only readable and traversable by the daemon user.

This achieves two things:

1. It prevents builders from making their build directory world-readable
   (or even writeable), which would allow the outside world to interact
   with them.
2. It prevents external processes running as the build user (either
   because that somehow leaked, maybe as a consequence of 1., or because
   `build-users` isn't in use) from gaining access to the build
   directory.

(cherry picked from commit 1d3696f0fb)
2024-06-21 17:07:41 +02:00
Théophane Hufschmitt 022f2db6ef Add a test for the user sandboxing
(cherry picked from commit 717f3eea39)
2024-06-21 17:07:37 +02:00
Robert Hensing 560ca6f54f
Merge pull request #10901 from NixOS/backport-10900-to-2.23-maintenance
[Backport 2.23-maintenance] hash: Compare hash algo second for back compat
2024-06-13 12:37:38 +02:00
John Ericson bbccb2fc43 hash: Compare hash algo second for back compat
Previously (in cfc18a7739), we forgot to
compare the algo at all. This means we keep the same ordering as before
by making the stuff we always have compared take priority.

(cherry picked from commit 25a9894943)
2024-06-12 23:35:49 +00:00
Eelco Dolstra 97253a92c2 Bump version 2024-06-12 15:00:47 +02:00
Robert Hensing ba36959311
Merge pull request #10885 from NixOS/backport-10883-to-2.23-maintenance
[Backport 2.23-maintenance] fix: remove usage of XDG_RUNTIME_DIR for TMP
2024-06-10 16:47:22 +02:00
Tom Bereknyei 19b179cb08 fix: remove usage of XDG_RUNTIME_DIR for TMP
(cherry picked from commit 1363f51bcb)
2024-06-10 13:40:45 +00:00
Eelco Dolstra c148aaa998
Merge pull request #10863 from NixOS/backport-10861-to-2.23-maintenance
[Backport 2.23-maintenance] PackageInfo::queryDrvPath(): Don't dereference an empty optional
2024-06-05 17:17:28 +02:00
Eelco Dolstra 61ab873a22 Typo
(cherry picked from commit 3e72ed9743)
2024-06-05 14:48:28 +00:00
Eelco Dolstra 4d788bda18 PackageInfo::queryDrvPath(): Don't dereference an empty optional
Fixes a regression introduced in f923ed6b6a.

https://hydra.nixos.org/build/262267313
(cherry picked from commit d2eeabf3e6)
2024-06-05 14:48:28 +00:00
Eelco Dolstra bd8ec66189 Mark official release 2024-06-04 16:23:19 +02:00
Eelco Dolstra b36aa04b53
Merge pull request #10836 from edolstra/release-notes
2.23 release notes
2024-06-04 13:00:06 +02:00
Eelco Dolstra 21be03b233
Merge pull request #10840 from obsidiansystems/libutil-pkg-config
Create and install a `nix-util.pc`
2024-06-04 12:33:37 +02:00
Philipp 214051ba79
clarify not on nix_value_force (#10842)
* clarify not on `nix_value_force`

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-06-04 07:41:04 +00:00
Eli Flanagan bf72b78ef2
docs: fix python nix-shell example (#10841)
* docs: fix python nix-shell example

This Python code snippet depended on Python 2 which has been marked as insecure in 24.05.

I modernized the example so new users will not be surprised upon copying and pasting the snippet for exploration.

Co-authored-by: John Ericson <git@JohnEricson.me>
2024-06-03 23:22:50 +02:00
John Ericson 06be6812a6 Create and install a nix-util.pc
Before, `-lnixutil` was just stuck in `nix-store.pc`, but that doesn't
seem so nice.

This prepares us to distribute `libnixutil` in a separate package if we
want, but it should be a good change either way. I suspect it wasn't
done before because libutil was an extra unstable interface, but I don't
think we need worry about that. *All* the C++ is less stable than the C
(or that's the goal at least).

For what it's worth, Lix also created this pkg-config file *en passant*
during their rename:
c97e17144e (diff-3c4f60cc44a0e35444c7f45331cfa50f76637118)
2024-06-03 14:14:40 -04:00
Eelco Dolstra e0885fc216 Fix link 2024-06-03 20:02:03 +02:00
Robert Hensing 9019b7a37a doc/rl-2.23.md: Fix broken link 2024-06-03 18:56:04 +02:00
Eelco Dolstra 879089e80d Edit release notes 2024-06-03 18:13:37 +02:00
Eelco Dolstra 754ea9058d release notes: 2.23.0 2024-06-03 18:06:42 +02:00
Eelco Dolstra da92ad7dd2
Merge pull request #10592 from hercules-ci/builtins-warn
Add `builtins.warn`
2024-06-03 17:16:32 +02:00
Eelco Dolstra a0e35d92d2
Merge pull request #10661 from edolstra/large-path-warning
Add setting to warn about copying/hashing large paths
2024-06-03 17:04:43 +02:00
Robert Hensing 3a0b0af2ac Fix typo in doc/manual/rl-next/builtins-warn.md
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2024-06-03 16:24:21 +02:00
Robert Hensing 70b1036224 builtins.warn: Use new EvalBaseError + "evaluation warning" 2024-06-03 16:24:21 +02:00
Robert Hensing 831d96d8d7 builtins.warn: Do not throw EvalError 2024-06-03 16:24:21 +02:00
Robert Hensing c07500e14d refactor: Extract EvalState::{runDebugRepl,canDebug} 2024-06-03 16:24:21 +02:00
Robert Hensing da82d67022 builtins.warn: Require string argument
... so that we may perhaps later extend the interface.
Note that Nixpkgs' lib.warn already requires a string coercible
argument, so this is reasonable. Also note that string coercible
values aren't all strings, but in practice, for warn, they are.
2024-06-03 16:24:21 +02:00
Robert Hensing 923cbea2af builtins.warn: Use logWarning
Constructing ErrorInfo is a little awkward for now, but this does
produce a richer log entry.
2024-06-03 16:24:21 +02:00
Robert Hensing 2d4c9d8f4a Add builtins.warn 2024-06-03 16:24:21 +02:00
Eelco Dolstra 54a9fbe5d6 Merge remote-tracking branch 'origin/master' into large-path-warning 2024-06-03 16:17:52 +02:00
Eelco Dolstra d07cdbd9c2
Merge pull request #10834 from obsidiansystems/fix-shellcheck
Fix shellcheck issue
2024-06-03 16:14:41 +02:00
Eelco Dolstra eb0d46fab6
Merge pull request #9897 from bryango/fix-submodule-subdir
libutil/url: fix git+file:./ parse error
2024-06-03 16:04:41 +02:00
Eelco Dolstra ac3e5d22e3
Merge pull request #10028 from DavHau/fetchTree-shallow-default
fetchTree: shallow git fetching by default
2024-06-03 16:02:34 +02:00
Eelco Dolstra d2bfc7e55a Add release note 2024-06-03 15:55:19 +02:00
John Ericson 4e62629a2d
Merge pull request #10833 from obsidiansystems/hash-ordering
Modernize `Hash` ordering with C++20 `<=>`
2024-06-03 09:50:04 -04:00
Eelco Dolstra deac00c6d0 Rename large-path-warning-threshold -> warn-large-path-threshold 2024-06-03 15:49:15 +02:00
Eelco Dolstra 1450b553fa
Merge pull request #10806 from jdek/riscv64_install
scripts/install.in: add riscv64 support to installer
2024-06-03 15:42:13 +02:00
John Ericson 1e99f324d9 Fix shellcheck issue
8b86f415c1 was merged from a CI run that
predated the new linting.
2024-06-03 09:36:48 -04:00
Eelco Dolstra 7f5b57d18f Merge remote-tracking branch 'origin/master' into large-path-warning 2024-06-03 15:32:27 +02:00
Eelco Dolstra ecfad6a828
Merge pull request #10564 from edolstra/remove-forceErrors
AttrCursor: Remove forceErrors
2024-06-03 15:30:01 +02:00
John Ericson cfc18a7739 Modernize Hash ordering with C++20 <=>
Progress on #10832

This doesn't switch to auto-deriving the fields, but by defining `<=>`
we allow deriving `<=>` in downstream types where `Hash` is used.
2024-06-03 09:24:33 -04:00
Eelco Dolstra d16fcaee21
Merge pull request #10782 from obsidiansystems/both-connections
Factor our connection code for worker proto like serve proto
2024-06-03 15:10:38 +02:00