Starting a poudboot rc service for building when the poudriere vm launches.
This commit is contained in:
parent
60c4d66f1c
commit
9be646f943
23
ansible/roles/poudriere/files/poudboot
Normal file
23
ansible/roles/poudriere/files/poudboot
Normal 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"
|
17
ansible/roles/poudriere/files/poudboot.bash
Normal file
17
ansible/roles/poudriere/files/poudboot.bash
Normal 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
|
@ -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
|
@ -66,17 +66,33 @@
|
|||||||
# - src: poudriere.d
|
# - src: poudriere.d
|
||||||
# dest: /usr/local/etc/
|
# dest: /usr/local/etc/
|
||||||
|
|
||||||
|
- name: Install scripts
|
||||||
|
copy:
|
||||||
|
src: "files/{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
mode: 0755
|
||||||
|
owner: root
|
||||||
|
group: wheel
|
||||||
|
loop:
|
||||||
|
- src: poudboot.bash
|
||||||
|
dest: /usr/local/bin/poudboot
|
||||||
|
|
||||||
- name: Get ports tree list
|
- name: Get ports tree list
|
||||||
command: poudriere ports -ln
|
command: poudriere ports -ln
|
||||||
register: ports_tree_list
|
register: ports_tree_list
|
||||||
changed_when: false
|
changed_when: false
|
||||||
check_mode: no
|
check_mode: no
|
||||||
|
|
||||||
# - name: Fetch a ports tree
|
|
||||||
# command: poudriere ports -c
|
|
||||||
# args:
|
|
||||||
# creates: /usr/local/poudriere/ports/default
|
|
||||||
|
|
||||||
- name: Configure the ports tree
|
- name: Configure the ports tree
|
||||||
command: poudriere ports -c -m null -M /usr/local/portshaker/trees/main -p default
|
command: poudriere ports -c -m null -M /usr/local/portshaker/trees/main -p default
|
||||||
when: '"default" not in ports_tree_list.stdout_lines'
|
when: '"default" not in ports_tree_list.stdout_lines'
|
||||||
|
|
||||||
|
- name: Install rc script
|
||||||
|
copy:
|
||||||
|
src: "files/{{ item.src }}"
|
||||||
|
dest: "/usr/local/etc/rc.d/{{ item.dest|default(item.src) }}"
|
||||||
|
owner: root
|
||||||
|
group: wheel
|
||||||
|
mode: 0755
|
||||||
|
loop:
|
||||||
|
- src: poudboot
|
||||||
|
Loading…
Reference in New Issue
Block a user