-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
81 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
patches/podman/0001-Enable-compilation-for-Windows-on-parts-of-QEMU-mach.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
From e7b676dfafa1704ad00317e23db93b79614660f1 Mon Sep 17 00:00:00 2001 | ||
From: Arthur Sengileyev <[email protected]> | ||
Date: Fri, 19 Apr 2024 16:38:38 +0300 | ||
Subject: [PATCH] Enable compilation for Windows on parts of QEMU machine | ||
provider | ||
|
||
Signed-off-by: Arthur Sengileyev <[email protected]> | ||
--- | ||
pkg/machine/qemu/machine.go | 2 +- | ||
pkg/machine/qemu/options_windows_amd64.go | 2 +- | ||
pkg/machine/qemu/stubber.go | 2 +- | ||
pkg/machine/vmconfigs/config_windows.go | 10 +++++++++- | ||
4 files changed, 12 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go | ||
index 2595eb54f..1373663c3 100644 | ||
--- a/pkg/machine/qemu/machine.go | ||
+++ b/pkg/machine/qemu/machine.go | ||
@@ -1,4 +1,4 @@ | ||
-//go:build linux || freebsd | ||
+//go:build linux || freebsd || windows | ||
|
||
package qemu | ||
|
||
diff --git a/pkg/machine/qemu/options_windows_amd64.go b/pkg/machine/qemu/options_windows_amd64.go | ||
index 1a929a5f3..6e0ba0271 100644 | ||
--- a/pkg/machine/qemu/options_windows_amd64.go | ||
+++ b/pkg/machine/qemu/options_windows_amd64.go | ||
@@ -1,4 +1,4 @@ | ||
-//go:build tempoff | ||
+//go:build windows && amd64 | ||
|
||
package qemu | ||
|
||
diff --git a/pkg/machine/qemu/stubber.go b/pkg/machine/qemu/stubber.go | ||
index dbd762a0d..21b3c7283 100644 | ||
--- a/pkg/machine/qemu/stubber.go | ||
+++ b/pkg/machine/qemu/stubber.go | ||
@@ -1,4 +1,4 @@ | ||
-//go:build linux || freebsd | ||
+//go:build linux || freebsd || windows | ||
|
||
package qemu | ||
|
||
diff --git a/pkg/machine/vmconfigs/config_windows.go b/pkg/machine/vmconfigs/config_windows.go | ||
index 0562490c7..f732226f6 100644 | ||
--- a/pkg/machine/vmconfigs/config_windows.go | ||
+++ b/pkg/machine/vmconfigs/config_windows.go | ||
@@ -1,7 +1,9 @@ | ||
package vmconfigs | ||
|
||
import ( | ||
+ "github.com/containers/podman/v5/pkg/machine/define" | ||
"github.com/containers/podman/v5/pkg/machine/hyperv/vsock" | ||
+ "github.com/containers/podman/v5/pkg/machine/qemu/command" | ||
) | ||
|
||
type HyperVConfig struct { | ||
@@ -17,8 +19,14 @@ type WSLConfig struct { | ||
UserModeNetworking bool | ||
} | ||
|
||
+type QEMUConfig struct { | ||
+ // QMPMonitor is the qemu monitor object for sending commands | ||
+ QMPMonitor command.Monitor | ||
+ // QEMUPidPath is where to write the PID for QEMU when running | ||
+ QEMUPidPath *define.VMFile | ||
+} | ||
+ | ||
// Stubs | ||
-type QEMUConfig struct{} | ||
type AppleHVConfig struct{} | ||
|
||
func getHostUID() int { | ||
-- | ||
2.44.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,11 +10,7 @@ Signed-off-by: Arthur Sengileyev <[email protected]> | |
pkg/machine/provider/platform_windows.go | 2 ++ | ||
pkg/machine/provider/platform_windows_amd64.go | 10 ++++++++++ | ||
pkg/machine/provider/platform_windows_arm64.go | 12 ++++++++++++ | ||
pkg/machine/qemu/machine.go | 2 +- | ||
pkg/machine/qemu/options_windows_amd64.go | 2 +- | ||
pkg/machine/qemu/stubber.go | 2 +- | ||
pkg/machine/vmconfigs/config_windows.go | 10 +++++++++- | ||
9 files changed, 50 insertions(+), 4 deletions(-) | ||
5 files changed, 38 insertions(+) | ||
create mode 100644 pkg/machine/provider/platform_windows_amd64.go | ||
create mode 100644 pkg/machine/provider/platform_windows_arm64.go | ||
|
||
|
@@ -101,66 +97,6 @@ index 000000000..ded7ad7b1 | |
+func getQemuProvider() (vmconfigs.VMProvider, error) { | ||
+ return nil, fmt.Errorf("unsupported virtualization provider: `%s`", define.QemuVirt.String()) | ||
+} | ||
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go | ||
index 2595eb54f..1373663c3 100644 | ||
--- a/pkg/machine/qemu/machine.go | ||
+++ b/pkg/machine/qemu/machine.go | ||
@@ -1,4 +1,4 @@ | ||
-//go:build linux || freebsd | ||
+//go:build linux || freebsd || windows | ||
|
||
package qemu | ||
|
||
diff --git a/pkg/machine/qemu/options_windows_amd64.go b/pkg/machine/qemu/options_windows_amd64.go | ||
index 1a929a5f3..6e0ba0271 100644 | ||
--- a/pkg/machine/qemu/options_windows_amd64.go | ||
+++ b/pkg/machine/qemu/options_windows_amd64.go | ||
@@ -1,4 +1,4 @@ | ||
-//go:build tempoff | ||
+//go:build windows && amd64 | ||
|
||
package qemu | ||
|
||
diff --git a/pkg/machine/qemu/stubber.go b/pkg/machine/qemu/stubber.go | ||
index dbd762a0d..21b3c7283 100644 | ||
--- a/pkg/machine/qemu/stubber.go | ||
+++ b/pkg/machine/qemu/stubber.go | ||
@@ -1,4 +1,4 @@ | ||
-//go:build linux || freebsd | ||
+//go:build linux || freebsd || windows | ||
|
||
package qemu | ||
|
||
diff --git a/pkg/machine/vmconfigs/config_windows.go b/pkg/machine/vmconfigs/config_windows.go | ||
index 0562490c7..f732226f6 100644 | ||
--- a/pkg/machine/vmconfigs/config_windows.go | ||
+++ b/pkg/machine/vmconfigs/config_windows.go | ||
@@ -1,7 +1,9 @@ | ||
package vmconfigs | ||
|
||
import ( | ||
+ "github.com/containers/podman/v5/pkg/machine/define" | ||
"github.com/containers/podman/v5/pkg/machine/hyperv/vsock" | ||
+ "github.com/containers/podman/v5/pkg/machine/qemu/command" | ||
) | ||
|
||
type HyperVConfig struct { | ||
@@ -17,8 +19,14 @@ type WSLConfig struct { | ||
UserModeNetworking bool | ||
} | ||
|
||
+type QEMUConfig struct { | ||
+ // QMPMonitor is the qemu monitor object for sending commands | ||
+ QMPMonitor command.Monitor | ||
+ // QEMUPidPath is where to write the PID for QEMU when running | ||
+ QEMUPidPath *define.VMFile | ||
+} | ||
+ | ||
// Stubs | ||
-type QEMUConfig struct{} | ||
type AppleHVConfig struct{} | ||
|
||
func getHostUID() int { | ||
-- | ||
2.44.0 | ||
|