Skip to content

Commit 9851d84

Browse files
Merge pull request #90 from openebs/fix-spdk
Update spdk to fix aio bdev
2 parents abe1203 + 7e63d41 commit 9851d84

File tree

5 files changed

+40
-11
lines changed

5 files changed

+40
-11
lines changed

.github/mergify.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
queue_rules:
2+
- name: default
3+
update_method: rebase
4+
branch_protection_injection_mode: merge
5+
update_bot_account: openebs-ci
6+
merge_queue:
7+
max_parallel_checks: 1
8+
pull_request_rules:
9+
- name: auto-label and approve backport PRs
10+
conditions:
11+
- author=mergify[bot]
12+
- title~=\(backport \#[0-9]+\)$
13+
actions:
14+
label:
15+
add:
16+
- kind/backport
17+
review:
18+
type: APPROVE
19+
message: "Automatically approved backport PR"
20+
bot_account: openebs-ci

.github/workflows/pr-code-lint.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ jobs:
1313
- uses: actions/checkout@v4
1414
with:
1515
submodules: 'recursive'
16-
- uses: cachix/install-nix-action@v26
16+
- run: |
17+
echo "NIX_PATH=nixpkgs=$(jq -r '.nixpkgs.url' nix/sources.json)" >> $GITHUB_ENV
18+
- uses: cachix/install-nix-action@v31
1719
with:
18-
nix_path: nixpkgs=channel:nixos-22.11
20+
nix_path: ${{ env.NIX_PATH }}
1921
- name: nix-shell
2022
run: nix-shell --pure --run exit
2123
- name: cargo-clippy
@@ -28,8 +30,10 @@ jobs:
2830
- uses: actions/checkout@v4
2931
with:
3032
submodules: 'recursive'
31-
- uses: cachix/install-nix-action@v26
33+
- run: |
34+
echo "NIX_PATH=nixpkgs=$(jq -r '.nixpkgs.url' nix/sources.json)" >> $GITHUB_ENV
35+
- uses: cachix/install-nix-action@v31
3236
with:
33-
nix_path: nixpkgs=channel:nixos-22.11
37+
nix_path: ${{ env.NIX_PATH }}
3438
- name: nix-shell
3539
run: nix-shell --pure -p nixpkgs-fmt --run "nixpkgs-fmt --check ."

build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,12 @@ fn configure_spdk() -> Result<LibraryConfig, Error> {
115115
spdk_lib.add_inc(spdk_path.join("include"))?;
116116
spdk_lib.add_inc(spdk_path.join("include/spdk_internal"))?;
117117

118+
// For nix-builds the end derivation would end up with "include/spdk/module" and the local builds using the local "module"
119+
// However on newer spdk, they also start using "include/spdk/module", meaning we can't use its presence as a check
120+
// to load alternatively load module.
118121
spdk_lib.add_inc(spdk_path.join("include/spdk/module"))?;
122+
// So for now, simply ignore any module include error.
123+
let _ = spdk_lib.add_inc(spdk_path.join("module"));
119124

120125
spdk_lib.add_inc_alt(spdk_path.join("include/spdk/lib"), spdk_path.join("lib"))?;
121126
spdk_lib.add_inc_alt(

build_scripts/tool_sha256.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ fi
2020

2121
msg_info "Using HEAD git revision: $REV"
2222

23-
CMD="nix-prefetch fetchFromGitHub --owner $OWNER --repo $REPO --fetchSubmodules --rev $REV"
23+
CMD="nix-prefetch-github --fetch-submodules --rev $REV $OWNER $REPO"
2424

2525
msg_debug "Command to prefetch: $CMD"
2626
msg_info "Fetching from github ..."
2727

2828
# For low verbosity levels, suppress fetch info printed by nex-prefect.
29+
OUT=$($CMD)
2930
if [[ "$VERBOSE" -ge "2" ]]
3031
then
31-
SHA=$($CMD)
32-
else
33-
SHA=$($CMD 2> /dev/null)
32+
echo "$OUT"
3433
fi
34+
SHA=$(echo "$OUT" | grep '"hash"' | cut -d '"' -f4)
3535

3636
if [[ -z "$SHA" ]]
3737
then

nix/pkgs/libspdk/default.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ let
8787
# Derivation attributes
8888
#
8989
spdk = rec {
90-
rev = "234212ed0b2eb515b52f48fab291e366f23676f3";
91-
sha256 = "sha256-FQz3AjRaLrGKK0wpZldzz2yaGSLM8g4xHRz4BbeY16c=";
90+
rev = "fd233103d1a24e18a275159e68922e3d1289c28c";
91+
sha256 = "sha256-ebr1C2r/CeNRU9RAIhBN6rdom7LFXkzIvs7l/GyGG70=";
9292
pname = "libspdk${nameSuffix}";
9393
version = "25.05-${lib.substring 0 7 rev}";
9494
name = "${pname}-${version}";
@@ -112,7 +112,7 @@ let
112112

113113
sourceRoot = spdk.name;
114114

115-
devBuildInputs = [ astyle pkgs.python3Packages.tabulate pkgs.python3Packages.jinja2 ];
115+
devBuildInputs = [ astyle pkgs.python3Packages.tabulate pkgs.python3Packages.jinja2 pkgs.nix-prefetch-github ];
116116

117117
nativeBuildInputs = [
118118
cmake

0 commit comments

Comments
 (0)