Skip to content

Commit

Permalink
Merge pull request #21558 from Luap99/freebsd-build
Browse files Browse the repository at this point in the history
pkg/machine: make it build for freebsd
  • Loading branch information
openshift-merge-bot[bot] authored Feb 8, 2024
2 parents 4570ccb + 9f38b22 commit b7d15a2
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 61 deletions.
60 changes: 30 additions & 30 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -488,35 +488,35 @@ osx_alt_build_task:
task_cleanup_script: *mac_cleanup

# Build freebsd release natively on a FreeBSD VM.
#freebsd_alt_build_task:
# name: "FreeBSD Cross"
# alias: freebsd_alt_build
# # Only run on 'main' and PRs against 'main'
# # Docs: ./contrib/cirrus/CIModes.md
# only_if: |
# $CIRRUS_CHANGE_TITLE !=~ '.*CI:MACHINE.*' &&
# ( $CIRRUS_BRANCH == 'main' || $CIRRUS_BASE_BRANCH == 'main' )
# depends_on:
# - build
# env:
# <<: *stdenvars
# # Functional FreeBSD builds must be built natively since they depend on CGO
# DISTRO_NV: freebsd-13
# VM_IMAGE_NAME: notyet
# CTR_FQIN: notyet
# CIRRUS_SHELL: "/bin/sh"
# TEST_FLAVOR: "altbuild"
# ALT_NAME: 'FreeBSD Cross'
# freebsd_instance:
# image_family: freebsd-13-2
# setup_script:
# - pkg install -y gpgme bash go-md2man gmake gsed gnugrep go pkgconf
# build_amd64_script:
# - gmake podman-release
# # This task cannot make use of the shared repo.tbz artifact and must
# # produce a new repo.tbz artifact for consumption by 'artifacts' task.
# repo_prep_script: *repo_prep
# repo_artifacts: *repo_artifacts
freebsd_alt_build_task:
name: "FreeBSD Cross"
alias: freebsd_alt_build
# Only run on 'main' and PRs against 'main'
# Docs: ./contrib/cirrus/CIModes.md
only_if: |
$CIRRUS_CHANGE_TITLE !=~ '.*CI:MACHINE.*' &&
( $CIRRUS_BRANCH == 'main' || $CIRRUS_BASE_BRANCH == 'main' )
depends_on:
- build
env:
<<: *stdenvars
# Functional FreeBSD builds must be built natively since they depend on CGO
DISTRO_NV: freebsd-13
VM_IMAGE_NAME: notyet
CTR_FQIN: notyet
CIRRUS_SHELL: "/bin/sh"
TEST_FLAVOR: "altbuild"
ALT_NAME: 'FreeBSD Cross'
freebsd_instance:
image_family: freebsd-13-2
setup_script:
- pkg install -y gpgme bash go-md2man gmake gsed gnugrep go pkgconf
build_amd64_script:
- gmake podman-release
# This task cannot make use of the shared repo.tbz artifact and must
# produce a new repo.tbz artifact for consumption by 'artifacts' task.
repo_prep_script: *repo_prep
repo_artifacts: *repo_artifacts


# Verify podman is compatible with the docker python-module.
Expand Down Expand Up @@ -1076,7 +1076,7 @@ success_task:
- swagger
- alt_build
- osx_alt_build
#- freebsd_alt_build
- freebsd_alt_build
#- win_installer
- docker-py_test
- unit_test
Expand Down
10 changes: 1 addition & 9 deletions pkg/machine/qemu/options_freebsd_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@ var (
QemuCommand = "qemu-system-x86_64"
)

func (v *MachineVM) addArchOptions(_ *setNewMachineCMDOpts) []string {
func (v *QEMUStubber) addArchOptions(_ *setNewMachineCMDOpts) []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{}
}
10 changes: 1 addition & 9 deletions pkg/machine/qemu/options_freebsd_arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,10 @@ var (
QemuCommand = "qemu-system-aarch64"
)

func (v *MachineVM) addArchOptions(_ *setNewMachineCMDOpts) []string {
func (v *QEMUStubber) addArchOptions(_ *setNewMachineCMDOpts) []string {
opts := []string{
"-machine", "virt",
"-accel", "tcg",
"-cpu", "host"}
return opts
}

func (v *MachineVM) prepare() error {
return nil
}

func (v *MachineVM) archRemovalFiles() []string {
return []string{}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build linux || freebsd

package vmconfigs

import (
Expand Down
13 changes: 0 additions & 13 deletions pkg/machine/vmconfigs/config_freebsd.go

This file was deleted.

0 comments on commit b7d15a2

Please sign in to comment.