create-openbsd-dev-env

Creates a local OpenBSD QEMU VM matching ponyc tier-3 CI for building and testing ponyc.

6.2k|438|Updated Nov 13, 2012
One-click install
npx skills add https://github.com/ponylang/ponyc --skill create-openbsd-dev-env
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: create-openbsd-dev-env
Source: https://github.com/ponylang/ponyc/tree/main/.claude/skills/create-openbsd-dev-env
Command: npx skills add https://github.com/ponylang/ponyc --skill create-openbsd-dev-env

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reproducing OpenBSD-specific ponyc build and test failures normally requires GitHub Actions CI runs, and hand-rolling an OpenBSD VM is error-prone due to cloud-init seed setup, doas configuration, disklabel partitioning, and datasize limits.

Core Features & Use Cases

  • CI-matched VM provisioning: Boots a cloud-init-configured OpenBSD 7.9 qcow2 image under QEMU/KVM with a cidata seed CD-ROM, passwordless doas, and ssh key access, mirroring the tier-3 CI job.
  • Build environment setup: Partitions and mounts a dedicated /build data disk, raises the datasize limit to 4096M for the LLVM build, and installs build dependencies via pkg_add.
  • Detached build and test workflow: Syncs the ponyc checkout with rsync, runs the multi-hour LLVM libs build detached with log polling, then configures, builds, and runs the ci-core test suite.
  • Use Case: A contributor hits an OpenBSD-only static-PIE linking failure in CI and needs a local VM to reproduce, debug, and validate the fix without pushing to GitHub Actions.

Quick Start

Ask the assistant to set up a local OpenBSD VM for building and testing ponyc using this skill, starting from the prerequisite check.

Frequently Asked Questions about create-openbsd-dev-env

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a local OpenBSD VM for ponyc development?▼

Download the hcartiaux openbsd-cloud-image qcow2, build a cloud-init cidata seed ISO with an ssh key and doas.conf, then boot it under QEMU with a second 50G data disk. The skill walks through each step from prerequisite checks to the first ssh login.

How do I build ponyc on OpenBSD locally?▼

Rsync your ponyc checkout to the VM's /build disk, run cmake -P lib/build-libs.cmake detached to build the vendored LLVM, then run cmake --preset debug, cmake --build --preset debug, and ctest --preset debug -L ci-core. The libs build takes hours, so poll its log for the completion marker.

Why does the LLVM build fail on OpenBSD with allocation errors?▼

OpenBSD caps each process's data segment via /etc/login.conf, defaulting to 1536M, which the LLVM build exceeds. Raise both datasize-cur and datasize-max to 4096M for the openbsd user's login class before starting the libs build.

Does this OpenBSD VM setup work on macOS hosts?▼

Yes, the guest-side steps are OS-agnostic and the QEMU boot uses accel=kvm:hvf, which selects HVF on macOS and KVM on Linux. The host needs qemu-system-x86_64, qemu-img, genisoimage or cloud-localds, rsync, and an OpenSSH client.

Why is ssh to the OpenBSD VM not coming up after boot?▼

The first boot runs cloud-init to create the openbsd user and write doas.conf, so ssh takes a few minutes; poll for up to five minutes. If it never comes up, verify the QEMU process is alive, confirm seed.iso is attached as a cdrom, and reboot with a serial console log to diagnose.

When should I use the FreeBSD or DragonFly skill instead of OpenBSD?▼

Use the FreeBSD skill for issues involving base libc++ or dtrace with an expect/su root bootstrap, and the DragonFly skill for gcc-specific issues since OpenBSD's base compiler is clang. This skill covers only OpenBSD-platform ponyc problems.