Merge pull request #15290 from dfr/freebsd-build
FreeBSD build fixes for pkg/util and pkg/machine
This commit is contained in:
commit
4136496ee7
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
//go:build freebsd
|
||||
// +build freebsd
|
||||
|
||||
package machine
|
||||
|
||||
func getLocalTimeZone() (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package qemu
|
||||
|
||||
import (
|
||||
"os"
|
||||
)
|
||||
|
||||
func getRuntimeDir() (string, error) {
|
||||
tmpDir, ok := os.LookupEnv("TMPDIR")
|
||||
if !ok {
|
||||
tmpDir = "/tmp"
|
||||
}
|
||||
return tmpDir, nil
|
||||
}
|
||||
|
|
@ -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{}
|
||||
}
|
||||
|
|
@ -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")
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
//go:build darwin || windows
|
||||
// +build darwin windows
|
||||
//go:build darwin || windows || freebsd
|
||||
// +build darwin windows freebsd
|
||||
|
||||
package util
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue