From 45a2ef5a6da15fc02657ba941492c35611620fcb Mon Sep 17 00:00:00 2001 From: regnat Date: Fri, 15 Oct 2021 14:15:43 +0200 Subject: [PATCH 1/3] Disable the eval-store test when using the daemon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using the daemon will break most of the assumptions of this test, so it’s as simple to just disable it (cherry picked from commit 0b55c8767dfa15540f47579442350ffad51fc047) --- tests/eval-store.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/eval-store.sh b/tests/eval-store.sh index 9ab7a87be..679da5741 100644 --- a/tests/eval-store.sh +++ b/tests/eval-store.sh @@ -1,6 +1,8 @@ source common.sh -requireDaemonNewerThan "2.4pre20210727" +# Using `--eval-store` with the daemon will eventually copy everything +# to the build store, invalidating most of the tests here +needLocalStore eval_store=$TEST_ROOT/eval-store From 1f0edcedc095d2e289174078c34260898623f4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Tue, 2 Nov 2021 08:24:17 -0600 Subject: [PATCH 2/3] install-nix-actionv@v14.1 (cherry picked from commit b8532c9ff16582b793d880ddea54e8806bd50238) --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index abaff75ee..eb8648f13 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v2.3.4 with: fetch-depth: 0 - - uses: cachix/install-nix-action@v14 + - uses: cachix/install-nix-action@v14.1 - run: echo CACHIX_NAME="$(echo $GITHUB_REPOSITORY-install-tests | tr "[A-Z]/" "[a-z]-")" >> $GITHUB_ENV - uses: cachix/cachix-action@v10 if: needs.check_cachix.outputs.secret == 'true' @@ -45,7 +45,7 @@ jobs: with: fetch-depth: 0 - run: echo CACHIX_NAME="$(echo $GITHUB_REPOSITORY-install-tests | tr "[A-Z]/" "[a-z]-")" >> $GITHUB_ENV - - uses: cachix/install-nix-action@v14 + - uses: cachix/install-nix-action@v14.1 - uses: cachix/cachix-action@v10 with: name: '${{ env.CACHIX_NAME }}' @@ -63,7 +63,7 @@ jobs: steps: - uses: actions/checkout@v2.3.4 - run: echo CACHIX_NAME="$(echo $GITHUB_REPOSITORY-install-tests | tr "[A-Z]/" "[a-z]-")" >> $GITHUB_ENV - - uses: cachix/install-nix-action@v14 + - uses: cachix/install-nix-action@v14.1 with: install_url: '${{needs.installer.outputs.installerURL}}' install_options: "--tarball-url-prefix https://${{ env.CACHIX_NAME }}.cachix.org/serve" From 4fc29974a44e37875ae50ab97a0cb99091904ed2 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 1 Nov 2021 23:26:26 -0700 Subject: [PATCH 3/3] installer: Do not use echo -e in #!/bin/sh script ShellCheck correctly warns: In scripts/install-nix-from-closure.sh line 218: echo -e "\nif [ -e $p ]; then . $p; fi # added by Nix installer" >> "$fn" ^-- SC3037: In POSIX sh, echo flags are undefined. In scripts/install-nix-from-closure.sh line 229: echo -e "\nif [ -e $p ]; then . $p; fi # added by Nix installer" >> "$fn" ^-- SC3037: In POSIX sh, echo flags are undefined. Indeed, this actually breaks on Ubuntu where /bin/sh is dash. Fixes #5458. Signed-off-by: Anders Kaseorg (cherry picked from commit 447350fe0ea29d8c45e1d7436d8a148f01bf7a42) --- scripts/install-nix-from-closure.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh index 28d884c79..e25978da7 100644 --- a/scripts/install-nix-from-closure.sh +++ b/scripts/install-nix-from-closure.sh @@ -215,7 +215,7 @@ if [ -z "$NIX_INSTALLER_NO_MODIFY_PROFILE" ]; then if [ -w "$fn" ]; then if ! grep -q "$p" "$fn"; then echo "modifying $fn..." >&2 - echo -e "\nif [ -e $p ]; then . $p; fi # added by Nix installer" >> "$fn" + printf '\nif [ -e %s ]; then . %s; fi # added by Nix installer\n' "$p" "$p" >> "$fn" fi added=1 break @@ -226,7 +226,7 @@ if [ -z "$NIX_INSTALLER_NO_MODIFY_PROFILE" ]; then if [ -w "$fn" ]; then if ! grep -q "$p" "$fn"; then echo "modifying $fn..." >&2 - echo -e "\nif [ -e $p ]; then . $p; fi # added by Nix installer" >> "$fn" + printf '\nif [ -e %s ]; then . %s; fi # added by Nix installer\n' "$p" "$p" >> "$fn" fi added=1 break