diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-10-30 13:37:39 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-10-30 13:37:39 +0100 |
commit | 7e0c8fe656bbc2fcbdfc3e03a367d2c6ff389769 (patch) | |
tree | 38e753812c0ceba947d65ec0555a5a66c1a5aa4e /nixpkgs/pkgs/development/libraries/spdk | |
parent | 46cf147fc42b72f68ecd52b3b03a8bfd6077f42b (diff) | |
parent | 63678e9f3d3afecfeafa0acead6239cdb447574c (diff) | |
download | nixlib-7e0c8fe656bbc2fcbdfc3e03a367d2c6ff389769.tar nixlib-7e0c8fe656bbc2fcbdfc3e03a367d2c6ff389769.tar.gz nixlib-7e0c8fe656bbc2fcbdfc3e03a367d2c6ff389769.tar.bz2 nixlib-7e0c8fe656bbc2fcbdfc3e03a367d2c6ff389769.tar.lz nixlib-7e0c8fe656bbc2fcbdfc3e03a367d2c6ff389769.tar.xz nixlib-7e0c8fe656bbc2fcbdfc3e03a367d2c6ff389769.tar.zst nixlib-7e0c8fe656bbc2fcbdfc3e03a367d2c6ff389769.zip |
Merge commit '63678e9f3d3afecfeafa0acead6239cdb447574c' into HEAD
Conflicts: nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/spdk')
3 files changed, 63 insertions, 82 deletions
diff --git a/nixpkgs/pkgs/development/libraries/spdk/default.nix b/nixpkgs/pkgs/development/libraries/spdk/default.nix index bcf6b804ed62..c7b83db53489 100644 --- a/nixpkgs/pkgs/development/libraries/spdk/default.nix +++ b/nixpkgs/pkgs/development/libraries/spdk/default.nix @@ -1,5 +1,4 @@ { lib, stdenv -, fetchpatch , fetchFromGitHub , ncurses , python3 @@ -10,65 +9,70 @@ , libuuid , numactl , openssl -, fetchurl +, pkg-config +, zlib +, libpcap +, libnl +, libelf +, jansson +, ensureNewerSourcesForZipFilesHook }: -let - # The old version has some CVEs howver they should not affect SPDK's usage of the framework: https://github.com/NixOS/nixpkgs/pull/171648#issuecomment-1121964568 - dpdk' = dpdk.overrideAttrs (old: rec { - name = "dpdk-21.11"; - src = fetchurl { - url = "https://fast.dpdk.org/rel/${name}.tar.xz"; - sha256 = "sha256-Mkbj7WjuKzaaXYviwGzxCKZp4Vf01Bxby7sha/Wr06E="; - }; - }); -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "spdk"; - version = "21.10"; + + version = "23.09"; src = fetchFromGitHub { owner = "spdk"; repo = "spdk"; rev = "v${version}"; - sha256 = "sha256-pFynTbbSF1g58VD9bOhe3c4oCozeqE+35kECTQwDBDM="; + sha256 = "sha256-P10NDa+MIEY8B3bu34Dq2keyuv2a24XV5Wf+Ah701b8="; + fetchSubmodules = true; }; - patches = [ - # Backport of upstream patch for ncurses-6.3 support. - # Will be in next release after 21.10. - ./ncurses-6.3.patch - - # DPDK 21.11 compatibility. - (fetchpatch { - url = "https://github.com/spdk/spdk/commit/f72cab94dd35d7b45ec5a4f35967adf3184ca616.patch"; - sha256 = "sha256-sSetvyNjlM/hSOUsUO3/dmPzAliVcteNDvy34yM5d4A="; - }) - ]; - nativeBuildInputs = [ python3 + python3.pkgs.setuptools + pkg-config + ensureNewerSourcesForZipFilesHook ]; buildInputs = [ - cunit dpdk' libaio libbsd libuuid numactl openssl ncurses + cunit + dpdk + jansson + libaio + libbsd + libelf + libuuid + libpcap + libnl + numactl + openssl + ncurses + zlib + ]; + + patches = [ + # https://review.spdk.io/gerrit/c/spdk/spdk/+/20394 + ./setuptools.patch ]; postPatch = '' patchShebangs . - - # glibc-2.36 adds arc4random, so we don't need the custom implementation - # here anymore. Fixed upstream in https://github.com/spdk/spdk/commit/43a3984c6c8fde7201d6c8dfe1b680cb88237269, - # but the patch doesn't apply here. - sed -i -e '1i #define HAVE_ARC4RANDOM 1' lib/iscsi/iscsi.c ''; enableParallelBuilding = true; - configureFlags = [ "--with-dpdk=${dpdk'}" ]; + configureFlags = [ + "--with-dpdk=${dpdk}" + "--pydir=${placeholder "out"}/${python3.sitePackages}" + ]; env.NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile. # otherwise does not find strncpy when compiling - NIX_LDFLAGS = "-lbsd"; + env.NIX_LDFLAGS = "-lbsd"; meta = with lib; { description = "Set of libraries for fast user-mode storage"; diff --git a/nixpkgs/pkgs/development/libraries/spdk/ncurses-6.3.patch b/nixpkgs/pkgs/development/libraries/spdk/ncurses-6.3.patch deleted file mode 100644 index 174c9b6435ef..000000000000 --- a/nixpkgs/pkgs/development/libraries/spdk/ncurses-6.3.patch +++ /dev/null @@ -1,48 +0,0 @@ -Backport of upstream https://review.spdk.io/gerrit/c/spdk/spdk/+/10300 ---- a/app/spdk_top/spdk_top.c -+++ b/app/spdk_top/spdk_top.c -@@ -1012 +1012 @@ print_max_len(WINDOW *win, int row, uint16_t col, uint16_t max_len, enum str_ali -- mvwprintw(win, row, col, tmp_str); -+ mvwprintw(win, row, col, "%s", tmp_str); -@@ -1944 +1944 @@ display_thread(struct rpc_thread_info *thread_info) -- mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 6, "%" PRIu64, -+ mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 6, "%d", -@@ -1949 +1949 @@ display_thread(struct rpc_thread_info *thread_info) -- mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 32, idle_time); -+ mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 32, "%s", idle_time); -@@ -1951 +1951 @@ display_thread(struct rpc_thread_info *thread_info) -- mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 54, busy_time); -+ mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 54, "%s", busy_time); -@@ -1954 +1954 @@ display_thread(struct rpc_thread_info *thread_info) -- mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 32, idle_time); -+ mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 32, "%s", idle_time); -@@ -1956 +1956 @@ display_thread(struct rpc_thread_info *thread_info) -- mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 54, busy_time); -+ mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 54, "%s", busy_time); -@@ -2111 +2111 @@ show_core(uint8_t current_page) -- mvwprintw(core_win, 5, CORE_WIN_FIRST_COL + 20, idle_time); -+ mvwprintw(core_win, 5, CORE_WIN_FIRST_COL + 20, "%s", idle_time); -@@ -2118 +2118 @@ show_core(uint8_t current_page) -- mvwprintw(core_win, 7, CORE_WIN_FIRST_COL + 20, busy_time); -+ mvwprintw(core_win, 7, CORE_WIN_FIRST_COL + 20, "%s", busy_time); -@@ -2124 +2124 @@ show_core(uint8_t current_page) -- mvwprintw(core_win, i + 10, 1, core_info->threads.thread[i].name); -+ mvwprintw(core_win, i + 10, 1, "%s", core_info->threads.thread[i].name); -@@ -2137 +2137 @@ show_core(uint8_t current_page) -- mvwprintw(core_win, i + 10, 1, core_info->threads.thread[i].name); -+ mvwprintw(core_win, i + 10, 1, "%s", core_info->threads.thread[i].name); -@@ -2214 +2214 @@ show_poller(uint8_t current_page) -- mvwprintw(poller_win, 3, POLLER_WIN_FIRST_COL, -+ mvwprintw(poller_win, 3, POLLER_WIN_FIRST_COL, "%s", -@@ -2216 +2216 @@ show_poller(uint8_t current_page) -- mvwprintw(poller_win, 3, POLLER_WIN_FIRST_COL + 23, poller->thread_name); -+ mvwprintw(poller_win, 3, POLLER_WIN_FIRST_COL + 23, "%s", poller->thread_name); -@@ -2231 +2231 @@ show_poller(uint8_t current_page) -- mvwprintw(poller_win, 4, POLLER_WIN_FIRST_COL + 23, poller_period); -+ mvwprintw(poller_win, 4, POLLER_WIN_FIRST_COL + 23, "%s", poller_period); -@@ -2264 +2264 @@ print_bottom_error_message(char *msg) -- mvprintw(g_max_row - 1, g_max_col - strlen(msg) - 2, msg); -+ mvprintw(g_max_row - 1, g_max_col - strlen(msg) - 2, "%s", msg); -@@ -2434 +2434 @@ show_stats(pthread_t *data_thread) -- mvprintw(g_max_row - 1, 1, current_page_str); -+ mvprintw(g_max_row - 1, 1, "%s", current_page_str); diff --git a/nixpkgs/pkgs/development/libraries/spdk/setuptools.patch b/nixpkgs/pkgs/development/libraries/spdk/setuptools.patch new file mode 100644 index 000000000000..b3e7644c0076 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/spdk/setuptools.patch @@ -0,0 +1,25 @@ +From 3a72290ba7e2d71ca887225fc0eb8792ca863be2 Mon Sep 17 00:00:00 2001 +From: Jörg Thalheim <joerg@thalheim.io> +Date: Tue, 24 Oct 2023 14:30:53 +0200 +Subject: [PATCH] python: drop deprecated distutils + +This is scheduled for removal in python 3.12: https://docs.python.org/3/whatsnew/3.12.html + +Change-Id: I728dc0cf4ed20f22016d3d58cca8aee3af2bcd8b +Signed-off-by: Jörg Thalheim <joerg@thalheim.io> +--- + +diff --git a/python/setup.py b/python/setup.py +index 47e2104..ae4dff7 100755 +--- a/python/setup.py ++++ b/python/setup.py +@@ -2,8 +2,7 @@ + # SPDX-License-Identifier: BSD-3-Clause + # Copyright (C) 2023 Intel Corporation. All rights reserved. + +-from distutils.core import setup +-from setuptools import find_packages ++from setuptools import setup, find_packages + from spdk import __version__ + + |