From 304617494bc2066bae25e7ca221e638f81b28e5a Mon Sep 17 00:00:00 2001 From: adisbladis Date: Sat, 13 Feb 2021 14:38:00 +0100 Subject: [PATCH 1/3] podman: Remove unconfigured runtime warnings It doesn't make sense as we promote using the podman wrapper where runtime paths will vary because they are nix store paths. --- .../virtualization/podman/default.nix | 4 ++++ .../remove-unconfigured-runtime-warn.patch | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+) create 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 e82ab35a344..7eaff926751 100644 --- a/pkgs/applications/virtualization/podman/default.nix +++ b/pkgs/applications/virtualization/podman/default.nix @@ -25,6 +25,10 @@ buildGoModule rec { sha256 = "141ii271w2azvhl8ragrgzmir9iq9npl8wmh5dr31kvq4z4syxw1"; }; + patches = [ + ./remove-unconfigured-runtime-warn.patch + ]; + vendorSha256 = null; doCheck = false; diff --git a/pkgs/applications/virtualization/podman/remove-unconfigured-runtime-warn.patch b/pkgs/applications/virtualization/podman/remove-unconfigured-runtime-warn.patch new file mode 100644 index 00000000000..8530cd93cdf --- /dev/null +++ b/pkgs/applications/virtualization/podman/remove-unconfigured-runtime-warn.patch @@ -0,0 +1,23 @@ +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 a62f04d38e17b27d0aff300104b1dfc08564fd98 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Sat, 13 Feb 2021 15:14:31 +0100 Subject: [PATCH 2/3] podman: Fix sha256 For some reason the archive sha256 has changed.. --- pkgs/applications/virtualization/podman/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/podman/default.nix b/pkgs/applications/virtualization/podman/default.nix index 7eaff926751..e3ff4fc417d 100644 --- a/pkgs/applications/virtualization/podman/default.nix +++ b/pkgs/applications/virtualization/podman/default.nix @@ -22,7 +22,7 @@ buildGoModule rec { owner = "containers"; repo = "podman"; rev = "v${version}"; - sha256 = "141ii271w2azvhl8ragrgzmir9iq9npl8wmh5dr31kvq4z4syxw1"; + sha256 = "1dsriw2vjzjaddxdhl3wbj2ppnsyi29f4bjwc8lzyz20wfwx4ay4"; }; patches = [ From 9c9828260989fa4f3d1211a48f1db1e4d65dbf18 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Sat, 13 Feb 2021 15:30:13 +0100 Subject: [PATCH 3/3] podman: Prefer to build wrapper locally This build is basically just creating 2 symlinks and a wrapper script. Downloading it from a cache is not efficient. --- pkgs/applications/virtualization/podman/wrapper.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/virtualization/podman/wrapper.nix b/pkgs/applications/virtualization/podman/wrapper.nix index 863888227b3..976ba6c67b3 100644 --- a/pkgs/applications/virtualization/podman/wrapper.nix +++ b/pkgs/applications/virtualization/podman/wrapper.nix @@ -31,6 +31,8 @@ in runCommand podman.name { name = "${podman.pname}-wrapper-${podman.version}"; inherit (podman) pname version passthru; + preferLocalBuild = true; + meta = builtins.removeAttrs podman.meta [ "outputsToInstall" ]; outputs = [