env/openbsd-amd64: update build image script to OpenBSD 7.6

OpenBSD 7.6 has been released, meaning that the only two supported
versions are 7.5 and 7.6. Update the image build script for 7.6.

Additionally, bump the maxproc limit for the swarming user, which
will hopefully reduce the number of failures due to fork/exec
returning EAGAIN.

Updates golang/go#66474
Updates golang/go#69823

Change-Id: Ie2667de2defefbb6a56adca3dec92d7663c615e4
Reviewed-on: https://go-review.googlesource.com/c/build/+/618895
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
Joel Sing 2024-10-10 00:06:40 +11:00
Родитель ad1c807825
Коммит 798078114f
2 изменённых файлов: 10 добавлений и 11 удалений

8
env/openbsd-amd64/README поставляемый
Просмотреть файл

@ -3,18 +3,18 @@ OpenBSD builder, booting up to run the buildlet.
make.bash should be run on a Linux box with expect and qemu.
Debian packages: expect qemu-utils qemu-system-x86 growisofs genisoimage.
VERSION=7.2 ARCH=amd64 ./make.bash
VERSION=7.6 ARCH=amd64 ./make.bash
After it completes, it creates a file openbsd-${VERSION}-${ARCH}-gce.tar.gz
Then:
gsutil cp -a public-read openbsd-7.2-amd64-gce.tar.gz gs://go-builder-data/openbsd-amd64-72.tar.gz
gsutil cp -a public-read openbsd-7.6-amd64-gce.tar.gz gs://go-builder-data/openbsd-amd64-76.tar.gz
Or just use the web UI at:
https://console.developers.google.com/project/symbolic-datum-552/storage/browser/go-builder-data/
Then:
gcloud compute --project symbolic-datum-552 images delete openbsd-amd64-72
gcloud compute --project symbolic-datum-552 images create openbsd-amd64-72 --source-uri gs://go-builder-data/openbsd-amd64-72.tar.gz
gcloud compute --project symbolic-datum-552 images delete openbsd-amd64-76
gcloud compute --project symbolic-datum-552 images create openbsd-amd64-76 --source-uri gs://go-builder-data/openbsd-amd64-76.tar.gz
The VM needs to be run with the GCE metadata attribute "buildlet-binary-url" set to a URL
of the OpenBSD buildlet (cross-compiled, typically).

13
env/openbsd-amd64/make.bash поставляемый
Просмотреть файл

@ -7,7 +7,7 @@ set -e
set -u
# Update to the version listed on https://openbsd.org
readonly VERSION="${VERSION:-7.2}"
readonly VERSION="${VERSION:-7.6}"
readonly RELNO="${VERSION/./}"
readonly SNAPSHOT=false
@ -63,18 +63,17 @@ moreres:\
:vmemoryuse-cur=infinity: \
:memoryuse-max=infinity: \
:memoryuse-cur=infinity: \
:maxproc-max=1024: \
:maxproc-cur=1024: \
:maxproc-max=2048: \
:maxproc-cur=2048: \
:openfiles-max=4096: \
:openfiles-cur=4096: \
:tc=default:
EOLOGIN
usermod -L moreres swarming
syspatch
# Run syspatch twice in case syspatch itself needs patching (this is the case with OpenBSD
# 7.1: https://www.openbsd.org/errata71.html )
# Run syspatch twice in case syspatch itself needs patching (this has been needed previously).
syspatch
pkg_add -iv ${PKG_ADD_OPTIONS} bash curl git python3 sudo--gettext
pkg_add -iv ${PKG_ADD_OPTIONS} bash curl git python%3 sudo--gettext
chown root:wheel /etc/sudoers
halt -p
EOF
@ -124,7 +123,7 @@ swarming ALL=NOPASSWD:/sbin/shutdown -r now
EOF
chmod +x ${SITE}/install.site
mkdir -p ${SITE}/usr/local/bin
CGO_ENABLED=0 GOOS=openbsd GOARCH=${ARCH/i386/386} go1.21.0 build -o ${SITE}/usr/local/bin/bootstrapswarm golang.org/x/build/cmd/bootstrapswarm
CGO_ENABLED=0 GOOS=openbsd GOARCH=${ARCH/i386/386} go build -o ${SITE}/usr/local/bin/bootstrapswarm golang.org/x/build/cmd/bootstrapswarm
tar --mode a=rx,u=rwx --owner root:0 --group wheel:0 -C ${SITE} -zcf ${WORK}/site${RELNO}.tgz .
# Autoinstall script.