From 1c0c92f35ec1b6466becdde174afc1fef55232fe Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Mon, 13 Feb 2023 15:33:30 -0800 Subject: [PATCH] Repair some tests (#248) * Repair some tests * Yank sha256 prefixes --- flake.nix | 2 +- nix/tests/container-test/default.nix | 18 +++++++++--------- nix/tests/container-test/default/Dockerfile | 2 +- nix/tests/vm-test/default.nix | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/flake.nix b/flake.nix index 057db81..cd64af8 100644 --- a/flake.nix +++ b/flake.nix @@ -36,7 +36,7 @@ forSystem = system: f: f rec { inherit system; - pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default nix.overlays.default ]; }; + pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default ]; }; lib = pkgs.lib; }; diff --git a/nix/tests/container-test/default.nix b/nix/tests/container-test/default.nix index ba66ab5..4e5f590 100644 --- a/nix/tests/container-test/default.nix +++ b/nix/tests/container-test/default.nix @@ -7,9 +7,9 @@ let # Found via https://hub.docker.com/_/ubuntu/ under "How is the rootfs build?" # Jammy "ubuntu-v22_04" = { - tarball = import { - url = "https://launchpad.net/~cloud-images-release-managers/+livefs/ubuntu/jammy/ubuntu-oci/+build/408115/+files/livecd.ubuntu-oci.rootfs.tar.gz"; - hash = "sha256-BirwSM4c+ZV1upU0yV3qa+BW9AvpBUxvZuPTeI9mA8M="; + tarball = builtins.fetchurl { + url = "http://cdimage.ubuntu.com/ubuntu-base/releases/22.04/release/ubuntu-base-22.04-base-amd64.tar.gz"; + sha256 = "01sbpjb32x1z1yr9q78zrk0a6kfw5c4fxw1jqmm23g8ixryffvyz"; }; tester = ./default/Dockerfile; system = "x86_64-linux"; @@ -17,9 +17,9 @@ let # focal "ubuntu-v20_04" = { - tarball = import { - url = "https://launchpad.net/~cloud-images-release-managers/+livefs/ubuntu/focal/ubuntu-oci/+build/408120/+files/livecd.ubuntu-oci.rootfs.tar.gz"; - hash = "sha256-iTJR+DeC5lT4PMqT/xFAFwmlC/qvslDFccDrVFLt/a8="; + tarball = builtins.fetchurl { + url = "http://cdimage.ubuntu.com/ubuntu-base/releases/20.04/release/ubuntu-base-20.04.1-base-amd64.tar.gz"; + sha256 = "0ryn38csmx41a415g9b3wk30csaxxlkgkdij9v4754pk877wpxlp"; }; tester = ./default/Dockerfile; system = "x86_64-linux"; @@ -27,9 +27,9 @@ let # bionic "ubuntu-v18_04" = { - tarball = import { - url = "https://launchpad.net/~cloud-images-release-managers/+livefs/ubuntu/bionic/ubuntu-oci/+build/408103/+files/livecd.ubuntu-oci.rootfs.tar.gz"; - hash = "sha256-gi48yl5laoKLoVCDIORsseOM6DI58FNpAjSVe7OOs7I="; + tarball = builtins.fetchurl { + url = "http://cdimage.ubuntu.com/ubuntu-base/releases/18.04/release/ubuntu-base-18.04.5-base-amd64.tar.gz"; + sha256 = "1sh73pqwgyzkyssv3ngpxa2ynnkbdvjpxdw1v9ql4ghjpd3hpwlg"; }; tester = ./default/Dockerfile; system = "x86_64-linux"; diff --git a/nix/tests/container-test/default/Dockerfile b/nix/tests/container-test/default/Dockerfile index eac0f65..cb6b19e 100644 --- a/nix/tests/container-test/default/Dockerfile +++ b/nix/tests/container-test/default/Dockerfile @@ -3,6 +3,6 @@ COPY nix-installer /nix-installer RUN chmod +x /nix-installer COPY binary-tarball /binary-tarball RUN mv /binary-tarball/nix-*.tar.xz nix.tar.xz -RUN /nix-installer/bin/nix-installer install linux-multi --nix-package-url file:///nix.tar.xz --init none --extra-conf "sandbox = false" --channel --no-confirm -vvv +RUN /nix-installer/bin/nix-installer install linux --nix-package-url file:///nix.tar.xz --init none --extra-conf "sandbox = false" --channel --no-confirm -vvv ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin" RUN nix-build --no-substitute -E 'derivation { name = "foo"; system = "x86_64-linux"; builder = "/bin/sh"; args = ["-c" "echo foobar > $out"]; }' \ No newline at end of file diff --git a/nix/tests/vm-test/default.nix b/nix/tests/vm-test/default.nix index 9ead800..8183292 100644 --- a/nix/tests/vm-test/default.nix +++ b/nix/tests/vm-test/default.nix @@ -22,7 +22,7 @@ let install-no-start-daemon = { install = '' NIX_PATH=$(readlink -f nix.tar.xz) - RUST_BACKTRACE="full" ./nix-installer install linux-multi --no-start-daemon --logger pretty --log-directive nix_installer=trace --channel --nix-package-url "file://$NIX_PATH" --no-confirm + RUST_BACKTRACE="full" ./nix-installer install linux --no-start-daemon --logger pretty --log-directive nix_installer=trace --channel --nix-package-url "file://$NIX_PATH" --no-confirm ''; check = '' set -ex @@ -48,7 +48,7 @@ let install-daemonless = { install = '' NIX_PATH=$(readlink -f nix.tar.xz) - RUST_BACKTRACE="full" ./nix-installer install linux-multi --init none --logger pretty --log-directive nix_installer=trace --channel --nix-package-url "file://$NIX_PATH" --no-confirm + RUST_BACKTRACE="full" ./nix-installer install linux --init none --logger pretty --log-directive nix_installer=trace --channel --nix-package-url "file://$NIX_PATH" --no-confirm ''; check = '' set -ex