Merge pull request #113006 from adisbladis/podman-runtime-nowarn

podman: Remove unconfigured runtime warnings
This commit is contained in:
adisbladis 2021-02-13 16:21:23 +01:00 committed by GitHub
commit 1be1abd288
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 1 deletions

View File

@ -22,9 +22,13 @@ buildGoModule rec {
owner = "containers";
repo = "podman";
rev = "v${version}";
sha256 = "141ii271w2azvhl8ragrgzmir9iq9npl8wmh5dr31kvq4z4syxw1";
sha256 = "1dsriw2vjzjaddxdhl3wbj2ppnsyi29f4bjwc8lzyz20wfwx4ay4";
};
patches = [
./remove-unconfigured-runtime-warn.patch
];
vendorSha256 = null;
doCheck = false;

View File

@ -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

View File

@ -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 = [