From 210218d4d851df39e85998d5c05b72434015f0df Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 27 Feb 2023 11:36:09 +0100 Subject: [PATCH] Fix building with cmocka >= 1.1.6 --- priv_wrapper-fix-cmocka-1.1.6+-support.patch | 31 ++++++++++++++++++++ priv_wrapper.spec | 7 ++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 priv_wrapper-fix-cmocka-1.1.6+-support.patch diff --git a/priv_wrapper-fix-cmocka-1.1.6+-support.patch b/priv_wrapper-fix-cmocka-1.1.6+-support.patch new file mode 100644 index 0000000..2af953c --- /dev/null +++ b/priv_wrapper-fix-cmocka-1.1.6+-support.patch @@ -0,0 +1,31 @@ +From 295bcbe9de1fb37531678d482efb12583b77c6d0 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 d33cf15..46147cf 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() ++ + include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +-- +2.39.2 + diff --git a/priv_wrapper.spec b/priv_wrapper.spec index 6edae06..9b22ff0 100644 --- a/priv_wrapper.spec +++ b/priv_wrapper.spec @@ -1,6 +1,6 @@ Name: priv_wrapper Version: 1.0.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A library to disable resource limits and other privilege dropping License: GPLv3+ @@ -10,6 +10,8 @@ Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz Source1: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc Source2: priv_wrapper.keyring +Patch0: priv_wrapper-fix-cmocka-1.1.6+-support.patch + BuildRequires: gcc BuildRequires: cmake BuildRequires: gnupg2 @@ -63,6 +65,9 @@ development/testing. %{_mandir}/man1/priv_wrapper.1* %changelog +* Mon Feb 27 2023 Andreas Schneider - 1.0.1-3 +- Fix building with cmocka >= 1.1.6 + * Fri Jan 20 2023 Fedora Release Engineering - 1.0.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild