Commit graph

18558 commits

Author SHA1 Message Date
Eelco Dolstra
e60b90192a
Merge pull request #11538 from NixOS/detect-close_range
Use close_range when available
2024-09-19 13:48:27 +02:00
Valentin Gagarin
a45a7e8011
Merge pull request #11528 from Mic92/mergify-2
mergify: enable merge-queue for backports
2024-09-19 11:29:52 +02:00
Noam Yorav-Raphael
97fffd8765 nix-profile.sh.in: fix envvar condition 2024-09-19 07:20:04 +03:00
Robert Hensing
3df1658ba1
Merge pull request #11539 from NixOS/fix-installer-tests
Revert "tests.installer: Load profile with -o unset"
2024-09-19 00:04:09 +02:00
Robert Hensing
56b8911766 nix-util / meson: Add -latomic on arm
I couldn't get the test program to work correctly after many attempts,
so let's just unblock this without making it perfect.
2024-09-19 00:01:24 +02:00
Robert Hensing
c75907e47b Revert "tests.installer: Load profile with -o unset"
I must have made a mistake while testing this, because nounset does
not work on any of the distributions.

This reverts commit 2f0db04da0.
2024-09-18 23:06:01 +02:00
Robert Hensing
5c87c40a5e Use close_range when available
This fixes the FreeBSD build of nix-util
2024-09-18 22:42:44 +02:00
Eelco Dolstra
59acf3b75c
Merge pull request #11532 from Mic92/macos-test-fix
tests/functional/shell: fix test in macOS devshell
2024-09-18 21:43:49 +02:00
Eelco Dolstra
96ee5450d9
Merge pull request #11529 from DeterminateSystems/test-ifd-in-chroot
Test IFD/filterSource in chroot stores
2024-09-18 21:20:04 +02:00
Valentin Gagarin
0f5c37c242
Merge pull request #11530 from Mic92/flake-archive 2024-09-18 20:58:06 +02:00
Jörg Thalheim
04a47e93f6 tests/functional/shell: fix test in macOS devshell 2024-09-18 20:51:15 +02:00
Eelco Dolstra
a673084733 Fix tests 2024-09-18 19:06:48 +02:00
Eelco Dolstra
d772a8b3dc shellcheck 2024-09-18 18:05:08 +02:00
Jörg Thalheim
f0a4f19087 add description + example for nix flake archive
Update src/nix/flake-archive.md

Update src/nix/flake-archive.md
2024-09-18 17:31:40 +02:00
Eelco Dolstra
0ed2ab0533
Merge pull request #11527 from Mic92/macos-test-fix
Fix macOS tests with meson
2024-09-18 15:07:22 +02:00
Jörg Thalheim
2b7642632e devShell: increase priority of clang-tools
Before we would get the unwrapped version of clang-tools from clang
itself, which doesn't quite work.
2024-09-18 14:29:26 +02:00
Nikodem Rabuliński
8105307f0f Always initialize curl in parent process on darwin
Because of an objc quirk[1], calling curl_global_init for the first time
after fork() will always result in a crash.
Up until now the solution has been to set
OBJC_DISABLE_INITIALIZE_FORK_SAFETY for every nix process to ignore
that error.
This is less than ideal because we were setting it in package.nix,
which meant that running nix tests locally would fail because
that variable was not set.
Instead of working around that error we address it at the core -
by calling curl_global_init inside initLibStore, which should mean
curl will already have been initialized by the time we try to do so in
a forked process.

[1] 01edf1705f/runtime/objc-initialize.mm (L614-L636)

(cherry-picked and adapted from c7d97802e4)
2024-09-18 14:29:26 +02:00
Valentin Gagarin
ec2b01585f
Merge pull request #11526 from quatquatt/update-multiple-inputs
docs: Provide an example of updating multiple inputs
2024-09-18 13:34:50 +02:00
Eelco Dolstra
8690b6f138 Test IFD/filterSource in a chroot
Relevant to #11503.
2024-09-18 12:42:20 +02:00
Jörg Thalheim
0624cf0f59 mergify: enable merge-queue for backports 2024-09-18 08:46:07 +02:00
quatquatt
9e335ee3b9 docs: Provide an example of updating multiple inputs with nix flake update
docs: Provide an example of updating multiple inputs with `nix flake update`
2024-09-17 22:50:21 -04:00
Jörg Thalheim
a20659f4fa unitests: fix tmpdir when running with meson on macOS 2024-09-17 19:15:01 +02:00
Jörg Thalheim
98db531df2 libstore-support: check that we can create the store 2024-09-17 18:46:50 +02:00
John Ericson
00013c7348
Merge pull request #11522 from tweag/fix-meson-build-in-sandbox
Fix meson build on macOS in sandbox
2024-09-17 12:04:16 -04:00
Eelco Dolstra
ee3f0b7a8b Rename import-derivation -> import-from-derivation 2024-09-17 16:56:40 +02:00
Yuriy Taraday
c7c3a7f667 Fix meson build on macOS in sandbox
Workaround at src/libstore/meson.build#L429-L434 by @Ericson2314 from
https://github.com/NixOS/nix/pull/11302 erroneously used `macos` instead
of `darwin` to distinguish macOS, while meson docs list only `darwin`:
https://mesonbuild.com/Reference-tables.html#operating-system-names.

