diff --git a/nss_wrapper-fix-cmocka-1.1.6+-support.patch b/nss_wrapper-fix-cmocka-1.1.6+-support.patch new file mode 100644 index 0000000..ba2589b --- /dev/null +++ b/nss_wrapper-fix-cmocka-1.1.6+-support.patch @@ -0,0 +1,31 @@ +From 2c879a0ffa70cee33329291d7576ec971d420da2 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Fri, 17 Feb 2023 17:51:27 +0100 +Subject: [PATCH] cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Andreas Schneider +Reviewed-by: Pavel Filipenský +--- + tests/CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 3b94076..733cc4e 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -1,5 +1,9 @@ + project(tests C) + ++if (TARGET cmocka::cmocka) ++ set(CMOCKA_LIBRARY cmocka::cmocka) ++endif() ++ + set(TESTSUITE_LIBRARIES nss_utils ${NWRAP_REQUIRED_LIBRARIES} ${CMOCKA_LIBRARY}) + string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER) + +-- +2.39.2 + diff --git a/nss_wrapper.spec b/nss_wrapper.spec index 515f131..7b45aa1 100644 --- a/nss_wrapper.spec +++ b/nss_wrapper.spec @@ -1,11 +1,12 @@ Name: nss_wrapper Version: 1.1.15 -Release: 1 +Release: 2 License: BSD-3-Clause Summary: A wrapper for the user, group and hosts NSS API Url: https://cwrap.org/ Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz Patch0000: 0001-Optimized-group_save-implemenation-in-case-of-selinux-attr-changes.patch +Patch0001: nss_wrapper-fix-cmocka-1.1.6+-support.patch BuildRequires: gcc cmake libcmocka-devel Requires: cmake pkgconfig @@ -72,6 +73,9 @@ make test %{_mandir}/man1/nss_wrapper.1* %changelog +* Wed Jun 21 2023 yaoxin - 1.1.15-2 +- Fix compilation failure due to cmocka update to 1.1.7 + * Mon Apr 17 2023 liyanan - 1.1.15-1 - Update to 1.1.15