[Midnightbsd-cvs] [MidnightBSD/mports] e0a94d: sysutils/vm-bhyve: fix UEFI and other version chec...

Lucas Holt noreply at github.com
Tue Sep 15 11:55:07 EDT 2026


  Branch: refs/heads/sysutils/vm-bhyve
  Home:   https://github.com/MidnightBSD/mports
  Commit: e0a94dac5233293fe4c2acb9a9633eadedea0248
      https://github.com/MidnightBSD/mports/commit/e0a94dac5233293fe4c2acb9a9633eadedea0248
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M sysutils/vm-bhyve/Makefile
    A sysutils/vm-bhyve/files/patch-lib_vm-base

  Log Message:
  -----------
  sysutils/vm-bhyve: fix UEFI and other version checks on MidnightBSD

vm-bhyve sets VERSION_BSD from "uname -K" and compares it against
__FreeBSD_version values throughout. On MidnightBSD uname -K reports
__MidnightBSD_version instead (400004 on 4.0.6), which is smaller than
every FreeBSD threshold in the code, so all nine version gates take the
wrong branch. The visible symptom is that UEFI guests are refused with

    fatal; uefi guests can only be run on FreeBSD 10.3 or newer

because 400004 is less than 1002509. The same mismatch also silently
disabled UTC time, the AHCI device limit, UEFI graphics, the xhci mouse,
the virtio console, wired memory (-S), rctl limits, and capped VM names
at 30 characters instead of 229.

MidnightBSD exposes no __FreeBSD_version at runtime -- kern.osreldate
and uname -K both return the MidnightBSD value, and __FreeBSD_version is
only available from sys/param.h at build time. Map to the FreeBSD base
each release derives from instead: 4.0+ is FreeBSD 13-stable, 3.2 is
FreeBSD 12.4. Other platforms are untouched.

Verified on 4.0.6 that all nine gates now take the correct branch.

AI-Assisted-by: Claude Opus 5 <noreply at anthropic.com>

Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
Claude-Session: https://claude.ai/code/session_01NSsgED5s7GPYJNb1HxuaU9
Signed-off-by: Lucas Holt <luke at foolishgames.com>



To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications


More information about the Midnightbsd-cvs mailing list