git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #113006 from adisbladis/podman-runtime-nowarn

podman: Remove unconfigured runtime warnings

commit1be1abd288449df36bffa326d9e13a8bf89a5f5f authoradisbladis <adisbladis@gmail.com> dateSat 13 Feb 2021, 16:21 (6 years ago) parentff96a0f9c98282
3 files changed+30−1
pkgs/applications/virtualization/podman/default.nix+5−1 pkgs/applications/virtualization/podman/remove-unconfigured-runtime-warn.patch+23 pkgs/applications/virtualization/podman/wrapper.nix+2
pkgs/applications/virtualization/podman/default.nix+5−1
@@ -22,9 +22,13 @@ buildGoModule rec {
2222 owner = "containers";
2323 repo = "podman";
2424 rev = "v${version}";
25− sha256 = "141ii271w2azvhl8ragrgzmir9iq9npl8wmh5dr31kvq4z4syxw1";
25+ sha256 = "1dsriw2vjzjaddxdhl3wbj2ppnsyi29f4bjwc8lzyz20wfwx4ay4";
2626 };
2727
28+ patches = [
29+ ./remove-unconfigured-runtime-warn.patch
30+ ];
31+
2832 vendorSha256 = null;
2933
3034 doCheck = false;
pkgs/applications/virtualization/podman/remove-unconfigured-runtime-warn.patchnew file+23
@@ -0,0 +1,23 @@
1+Remove warning "WARN[0000] Found default OCIruntime /nix/store/.../bin/crun path which is missing from [engine.runtimes] in containers.conf
2+
3+It doesn't make sense as we promote using the podman wrapper where runtime paths will vary because they are nix store paths.
4+---
5+ vendor/github.com/containers/common/pkg/config/config.go | 3 +--
6+ 1 file changed, 1 insertion(+), 2 deletions(-)
7+
8+diff --git a/vendor/github.com/containers/common/pkg/config/config.go b/vendor/github.com/containers/common/pkg/config/config.go
9+index 4a98c7e92..4a95a2a49 100644
10+--- a/vendor/github.com/containers/common/pkg/config/config.go
11++++ b/vendor/github.com/containers/common/pkg/config/config.go
12+@@ -605,8 +605,7 @@ func (c *EngineConfig) findRuntime() string {
13+ return name
14+ }
15+ }
16+- if path, err := exec.LookPath(name); err == nil {
17+- logrus.Warningf("Found default OCIruntime %s path which is missing from [engine.runtimes] in containers.conf", path)
18++ if _, err := exec.LookPath(name); err == nil {
19+ return name
20+ }
21+ }
22+--
23+2.30.0
pkgs/applications/virtualization/podman/wrapper.nix+2
@@ -31,6 +31,8 @@ in runCommand podman.name {
3131 name = "${podman.pname}-wrapper-${podman.version}";
3232 inherit (podman) pname version passthru;
3333
34+ preferLocalBuild = true;
35+
3436 meta = builtins.removeAttrs podman.meta [ "outputsToInstall" ];
3537
3638 outputs = [