Noel Georgi 76ea5dc465
feat: nvidia extension rework
Rework and cleanup the NVIDIA extensions so that it uses standard paths and is easier to maintain.

Signed-off-by: Noel Georgi <git@frezbo.dev>
(cherry picked from commit fdd02585f835159c1266f1b141f67423e3450d2a)
2026-04-15 14:08:19 +04:00

58 lines
1.7 KiB
YAML

name: nvme-cli
variant: scratch
shell: /bin/bash
dependencies:
- stage: base
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/libjson-c:{{ .BUILD_ARG_PKGS }}"
- stage: libnvme
from: /rootfs # build dependency
- stage: libnvme
from: /rootfs
to: /rootfs
steps:
- sources:
- url: https://github.com/linux-nvme/nvme-cli/archive/refs/tags/{{ .NVME_CLI_VERSION }}.tar.gz
destination: nvme-cli.tar.gz
sha256: {{ .NVME_CLI_SHA256 }}
sha512: {{ .NVME_CLI_SHA512 }}
prepare:
- |
tar xf nvme-cli.tar.gz --strip-components=1
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig
meson setup \
-Db_lto=true \
-Dudevrulesdir=/usr/lib/udev/rules.d \
-Djson-c=enabled \
-Ddocs=false \
-Dsysconfdir=/etc \
.build
build:
- |
meson compile -C .build
install:
- |
mkdir -p /rootfs/usr/bin
DESTDIR=/rootfs meson install -C .build
rm -rf /rootfs/{etc/nvme/discovery.conf,usr/local/{include,lib/{dracut,systemd},share}}
ln -s /usr/local/sbin/nvme /rootfs/usr/bin/nvme
test:
- |
mkdir -p /extensions-validator-rootfs
cp -r /rootfs/ /extensions-validator-rootfs/rootfs
cp /pkg/manifest.yaml /extensions-validator-rootfs/manifest.yaml
/extensions-validator validate --rootfs=/extensions-validator-rootfs --pkg-name="${PKG_NAME}"
sbom:
outputPath: /rootfs/usr/local/share/spdx/nvme-cli.spdx.json
version: {{ .NVME_CLI_VERSION }}
licenses:
- GPL-2.0
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /