diff options
| author | Greg Steuck <gnezdo@google.com> | 2018-10-11 10:32:25 -0700 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-10-11 19:44:34 +0200 |
| commit | 42c78641f53c8e6208bfd1808259f116a7ec71de (patch) | |
| tree | 2e041b36ab796168114eb7e99a998e6afcb5d977 /tools | |
| parent | 5f818b4b9f7640ea6c31c3cdf138e5d5004a4b00 (diff) | |
tools/create-openbsd*: Support post-version flip snapshots.
* Fixed pkg_add status checking
* Switched to qcow2 test image
* Minor GC
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/create-openbsd-gce-ci.sh | 6 | ||||
| -rwxr-xr-x | tools/create-openbsd-vmm-worker.sh | 22 |
2 files changed, 9 insertions, 19 deletions
diff --git a/tools/create-openbsd-gce-ci.sh b/tools/create-openbsd-gce-ci.sh index 1075aac1b..b425ef1ff 100755 --- a/tools/create-openbsd-gce-ci.sh +++ b/tools/create-openbsd-gce-ci.sh @@ -26,11 +26,13 @@ if [[ ! -f "${ISO}" ]]; then fi # Create custom siteXX.tgz set. -mkdir -p etc +rm -fr etc && mkdir -p etc cat >install.site <<EOF #!/bin/sh syspatch -pkg_add -I bash git gmake go llvm nano wget && echo pkg_add OK +PKGS="bash git gmake go llvm nano wget" +PKG_PATH=https://${MIRROR}/pub/OpenBSD/${DOWNLOAD_VERSION}/packages/${ARCH}/ pkg_add -I \$PKGS +PKG_PATH= pkg_info -I \$PKGS && echo pkg_add OK echo 'set tty com0' > boot.conf echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config diff --git a/tools/create-openbsd-vmm-worker.sh b/tools/create-openbsd-vmm-worker.sh index 15f78cf08..ebc2d4c02 100755 --- a/tools/create-openbsd-vmm-worker.sh +++ b/tools/create-openbsd-vmm-worker.sh @@ -26,7 +26,7 @@ if [[ ! -f "${ISO}" ]]; then fi # Create custom siteXX.tgz set. -mkdir -p etc +rm -fr etc && mkdir -p etc cat >install.site <<'EOF' #!/bin/sh echo 'set tty com0' > boot.conf @@ -45,13 +45,6 @@ cat >etc/installurl <<EOF https://${MIRROR}/pub/OpenBSD EOF -cat >etc/rc.local <<EOF -( - set -x - - echo "starting syz-manager" -) -EOF chmod +x install.site cat >etc/rc.conf.local <<EOF @@ -115,15 +108,15 @@ growisofs -M "${ISO_PATCHED}" -l -R -graft-points \ /etc/random.seed=random.seed # Initialize disk image. -rm -f worker_disk.raw -qemu-img create -f raw worker_disk.raw 1G +rm -f worker_disk.qcow2 +qemu-img create -f qcow2 worker_disk.qcow2 1G # Run the installer to create the disk image. expect 2>&1 <<EOF | tee install_log set timeout 1800 spawn qemu-system-x86_64 -nographic -smp 2 \ - -drive if=virtio,file=worker_disk.raw,format=raw -cdrom "${ISO_PATCHED}" \ + -drive if=virtio,file=worker_disk.qcow2,format=qcow2 -cdrom "${ISO_PATCHED}" \ -net nic,model=virtio -net user -boot once=d -m 4000 -enable-kvm expect timeout { exit 1 } "boot>" @@ -171,11 +164,6 @@ expect { } EOF -# Create Compute Engine disk image. -echo "Archiving worker_disk.raw... (this may take a while)" -i="openbsd-${ARCH}-${RELNO}-vmm.tar.gz" -tar -zcf "$i" worker_disk.raw - cat <<EOF -Done: $i +Done: worker_disk.qcow2 EOF |
