From 798078114f56a8cf791c5495fb2ff011e0dc9990 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Thu, 10 Oct 2024 00:06:40 +1100 Subject: [PATCH] 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 Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov --- env/openbsd-amd64/README | 8 ++++---- env/openbsd-amd64/make.bash | 13 ++++++------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/env/openbsd-amd64/README b/env/openbsd-amd64/README index 6520b672..a5528329 100644 --- a/env/openbsd-amd64/README +++ b/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). diff --git a/env/openbsd-amd64/make.bash b/env/openbsd-amd64/make.bash index 12892f2c..e250ec15 100755 --- a/env/openbsd-amd64/make.bash +++ b/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.