Commit 70950325 authored by Dimitri John Ledkov's avatar Dimitri John Ledkov Committed by Simon McVittie

Adjust cmake build to match autoconf installation locations.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89280Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
parent b2c61ca6
......@@ -86,11 +86,15 @@ set(EXPANDED_LIBDIR ${DBUS_INSTALL_DIR}/lib)
set(EXPANDED_INCLUDEDIR ${DBUS_INSTALL_DIR}/include)
set(EXPANDED_BINDIR ${DBUS_INSTALL_DIR}/bin)
set(EXPANDED_SYSCONFDIR ${DBUS_INSTALL_DIR}/etc)
set(EXPANDED_LOCALSTATEDIR ${DBUS_INSTALL_DIR}/var)
set(EXPANDED_DATADIR ${DBUS_INSTALL_DIR}/${DBUS_DATADIR})
set(DBUS_MACHINE_UUID_FILE ${DBUS_INSTALL_DIR}/lib/dbus/machine-id)
set(DBUS_BINDIR ${EXPANDED_BINDIR})
set(DBUS_DAEMONDIR ${EXPANDED_BINDIR})
set(DBUS_LOCALSTATEDIR ${DBUS_INSTALL_DIR}/var)
set(DBUS_LOCALSTATEDIR ${EXPANDED_LOCALSTATEDIR})
set(DBUS_SYSCONFDIR ${EXPANDED_SYSCONFDIR})
set(DBUS_LIBEXECDIR ${EXPANDED_LIBDIR})
set(DBUS_DATADIR ${EXPANDED_DATADIR})
#enable building of shared library
SET(BUILD_SHARED_LIBS ON)
......@@ -447,8 +451,8 @@ if (WIN32)
set (DBUS_SESSION_BUS_LISTEN_ADDRESS "autolaunch:" CACHE STRING "session bus default listening address")
set (DBUS_SESSION_BUS_CONNECT_ADDRESS "autolaunch:" CACHE STRING "session bus fallback address for clients")
set (DBUS_SYSTEM_CONFIG_FILE "etc/dbus-1/system.conf")
set (DBUS_SESSION_CONFIG_FILE "etc/dbus-1/session.conf")
set (DBUS_SYSTEM_CONFIG_FILE "share/dbus-1/system.conf")
set (DBUS_SESSION_CONFIG_FILE "share/dbus-1/session.conf")
# bus-test expects a non empty string
set (DBUS_USER "Administrator")
set (DBUS_TEST_USER "guest")
......
......@@ -5,10 +5,12 @@ SET(BUS_DIR ${CMAKE_SOURCE_DIR}/../bus)
# config files for installation
CONFIGURE_FILE( "${BUS_DIR}/session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/session.conf" IMMEDIATE @ONLY)
CONFIGURE_FILE( "${BUS_DIR}/legacy-config/session.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/legacy-config/session.conf" IMMEDIATE @ONLY)
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/session.d)
if(NOT WIN32)
CONFIGURE_FILE( "system.conf.cmake" "${CMAKE_CURRENT_BINARY_DIR}/system.conf" IMMEDIATE @ONLY)
CONFIGURE_FILE( "${BUS_DIR}/system.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/system.conf" IMMEDIATE @ONLY)
CONFIGURE_FILE( "${BUS_DIR}/legacy-config/system.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/legacy-config/system.conf" IMMEDIATE @ONLY)
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/system.d)
endif()
......@@ -91,13 +93,15 @@ set_target_properties(dbus-daemon PROPERTIES OUTPUT_NAME ${DBUS_DAEMON_NAME})
set_target_properties(dbus-daemon PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_CLIENT_DEFINITIONS})
install_targets(/bin dbus-daemon)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/session.conf DESTINATION etc/dbus-1)
install(DIRECTORY DESTINATION etc/dbus-1/session.d)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/session.conf DESTINATION share/dbus-1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/legacy-config/session.conf DESTINATION etc/dbus-1)
install(DIRECTORY DESTINATION share/dbus-1/session.d)
install(DIRECTORY DESTINATION share/dbus-1/services)
if(NOT WIN32)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/system.conf DESTINATION etc/dbus-1)
install(DIRECTORY DESTINATION etc/dbus-1/system.d)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/system.conf DESTINATION share/dbus-1)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/legacy-config/system.conf DESTINATION etc/dbus-1)
install(DIRECTORY DESTINATION share/dbus-1/system.d)
install(DIRECTORY DESTINATION share/dbus-1/system-services)
install(DIRECTORY DESTINATION var/run/dbus)
endif()
......@@ -169,6 +173,7 @@ if(NOT WIN32)
set (SOURCES ${LAUNCH_HELPER_SOURCES} ${BUS_DIR}/test-launch-helper.c)
add_test_executable(test-bus-launch-helper "${SOURCES}" ${DBUS_INTERNAL_LIBRARIES} ${XML_LIBRARY})
set_target_properties(test-bus-launch-helper PROPERTIES COMPILE_FLAGS "-DACTIVATION_LAUNCHER_TEST -DACTIVATION_LAUNCHER_DO_OOM")
install_targets(/lib dbus-daemon-launch-helper)
endif(NOT WIN32)
#### Init scripts fun
......
<!-- This configuration file controls the systemwide message bus.
Add a system-local.conf and edit that rather than changing this
file directly. -->
<!-- Note that there are any number of ways you can hose yourself
security-wise by screwing up this file; in particular, you
probably don't want to listen on any more addresses, add any more
auth mechanisms, run as a different user, etc. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Our well-known bus type, do not change this -->
<type>system</type>
<!-- Run as special user -->
<user>@DBUS_USER@</user>
<!-- Fork into daemon mode -->
<fork/>
<!-- Write a pid file -->
<pidfile>@DBUS_SYSTEM_PID_FILE@</pidfile>
<!-- Only allow socket-credentials-based authentication -->
<auth>EXTERNAL</auth>
<!-- Only listen on a local socket. (abstract=/path/to/socket
means use abstract namespace, don't really create filesystem
file; only Linux supports this. Use path=/whatever on other
systems.) -->
<listen>@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@</listen>
<policy context="default">
<!-- Deny everything then punch holes -->
<deny send_interface="*"/>
<deny receive_interface="*"/>
<deny own="*"/>
<!-- But allow all users to connect -->
<allow user="*"/>
<!-- Allow anyone to talk to the message bus -->
<!-- FIXME I think currently these allow rules are always implicit
even if they aren't in here -->
<allow send_destination="org.freedesktop.DBus"/>
<allow receive_sender="org.freedesktop.DBus"/>
<!-- valid replies are always allowed -->
<allow send_requested_reply="true"/>
<allow receive_requested_reply="true"/>
</policy>
<!-- Config files are placed here that among other things, punch
holes in the above policy for specific services. -->
<includedir>system.d</includedir>
<!-- This is included last so local configuration can override what's
in this standard file -->
<include ignore_missing="yes">system-local.conf</include>
<include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include>
</busconfig>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment