DebianPreseed
Text to add to the debian-installer preseed file. Optional.
+FreeBSDDist
+ Path to the folder(s) that contain the FreeBSD install image and
+ the FreeBSD compressed install sets, together with the MANIFEST
+ file that holds the checksums. This is required in order to run
+ a FreeBSD host install if no previous FreeBSD buildjob is
+ available (ie: for example when running in standalone mode).
+ The layout expected by osstest is the following:
+ <FreeBSDDist>/<arch>/install.img
+ <FreeBSDDist>/<arch>/base.txz
+ <FreeBSDDist>/<arch>/kernel.txz
+ <FreeBSDDist>/<arch>/MANIFEST
+
+FreeBSDVersion
+ Numeric value holding the major FreeBSD version of the media
+ provided in FreeBSDDist (ie: 12).
+
========================================
Config settings relevant only to standalone mode
--- /dev/null
+#!/bin/bash
+
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2017 Citrix Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -e -o posix
+
+branch=$1
+xenbranch=$2
+blessing=$3
+buildflight=$4
+
+flight=`./cs-flight-create $blessing $branch`
+
+. ./cri-common
+. ./ap-common
+. ./mfi-common
+
+# Only supports amd64 ATM.
+arches="amd64"
+
+job_create_build_filter_callback () {
+ :
+}
+
+set_freebsd_runvars () {
+ # Caller should have done if required:
+ # local freebsd_runvars
+ #
+ # Figure out where are the installer binaries. The order is the
+ # following:
+ #
+ # 1. Env variable FREEBSD_<arch>_BUILDJOB: use the output from a
+ # previous build-<arch>-freebsd.
+ #
+ # 2. Env variables FREEBSD_DIST, FREEBSD_VERSION: set before calling
+ # into make-flight, provide the path to the installer image, the sets
+ # to install and the version being installed.
+ #
+ # 3. Config file FreeBSDDist, FreeBSDVersion: same as 2. except that
+ # they are set on the config file.
+ #
+ envvar="FREEBSD_${arch^^}_BUILDJOB"
+ if [ -n "${!envvar}" ]; then
+ freebsd_runvars="freebsdbuildjob=${!envvar}"
+ elif [ -n "$FREEBSD_DIST" ] && [ -n "$FREEBSD_VERSION" ]; then
+ freebsd_runvars="freebsd_distpath=$FREEBSD_DIST/$arch \
+ freebsd_version=$FREEBSD_VERSION"
+ else
+ distpath=`getconfig "FreeBSDDist"`
+ version=`getconfig "FreeBSDVersion"`
+ freebsd_runvars="freebsd_distpath=$distpath/$arch \
+ freebsd_version=$version"
+ fi
+}
+
+for arch in "$arches"; do
+ set_freebsd_runvars
+ job_create_build build-$arch-freebsd build-freebsd \
+ arch=$arch \
+ $RUNVARS $BUILD_RUNVARS $BUILD_FREEBSD_RUNVARS \
+ $arch_runvars \
+ tree_freebsd=$TREE_FREEBSD \
+ revision_freebsd=$REVISION_FREEBSD \
+ host_hostflags=arch-$arch,purpose-build \
+ all_host_os=freebsd \
+ $freebsd_runvars
+
+ # Create an identical job that's going to use the build output from
+ # the previous one.
+ job_create_build build-$arch-freebsd-again build-freebsd \
+ arch=$arch \
+ $RUNVARS $BUILD_RUNVARS $BUILD_FREEBSD_RUNVARS \
+ $arch_runvars \
+ tree_freebsd=$TREE_FREEBSD \
+ revision_freebsd=$REVISION_FREEBSD \
+ host_hostflags=arch-$arch,purpose-build \
+ all_host_os=freebsd \
+ freebsdbuildjob=build-$arch-freebsd
+done
+
+echo $flight