Original thread: https://github.com/NixOS/nix/issues/2503#issuecomment-2353184049
2024-09-17 16:15:39 +02:00
John Ericson
95f2b2beab
Merge pull request #8766 from brianmcgee/fix/base64-decode-error-message
base64Decode: clearer error message when an invalid character is detected
2024-09-17 09:59:15 -04:00
Eelco Dolstra
3fb6605d3d
Merge pull request #11514 from DeterminateSystems/fix-derivation-add
nix derivation add: Remove reference to "installable"
2024-09-17 13:12:12 +02:00
Eelco Dolstra
65f138f669 nix derivation add: Remove reference to "installable"
It doesn't operate on an installable, so don't mention it.
2024-09-17 12:37:33 +02:00
Eelco Dolstra
8321fe7c2b
Merge pull request #11512 from NixOS/dependabot/github_actions/cachix/install-nix-action-V28
Bump cachix/install-nix-action from V27 to 28
2024-09-17 12:29:11 +02:00
dependabot[bot]
afa6cc7271
Bump cachix/install-nix-action from V27 to 28
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from V27 to 28. This release includes the previously tagged commit.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/V27...V28)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-16 22:59:12 +00:00
Robert Hensing
799abea0c4
Merge pull request #11330 from NixOS/packfile
libgit2, GitRepo: Write (thin) packfiles
2024-09-16 14:42:59 +02:00
Robert Hensing
459d02672c fix Windows build 2024-09-16 13:42:46 +02:00
Robert Hensing
976f539f7d Make Repo::flush interruptible 2024-09-16 13:42:46 +02:00
Eelco Dolstra
176334d8be
Merge pull request #10612 from edolstra/no-flake-substitution
Input::fetchToStore(): Don't try to substitute
2024-09-16 12:47:50 +02:00
Eelco Dolstra
2c42a9dbaa
Merge pull request #11485 from abathur/sequoia_migration_errexit
sequoia-nixbld-user-migration: halt on error
2024-09-13 17:12:28 +02:00
Eelco Dolstra
11452ce674
Merge pull request #11490 from bryanhonof/bryanhonof.add-mixenvironment-to-run
Add MixEnvironment to CmdRun
2024-09-12 20:29:16 +02:00
Robert Hensing
bbef37b4a6
Merge pull request #11423 from DeterminateSystems/ignore-stale-submodules
Git fetcher: Ignore .gitmodules entries that are not submodules
2024-09-12 18:14:18 +02:00
Eelco Dolstra
bb1ce014be
Merge pull request #11492 from DeterminateSystems/canon-nars
Make the NAR parser stricter and add some tests
2024-09-12 18:14:06 +02:00
Bryan Honof
2226f9864e
feat(run): inherit from MixEnvironment 2024-09-12 17:47:48 +02:00
Eelco Dolstra
5737d31d4e Test the case hack a bit more 2024-09-12 17:27:41 +02:00
Eelco Dolstra
7aa3e7e3a5 Make the NAR parser much stricter wrt field order
We really want to enforce a canonical representation since NAR
hashing/signing/deduplication depends on that.
2024-09-12 15:57:46 +02:00
Eelco Dolstra
27ec0def74 Typo 2024-09-12 15:33:55 +02:00
Eelco Dolstra
69bf9947c7 Put 'names' in the right scope 2024-09-12 15:29:54 +02:00
Eelco Dolstra
4de9587e50 Improve badArchive() 2024-09-12 15:27:55 +02:00
Eelco Dolstra
421aa1add1 Add tests for invalid file names in NARs
Note: in general, we rely on the OS to tell us if a name is invalid or
if two names normalize in the same way. But for security, we do want
to make sure that we catch '.', '..', slashes and NUL characters. (NUL
characters aren't really a security issue, but since they would be
truncated when we pass them to the OS, it would be canonicity problem.)
2024-09-12 15:02:30 +02:00
Eelco Dolstra
12fd65d179 Disable subflakes test
Relative path flakes ("subflakes") are basically fundamentally
broken, since they produce lock file entries like

  "locked": {
    "lastModified": 1,
    "narHash": "sha256-/2tW9SKjQbRLzfcJs5SHijli6l3+iPr1235zylGynK8=",
    "path": "./flakeC",
    "type": "path"
  },

that don't specify what "./flakeC" is relative to. They *sometimes*
worked by accident because the `narHash` field allowed
`fetchToStore()` to get the store path of the subflake *if* it
happened to exist in the local store or in a substituter.

Subflakes are properly fixed in #10089 (which adds a "parent" field to
the lock file). Rather than come up with some crazy hack to make them
work in the interim, let's just disable the only test that depends on
the broken behaviour for now.
2024-09-11 21:58:32 +02:00
Eelco Dolstra
30aa45a373 Formatting 2024-09-11 20:35:04 +02:00
Travis A. Everett
48477d4a3e
doc: add admonitions for macOS 15 Sequoia update (#11487)
The impending release of macOS 15 Sequoia will break many existing nix
installs on macOS, which may lead to an increased number of people who
are looking to try to reinstall Nix without noticing the open/pinned
issue (#10892) that explains the problem and outlines how to migrate
existing installs.

These admonitions are a short-term measure until we are over the hump
and support volumes dwindle.
2024-09-11 17:50:47 +00:00
John Ericson
db7c868d24
Merge pull request #11378 from Mic92/nix-dir-errors
builtins.readDir: fix nix error trace on filesystem errors
2024-09-11 13:10:28 -04:00