From 6df0ceb9a2100948f9be7fb722772d9a7f25c081 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Thu, 11 Aug 2022 17:36:38 +0100 Subject: Add default value for $RM For some reason GNU make doesn't define this on FreeBSD. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson --- docs/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Makefile b/docs/Makefile index c9192f5e6..4e982e27f 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -7,6 +7,7 @@ SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = source BUILDDIR = build +RM ?= rm # Put it first so that "make" without argument is like "make help". help: -- cgit v1.2.3-54-g00ecf From b806e9f360c5a502c59f51d6ea43ce990a577e5e Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Sun, 8 May 2022 12:54:05 +0100 Subject: pkg: Build pkg/util on FreeBSD Remove freebsd from the unsupported list and add missing symbols. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson --- pkg/util/utils_freebsd.go | 12 ++++++++++++ pkg/util/utils_unsupported.go | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 pkg/util/utils_freebsd.go diff --git a/pkg/util/utils_freebsd.go b/pkg/util/utils_freebsd.go new file mode 100644 index 000000000..17436ae81 --- /dev/null +++ b/pkg/util/utils_freebsd.go @@ -0,0 +1,12 @@ +//go:build freebsd +// +build freebsd + +package util + +import ( + "errors" +) + +func GetContainerPidInformationDescriptors() ([]string, error) { + return []string{}, errors.New("this function is not supported on freebsd") +} diff --git a/pkg/util/utils_unsupported.go b/pkg/util/utils_unsupported.go index 3a0f8646b..26fb7adf9 100644 --- a/pkg/util/utils_unsupported.go +++ b/pkg/util/utils_unsupported.go @@ -1,5 +1,5 @@ -//go:build darwin || windows -// +build darwin windows +//go:build darwin || windows || freebsd +// +build darwin windows freebsd package util -- cgit v1.2.3-54-g00ecf From 5ee3522f56f2c87db7b65e3843b6452d98bb4663 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Sun, 8 May 2022 12:56:59 +0100 Subject: pkg: Build pkg/machine on FreeBSD Add missing symbols for freebsd and freebsd/amd64. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson --- pkg/machine/ignition_freebsd.go | 8 ++++++++ pkg/machine/qemu/options_freebsd.go | 13 +++++++++++++ pkg/machine/qemu/options_freebsd_amd64.go | 18 ++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 pkg/machine/ignition_freebsd.go create mode 100644 pkg/machine/qemu/options_freebsd.go create mode 100644 pkg/machine/qemu/options_freebsd_amd64.go diff --git a/pkg/machine/ignition_freebsd.go b/pkg/machine/ignition_freebsd.go new file mode 100644 index 000000000..ddea40782 --- /dev/null +++ b/pkg/machine/ignition_freebsd.go @@ -0,0 +1,8 @@ +//go:build freebsd +// +build freebsd + +package machine + +func getLocalTimeZone() (string, error) { + return "", nil +} diff --git a/pkg/machine/qemu/options_freebsd.go b/pkg/machine/qemu/options_freebsd.go new file mode 100644 index 000000000..124358db8 --- /dev/null +++ b/pkg/machine/qemu/options_freebsd.go @@ -0,0 +1,13 @@ +package qemu + +import ( + "os" +) + +func getRuntimeDir() (string, error) { + tmpDir, ok := os.LookupEnv("TMPDIR") + if !ok { + tmpDir = "/tmp" + } + return tmpDir, nil +} diff --git a/pkg/machine/qemu/options_freebsd_amd64.go b/pkg/machine/qemu/options_freebsd_amd64.go new file mode 100644 index 000000000..ff8d10db1 --- /dev/null +++ b/pkg/machine/qemu/options_freebsd_amd64.go @@ -0,0 +1,18 @@ +package qemu + +var ( + QemuCommand = "qemu-system-x86_64" +) + +func (v *MachineVM) addArchOptions() []string { + opts := []string{"-machine", "q35,accel=hvf:tcg", "-cpu", "host"} + return opts +} + +func (v *MachineVM) prepare() error { + return nil +} + +func (v *MachineVM) archRemovalFiles() []string { + return []string{} +} -- cgit v1.2.3-54-g00ecf