Commit Graph

7143 Commits

Author SHA1 Message Date
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
regnat
89fba5c847 Use the real path when checking imported CA paths
Otherwise chrooted store will fail because Nix will try to read the
virtual path instead of the physical one

Should fix https://github.com/NixOS/nixpkgs/issues/126141
2021-07-26 11:34:47 +02:00
Alyssa Ross
fa7cbf8222
Only link with libdl on Linux
Linux is (as far as I know) the only mainstream operating system that
requires linking with libdl for dlopen.  On BSD, libdl doesn't exist,
so on non-FreeBSD BSDs linking will currently fail.  On macOS, it's
apparently just a symlink to libSystem (macOS libc), presumably
present for compatibility with things that assume Linux.

So the right thing to do here is to only add -ldl on Linux, not to add
it for everything that isn't FreeBSD.

(cherry picked from commit c57ab17687)
2021-07-23 10:50:29 +00:00
Eelco Dolstra
e871146179
Merge pull request #5013 from illustris/nscd-backport
fixed-output derivations: fix incorrect responses for getpwuid
2021-07-14 17:00:00 +02:00
illustris
1c51a169fb fixed-output derivations: fix incorrect responses for getpwuid
backport of #5006
2021-07-14 14:26:25 +05:30
Emily
76c7f5f215
sandbox: allow SystemVersionCompat.plist on Darwin
For whatever reason, many programs trying to access SystemVersion.plist
also open SystemVersionCompat.plist; this includes Python code and
coreutils’ `cat(1)` (but not the native macOS `/bin/cat`). Illustratory
`dtruss(1m)` output:

    open("/System/Library/CoreServices/SystemVersion.plist\0", 0x0, 0x0)		 = 3 0
    open("/System/Library/CoreServices/SystemVersionCompat.plist\0", 0x0, 0x0)		 = 4 0

I assume this is a Big Sur change relating to the 10.16.x/11.x
version compatibility divide and that it’s something along the lines of
a hook inside libSystem.

Fixes a lot of sandboxed package builds under Big Sur.

(cherry picked from commit 559a504da7)
Signed-off-by: Domen Kožar <domen@dev.si>
2021-07-12 09:35:16 +02:00
Emily
405d78eafc
Mark __impureHostDeps paths as optional
Starting in macOS 11, the on-disk dylib bundles are no longer available,
but nixpkgs needs to be able to keep compatibility with older versions
that require `/usr/lib/libSystem.B.dylib` in `__impureHostDeps`. Allow
it to keep backwards compatibility with these versions by marking these
dependencies as optional.

Fixes #4658.

(cherry picked from commit c4355a52fa)
Signed-off-by: Domen Kožar <domen@dev.si>
2021-07-12 09:30:35 +02:00
Eelco Dolstra
998fe9d645
Merge pull request #4985 from toonn/doc-install-fish
Make install documentation fish-friendly
2021-07-05 21:52:15 +02:00
toonn
ea962a84c3
doc: Change install syntax to be fish compatible 2021-07-05 13:58:01 +02:00
Eelco Dolstra
1da76cbec7
Merge pull request #4975 from domenkozar/2.3-upload-release-aarch64-darwin
upload-release.pl: add aarch64-darwin
2021-07-02 15:32:54 +02:00
Eelco Dolstra
f1e3a6a50a
Bump version 2021-07-02 15:00:14 +02:00
Domen Kožar
14262b86cc
upload-release.pl: add aarch64-darwin 2021-07-02 14:13:26 +02:00
Domen Kožar
eda79305b6
installer: use native aarch64-darwin 2021-07-02 14:08:01 +02:00
Eelco Dolstra
926163070b
Merge pull request #4899 from sternenseemann/primops-2.3
[2.3] backport: Make `functionArgs` primitive accept primops
2021-06-23 14:15:36 +02:00
Eelco Dolstra
8aeea1e9f4
Remove Deb/RPM jobs 2021-06-23 11:41:06 +02:00
Eelco Dolstra
a49bddb040
Remove tests.binaryTarball
This test no longer works on Hydra because import-from-derivation is
no longer allowed.

(cherry picked from commit 3daa256728)
2021-06-23 11:39:59 +02:00
Domen Kožar
165e44fef9
fix setuid test eval 2021-06-23 09:37:14 +02:00
aszlig
50b8ef40cb
Convert VM tests to Python
Perl-based tests are deprecated since NixOS 20.03 and subsequently got
removed in NixOS 20.09, which effectively means that tests are going to
fail as soon as we build it with NixOS 20.09 or anything newer.

I've put "# fmt: off" at the start of every testScript, because
formatting with Black really messes up indentation and I don't think it
really adds anything in value or readability for inlined Python scripts.

Signed-off-by: aszlig <aszlig@nix.build>
(cherry picked from commit 5cfdf16dd6)
Signed-off-by: Domen Kožar <domen@dev.si>
2021-06-22 11:03:51 +02:00