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

18892 commits

Author SHA1 Message Date
mergify[bot]
9cf1b0cb57
Merge pull request #11761 from abitrolly/alt-sudo
install: Allow to specify alternative `sudo` command
2024-12-12 02:07:56 +00:00
Eelco Dolstra
be04e68b34
Merge pull request #12036 from Mic92/mergify
mergify: don't use rebase merge method
2024-12-11 19:46:11 +01:00
Eelco Dolstra
da2c2547a9
Merge pull request #12033 from Mic92/various-picks
Various packaging improvements
2024-12-11 17:01:39 +01:00
Eelco Dolstra
50ba85167c
Merge pull request #12024 from NaN-git/null-char
fromJSON/fromTOML: throw if string contains null byte
2024-12-10 12:29:48 +01:00
Jörg Thalheim
7bd8ece4ba
Merge pull request #12009 from DeterminateSystems/401-cache
HttpBinaryCacheStore: Improve error message for unauthorized caches
2024-12-10 05:41:37 +01:00
Jörg Thalheim
8c25eac7a3
Merge pull request #12031 from DeterminateSystems/fixup-mode-typos
Install .nix-channels and nix.conf with 644 instead of 664
2024-12-10 05:39:22 +01:00
Jörg Thalheim
b5cdf2e268 mergify: don't use rebase merge method
The repository configuration doesn't allow rebase merge method.
2024-12-10 05:36:09 +01:00
Jörg Thalheim
41a464c68d tests/libstore.hh: reformat with clang-format after update 2024-12-10 05:28:50 +01:00
John Ericson
747256cbe1
Merge pull request #11921 from NixOS/log-json-tolerant
Make @nix json structured build log parsing warn instead of fail
2024-12-09 16:39:04 -05:00
Philipp Otterbein
3a9d64b8e3 fromJSON/fromTOML: throw if string contains null byte 2024-12-09 22:04:21 +01:00
Jörg Thalheim
9b40618d2e tests/nixos: disable documentation to improve eval speed
we are not testing any nixos modules, so we don't need to generate
documentation. This will give us a bit of speed up.
2024-12-09 21:19:48 +01:00
Jörg Thalheim
35dd19d785 ensure clang-format is using the same version on all platforms 2024-12-09 21:15:58 +01:00
Cole Helbling
8768239517 Install .nix-channels and nix.conf with 644 instead of 664
As far as I can tell, there's no real reason either of these need to
be 664. I'm willing to bet they were just a typo that has lasted for
7 years. While this shouldn't change anything, this is, IMHO, more
correct, so let's stop perpetuating the wrong mode!
2024-12-09 11:15:53 -08:00
Robert Hensing
b6250dc6bd
Merge pull request #12029 from roberth/meson-build-support
rename: build-utils-meson -> nix-meson-build-support
2024-12-09 18:29:39 +01:00
Eelco Dolstra
8ecf848080
Merge pull request #12030 from roberth/rename-nix-daemon-compat-tests
rename: nix-tests -> nix-daemon-compat-tests
2024-12-09 18:17:11 +01:00
Robert Hensing
62d3957268 Remove dead code from nix-daemon-compat-tests packaging
We're not testing against these versions anymore.
If we bring that back (I would support that), we could do so in a clean
way, by making sure that the packaging we test against has a proper version
attribute.
2024-12-09 17:35:57 +01:00
Robert Hensing
6d86839a02 Use version correctly in nix-daemon-compat-tests derivation
Previously, a version would be appended to the pname which already
contained a version.
2024-12-09 17:34:56 +01:00
Robert Hensing
c783cd22ac tests: Make unusual logging test conditional on fixed daemon version 2024-12-09 17:29:45 +01:00
Robert Hensing
f3c722cab2 Remove redundant warning: prefix from structured build log warning 2024-12-09 17:20:27 +01:00
Robert Hensing
1421420e86 test: Move unusual-logging to run only in logging test case 2024-12-09 17:19:47 +01:00
Robert Hensing
d0b4db924a rename: build-utils-meson -> nix-meson-build-support
Fix a footgun. In my case, I had a couple of build ("output")
directories sitting around.

    rm -rf build-*

Was confused for a bit why a meson.build file was missing.

Probably also helps with autocompletion.

I tried meson-build-support first, but I had to add something like
a nix- prefix, in order to make meson happy. They've reserved the
meson- prefix.
2024-12-09 16:54:42 +01:00
Robert Hensing
1edf868213 rename: nix-tests -> nix-daemon-compat-tests
I think I have failed to read the very long version-garbage-like
string for the second time now, leaving me oblivious to the crucial
info that a test failure happens in the context of an older daemon.
2024-12-09 16:49:02 +01:00
Robert Hensing
03d4bfd852 Push log source description out of libutil and report build hook @nix warning correctly 2024-12-09 15:59:59 +01:00
Robert Hensing
1485937b89 tests/functional/dependencies.nix: Check that we tolerate syntax and type errors 2024-12-09 15:59:59 +01:00
Linus Heckemann
ee03fd478e libutil: handle json builder log messages with unexpected format
Before this change, expressions like:

with import <nixpkgs> {};
runCommand "foo" {} ''
  echo '@nix {}' >&$NIX_LOG_FD
''

