Skip to content

env/openbsd-amd64: use version 6.3, make disklabel readable #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion env/openbsd-amd64/README
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
make.bash creates a Google Compute Engine VM image to run the Go
OpenBSD builder, booting up to run the buildlet.

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

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

Expand Down
16 changes: 10 additions & 6 deletions env/openbsd-amd64/make.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
set -e
set -u

readonly VERSION="6.2"
readonly VERSION="6.3"
readonly RELNO="${VERSION/./}"

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

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

function cleanup() {
Expand All @@ -32,7 +32,7 @@ function cleanup() {
rm -f boot.conf
rm -f disk.raw
rm -f disklabel.template
rm -f etc/rc.local
rm -f etc/{installurl,rc.local}
rm -f install.site
rm -f random.seed
rm -f site${RELNO}.tgz
Expand All @@ -48,12 +48,15 @@ trap cleanup EXIT INT
mkdir -p etc
cat >install.site <<EOF
#!/bin/sh
env PKG_PATH=http://${MIRROR}/pub/OpenBSD/${VERSION}/packages/${ARCH} \
pkg_add -iv bash curl git
syspatch
pkg_add -iv bash curl git

echo 'set tty com0' > boot.conf
EOF

cat >etc/installurl <<EOF
https://${MIRROR}/pub/OpenBSD
EOF
cat >etc/rc.local <<EOF
(
set -x
Expand All @@ -80,7 +83,7 @@ cat >etc/rc.local <<EOF
)
EOF
chmod +x install.site
tar -zcvf site${RELNO}.tgz install.site etc/rc.local
tar -zcvf site${RELNO}.tgz install.site etc/{installurl,rc.local}

# Autoinstall script.
cat >auto_install.conf <<EOF
Expand Down Expand Up @@ -144,6 +147,7 @@ send "s\n"
expect timeout { exit 1 } "# "
send "mount /dev/cd0c /mnt\n"
send "cp /mnt/auto_install.conf /mnt/disklabel.template /\n"
send "chmod a+r /disklabel.template\n"
send "umount /mnt\n"
send "exit\n"

Expand Down