Commit Graph

7161 Commits

Author SHA1 Message Date
Eelco Dolstra
63ba2fde50
Merge pull request #9245 from bjornfor/backport-installer-fix
[2.3] Backport installer fix for non-NixOS
2023-10-27 16:28:07 +02:00
John Ericson
619e9758bb
Merge pull request #4593 from grahamc/builder-host-key-stable
(Backport #4574) distributed builds: load remote builder host key from the machines file
2023-10-26 16:19:06 -04:00
John Ericson
b4abe56a23 Merge remote-tracking branch 'upstream/2.3-maintenance' into builder-host-key-stable 2023-10-26 16:01:18 -04:00
Guillaume Maudoux
36c560552d Create to daemon-socket folder during install
(cherry picked from commit 1bec333788)

[Bjørn: This fixes Nix 2.3 multi-user/daemon installs on modern
non-NixOS distros.]
2023-10-26 14:31:46 +02:00
Eelco Dolstra
12ac3f6f28
Merge pull request #9221 from edef1c/2.3-zstd
[2.3-maintenance] libutil: add ZstdDecompressionSink
2023-10-25 10:33:07 +02:00
edef
7f8790eff2 libutil: add ZstdDecompressionSink 2023-10-23 17:36:13 +00:00
Eelco Dolstra
8e836716bb
Merge pull request #9190 from trofi/2.13-gcc-13
[2.3 backport] src/libutil/json.cc: add missing <cstdint> include for gcc-13
2023-10-19 19:12:15 +02:00
Sergei Trofimovich
42b19c7181 src/libutil/json.cc: add missing <cstdint> include for gcc-13
Without the change llvm build fails on this week's gcc-13 snapshot as:

    src/libutil/json.cc: In function 'void nix::toJSON(std::ostream&, const char*, const char*)':
    src/libutil/json.cc:33:22: error: 'uint16_t' was not declared in this scope
       33 |             put(hex[(uint16_t(*i) >> 12) & 0xf]);
          |                      ^~~~~~~~
    src/libutil/json.cc:5:1: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
        4 | #include <cstring>
      +++ |+#include <cstdint>
        5 |

(cherry picked from commit b36d5172cb)
2023-10-19 15:25:34 +01:00
John Ericson
104c562b63
Merge pull request #8031 from klemensn/openbsd
Build and test fixes for OpenBSD
2023-03-20 11:41:36 -04:00
Klemens Nanni
c84e20a296
Fix SO_PEERCRED usage on OpenBSD
getsockopt(2) documents `struct sockpeercred` with `SO_PEERCRED`.
(`struct ucred` does exist, but is incompatible to the Linux version.)
2023-03-11 23:07:19 +04:00
Klemens Nanni
fda598cfdd
Make tar invocation portable, fix OpenBSD build/test
At least on OpenBSD, tar(1) reads from /dev/rst0 not stdin by default
options must specififed consistently with or without dashes, not mixed.

Specify standard input explicitly to not rely on implementation details.
Use either option style consistently.
2023-03-11 23:07:19 +04:00
Klemens Nanni
2dff8c2b40
Include <sys/wait.h> as per wait(4) for WIFEXITED and WEXITSTATUS
Unbreak the build on OpenBSD.
2023-03-11 23:07:19 +04:00
Eelco Dolstra
6507aef191
Merge pull request #5649 from obsidiansystems/2.3-modernize-test-suite
[backport 2.3] Parallelize test suite
2021-12-09 15:27:16 +01:00
Domen Kožar
3690c9350d
Merge pull request #5688 from obsidiansystems/2.3-pr-ci
[backport 2.3] Add GitHub actions CI for PRs
2021-11-30 13:17:03 +01:00
Albert Safin
75bd19758d nix-shell: don't check for "nix-shell" in shebang script name
Without this, moving the nix-shell tests into a `nix-shell` dir breaks
them.

(cherry picked from commit a70706b025)
2021-11-30 05:33:50 +00:00
Eelco Dolstra
522243fb26 Close stdin while running tests
For some reason, the bash shell started by 'nix develop' sometimes
reads from stdin, which can hang.

(cherry picked from commit 50a8710ed1)
2021-11-30 05:33:50 +00:00
regnat
1a3956cceb Shorten the path to the test root
Fix a socket length failure on the OSX builders

(cherry picked from commit 223fbe644a)
2021-11-30 05:33:50 +00:00
regnat
8ca44a901c Fix the test dependencies
Reuse the pre-existing list rather than the one written as part of #3777

(cherry picked from commit 5101ed18bc)
2021-11-30 05:33:50 +00:00
regnat
b3cdebf328 Run the tests in parallel
Cause the time needed to run the testsuite to drop from ~4mins to ~40s

(cherry picked from commit 1b5aa60767)
2021-11-30 05:33:50 +00:00
John Ericson
e9cfba389f Add GitHub actions CI for PRs
Adapted from master.
2021-11-29 23:18:01 +00:00
Eelco Dolstra
c9f0904d13
Merge pull request #5659 from baloo/baloo/dns-2.3
preloadNSS: rework the dns query workaround [nix2.3]
2021-11-26 12:48:21 +01:00
Arthur Gautier
765332d94b preloadNSS: rework the dns query workaround
backport of https://github.com/NixOS/nix/pull/5384 to nix 2.3
2021-11-25 13:06:00 -08:00
Eelco Dolstra
addb547b9d
Merge pull request #5571 from obsidiansystems/forward-compat-2.3
[2.3-maintenance] Override socket path with `NIX_DAEMON_SOCKET_PATH` so we can test 2.4+ compat
2021-11-23 18:55:38 +01:00
regnat
1aa288c8cf Override socket path with NIX_DAEMON_SOCKET_PATH
This is the first step to testing compatibility with 2.3 in 2.4 and
master.

(adapted from commit 223fbe644a)
2021-11-16 05:44:59 +00:00
Eelco Dolstra
cad762e2d1
Merge pull request #5395 from winterqt/revert-4985
Revert "doc: Change install syntax to be fish compatible"
2021-11-08 14:18:12 +01:00
Eelco Dolstra
6b17b1677f
Merge pull request #5491 from doronbehar/SQLiteWAL-vfs-backport2.3
libstore: Use unix-dotfile vfs if useSQLiteWAL is false
2021-11-05 13:24:22 +01:00
Eelco Dolstra
9a83b37764
Merge pull request #5492 from obsidiansystems/backport/fd-leak-2.3-maintenance
Nix 2.3 Backport: PathSubstitutionGoal: Clean up pipe
2021-11-04 20:32:36 +01:00
Fendor
c31ce3dffe PathSubstitutionGoal: Clean up pipe
If there were many top-level goals (which are not destroyed until the
very end), commands like

  $ nix copy --to 'ssh://localhost?remote-store=/tmp/nix' \
    /run/current-system --no-check-sigs --substitute-on-destination

could fail with "Too many open files". So now we do some explicit
cleanup from amDone(). It would be cleaner to separate goals from
their temporary internal state, but that would be a bigger refactor.

Backport 8a29052cb2
2021-11-04 11:26:39 +01:00
Doron Behar
1261a1689b libstore: Use unix-dotfile vfs if useSQLiteWAL is false 2021-11-04 08:10:44 +02:00
Winter
6c0d9778d1 Revert "doc: Change install syntax to be fish compatible"
This reverts commit ea962a84c3.
2021-10-15 17:27:17 -04:00
Eelco Dolstra
8223cc5663
Bump version 2021-10-07 17:32:08 +02:00
Domen Kožar
8c5b39875e
Merge pull request #5054 from alyssais/2.3-host_os
[2.3] Apply OS checks to host platform, not build
2021-09-21 08:12:04 +02:00
Eelco Dolstra
2e80a42c13
Merge pull request #5216 from kvtb/patch-2
`builtins.hashFile`, `builtins.hashString`: realize context before calculation, and discard afterwards
2021-09-13 22:39:26 +02:00
Eelco Dolstra
edf511dfb2
Merge pull request #5234 from kvtb/patch-4
builtins.fetchurl: fix error message
2021-09-13 10:00:15 +02:00
kvtb
7d92204b67
builtins.fetchurl: fix error message
fixes `error: unsupported argument 'path' to 'fetchurl', at 0x1630b48`
2021-09-11 04:54:55 +00:00
Eelco Dolstra
72128074d8
Merge pull request #5228 from baloo/baloo/5089/force-nss_dns-load.2.3.15
preloadNSS: fixup nss_dns load [2.3]
2021-09-09 10:35:49 +02:00
Arthur Gautier
a67dcdd991 preloadNSS: load NSS before threads are started
preloadNSS is not thread-safe, this commit moves it before we start the
first thread.

Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2021-09-08 18:36:53 +00:00
Eelco Dolstra
a10644fa66
Merge pull request #5223 from kvtb/patch-3
Expr::show(): avoid emiting meaningless chars
2021-09-08 12:13:36 +02:00
Arthur Gautier
3d75d87bd3 preloadNSS: fixup nss_dns load
Before this commit, the dns lookup in preloadNSS would still go through
nscd. This did not have the effect of loading the nss_dns.so as expected
(nss_dns.so being out of reach from within the sandbox).

Should LOCALDOMAIN environment variable be defined, nss will completely
avoid nscd and will do its dns resolution on its own.

By temporarly setting LOCALDOMAIN variable before calling in NSS, we can
force NSS to load the shared libraries as expected.

Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2021-09-07 01:49:37 +00:00
kvtb
f8ccbb40d1
Expr::show(): avoid emiting meaningless chars 2021-09-06 14:29:20 +00:00
kvtb
2b665a311e
hashFile, hashString: realize context before calculation, and discard afterwards 2021-09-05 14:42:06 +00:00
Eelco Dolstra
896fad9119
Merge pull request #5132 from alyssais/2.3-sys_name
[2.3] configure.ac: remove another uname check
2021-08-16 11:56:01 +02:00
Alyssa Ross
bb98526123
configure.ac: remove another uname check
uname checks are not cross-safe.

The normalization for Cygwin doesn't need any equivalent for host_os
because nothing actually checked whether sys_name was cygwin any more.

(cherry picked from commit cff8fd69b6)
2021-08-13 16:35:25 +00:00
Domen Kožar
015ca6a7a5
Merge pull request #5129 from alyssais/2.3-darwin-host-os
[2.3] Fix host OS detection for darwin-specific linker flag
2021-08-13 10:14:36 +02:00
Ryan Burns
ac2ca8d083
Fix host OS detection for darwin-specific linker flag
(cherry picked from commit d86d43c34c)
2021-08-13 08:06:03 +00:00
Eelco Dolstra
183f2cc395
Bump version 2021-07-28 22:54:47 +02:00
Eelco Dolstra
9d9dbe6ed0 Bump version 2021-07-28 21:20:08 +02:00
Alyssa Ross
12dc642781
Apply OS checks to host platform, not build
Previously, the build system used uname(1) output when it wanted to
check the operating system it was being built for, which meant that it
didn't take into-account cross-compilation when the build and host
operating systems were different.

To fix this, instead of consulting uname output, we consult the host
triple, specifically the third "kernel" part.

For "kernel"s with stable ABIs, like Linux or Cygwin, we can use a
simple ifeq to test whether we're compiling for that system, but for
other platforms, like Darwin, FreeBSD, or Solaris, we have to use a
more complicated check to take into account the version numbers at the
end of the "kernel"s.  I couldn't find a way to just strip these
version numbers in GNU Make without shelling out, which would be even
more ugly IMO.  Because these checks differ between kernels, and the
patsubst ones are quite fiddly, I've added variables for each host OS
we might want to check to make them easier to reuse.

(cherry picked from commit 4f80464645)
2021-07-27 08:41:57 +00:00
Eelco Dolstra
bd4e03d5fa
Merge pull request #5053 from NixOS/fix-no-such-file-in-chrooted-store
[2.3]: Use the real path when checking imported CA paths
2021-07-27 10:34:29 +02:00
Domen Kožar
9f1287e1ca
Merge pull request #5038 from alyssais/2.3-libdl
[2.3] Only link with libdl on Linux
2021-07-27 07:33:10 +02:00