зеркало из https://github.com/golang/build.git
dashboard, env: add FreeBSD 9.3 support.
Differences from 10.1 support: - Uses gcc in base image, 10.1 uses clang. - Uses dig in startup diagnostic, 10.1 uses drill. Fixes #8639 Change-Id: I298bdf7d76c91395ae56606d1e2f0176eb0eb792 Reviewed-on: https://go-review.googlesource.com/3173 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Родитель
de1efdcb09
Коммит
222a9c067a
|
@ -156,6 +156,12 @@ func init() {
|
|||
addBuilder(BuildConfig{Name: "linux-amd64-clang", Image: "gobuilders/linux-x86-clang"})
|
||||
|
||||
// VMs:
|
||||
addBuilder(BuildConfig{
|
||||
Name: "freebsd-amd64-gce93",
|
||||
VMImage: "freebsd-amd64-gce93",
|
||||
machineType: "n1-highcpu-2",
|
||||
Go14URL: "https://storage.googleapis.com/go-builder-data/go1.4-freebsd-amd64.tar.gz",
|
||||
})
|
||||
addBuilder(BuildConfig{
|
||||
Name: "freebsd-amd64-gce101",
|
||||
VMImage: "freebsd-amd64-gce101",
|
||||
|
|
|
@ -11,8 +11,30 @@
|
|||
# Only tested on Ubuntu 14.04.
|
||||
# Requires packages: qemu expect mkisofs
|
||||
|
||||
set -e -x
|
||||
readonly VERSION=10.1
|
||||
set -e
|
||||
|
||||
case $1 in
|
||||
9.3)
|
||||
readonly VERSION=9.3
|
||||
readonly VERSION_TRAILER="-20140711-r268512"
|
||||
readonly DNS_LOOKUP=dig
|
||||
;;
|
||||
|
||||
10.1)
|
||||
if [ -z $1 ]; then
|
||||
echo "No version specified, defaulting to 10.1"
|
||||
fi
|
||||
readonly VERSION=10.1
|
||||
readonly VERSION_TRAILER=
|
||||
# BIND replaced by unbound on FreeBSD 10, so drill(1) is the new dig(1)
|
||||
readonly DNS_LOOKUP=drill
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 <version>"
|
||||
echo " version - FreeBSD version to build. Valid choices: 9.3 10.1"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
readonly IMAGE=freebsd-amd64-gce${VERSION/\./}.tar.gz
|
||||
|
||||
if [ $(tput cols) -lt 80 ]; then
|
||||
|
@ -21,11 +43,11 @@ if [ $(tput cols) -lt 80 ]; then
|
|||
fi
|
||||
|
||||
if ! [ -e FreeBSD-${VERSION:?}-RELEASE-amd64.raw ]; then
|
||||
curl -O ftp://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/${VERSION:?}-RELEASE/amd64/Latest/FreeBSD-${VERSION:?}-RELEASE-amd64.raw.xz
|
||||
xz -d FreeBSD-${VERSION:?}-RELEASE-amd64.raw.xz
|
||||
curl -O ftp://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/${VERSION:?}-RELEASE/amd64/Latest/FreeBSD-${VERSION:?}-RELEASE-amd64${VERSION_TRAILER}.raw.xz
|
||||
xz -d FreeBSD-${VERSION:?}-RELEASE-amd64${VERSION_TRAILER}.raw.xz
|
||||
fi
|
||||
|
||||
cp FreeBSD-${VERSION:?}-RELEASE-amd64.raw disk.raw
|
||||
cp FreeBSD-${VERSION:?}-RELEASE-amd64${VERSION_TRAILER}.raw disk.raw
|
||||
|
||||
mkdir -p iso/etc iso/usr/local/etc/rc.d
|
||||
|
||||
|
@ -55,8 +77,7 @@ buildlet_start()
|
|||
echo "starting buildlet script"
|
||||
netstat -rn
|
||||
cat /etc/resolv.conf
|
||||
# BIND replaced by unbound on FreeBSD 10, so drill(1) is the new dig(1)
|
||||
drill metadata.google.internal
|
||||
${DNS_LOOKUP:?} metadata.google.internal
|
||||
(
|
||||
set -e
|
||||
export PATH="\$PATH:/usr/local/bin"
|
||||
|
|
Загрузка…
Ссылка в новой задаче