# SPDX-FileCopyrightText: Copyright (C) 2025 Bruce Ashfield
#
# SPDX-License-Identifier: MIT
#
# VRuntime - Minimal distro for vdkr/vpdmn container runtime environments
#
# This distro is used by multiconfig builds (vruntime-aarch64, vruntime-x86-64)
# to create minimal rootfs images for QEMU-based container processing.
#
# IMPORTANT: This distro does NOT participate in CONTAINER_PROFILE.
# The vdkr/vpdmn rootfs images explicitly specify their container stacks
# to avoid conflicts between docker (runc) and podman (crun) requirements.
# This allows both to be built in the same multiconfig.

require conf/distro/include/vruntime-base.inc

# Mask recipes not needed by vruntime container runtime builds.
# Generated from bitbake -g dependency graph analysis.
# Each file can be commented out independently to disable masking for that layer.
require conf/distro/include/vruntime-bbmask.inc
require conf/distro/include/vruntime-bbmask-oe-core.inc
require conf/distro/include/vruntime-bbmask-meta-oe.inc

DISTRO = "vruntime"
DISTRO_NAME = "VRuntime Minimal"
DISTRO_VERSION = "1.0"

# Default to ext4, but image recipes may override to squashfs
IMAGE_FSTYPES = "ext4"

# Use busybox init for minimal footprint
# The vdkr/vpdmn images use custom /init scripts anyway
VIRTUAL-RUNTIME_init_manager = "busybox"
VIRTUAL-RUNTIME_initscripts = "initscripts"

# Disable unnecessary features
VIRTUAL-RUNTIME_login_manager = ""

# Disable ptest for glib-2.0 -- its -ptest RDEPENDS pulls
# cairo -> fontconfig -> freetype (entire graphics stack) via
# python3-dbusmock -> python3-pygobject, all masked in vruntime.
PTEST_ENABLED:pn-glib-2.0 = ""

# =============================================================================
# Container runtime: NOT SET
# =============================================================================
# Unlike normal container distros, vruntime does NOT set CONTAINER_PROFILE
# or VIRTUAL-RUNTIME_container_runtime. This prevents containerd/podman from
# pulling a specific runtime via RDEPENDS, avoiding conflicts when both
# vdkr (runc) and vpdmn (crun) are built in the same multiconfig.
#
# The vdkr-rootfs-image and vpdmn-rootfs-image recipes explicitly install
# their required runtimes in IMAGE_INSTALL.
# =============================================================================
VIRTUAL-RUNTIME_container_runtime = ""
VIRTUAL-RUNTIME_container_engine = ""
VIRTUAL-RUNTIME_container_networking = ""
VIRTUAL-RUNTIME_container_dns = ""
VIRTUAL-RUNTIME_container_orchestration = ""

# Ensure the unified runc recipe is the provider -- vdkr-rootfs-image
# RDEPENDS on runc directly. Strong assignment to override any stale
# cache or weak defaults.
PREFERRED_PROVIDER_virtual/runc = "runc"
