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
-# 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.
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")
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