From a27e94f671aa15d704438b89aa0c23a46297fc88 Mon Sep 17 00:00:00 2001 From: Wim de With Date: Fri, 22 Mar 2024 10:26:13 +0100 Subject: [PATCH] spdk: 23.09 -> 24.01 --- .../0001-fix-setuptools-installation.patch | 29 ------------------- pkgs/development/libraries/spdk/default.nix | 20 ++++++++----- .../libraries/spdk/setuptools.patch | 25 ---------------- 3 files changed, 13 insertions(+), 61 deletions(-) delete mode 100644 pkgs/development/libraries/spdk/0001-fix-setuptools-installation.patch delete mode 100644 pkgs/development/libraries/spdk/setuptools.patch diff --git a/pkgs/development/libraries/spdk/0001-fix-setuptools-installation.patch b/pkgs/development/libraries/spdk/0001-fix-setuptools-installation.patch deleted file mode 100644 index 3c3fb50fc152..000000000000 --- a/pkgs/development/libraries/spdk/0001-fix-setuptools-installation.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 3f718fc1873c9c138684ea019e9bd42c9b24506c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= -Date: Tue, 28 Nov 2023 11:28:11 +0100 -Subject: [PATCH] fix setuptools installation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Jörg Thalheim ---- - python/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/python/Makefile b/python/Makefile -index f835daa..b41995a 100644 ---- a/python/Makefile -+++ b/python/Makefile -@@ -12,7 +12,7 @@ setup_cmd += --root $(DESTDIR) - endif - - ifneq ($(CONFIG_PYDIR),) --setup_cmd += --install-purelib $(CONFIG_PYDIR) -+setup_cmd += --root / --prefix $(CONFIG_PYDIR) - purelibdir := $(CONFIG_PYDIR) - else - purelibdir := $(shell python3 -c "import sysconfig; print(sysconfig.get_paths()['purelib'])") --- -2.42.0 - diff --git a/pkgs/development/libraries/spdk/default.nix b/pkgs/development/libraries/spdk/default.nix index c62f54b14091..0b84820a3174 100644 --- a/pkgs/development/libraries/spdk/default.nix +++ b/pkgs/development/libraries/spdk/default.nix @@ -4,6 +4,7 @@ , python3 , cunit , dpdk +, fuse3 , libaio , libbsd , libuuid @@ -21,19 +22,22 @@ stdenv.mkDerivation rec { pname = "spdk"; - version = "23.09"; + version = "24.01"; src = fetchFromGitHub { owner = "spdk"; repo = "spdk"; rev = "v${version}"; - sha256 = "sha256-P10NDa+MIEY8B3bu34Dq2keyuv2a24XV5Wf+Ah701b8="; + sha256 = "sha256-5znYELR6WvVXbfFKAcRtJnSwAE5WHmA8v1rvZUtszS4="; fetchSubmodules = true; }; nativeBuildInputs = [ python3 + python3.pkgs.pip python3.pkgs.setuptools + python3.pkgs.wheel + python3.pkgs.wrapPython pkg-config ensureNewerSourcesForZipFilesHook ]; @@ -41,6 +45,7 @@ stdenv.mkDerivation rec { buildInputs = [ cunit dpdk + fuse3 jansson libaio libbsd @@ -54,10 +59,8 @@ stdenv.mkDerivation rec { zlib ]; - patches = [ - # https://review.spdk.io/gerrit/c/spdk/spdk/+/20394 - ./setuptools.patch - ./0001-fix-setuptools-installation.patch + propagatedBuildInputs = [ + python3.pkgs.configshell ]; postPatch = '' @@ -68,13 +71,16 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-dpdk=${dpdk}" - "--pydir=${placeholder "out"}" ]; postCheck = '' python3 -m spdk ''; + postFixup = '' + wrapPythonPrograms + ''; + env.NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile. # otherwise does not find strncpy when compiling env.NIX_LDFLAGS = "-lbsd"; diff --git a/pkgs/development/libraries/spdk/setuptools.patch b/pkgs/development/libraries/spdk/setuptools.patch deleted file mode 100644 index b3e7644c0076..000000000000 --- a/pkgs/development/libraries/spdk/setuptools.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 3a72290ba7e2d71ca887225fc0eb8792ca863be2 Mon Sep 17 00:00:00 2001 -From: Jörg Thalheim -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 ---- - -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__ - -