diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2021-11-30 21:55:23 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2021-11-30 22:41:39 +0000 |
commit | 914567e4a7f41b046af6aa4b5214b9d026256a77 (patch) | |
tree | 4ef5a06824f379917636d0cd1a1917d90f659f2a /pkgs/development/libraries/spdk | |
parent | ab5a3f8226b52b4ee32ea9dcb33d007b39a1e566 (diff) |
spdk: upstream fix for ncurses-6.3
Without the change the build fails as: spdk_top.c:1949:69: error: format not a string literal and no format arguments [-Werror=format-security] 1949 | mvwprintw(thread_win, 3, THREAD_WIN_FIRST_COL + 32, idle_time); | ^~~~~~~~~
Diffstat (limited to 'pkgs/development/libraries/spdk')
-rw-r--r-- | pkgs/development/libraries/spdk/default.nix | 7 | ||||
-rw-r--r-- | pkgs/development/libraries/spdk/ncurses-6.3.patch | 48 | ||||
-rw-r--r-- | pkgs/development/libraries/spdk/spdk-dpdk-meson.patch | 17 |
3 files changed, 54 insertions, 18 deletions
diff --git a/pkgs/development/libraries/spdk/default.nix b/pkgs/development/libraries/spdk/default.nix index ec20f68b6f48c..0171070377c3d 100644 --- a/pkgs/development/libraries/spdk/default.nix +++ b/pkgs/development/libraries/spdk/default.nix @@ -1,7 +1,6 @@ { lib, stdenv , fetchurl , fetchFromGitHub -, fetchpatch , ncurses , python3 , cunit @@ -24,6 +23,12 @@ stdenv.mkDerivation rec { sha256 = "sha256-/hynuYVdzIfiHUUfuuOY8SBJ18DqJr2Fos2JjQQVvbg="; }; + patches = [ + # Backport of upstream patch for ncurses-6.3 support. + # Will be in next release after 21.10. + ./ncurses-6.3.patch + ]; + nativeBuildInputs = [ python3 ]; diff --git a/pkgs/development/libraries/spdk/ncurses-6.3.patch b/pkgs/development/libraries/spdk/ncurses-6.3.patch new file mode 100644 index 0000000000000..174c9b6435ef3 --- /dev/null +++ b/pkgs/development/libraries/spdk/ncurses-6.3.patch @@ -0,0 +1,48 @@ +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/pkgs/development/libraries/spdk/spdk-dpdk-meson.patch b/pkgs/development/libraries/spdk/spdk-dpdk-meson.patch deleted file mode 100644 index 9cc6d89ce50e9..0000000000000 --- a/pkgs/development/libraries/spdk/spdk-dpdk-meson.patch +++ /dev/null @@ -1,17 +0,0 @@ -1. dpdk built with meson generates rte_build_config.h rather than rte_config.h. -2. dpdk configured with libbsd requires that dependents link with libbsd. - ---- a/lib/env_dpdk/env.mk -+++ b/lib/env_dpdk/env.mk -@@ -140,6 +140,9 @@ endif - --ifneq (,$(wildcard $(DPDK_INC_DIR)/rte_config.h)) --ifneq (,$(shell grep -e "define RTE_LIBRTE_VHOST_NUMA 1" -e "define RTE_EAL_NUMA_AWARE_HUGEPAGES 1" $(DPDK_INC_DIR)/rte_config.h)) -+ifneq (,$(wildcard $(DPDK_INC_DIR)/rte_build_config.h)) -+ifneq (,$(shell grep -e "define RTE_LIBRTE_VHOST_NUMA 1" -e "define RTE_EAL_NUMA_AWARE_HUGEPAGES 1" $(DPDK_INC_DIR)/rte_build_config.h)) - ENV_LINKER_ARGS += -lnuma - endif -+ifneq (,$(shell grep -e "define RTE_USE_LIBBSD 1" $(DPDK_INC_DIR)/rte_build_config.h)) -+ENV_LINKER_ARGS += -lbsd -+endif - endif |