summaryrefslogtreecommitdiffstats
path: root/recipes-containers/cdi/cdi_git.bb
diff options
context:
space:
mode:
authorKoen Kooi <koen.kooi@oss.qualcomm.com>2026-04-17 09:31:34 +0200
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-04-21 02:30:58 +0000
commit115184e6c9dbca661c3359f039f88faa76a72b4f (patch)
tree048e0e162f5a15d918b4a0b419bf6baa0f0b0ecb /recipes-containers/cdi/cdi_git.bb
parentc83f423bfed7963d2f98276f8cd5d13f2cfda4ca (diff)
downloadmeta-virtualization-115184e6c9dbca661c3359f039f88faa76a72b4f.tar.gz
cdi: add container-device-interface commandline utility
From the upstream description: The `cdi` command-line tool is a utility for inspecting and interacting with the CDI (Container Device Interface) cache. It allows developers and system administrators to: - List CDI Spec files: View all available CDI specification files in the configured directories - List vendors: Display registered device vendors in the CDI cache - List device classes: Show available device classes from CDI Specs - List devices: Enumerate all CDI devices available in the system - Validate specs: Verify CDI specification files against the JSON schema - Inject devices: Inject CDI device configurations into OCI runtime specifications - Monitor cache: Watch for changes in the CDI cache and Spec directories - Resolve devices: Resolve fully-qualified device names to their configurations The CLI tool is particularly useful for debugging CDI configurations, validating spec files, and testing device assignments before deploying them in production environments. Signed-off-by: Koen Kooi <koen.kooi@oss.qualcomm.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/cdi/cdi_git.bb')
-rw-r--r--recipes-containers/cdi/cdi_git.bb40
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes-containers/cdi/cdi_git.bb b/recipes-containers/cdi/cdi_git.bb
new file mode 100644
index 00000000..acdfb7ad
--- /dev/null
+++ b/recipes-containers/cdi/cdi_git.bb
@@ -0,0 +1,40 @@
1DESCRIPTION = "The cdi command-line tool is a utility for inspecting and interacting with the CDI (Container Device Interface) cache."
2SUMMARY = "The cdi command-line tool."
3HOMEPAGE = "https://github.com/cncf-tags/container-device-interface"
4
5LICENSE = "Apache-2.0"
6LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
7
8PV = "1.1.0+git"
9SRCREV_cdi = "35765bd41b50a86aa3919eb352bc90321e010e68"
10SRCREV_FORMAT = "cdi"
11SRC_URI = "git://github.com/cncf-tags/container-device-interface.git;protocol=https;name=cdi;branch=main;destsuffix=${GO_SRCURI_DESTSUFFIX} \
12 "
13SRCREV_FORMAT = "cdi"
14
15GO_IMPORT = "tags.cncf.io/container-device-interface/"
16
17inherit go goarch
18
19# GO_MOD_FETCH_MODE: "vcs" (all git://) or "hybrid" (gomod:// + git://)
20GO_MOD_FETCH_MODE ?= "hybrid"
21
22# VCS mode: all modules via git://
23include ${@ "go-mod-git.inc" if d.getVar("GO_MOD_FETCH_MODE") == "vcs" else ""}
24include ${@ "go-mod-cache.inc" if d.getVar("GO_MOD_FETCH_MODE") == "vcs" else ""}
25
26# Hybrid mode: gomod:// for most, git:// for selected
27include ${@ "go-mod-hybrid-gomod.inc" if d.getVar("GO_MOD_FETCH_MODE") == "hybrid" else ""}
28include ${@ "go-mod-hybrid-git.inc" if d.getVar("GO_MOD_FETCH_MODE") == "hybrid" else ""}
29include ${@ "go-mod-hybrid-cache.inc" if d.getVar("GO_MOD_FETCH_MODE") == "hybrid" else ""}
30
31do_compile() {
32 cd ${S}/src/${GO_IMPORT}
33 sed -i -e 's:GO_EXTRAFLAGS:GOBUILDFLAGS:g' Makefile
34 oe_runmake
35}
36
37do_install() {
38 install -d "${D}${bindir}"
39 install -m 755 ${S}/src/${GO_IMPORT}/bin/* "${D}${bindir}"
40}