From b4b701139280fe0575c3a03497bb035c1a45064e Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Sun, 2 Oct 2022 14:25:57 +0100 Subject: [PATCH] libpod: Add support for 'podman pod' on FreeBSD [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson --- libpod/runtime_pod_common.go | 4 ++-- libpod/runtime_pod_freebsd.go | 9 +++++++++ libpod/runtime_pod_unsupported.go | 4 ++-- libpod/util_freebsd.go | 5 +++++ 4 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 libpod/runtime_pod_freebsd.go diff --git a/libpod/runtime_pod_common.go b/libpod/runtime_pod_common.go index b108d00906..9ca85d9a74 100644 --- a/libpod/runtime_pod_common.go +++ b/libpod/runtime_pod_common.go @@ -1,5 +1,5 @@ -//go:build linux -// +build linux +//go:build linux || freebsd +// +build linux freebsd package libpod diff --git a/libpod/runtime_pod_freebsd.go b/libpod/runtime_pod_freebsd.go new file mode 100644 index 0000000000..eb5315fc1a --- /dev/null +++ b/libpod/runtime_pod_freebsd.go @@ -0,0 +1,9 @@ +package libpod + +import ( + "github.com/containers/podman/v4/pkg/specgen" +) + +func (r *Runtime) platformMakePod(pod *Pod, p specgen.PodSpecGenerator) error { + return nil +} diff --git a/libpod/runtime_pod_unsupported.go b/libpod/runtime_pod_unsupported.go index 0c7ff8655a..1e32d3d513 100644 --- a/libpod/runtime_pod_unsupported.go +++ b/libpod/runtime_pod_unsupported.go @@ -1,5 +1,5 @@ -//go:build !linux -// +build !linux +//go:build !linux && !freebsd +// +build !linux,!freebsd package libpod diff --git a/libpod/util_freebsd.go b/libpod/util_freebsd.go index 72019743c0..894fa502b4 100644 --- a/libpod/util_freebsd.go +++ b/libpod/util_freebsd.go @@ -19,6 +19,11 @@ func systemdSliceFromPath(parent, name string, resources *spec.LinuxResources) ( return "", errors.New("not implemented systemdSliceFromPath") } +// deleteSystemdCgroup deletes the systemd cgroup at the given location +func deleteSystemdCgroup(path string, resources *spec.LinuxResources) error { + return nil +} + // No equivalent on FreeBSD? func LabelVolumePath(path string) error { return nil