Skip to content

Commit

Permalink
env/openbsd-amd64: create OpenBSD 6.8 builder images
Browse files Browse the repository at this point in the history
Update the openbsd-{386,amd64} builder script to create OpenBSD 6.8 images.

Updates golang/go#35712

Change-Id: I7b306f7c99c02ae0c2eab57bdf2c463b11aa507f
Reviewed-on: https://go-review.googlesource.com/c/build/+/268297
Trust: Joel Sing <joel@sing.id.au>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
  • Loading branch information
4a6f656c committed Nov 9, 2020
1 parent 788b5c2 commit a438e8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
6 changes: 3 additions & 3 deletions env/openbsd-amd64/README
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ Debian packages: expect qemu-utils qemu-system-x86.
After it completes, it creates a file openbsd-amd64-gce.tar.gz

Then:
gsutil cp -a public-read openbsd-amd64-gce.tar.gz gs://go-builder-data/openbsd-amd64-64-snap1.tar.gz
gsutil cp -a public-read openbsd-amd64-gce.tar.gz gs://go-builder-data/openbsd-amd64-68.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-64-snap1
gcloud compute --project symbolic-datum-552 images create openbsd-amd64-64-snap1 --source-uri gs://go-builder-data/openbsd-amd64-64-snap1.tar.gz
gcloud compute --project symbolic-datum-552 images delete openbsd-amd64-68
gcloud compute --project symbolic-datum-552 images create openbsd-amd64-68 --source-uri gs://go-builder-data/openbsd-amd64-68.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).
Expand Down
21 changes: 4 additions & 17 deletions env/openbsd-amd64/make.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
set -e
set -u

readonly VERSION="6.4"
readonly VERSION="6.8"
readonly RELNO="${VERSION/./}"
readonly SNAPSHOT=false

readonly ARCH="${ARCH:-amd64}"
readonly MIRROR="${MIRROR:-ftp.usa.openbsd.org}"
readonly MIRROR="${MIRROR:-cdn.openbsd.org}"

if [[ "${ARCH}" != "amd64" && "${ARCH}" != "i386" ]]; then
echo "ARCH must be amd64 or i386"
Expand Down Expand Up @@ -46,9 +46,6 @@ function cleanup() {

trap cleanup EXIT INT

# XXX: Download and save bash, curl, and their dependencies too?
# Currently we download them from the network during the install process.

# Create custom siteXX.tgz set.
PKG_ADD_OPTIONS=""
if [[ "$SNAPSHOT" = true ]]; then
Expand Down Expand Up @@ -117,6 +114,7 @@ Which disk = sd0
Use (W)hole disk or (E)dit the MBR = whole
Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout = auto
URL to autopartitioning template for disklabel = file://disklabel.template
Location of sets = cd0
Set name(s) = +* -x* -game* -man* done
Directory does not contain SHA256.sig. Continue without verification = yes
EOF
Expand Down Expand Up @@ -165,18 +163,7 @@ send "umount /mnt\n"
send "exit\n"
expect timeout { exit 1 } "CONGRATULATIONS!"
# There is some form of race condition with OpenBSD 6.2 MP
# and qemu, which can result in init(1) failing to run /bin/sh
# the first time around...
expect {
timeout { exit 1 }
"Enter pathname of shell or RETURN for sh:" {
send "\nexit\n"
expect timeout { exit 1 } eof
}
eof
}
expect timeout { exit 1 } eof
EOF

# Create Compute Engine disk image.
Expand Down

0 comments on commit a438e8c

Please sign in to comment.