Starting a poudboot rc service for building when the poudriere vm launches.

This commit is contained in:
Tom Alexander
2022-12-10 18:42:02 -05:00
parent 60c4d66f1c
commit 9be646f943
4 changed files with 78 additions and 5 deletions

View File

@@ -0,0 +1,23 @@
#!/bin/sh
# /usr/local/etc/rc.d/poudboot
#
# REQUIRE: FILESYSTEM kld
# PROVIDE: poudboot
# AFTER: netif
. /etc/rc.subr
name=poudboot
rcvar=${name}_enable
start_cmd="${name}_start"
stop_cmd="${name}_stop"
load_rc_config $name
poudboot_start() {
/usr/local/bin/poudboot start
}
poudboot_stop() {
/usr/local/bin/poudboot stop
}
run_rc_command "$1"

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
#
# Run poudriere at system boot. Useful for virtual machines so launching the VM also kicks off a build.
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
COMMAND="$1"
shift 1
if [ "$COMMAND" = "start" ]; then
echo "foo"
elif [ "$COMMAND" = "stop" ]; then
echo "bar"
else
echo "baz"
fi

View File

@@ -0,0 +1,17 @@
# Disable CPUTYPE optimizations when compiling gcc48 because tigerlake is not included in gcc4.8
#
# Disable CPUTYPE optimizations when compiling ripgrep because the build is failing https://github.com/BurntSushi/ripgrep/issues/1721
#
# Disable CPUTYPE optimizations for firefox due to failing build.
#
# Example from bottom of /usr/share/examples/etc/make.conf
.if ${.CURDIR:N*/lang/gcc48*} && ${.CURDIR:N*/lang/gcc10*} && ${.CURDIR:N*/textproc/ripgrep*} && ${.CURDIR:N*/www/firefox*}
# Disabling tigerlake optimizations because qemu's TCG does not support avx512
#
#CPUTYPE?=tigerlake
CPUTYPE?=x86-64-v3
.endif
OPTIMIZED_CFLAGS=YES
BUILD_OPTIMIZED=YES
WITH_CPUFLAGS=YES
BUILD_STATIC=YES