diff --git a/.github/AppImageBuilder.yml b/.github/AppImageBuilder.yml
index 67b215c..cce4689 100644
--- a/.github/AppImageBuilder.yml
+++ b/.github/AppImageBuilder.yml
@@ -27,7 +27,6 @@ AppDir:
- sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
include:
- libjson-c5
- - libhugetlbfs0
- libssl3
files:
include:
diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml
new file mode 100644
index 0000000..d9079fd
--- /dev/null
+++ b/.github/codeql/codeql-config.yml
@@ -0,0 +1,3 @@
+name: "CodeQL Config"
+paths-ignore:
+ - subprojects/**
diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml
index 526c879..6c0d3e5 100644
--- a/.github/workflows/appimage.yml
+++ b/.github/workflows/appimage.yml
@@ -24,7 +24,7 @@ jobs:
uses: AppImageCrafters/build-appimage@v1.3
with:
recipe: .github/AppImageBuilder.yml
- - uses: actions/upload-artifact@v3
+ - uses: actions/upload-artifact@v4
name: upload artifacts to github
with:
name: AppImage
@@ -34,10 +34,10 @@ jobs:
name: deploy AppImage
runs-on: ubuntu-latest
needs: build-appimage
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'linux-nvme/nvme-cli' }}
steps:
- name: Download artifact
- uses: dawidd6/action-download-artifact@v2
+ uses: dawidd6/action-download-artifact@v3
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
workflow_conclusion: success
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 9903645..0b12517 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -23,7 +23,7 @@ jobs:
- name: build
run: |
scripts/build.sh -b ${{ matrix.buildtype }} -c ${{ matrix.compiler }}
- - uses: actions/upload-artifact@v3
+ - uses: actions/upload-artifact@v4
name: upload logs
if: failure()
with:
@@ -53,7 +53,7 @@ jobs:
scripts/build.sh -b release -c gcc -t ${{ matrix.arch }} cross
params: "--platform linux/amd64"
pull-params: "--platform linux/amd64"
- - uses: actions/upload-artifact@v3
+ - uses: actions/upload-artifact@v4
name: upload logs
if: failure()
with:
@@ -72,7 +72,7 @@ jobs:
- name: build
run: |
scripts/build.sh -b release -c gcc fallback
- - uses: actions/upload-artifact@v3
+ - uses: actions/upload-artifact@v4
if: failure()
with:
name: log files
@@ -89,3 +89,13 @@ jobs:
- name: build
run: |
scripts/build.sh -m muon
+ build-make-static:
+ name: make static
+ runs-on: ubuntu-latest
+ container:
+ image: ghcr.io/igaw/linux-nvme/debian:latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: build
+ run: |
+ make static
diff --git a/.github/workflows/checkpatch.yml b/.github/workflows/checkpatch.yml
new file mode 100644
index 0000000..c0a09b7
--- /dev/null
+++ b/.github/workflows/checkpatch.yml
@@ -0,0 +1,15 @@
+name: checkpatch review
+on: [pull_request]
+jobs:
+ checkpatch:
+ name: checkpatch review
+ runs-on: ubuntu-latest
+ steps:
+ - name: 'Calculate PR commits + 1'
+ run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
+ fetch-depth: 0
+ - name: Run checkpatch review
+ uses: webispy/checkpatch-action@v9
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 0000000..d57e17a
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,71 @@
+# CodeQL build configuration for nvme-cli
+# Mostly based on auto-configuration with additions and tweaks for:
+# * meson install
+# * language detection
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ "master" ]
+ schedule:
+ - cron: '24 2 * * 5'
+
+jobs:
+ analyze:
+ name: Analyze
+ # Runner size impacts CodeQL analysis time. To learn more, please see:
+ # - https://gh.io/recommended-hardware-resources-for-running-codeql
+ # - https://gh.io/supported-runners-and-hardware-resources
+ # - https://gh.io/using-larger-runners
+ # Consider using larger runners for possible analysis time improvements.
+ runs-on: 'ubuntu-latest'
+ timeout-minutes: 360
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'c-cpp', 'python' ]
+ # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
+ # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
+ # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Install build tools
+ run: |
+ sudo apt-get update
+ sudo apt-get install meson
+
+ # Initializes the CodeQL tools for scanning.
+ - if: matrix.language == 'c-cpp'
+ name: Initialize CodeQL C
+ uses: github/codeql-action/init@v3
+ with:
+ languages: 'c-cpp'
+
+ - if: matrix.language == 'python'
+ name: Initialize CodeQL Python
+ uses: github/codeql-action/init@v3
+ with:
+ languages: 'python'
+ config-file: ./.github/codeql/codeql-config.yml
+
+ - name: meson build
+ run: |
+ meson setup --force-fallback-for=libnvme,json-c .build
+ ninja -C .build
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v3
+ with:
+ category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 39ea739..d272d0f 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -7,6 +7,7 @@ on:
jobs:
code-coverage:
+ if: github.repository == 'linux-nvme/nvme-cli'
name: code coverage
runs-on: ubuntu-latest
container:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 8259480..8a5651c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -10,7 +10,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
- if: startsWith(github.ref, 'refs/tags/v')
+ if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'linux-nvme/nvme-cli'
permissions:
contents: write
steps:
diff --git a/.mailmap b/.mailmap
new file mode 100644
index 0000000..b506f85
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1 @@
+Vigneshwaran Saravanan SYNOPSIS
nvme-admin-passthru <device> [--opcode=<opcode> | -o <opcode>]
- [--flags=<flags> | -f <flags>] [-rsvd=<rsvd> | -R <rsvd>]
- [--namespace-id=<nsid> | -n <nsid>] [--cdw2=<cdw2> | -2 <cdw2>]
- [--cdw3=<cdw3> | -3 <cdw3>] [--cdw10=<cdw10> | -4 <cdw4>]
- [--cdw11=<cdw11> | -5 <cdw5>] [--cdw12=<cdw12> | -6 <cdw6>]
- [--cdw13=<cdw13> | -7 <cdw7>] [--cdw14=<cdw14> | -8 <cdw8>]
- [--cdw15=<cdw15> | -9 <cdw9>]
- [--data-len=<data-len> | -l <data-len>]
- [--metadata-len=<len> | -m <len>]
- [--input-file=<file> | -i <file>]
- [--read | -r ] [--write | -w]
- [--timeout=<to> | -t <to>]
- [--show-command | -s]
- [--dry-run | -d]
- [--raw-binary | -b]
- [--prefill=<prefill> | -p <prefill>]
- [--latency | -T]
+nvme-admin-passthru <device> [--opcode=<opcode> | -O <opcode>]
+ [--flags=<flags> | -f <flags>] [-rsvd=<rsvd> | -R <rsvd>]
+ [--namespace-id=<nsid> | -n <nsid>] [--cdw2=<cdw2> | -2 <cdw2>]
+ [--cdw3=<cdw3> | -3 <cdw3>] [--cdw10=<cdw10> | -4 <cdw4>]
+ [--cdw11=<cdw11> | -5 <cdw5>] [--cdw12=<cdw12> | -6 <cdw6>]
+ [--cdw13=<cdw13> | -7 <cdw7>] [--cdw14=<cdw14> | -8 <cdw8>]
+ [--cdw15=<cdw15> | -9 <cdw9>]
+ [--data-len=<data-len> | -l <data-len>]
+ [--metadata-len=<len> | -m <len>]
+ [--input-file=<file> | -i <file>]
+ [--read | -r] [--write | -w]
+ [--timeout=<to> | -t <to>]
+ [--show-command | -s]
+ [--dry-run | -d]
+ [--raw-binary | -b]
+ [--prefill=<prefill> | -p <prefill>]
+ [--latency | -T]
+ [--output-format=<fmt> | -o <fmt>] [--verbose | -v]
+ Set the reporting format to normal, json or binary. Only one + output format can be used at a time. +
++ Increase the information detail in the output. +
+