From fe4fa9e13c9a84738f788d6640e817cb633ccbab Mon Sep 17 00:00:00 2001 From: lixiaokeng Date: Thu, 15 Oct 2020 11:25:37 +0800 Subject: [PATCH] fix boolean value with json-c 0.14 --- 0026-fix-boolean-value-with-json-c-0.14.patch | 40 +++++++++++++++++++ multipath-tools.spec | 30 +++++++++++--- 2 files changed, 64 insertions(+), 6 deletions(-) create mode 100644 0026-fix-boolean-value-with-json-c-0.14.patch diff --git a/0026-fix-boolean-value-with-json-c-0.14.patch b/0026-fix-boolean-value-with-json-c-0.14.patch new file mode 100644 index 0000000..cbfc8c5 --- /dev/null +++ b/0026-fix-boolean-value-with-json-c-0.14.patch @@ -0,0 +1,40 @@ +From 82129852d74785267f95ef598ac483ff9af38a55 Mon Sep 17 00:00:00 2001 +From: "mail@eworm.de" +Date: Sat, 25 Apr 2020 21:11:13 +0200 +Subject: [PATCH] fix boolean value with json-c 0.14 + +Upstream json-c removed the TRUE and FALSE defines in commit +0992aac61f8b087efd7094e9ac2b84fa9c040fcd. + +[mwilck]: Use stdbool.h, and keep the log message unchanged. + +Signed-off-by: Christian Hesse +Signed-off-by: Martin Wilck +--- + libdmmp/libdmmp_private.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libdmmp/libdmmp_private.h b/libdmmp/libdmmp_private.h +index ac85b63..b1a6dde 100644 +--- a/libdmmp/libdmmp_private.h ++++ b/libdmmp/libdmmp_private.h +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + + #include "libdmmp/libdmmp.h" +@@ -82,7 +83,7 @@ static out_type func_name(struct dmmp_context *ctx, const char *var_name) { \ + do { \ + json_type j_type = json_type_null; \ + json_object *j_obj_tmp = NULL; \ +- if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != TRUE) { \ ++ if (json_object_object_get_ex(j_obj, key, &j_obj_tmp) != true) { \ + _error(ctx, "Invalid JSON output from multipathd IPC: " \ + "key '%s' not found", key); \ + rc = DMMP_ERR_IPC_ERROR; \ +-- +1.8.3.1 + diff --git a/multipath-tools.spec b/multipath-tools.spec index 25bfc42..88047df 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -1,6 +1,6 @@ Name: multipath-tools Version: 0.8.4 -Release: 2 +Release: 3 Summary: Tools to manage multipath devices with the device-mapper License: GPLv2-or-later and LGPLv2+ URL: http://christophe.varoqui.free.fr/ @@ -33,7 +33,7 @@ Patch22: 0022-master-libmultipath-fix-use-after-free-when-iscsi-lo.patch Patch23: 0023-libmultipath-warn-if-freeing-path-that-holds-mpp-hwe.patch Patch24: 0024-libmultipath-warn-about-NULL-value-of-mpp-hwe.patch Patch25: 0025-libmultipath-fix-mpp-hwe-handling-in-sync_paths.patch - +Patch26: 0026-fix-boolean-value-with-json-c-0.14.patch BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89 BuildRequires: libselinux-devel, libsepol-devel, readline-devel, ncurses-devel, git BuildRequires: systemd-units, systemd-devel, json-c-devel, perl-interpreter, pkgconfig @@ -173,17 +173,35 @@ fi %changelog +* Fri Sep 25 2020 lixiaokeng - 0.8.4-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix boolean value for TRUE deleted + * Tue Sep 01 2020 lixiaokeng - 0.8.4-2 - Type:bugfix - ID:NA - SUG:NA - DESC:fix use after free in select_pgfailback -* Tue Aug 26 2020 lixiaokeng - 0.8.4-1 -- upgrade to 0.8.4 +* Thu Jul 16 2020 lixiaokeng - 0.8.4-1 +- update to 0.8.4-1 + +* Sun Jul 5 2020 Zhiqiang Liu - 0.7.7-20 +- remove useless readme files. -* Tue Aug 18 2020 smileknife - 0.7.7-18 -- update release for rebuilding +* Tue Jun 30 2020 volcanodragon - 0.7.7-19 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:rename patches + +* Sat May 28 2020 ethan848 - 0.7.7-18 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:backport bugfix from community * Thu Mar 19 2020 hy-euler - 0.7.7-17 - Type:enhancement -- Gitee