From c4d43ee1f81ced167ac99901afb6919cfb9156be Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 4 Jun 2021 09:10:09 +1000 Subject: [PATCH 1/2] podman: 3.1.2 -> 3.2.1 https://github.com/containers/podman/releases/tag/v3.2.0 https://github.com/containers/podman/releases/tag/v3.2.1 --- .../virtualization/podman/default.nix | 10 +++----- .../remove-unconfigured-runtime-warn.patch | 23 ------------------- 2 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 pkgs/applications/virtualization/podman/remove-unconfigured-runtime-warn.patch diff --git a/pkgs/applications/virtualization/podman/default.nix b/pkgs/applications/virtualization/podman/default.nix index 10a6d726aef83..0f5eaecb67dbc 100644 --- a/pkgs/applications/virtualization/podman/default.nix +++ b/pkgs/applications/virtualization/podman/default.nix @@ -17,19 +17,15 @@ buildGoModule rec { pname = "podman"; - version = "3.1.2"; + version = "3.2.1"; src = fetchFromGitHub { owner = "containers"; repo = "podman"; rev = "v${version}"; - sha256 = "sha256-PS41e7myv5xCSJIeT+SRj4rLVCXpthq7KeHisYoSiOE="; + sha256 = "sha256-nnVMK4ST9Z2Oi1yLiFRIc9qAlJF4UEtE90iseHhKGlQ="; }; - patches = [ - ./remove-unconfigured-runtime-warn.patch - ]; - vendorSha256 = null; doCheck = false; @@ -61,7 +57,7 @@ buildGoModule rec { installPhase = '' runHook preInstall '' + lib.optionalString stdenv.isDarwin '' - mv bin/{podman-remote,podman} + mv bin/{darwin/podman,podman} '' + '' install -Dm555 bin/podman $out/bin/podman installShellCompletion --bash completions/bash/* diff --git a/pkgs/applications/virtualization/podman/remove-unconfigured-runtime-warn.patch b/pkgs/applications/virtualization/podman/remove-unconfigured-runtime-warn.patch deleted file mode 100644 index 8530cd93cdf3a..0000000000000 --- a/pkgs/applications/virtualization/podman/remove-unconfigured-runtime-warn.patch +++ /dev/null @@ -1,23 +0,0 @@ -Remove warning "WARN[0000] Found default OCIruntime /nix/store/.../bin/crun path which is missing from [engine.runtimes] in containers.conf - -It doesn't make sense as we promote using the podman wrapper where runtime paths will vary because they are nix store paths. ---- - vendor/github.com/containers/common/pkg/config/config.go | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/vendor/github.com/containers/common/pkg/config/config.go b/vendor/github.com/containers/common/pkg/config/config.go -index 4a98c7e92..4a95a2a49 100644 ---- a/vendor/github.com/containers/common/pkg/config/config.go -+++ b/vendor/github.com/containers/common/pkg/config/config.go -@@ -605,8 +605,7 @@ func (c *EngineConfig) findRuntime() string { - return name - } - } -- if path, err := exec.LookPath(name); err == nil { -- logrus.Warningf("Found default OCIruntime %s path which is missing from [engine.runtimes] in containers.conf", path) -+ if _, err := exec.LookPath(name); err == nil { - return name - } - } --- -2.30.0 From 9edf2e0ffd4ed8147fdd41ce3086290d4c0a2f30 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 18 Jun 2021 15:43:24 +1000 Subject: [PATCH 2/2] nixos/podman/tests: add workaround for broken import --- nixos/tests/podman-dnsname.nix | 2 +- nixos/tests/podman-tls-ghostunnel.nix | 2 +- nixos/tests/podman.nix | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/nixos/tests/podman-dnsname.nix b/nixos/tests/podman-dnsname.nix index dd352f754dcf2..9e4e8fdb08a2f 100644 --- a/nixos/tests/podman-dnsname.nix +++ b/nixos/tests/podman-dnsname.nix @@ -21,7 +21,7 @@ import ./make-test-python.nix ( podman.wait_for_unit("sockets.target") with subtest("DNS works"): # also tests inter-container tcp routing - podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg") + podman.succeed("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg") podman.succeed( "podman run -d --name=webserver -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin -w ${webroot} scratchimg ${python3}/bin/python -m http.server 8000" ) diff --git a/nixos/tests/podman-tls-ghostunnel.nix b/nixos/tests/podman-tls-ghostunnel.nix index 0e687b199b262..b5836c436497b 100644 --- a/nixos/tests/podman-tls-ghostunnel.nix +++ b/nixos/tests/podman-tls-ghostunnel.nix @@ -126,7 +126,7 @@ import ./make-test-python.nix ( client.succeed("docker version") # via socket would be nicer - podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg") + podman.succeed("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg") client.succeed( "docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" diff --git a/nixos/tests/podman.nix b/nixos/tests/podman.nix index 7eae575fd7f0e..6184561e6dddf 100644 --- a/nixos/tests/podman.nix +++ b/nixos/tests/podman.nix @@ -48,7 +48,7 @@ import ./make-test-python.nix ( start_all() with subtest("Run container as root with runc"): - podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg") + podman.succeed("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg") podman.succeed( "podman run --runtime=runc -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" ) @@ -57,7 +57,7 @@ import ./make-test-python.nix ( podman.succeed("podman rm sleeping") with subtest("Run container as root with crun"): - podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg") + podman.succeed("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg") podman.succeed( "podman run --runtime=crun -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" ) @@ -66,7 +66,7 @@ import ./make-test-python.nix ( podman.succeed("podman rm sleeping") with subtest("Run container as root with the default backend"): - podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg") + podman.succeed("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg") podman.succeed( "podman run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" ) @@ -78,7 +78,7 @@ import ./make-test-python.nix ( podman.succeed("loginctl enable-linger alice") with subtest("Run container rootless with runc"): - podman.succeed(su_cmd("tar cv --files-from /dev/null | podman import - scratchimg")) + podman.succeed(su_cmd("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg")) podman.succeed( su_cmd( "podman run --runtime=runc -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" @@ -89,7 +89,7 @@ import ./make-test-python.nix ( podman.succeed(su_cmd("podman rm sleeping")) with subtest("Run container rootless with crun"): - podman.succeed(su_cmd("tar cv --files-from /dev/null | podman import - scratchimg")) + podman.succeed(su_cmd("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg")) podman.succeed( su_cmd( "podman run --runtime=crun -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" @@ -100,7 +100,7 @@ import ./make-test-python.nix ( podman.succeed(su_cmd("podman rm sleeping")) with subtest("Run container rootless with the default backend"): - podman.succeed(su_cmd("tar cv --files-from /dev/null | podman import - scratchimg")) + podman.succeed(su_cmd("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg")) podman.succeed( su_cmd( "podman run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" @@ -112,7 +112,7 @@ import ./make-test-python.nix ( with subtest("Run container with init"): podman.succeed( - "tar cv -C ${pkgs.pkgsStatic.busybox} . | podman import - busybox" + "tar cvf busybox.tar -C ${pkgs.pkgsStatic.busybox} . && podman import busybox.tar busybox" ) pid = podman.succeed("podman run --rm busybox readlink /proc/self").strip() assert pid == "1" @@ -124,7 +124,7 @@ import ./make-test-python.nix ( with subtest("Run container via docker cli"): podman.succeed("docker network create default") - podman.succeed("tar cv --files-from /dev/null | podman import - scratchimg") + podman.succeed("tar cvf scratchimg.tar --files-from /dev/null && podman import scratchimg.tar scratchimg") podman.succeed( "docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10" )