From fa9f6c56a8b9340aa9dcf02cdd0026bdb0e61422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 6 Jul 2021 10:10:09 +0200 Subject: [PATCH 1/2] makeself: disable tests for now, working around #110149 I couldn't find an easy way to work around this while doing the tests, so let's disable them for now and work on fixing the sandbox shell instead (and re-enable tests after that is deployed; I hope). --- pkgs/applications/misc/makeself/default.nix | 6 ++++-- .../misc/makeself/tests-use-better-shell.patch | 10 ---------- 2 files changed, 4 insertions(+), 12 deletions(-) delete mode 100644 pkgs/applications/misc/makeself/tests-use-better-shell.patch diff --git a/pkgs/applications/misc/makeself/default.nix b/pkgs/applications/misc/makeself/default.nix index 353fe6614833..12d4f62a7834 100644 --- a/pkgs/applications/misc/makeself/default.nix +++ b/pkgs/applications/misc/makeself/default.nix @@ -12,10 +12,12 @@ stdenv.mkDerivation rec { sha256 = "07cq7q71bv3fwddkp2863ylry2ivds00f8sjy8npjpdbkailxm21"; }; - patches = [ ./tests-use-better-shell.patch ]; postPatch = "patchShebangs test"; - doCheck = true; + # Issue #110149: our default /bin/sh apparently has 32-bit math only + # (attribute busybox-sandbox-shell), and that causes problems + # when running these tests inside build, based on free disk space. + doCheck = false; checkTarget = "test"; checkInputs = [ which zstd pbzip2 ]; diff --git a/pkgs/applications/misc/makeself/tests-use-better-shell.patch b/pkgs/applications/misc/makeself/tests-use-better-shell.patch deleted file mode 100644 index 159a93622ad2..000000000000 --- a/pkgs/applications/misc/makeself/tests-use-better-shell.patch +++ /dev/null @@ -1,10 +0,0 @@ -Use full bash's sh in tests instead of /bin/sh, as that would be -too minimalist in the build sandbox. See issue: -https://github.com/NixOS/nixpkgs/issues/110149#issuecomment-874258128 -diff --git a/test/extracttest b/test/extracttest ---- a/test/extracttest -+++ b/test/extracttest -@@ -9,2 +9,3 @@ setupTests() { - $SUT $* archive makeself-test.run "Test $*" echo Testing -+ sed "1s|/bin|$(dirname "$SHELL")|" -i ./makeself-test.run - } From f526256a6f2e7eacc564347a35a86218065ca1ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 6 Jul 2021 10:43:39 +0200 Subject: [PATCH 2/2] busybox-sandbox-shell: use 64-bit numbers in `test` command The default is C int, which usually gives 32-bit even on 64-bit Linux. This will be the right way to fix #110149 (but needs to be deployed). --- pkgs/os-specific/linux/busybox/sandbox-shell.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/busybox/sandbox-shell.nix b/pkgs/os-specific/linux/busybox/sandbox-shell.nix index f5db0b25f18f..fa70e5f91d80 100644 --- a/pkgs/os-specific/linux/busybox/sandbox-shell.nix +++ b/pkgs/os-specific/linux/busybox/sandbox-shell.nix @@ -8,6 +8,7 @@ busybox.override { CONFIG_FEATURE_FANCY_ECHO y CONFIG_FEATURE_SH_MATH y CONFIG_FEATURE_SH_MATH_64 y + CONFIG_FEATURE_TEST_64 y CONFIG_ASH y CONFIG_ASH_OPTIMIZE_FOR_SIZE y