would result in Lix crashing, because accessing nonexistent fields of
a JSON object throws an exception.

Rather than handling each field individually, we just catch JSON
exceptions wholesale. Since these log messages are an unusual
circumstance, log a warning when this happens.

Fixes #544.

Change-Id: Idc2d8acf6e37046b3ec212f42e29269163dca893
(cherry picked from commit e55cd3beea710db727fd966f265a1b715b7285f3)
2024-12-09 15:59:59 +01:00
Robert Hensing
e82ff51726 tests/functional/dependencies.nix: Refactor, replace arcane let 2024-12-09 15:59:59 +01:00
Eelco Dolstra
3081e7ce90
Merge pull request #12025 from NaN-git/strlen
optimize string concat
2024-12-09 13:02:16 +01:00
Philipp Otterbein
ad3a67a2a0 optimize string concat 2024-12-07 04:42:04 +01:00
Jörg Thalheim
ab5a9cf2db
Merge pull request #12016 from grahamc/patch-2
Disable suid and atime on the /nix mount point on Darwin
2024-12-06 01:37:39 +01:00
Robert Hensing
a7cdb55b44
Merge pull request #12013 from DeterminateSystems/fix-11996
nix hash convert: Support SRI hashes that lack trailing '=' characters
2024-12-05 23:29:30 +01:00
‮rekcäH nitraM‮
49fa31fb4c
Fix typo (#12015) 2024-12-05 19:10:59 +00:00
Graham Christensen
4137ead7a1
Disable suid and atime on the /nix mount point on Darwin
The Determinate Nix Installer has set nosuid and noatime in https://github.com/DeterminateSystems/nix-installer/pull/1338, and figured this perf and security improvement is worthy of upstreaming.

The /nix volume shouldn't have setuid binaries anyway, and filesystems seem to generally be noatime on macOS.
Further, the garbage collector doesn't use atime.
2024-12-05 14:01:00 -05:00
Eelco Dolstra
408c2faf93 nix hash: Don't print 'nix hash' deprecation message
Fixes #11997.
2024-12-05 16:25:05 +01:00
Eelco Dolstra
33b645cedf nix hash convert: Don't fail on uppercase base-16 hashes 2024-12-05 16:19:21 +01:00
Eelco Dolstra
52f1cd0595 nix hash convert: Support SRI hashes that lack trailing '=' characters
Fixes #11996.
2024-12-05 16:02:35 +01:00
Eelco Dolstra
3b21ea40cc HttpBinaryCacheStore: Improve error message for unauthorized caches
Instead of the unhelpful

  warning: 'https://cache.flakehub.com' does not appear to be a binary cache

you now get

  warning: unable to download 'https://cache.flakehub.com/nix-cache-info': HTTP error 401

           response body:

           {"code":401,"error":"Unauthorized","message":"Unauthorized."}
2024-12-04 16:52:30 +01:00
Eelco Dolstra
a8a572b11b
Merge pull request #12007 from mupdt/s3-binary-cache-error-request-id
s3-binary-cache: show the error's request ID
2024-12-04 16:23:41 +01:00
mupdt
abcfdb4bda s3-binary-cache: show the error's request ID
The request ID is essential for traceability and debugging purposes.
It allows us to connect client-side to server-side events.
2024-12-04 05:49:21 -05:00
Jörg Thalheim
ff00eebb16
Merge pull request #12000 from NixOS/fix-men
fix: Add missing manpages to meson.build and more
2024-12-03 19:41:24 +01:00
Robert Hensing
63c0f0dcd2 Install init system configs only when relevant 2024-12-03 16:51:01 +01:00
Robert Hensing
038ab46d7a Restore org.nixos.nix-daemon.plist installation 2024-12-03 16:37:07 +01:00
Robert Hensing
d67e24afec fix: Add missing manpages to meson.build 2024-12-02 17:42:11 +01:00
Eelco Dolstra
8e0913b84a
Merge pull request #11820 from hercules-ci/fix-cross-manual
Fix cross build (was: fix manual)
2024-12-02 16:51:59 +01:00
Robert Hensing
747cf4e50f fix: Add splicing to fix the manual in cross
We *could* use a "native" manual instead - ie reusing a native
`nixpkgsFor.${buildPlatform}`, but this works, and also
works for possible cases where we have a custom or patched build tool.
2024-12-02 15:55:18 +01:00
Anatoli Babenia
e83481f5a8 Allow sudo alternatives when installing from tarball 2024-12-01 14:36:58 +03:00
Anatoli Babenia
04975f7c32 install: Allow to specify alternative sudo command 2024-11-30 10:07:29 +03:00
Robert Hensing
6400048116
Merge pull request #11977 from Mic92/installer
mergify: drop installer test
2024-11-29 15:54:50 +01:00
Eelco Dolstra
10c578ec4b
Merge pull request #11980 from h0nIg/patch-1
docker: Fix command "nix profile install", Don't require --impure
2024-11-29 13:13:28 +01:00
Eelco Dolstra
daa8ceb022
Merge pull request #11986 from DeterminateSystems/fix-warning
Work around gcc warning
2024-11-28 16:13:30 +01:00
Eelco Dolstra
e5e09006f9 Work around gcc warning
Same as 57fea81f8a.
2024-11-28 15:25:51 +01:00