From ed19d04161b16dc6de72dfd15c71187b48bce60f Mon Sep 17 00:00:00 2001 From: Jason Felice Date: Thu, 27 Jan 2022 13:59:13 -0500 Subject: [PATCH] podman: Use path to find gvproxy on Darwin Closes #141041 Once 4.0.0 is released, there will be an environment variabled that we can set in the wrapper. Until then, this allows `podman machine start` to work on Darwin. --- .../0001-Look-for-gvproxy-in-PATH.patch | 25 +++++++++++++++++++ .../virtualization/podman/default.nix | 8 ++++++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/applications/virtualization/podman/0001-Look-for-gvproxy-in-PATH.patch diff --git a/pkgs/applications/virtualization/podman/0001-Look-for-gvproxy-in-PATH.patch b/pkgs/applications/virtualization/podman/0001-Look-for-gvproxy-in-PATH.patch new file mode 100644 index 0000000000000..9ad9980469b60 --- /dev/null +++ b/pkgs/applications/virtualization/podman/0001-Look-for-gvproxy-in-PATH.patch @@ -0,0 +1,25 @@ +From f2883a5bfb099f7690518ac612f82aa7f7d30709 Mon Sep 17 00:00:00 2001 +From: Jason Felice +Date: Thu, 27 Jan 2022 13:55:05 -0500 +Subject: [PATCH] Look for gvproxy in PATH + +--- + pkg/machine/qemu/machine.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go +index ab1b6c7df..866b3d6a5 100644 +--- a/pkg/machine/qemu/machine.go ++++ b/pkg/machine/qemu/machine.go +@@ -652,7 +652,7 @@ func (v *MachineVM) startHostNetworking() error { + if err != nil { + return err + } +- binary, err := cfg.FindHelperBinary(machine.ForwarderBinaryName, false) ++ binary, err := cfg.FindHelperBinary(machine.ForwarderBinaryName, true) + if err != nil { + return err + } +-- +2.34.1 + diff --git a/pkgs/applications/virtualization/podman/default.nix b/pkgs/applications/virtualization/podman/default.nix index 0dad4d9123dc0..d27a47c1e4267 100644 --- a/pkgs/applications/virtualization/podman/default.nix +++ b/pkgs/applications/virtualization/podman/default.nix @@ -44,6 +44,14 @@ buildGoModule rec { systemd ]; + patches = [ + # Temporary fix for darwin. This works because the wrapper correctly sets the + # path. When 4.0.0 is released, this goes away and the wrapper should set + # $CONTAINERS_HELPER_BINARY_DIR instead: + # https://github.com/containers/podman/blob/main/vendor/github.com/containers/common/pkg/config/config.go#L1171 + ./0001-Look-for-gvproxy-in-PATH.patch + ]; + buildPhase = '' runHook preBuild patchShebangs .