Skip to content

Commit c2cb18f

Browse files
Greg Steuckbradfitz
Greg Steuck
authored andcommitted
env/openbsd-amd64: use version 6.3, make disklabel readable
Updates golang/go#26833 Restrictive root umask prevented ftp running as unprivileged user from reading disklabel file. Change-Id: I40b2d5b29881ea3733d245f7705cf33c73d4f7dd GitHub-Last-Rev: 99fd276 GitHub-Pull-Request: #12 Reviewed-on: https://go-review.googlesource.com/133115 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 2e02409 commit c2cb18f

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

env/openbsd-amd64/README

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
make.bash creates a Google Compute Engine VM image to run the Go
22
OpenBSD builder, booting up to run the buildlet.
33

4-
make.bash should be run on a Linux box with qemu.
4+
make.bash should be run on a Linux box with expect and qemu.
5+
Debian packages: expect qemu-utils qemu-system-x86.
56

67
After it completes, it creates a file openbsd-amd64-gce.tar.gz
78

env/openbsd-amd64/make.bash

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
set -e
99
set -u
1010

11-
readonly VERSION="6.2"
11+
readonly VERSION="6.3"
1212
readonly RELNO="${VERSION/./}"
1313

1414
readonly ARCH="${ARCH:-amd64}"
@@ -23,7 +23,7 @@ readonly ISO="install${RELNO}-${ARCH}.iso"
2323
readonly ISO_PATCHED="install${RELNO}-${ARCH}-patched.iso"
2424

2525
if [[ ! -f "${ISO}" ]]; then
26-
curl -o "${ISO}" "http://${MIRROR}/pub/OpenBSD/${VERSION}/${ARCH}/install${RELNO}.iso"
26+
curl -o "${ISO}" "https://${MIRROR}/pub/OpenBSD/${VERSION}/${ARCH}/install${RELNO}.iso"
2727
fi
2828

2929
function cleanup() {
@@ -32,7 +32,7 @@ function cleanup() {
3232
rm -f boot.conf
3333
rm -f disk.raw
3434
rm -f disklabel.template
35-
rm -f etc/rc.local
35+
rm -f etc/{installurl,rc.local}
3636
rm -f install.site
3737
rm -f random.seed
3838
rm -f site${RELNO}.tgz
@@ -48,12 +48,15 @@ trap cleanup EXIT INT
4848
mkdir -p etc
4949
cat >install.site <<EOF
5050
#!/bin/sh
51-
env PKG_PATH=http://${MIRROR}/pub/OpenBSD/${VERSION}/packages/${ARCH} \
52-
pkg_add -iv bash curl git
51+
syspatch
52+
pkg_add -iv bash curl git
5353
5454
echo 'set tty com0' > boot.conf
5555
EOF
5656

57+
cat >etc/installurl <<EOF
58+
https://${MIRROR}/pub/OpenBSD
59+
EOF
5760
cat >etc/rc.local <<EOF
5861
(
5962
set -x
@@ -80,7 +83,7 @@ cat >etc/rc.local <<EOF
8083
)
8184
EOF
8285
chmod +x install.site
83-
tar -zcvf site${RELNO}.tgz install.site etc/rc.local
86+
tar -zcvf site${RELNO}.tgz install.site etc/{installurl,rc.local}
8487

8588
# Autoinstall script.
8689
cat >auto_install.conf <<EOF
@@ -144,6 +147,7 @@ send "s\n"
144147
expect timeout { exit 1 } "# "
145148
send "mount /dev/cd0c /mnt\n"
146149
send "cp /mnt/auto_install.conf /mnt/disklabel.template /\n"
150+
send "chmod a+r /disklabel.template\n"
147151
send "umount /mnt\n"
148152
send "exit\n"
149153

0 commit comments

Comments
 (0)