Add dependency warning on enabling journal logs in cynara-client 24/253824/3
authorTomasz Swierczek <t.swierczek@samsung.com>
Thu, 18 Feb 2021 08:50:52 +0000 (09:50 +0100)
committerTomasz Swierczek <t.swierczek@samsung.com>
Tue, 23 Feb 2021 06:46:23 +0000 (07:46 +0100)
libdbus-policy is going to be integrated with systemd on
kdbus-aware systems. This, combined with cynara-client
which can be configured to use journal (systemd) logs,
can lead to cyclic build dependency:

systemd -> libdbus-policy -> cynara -> systemd

This patch adds a warning comment in spec file where configuration
of the logging module is done and adds a warning displayed from
CMake during build to check the cyclic dependency.

Removal of journal logging was not performend as older cynara
releases used to take advantage of it and the implementation
may be still useful.

Change-Id: I474ae7d6f2724dbaf855adb2c49cea38168d85a3

CMakeLists.txt
packaging/libcynara-commons.spec

index 025219a7c6e12a86fc9c9fa97897a82e99ad0f8b..b3d6c560357866dd5ff463da3b382df0e2724448 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2014-2020 Samsung Electronics Co., Ltd All Rights Reserved
+# Copyright (c) 2014-2021 Samsung Electronics Co., Ltd All Rights Reserved
 #
 # This file is licensed under the terms of MIT License or the Apache License
 # Version 2.0 of your choice. See the LICENSE.MIT file for MIT license details.
@@ -174,6 +174,9 @@ ENDIF (BUILD_WITH_SYSTEMD_DAEMON)
 
 IF (LOG_TYPE MATCHES "JOURNAL")
     ADD_DEFINITIONS("-DBUILD_WITH_SYSTEMD_JOURNAL")
+    IF (BUILD_COMMONS)
+        MESSAGE(WARNING "CHECK CYCLIC DEPENDENCIES FROM SYSTEMD")
+    ENDIF (BUILD_COMMONS)
 ELSEIF (LOG_TYPE MATCHES "DLOG")
     ADD_DEFINITIONS("-DBUILD_WITH_DLOG")
 ELSEIF (LOG_TYPE MATCHES "NONE")
index 7a19b227b7d028f250a4c34176cb5e1bddeaf3ee..d40e2b2b82836eefa8d1864cd06e08c113036e1f 100644 (file)
@@ -29,6 +29,9 @@ BuildRequires: pkgconfig(libsmack)
 Obsoletes:     libcynara-storage
 
 # alternatives: DLOG, JOURNAL, NONE, (otherwise SYSLOG is used)
+# WARNING!
+# when choosing JOURNAL, make sure not to introduce cyclic dependency
+# check if systemd depends on libdbus-policy!
 %if !%{defined log_type}
 %define log_type "DLOG"
 %endif