#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#

---
description: |
  This file contains version details that are used by various
  repositories for setting up the correct environment to run
  tests and package components.

format: |
  Each entry in this file MUST conform to the following format:

  <group>:
   description: "<brief-description>"
   notes: "<notes>"

   <project>:
     description: "<brief-description>"
     notes: "<notes>"
     url: "<project-url>"
     issue: "<bug-url>"
     commit: "<commit>"
     version: "<version>"
     uscan-opts: "<optional uscan options>"
     uscan-url: "<url regex for uscan to list versions>"
     release: "<version>"
     branch: "<git-branch>"
     meta:
       <key-1>: "<value-1>"
       <key-n>: "<value-n>"

  Notes:

  - All sections (except "meta") MUST include a description where
    applicable. This is expected to be a brief summary.

  - A section MAY specify a "notes" section which may be multi-line.
    It is expected to be expand on the information specified in
    "description".

  - All sections (except "meta") MUST include a URL where applicable.

  - A section MAY specify a bug URL using the "issue" field.

  - A section MAY define a "meta" section to store additional
    information about a project or group.

  - Each entry MUST specify ATLEAST one of "commit", "version", "release"
    and "branch".

  - WARNING: Gotcha alert! Remember to double-quote all strings
    (except multi-line strings)! This avoids the possibility of a
    version containing a period being treated as a floating point
    number (and truncated!)

  - NOTE: For the uscan related entries, refer to the following uscan pages:
    https://manpages.debian.org/stretch/devscripts/uscan.1.en.html
    https://wiki.debian.org/debian/watch
    Particularly note the 'Common mistakes' section.
    Also note, if you place the uscan strings on single lines in this file then
    '\'s need to be '\'d, so are replaced with '\\', but this does not apply
    for '>-' multi line entries, which can then use the normal uscan syntax.

assets:
  description: "Additional required system elements"

  hypervisor:
    description: "Component used to create virtual machines"

    cloud_hypervisor:
      description: "Cloud Hypervisor is an open source Virtual Machine Monitor"
      url: "https://github.com/cloud-hypervisor/cloud-hypervisor"
      uscan-url: >-
        https://github.com/cloud-hypervisor/cloud-hypervisor/tags.*/v?(\d\S+)\.tar\.gz
      version: "v23.0"

    firecracker:
      description: "Firecracker micro-VMM"
      url: "https://github.com/firecracker-microvm/firecracker"
      uscan-url: >-
        https://github.com/firecracker-microvm/firecracker/tags
        .*/v?(\d\S+)\.tar\.gz
      version: "v0.23.1"

    qemu:
      description: "VMM that uses KVM"
      url: "https://github.com/qemu/qemu"
      version: "v6.2.0"
      tag: "v6.2.0"
      # Do not include any non-full release versions
      # Break the line *without CR or space being appended*, to appease
      # yamllint, and note the deliberate ' ' at the end of the expression.
      uscan-opts: "opts=uversionmangle=s/(\\d)[_\\.\\-\\+]?\
        ((RC|rc|pre|dev|beta|alpha)\\d*)$/$1~$2/ "
      uscan-url: >-
        https://github.com/qemu/qemu/tags
        .*/v?(\d\S+)\.tar\.gz
      tdx:
        description: "VMM that uses KVM and supports TDX"
        url: "https://github.com/intel/qemu-tdx"
        tag: "tdx-qemu-2021.11.29-v6.0.0-rc1-mvp"

    qemu-experimental:
      description: "QEMU with virtiofs support"
      url: "https://github.com/qemu/qemu"
      version: "7a800cf9496fddddf71b21a00991e0ec757a170a"

  image:
    description: |
      Root filesystem disk image used to boot the guest virtual
      machine.
    url: "https://github.com/kata-containers/kata-containers/tools/osbuilder"
    architecture:
      aarch64:
        name: "ubuntu"
        version: "latest"
      ppc64le:
        name: "ubuntu"
        version: "latest"
      s390x:
        name: "ubuntu"
        version: "latest"
      x86_64:
        name: &default-image-name "clearlinux"
        version: "latest"
    meta:
      image-type: *default-image-name

  initrd:
    description: |
      Root filesystem initrd used to boot the guest virtual
      machine.
    url: "https://github.com/kata-containers/kata-containers/tools/osbuilder"
    architecture:
      aarch64:
        name: &default-initrd-name "alpine"
        version: &default-initrd-version "3.15"
      # Do not use Alpine on ppc64le & s390x, the agent cannot use musl because
      # there is no such Rust target
      ppc64le:
        name: &glibc-initrd-name "ubuntu"
        version: &glibc-initrd-version "20.04"
      s390x:
        name: *glibc-initrd-name
        version: *glibc-initrd-version
      x86_64:
        name: *default-initrd-name
        version: *default-initrd-version

  kernel:
    description: "Linux kernel optimised for virtual machines"
    url: "https://cdn.kernel.org/pub/linux/kernel/v5.x/"
    version: "v5.15.26"
    tdx:
      description: "Linux kernel that supports TDX"
      url: "https://github.com/intel/tdx/archive/refs/tags"
      tag: "tdx-guest-v5.15-4"

  kernel-experimental:
    description: "Linux kernel with virtio-fs support"
    url: "https://cdn.kernel.org/pub/linux/kernel/v5.x/"
    tag: "v5.13.10"

  arm-kernel-experimental:
    description: "Linux kernel with cpu/mem hotplug support on arm64"
    url: "https://cdn.kernel.org/pub/linux/kernel/v5.x/"
    version: "v5.15.7"

externals:
  description: "Third-party projects used by the system"

  cni-plugins:
    description: "CNI network plugins"
    url: "https://github.com/containernetworking/plugins"
    commit: "485be65581341430f9106a194a98f0f2412245fb"

  conmon:
    description: "An OCI container runtime monitor"
    url: "https://github.com/containers/conmon"
    version: "v2.0.5"

  crio:
    description: |
      OCI-based Kubernetes Container Runtime Interface implementation
    url: "https://github.com/cri-o/cri-o"
    branch: "release-1.23"

  containerd:
    description: |
      Containerd for Kubernetes Container Runtime Interface.
    url: "github.com/containerd/containerd"
    tarball_url: "https://github.com/containerd/containerd/releases/download"
    # containerd from v1.5.0 used the path unix socket
    # instead of abstract socket, thus kata wouldn's support the containerd's
    # version older than them.
    version: "v1.5.2"

  critools:
    description: "CLI tool for Container Runtime Interface (CRI)"
    url: "https://github.com/kubernetes-sigs/cri-tools"
    version: "1.23.0"

  gperf:
    description: "GNU gperf is a perfect hash function generator"
    url: "https://ftp.gnu.org/gnu/gperf"
    version: "3.1"

  kubernetes:
    description: "Kubernetes project container manager"
    url: "https://github.com/kubernetes/kubernetes"
    # regexp formed to match 'd.tar.gz', deliberately to not match any alpha or
    # beta type releases
    uscan-url: >-
      https://github.com/kubernetes/kubernetes/tags
      .*/v?([\d\.]+)\.tar\.gz
    version: "1.23.1-00"

  libseccomp:
    description: "High level interface to Linux seccomp filter"
    url: "https://github.com/seccomp/libseccomp"
    version: "2.5.1"

  runc:
    description: "OCI CLI reference runtime implementation"
    url: "https://github.com/opencontainers/runc"
    # Oddly, here we do want rc versions, as there appears to be little else
    # really for runc.
    uscan-url: >-
      https://github.com/opencontainers/runc/tags
      .*/v?(\d\S+)\.tar\.gz
    version: "v1.0.1"

  musl:
    description: |
      The musl library is used to build the rust agent.
    url: "https://www.musl-libc.org/"
    uscan-url: >-
      https://www.musl-libc.org/releases/
      musl-([\d\.]+)\.tar\.gz
    version: "1.1.23"
    meta:
      description: |
        'newest-version' is the latest version known to work.
      newest-version: "1.1.23"

  nydus:
    description: "Nydus image acceleration service"
    url: "https://github.com/dragonflyoss/image-service"
    version: "v1.1.2"

  nydus-snapshotter:
    description: "Snapshotter for Nydus image acceleration service"
    url: "https://github.com/containerd/nydus-snapshotter"
    version: "v0.1.0"

languages:
  description: |
    Details of programming languages required to build system
    components.

  golang:
    description: "Google's 'go' language"
    notes: "'version' is the default minimum version used by this project."
    issue: "https://github.com/golang/go/issues/20676"
    uscan-url: >-
      https://github.com/golang/go/tags .*/go?([\d\.]+)\.tar\.gz
    version: "1.16.10"
    meta:
      description: |
        'newest-version' is the latest version known to work when
        building Kata
      newest-version: "1.17.3"

  rust:
    description: "Rust language"
    notes: "'version' is the default minimum version used by this project."
    version: "1.58.1"
    meta:
      description: |
        'newest-version' is the latest version known to work when
        building Kata
      newest-version: "1.58.1"

specs:
  description: "Details of important specifications"

  oci:
    description: "Open Containers Initiative runtime specification"
    url: "https://github.com/opencontainers/runtime-spec/releases"
    uscan-url: >-
      https://github.com/opencontainers/runtime-spec/tags
      .*/v?(\d\S+)\.tar\.gz
    version: "v1.0.0-rc5"

plugins:
  description: |
    Details of plugins required for the components or testing.

  sriov-network-device:
    description: |
      The SR-IOV network device plugin is Kubernetes device plugin for
      discovering and advertising SR-IOV virtual functions (VFs)
      available on a Kubernetes host.
    url: "https://github.com/k8snetworkplumbingwg/sriov-network-device-plugin"
    version: "b7f6d3e0679796e907ecca88cfab0e32e326850d"
