Skip to content

Commit

Permalink
feat: add nvme cli
Browse files Browse the repository at this point in the history
Add nvme cli.

Fixes: #562

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Jan 20, 2025
1 parent 4a2e536 commit b1a7dd6
Show file tree
Hide file tree
Showing 12 changed files with 201 additions and 54 deletions.
4 changes: 3 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@
"containers/crun",
"git://git.kernel.org/pub/scm/libs/libcap/libcap.git",
"git://sourceware.org/git/elfutils.git",
"git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git"
"git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git",
"linux-nvme/libnvme",
"linux-nvme/nvme-cli"
]
},
{
Expand Down
3 changes: 3 additions & 0 deletions .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ spec:
- nvidia-fabricmanager-production
- nvidia-open-gpu-kernel-modules-lts
- nvidia-open-gpu-kernel-modules-production
- nvme-cli
- qemu-guest-agent
- qlogic-firmware
- realtek-firmware
Expand Down Expand Up @@ -178,6 +179,8 @@ spec:
- git://git.kernel.org/pub/scm/libs/libcap/libcap.git
- git://sourceware.org/git/elfutils.git
- git://git.kernel.org/pub/scm/utils/mdadm/mdadm.git
- linux-nvme/libnvme
- linux-nvme/nvme-cli
versioning: 'regex:^(?<major>\d+)\.(?<minor>\d+)\.?(?<patch>\d+)?$'
- matchPackageNames:
- https://sourceware.org/git/glibc.git
Expand Down
105 changes: 53 additions & 52 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,56 @@ If the field is marked as `Needs Maintainer`, it means that the package is curre

# Maintainers

| Name | Maintainer | Github ID |
| ----------------------------------------- | -------------------- | -------------------------------------------------------------------- |
| amdgpu | Sidero Labs | NA |
| amd-ucode | Sidero Labs | NA |
| binfmt-misc | Serge Logvinov | [sergelogvinov](https://github.com/sergelogvinov) |
| bnx2-bnx2x | Sidero Labs | NA |
| btrfs | Enno Boland | [Gottox](https://github.com/Gottox) |
| chelsio-drivers | Sidero Labs | NA |
| chelsio-firmware | Sidero Labs | NA |
| cloudflared | Maxime Nrb | [maxnrb](https://github.com/maxnrb) |
| crun | Henrik Gerdes | [hegerdes](https://github.com/hegerdes) |
| drbd | Needs Maintainer | NA |
| dvb-cx23885 | Skyler Mäntysaari | [samip5](https://github.com/samip5) |
| ecr-credential-provider | Florian Ströger | [Preisschild](https://github.com/Preisschild) |
| fuse3 | Sidero Labs | NA |
| gasket-driver | Sidero Labs | NA |
| gvisor | Sidero Labs | NA |
| gvisor-debug | Sidero Labs | NA |
| hello-world-service | Sidero Labs | NA |
| i915 | Sidero Labs | NA |
| intel-ice-firmware | Sidero Labs | NA |
| intel-ucode | Sidero Labs | NA |
| iscsi-tools | Sidero Labs | NA |
| kata-containers | Fabiano Fidêncio | [fidencio](https://github.com/fidencio) |
| lldpd | Nokia (Niklas Wik) | [salkin](https://github.com/salkin) |
| mdadm | Serge Logvinov | [sergelogvinov](https://github.com/sergelogvinov) |
| mei | Nick Meyer | [e3b0c442](https://github.com/e3b0c442) |
| metal-agent | Sidero Labs | NA |
| nut-client | Sidero Labs | NA |
| nvidia-container-toolkit-lts | Sidero Labs | NA |
| nivida-container-toolkit-production | Sidero Labs | NA |
| nvidia-fabricmanager-lts | Sidero Labs | NA |
| nvidia-fabricmanager-production | Sidero Labs | NA |
| nvidia-open-gpu-kernel-modules-lts | Sidero Labs | NA |
| nvidia-open-gpu-kernel-modules-production | Sidero Labs | NA |
| nonfree-kmod-nvidia-lts | Sidero Labs | NA |
| nonfree-kmod-nvidia-production | Sidero Labs | NA |
| qemu-guest-agent | Markus Reiter | [reitermarkus](https://github.com/reitermarkus) |
| qlogic-firmware | Sidero Labs | NA |
| realtek-firmware | Sidero Labs | NA |
| spin | Sven Pfennig | [0xE282B0](https://github.com/0xE282B0) |
| stargz-snapshotter | Sidero Labs | NA |
| tailscale | Beau Trepp | [btrepp](https://github.com/btrepp) |
| thunderbolt | Igor Rzegocki | [ajgon](https://github.com/ajgon) |
| uinput | Judah Rand | [judahrand](https://github.com/judahrand) |
| usb-modem-drivers | Sidero Labs | NA |
| util-linux-tools | Sidero Labs | NA |
| v4l-uvc-drivers | Jacob McSwain | [USA-RedDragon](https://github.com/USA-RedDragon) |
| vmtoolsd-guest-agent | Robin Elfrink | [robinelfrink](https://github.com/robinelfrink) |
| wasmedge | Sidero Labs | NA |
| xen-guest-agent | Jerwin NJ | [j3rwin](https://github.com/j3rwin) |
| zfs | Aenix, Enix | [kvaps](https://github.com/kvaps), [donch](https://github.com/donch) |
| Name | Maintainer | Github ID |
| ----------------------------------------- | ------------------ | -------------------------------------------------------------------- |
| amdgpu | Sidero Labs | NA |
| amd-ucode | Sidero Labs | NA |
| binfmt-misc | Serge Logvinov | [sergelogvinov](https://github.com/sergelogvinov) |
| bnx2-bnx2x | Sidero Labs | NA |
| btrfs | Enno Boland | [Gottox](https://github.com/Gottox) |
| chelsio-drivers | Sidero Labs | NA |
| chelsio-firmware | Sidero Labs | NA |
| cloudflared | Maxime Nrb | [maxnrb](https://github.com/maxnrb) |
| crun | Henrik Gerdes | [hegerdes](https://github.com/hegerdes) |
| drbd | Needs Maintainer | NA |
| dvb-cx23885 | Skyler Mäntysaari | [samip5](https://github.com/samip5) |
| ecr-credential-provider | Florian Ströger | [Preisschild](https://github.com/Preisschild) |
| fuse3 | Sidero Labs | NA |
| gasket-driver | Sidero Labs | NA |
| gvisor | Sidero Labs | NA |
| gvisor-debug | Sidero Labs | NA |
| hello-world-service | Sidero Labs | NA |
| i915 | Sidero Labs | NA |
| intel-ice-firmware | Sidero Labs | NA |
| intel-ucode | Sidero Labs | NA |
| iscsi-tools | Sidero Labs | NA |
| kata-containers | Fabiano Fidêncio | [fidencio](https://github.com/fidencio) |
| lldpd | Nokia (Niklas Wik) | [salkin](https://github.com/salkin) |
| mdadm | Serge Logvinov | [sergelogvinov](https://github.com/sergelogvinov) |
| mei | Nick Meyer | [e3b0c442](https://github.com/e3b0c442) |
| metal-agent | Sidero Labs | NA |
| nut-client | Sidero Labs | NA |
| nvidia-container-toolkit-lts | Sidero Labs | NA |
| nivida-container-toolkit-production | Sidero Labs | NA |
| nvidia-fabricmanager-lts | Sidero Labs | NA |
| nvidia-fabricmanager-production | Sidero Labs | NA |
| nvidia-open-gpu-kernel-modules-lts | Sidero Labs | NA |
| nvidia-open-gpu-kernel-modules-production | Sidero Labs | NA |
| nvme-cli | Sidelo Labs | NA |
| nonfree-kmod-nvidia-lts | Sidero Labs | NA |
| nonfree-kmod-nvidia-production | Sidero Labs | NA |
| qemu-guest-agent | Markus Reiter | [reitermarkus](https://github.com/reitermarkus) |
| qlogic-firmware | Sidero Labs | NA |
| realtek-firmware | Sidero Labs | NA |
| spin | Sven Pfennig | [0xE282B0](https://github.com/0xE282B0) |
| stargz-snapshotter | Sidero Labs | NA |
| tailscale | Beau Trepp | [btrepp](https://github.com/btrepp) |
| thunderbolt | Igor Rzegocki | [ajgon](https://github.com/ajgon) |
| uinput | Judah Rand | [judahrand](https://github.com/judahrand) |
| usb-modem-drivers | Sidero Labs | NA |
| util-linux-tools | Sidero Labs | NA |
| v4l-uvc-drivers | Jacob McSwain | [USA-RedDragon](https://github.com/USA-RedDragon) |
| vmtoolsd-guest-agent | Robin Elfrink | [robinelfrink](https://github.com/robinelfrink) |
| wasmedge | Sidero Labs | NA |
| xen-guest-agent | Jerwin NJ | [j3rwin](https://github.com/j3rwin) |
| zfs | Aenix, Enix | [kvaps](https://github.com/kvaps), [donch](https://github.com/donch) |
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ TARGETS += nvidia-fabricmanager-lts
TARGETS += nvidia-fabricmanager-production
TARGETS += nvidia-open-gpu-kernel-modules-lts
TARGETS += nvidia-open-gpu-kernel-modules-production
TARGETS += nvme-cli
TARGETS += qemu-guest-agent
TARGETS += qlogic-firmware
TARGETS += realtek-firmware
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ cosign verify --certificate-identity-regexp '@siderolabs\.com$' --certificate-oi
### Drivers

| Name | Image | Description | Version Format |
|--------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------|-------------------------------------------------------|
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ----------------------------------------------------- |
| [chelsio](drivers/chelsio/) | [ghcr.io/siderolabs/chelsio-drivers](https://github.com/siderolabs/extensions/pkgs/container/chelsio-drivers) | Chelsio NIC drivers | `talos version` |
| [gasket](drivers/gasket/) | [ghcr.io/siderolabs/gasket-driver](https://github.com/siderolabs/extensions/pkgs/container/gasket-driver) | Driver for Google Coral PCIe devices | `gasket driver upstream short commit`-`talos version` |
| [mei](drivers/mei/) | [ghcr.io/siderolabs/mei](https://github.com/siderolabs/extensions/pkgs/container/mei) | Driver for Intel Management Engine | `talos version` |
Expand Down Expand Up @@ -142,6 +142,7 @@ cosign verify --certificate-identity-regexp '@siderolabs\.com$' --certificate-oi
| Name | Description | Version Format |
| ------------------------------------- | ----------------------------------------- | ------------------ |
| [util-linux-tools](tools/util-linux/) | Util Linux tools (`fstrim` and `nsenter`) | `upstream version` |
| [nvme-cli](tools/nvme-cli/) | NVMe command line interface | `upstream version` |

## Building Extensions

Expand Down
38 changes: 38 additions & 0 deletions tools/nvme-cli/libnvme/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: libnvme
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/openssl:{{ .BUILD_ARG_PKGS }}"
- image: "{{ .BUILD_ARG_PKGS_PREFIX }}/libjson-c:{{ .BUILD_ARG_PKGS }}"
steps:
- sources:
- url: https://github.com/linux-nvme/libnvme/archive/refs/tags/{{ .LIBNVME_VERSION }}.tar.gz
destination: libnvme.tar.gz
sha256: 6d5d8ba2cc4c94a61a994c9f7f25b3b26ef973fb5c0daa37729890903f37a1f1
sha512: 8720f2907a3d13af44fb3deec883cd6eb247d5861c4459b5fe0e67ff9ecfb565462a5faf39d43e08b5284f3e8ca8e72d41b333984beaa45d3287b1a258f3e59d
prepare:
- |
tar xf libnvme.tar.gz --strip-components=1
mkdir -p /usr/bin
ln -s /toolchain/bin/env /usr/bin/env
ln -s /toolchain/bin/python3 /toolchain/bin/python
pip3 install ninja
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
meson setup \
-Db_lto=true \
-Djson-c=enabled \
-Dpython=disabled \
.build
build:
- |
meson compile -C .build
install:
- |
DESTDIR=/rootfs meson install -C .build
finalize:
- from: /rootfs
to: /rootfs
10 changes: 10 additions & 0 deletions tools/nvme-cli/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1alpha1
metadata:
name: nvme-cli
version: "$VERSION"
author: Sidero Labs
description: |
This system extension provides the NVMe command line interface.
compatibility:
talos:
version: ">= v1.0.0"
11 changes: 11 additions & 0 deletions tools/nvme-cli/patches/basename.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/nvme-cli/basename.patch
--- a/plugins/netapp/netapp-nvme.c 2024-10-31 10:39:11
+++ b/plugins/netapp/netapp-nvme.c 2024-11-11 21:02:24
@@ -22,6 +22,7 @@
#include <unistd.h>
#include <errno.h>
#include <string.h>
+#include <libgen.h>

#include "common.h"
#include "nvme.h"
Loading

0 comments on commit b1a7dd6

Please sign in to comment.