From 9bce6cca3ad3e49627c85e459b1ef2bc5360f9b4 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 11 Sep 2014 17:37:49 +0100 Subject: [PATCH] Make various system-bus-related things Unix-only There is no system bus on Windows, and there won't be until/unless it can be secure. --- bus/Makefile.am | 18 +++++++++++------- cmake/CMakeLists.txt | 9 ++------- test/Makefile.am | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/bus/Makefile.am b/bus/Makefile.am index c4bbf01..e8c8307 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -33,9 +33,11 @@ CONFIG_IN_FILES= \ system.conf.in \ org.freedesktop.dbus-session.plist.in -config_DATA= \ - session.conf \ - system.conf +config_DATA = session.conf + +if DBUS_UNIX +config_DATA += system.conf +endif if DBUS_ENABLE_LAUNCHD agentdir=$(LAUNCHD_AGENT_DIR) @@ -171,11 +173,11 @@ if DBUS_ENABLE_EMBEDDED_TESTS ## even when not doing "make check" # run as a test by test/Makefile.am -noinst_PROGRAMS += test-bus test-bus-system +noinst_PROGRAMS += test-bus if DBUS_UNIX # run as a test by test/Makefile.am -noinst_PROGRAMS += test-bus-launch-helper +noinst_PROGRAMS += test-bus-launch-helper test-bus-system # this is used by the tests but is not,itself, a test noinst_PROGRAMS += dbus-daemon-launch-helper-test endif DBUS_UNIX @@ -205,11 +207,13 @@ clean-local: /bin/rm *.bb *.bbg *.da *.gcov || true install-data-hook: - $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus - $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services +if DBUS_UNIX + $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus + $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services +endif if HAVE_SYSTEMD # Install dbus.socket as default implementation of a D-Bus stack. # Deliberately not using $(LN_S) here: ln -fs is not universally portable, diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 819838b..d8a812d 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -400,13 +400,8 @@ endif (MSVC_IDE) endif (NOT $ENV{TEMP} STREQUAL "") endif (NOT $ENV{TMPDIR} STREQUAL "") -# TODO: fix redhet -if (WIN32) - # bus-test expects a non empty string - set (DBUS_SYSTEM_PID_FILE "/dbus-pid") -else (WIN32) - set (DBUS_SYSTEM_PID_FILE ${EXPANDED_LOCALSTATEDIR}/run/dbus/pid) -endif (WIN32) + # Not used on Windows, where there is no system bus +set (DBUS_SYSTEM_PID_FILE ${EXPANDED_LOCALSTATEDIR}/run/dbus/pid) if (WIN32) set (DBUS_CONSOLE_AUTH_DIR "") diff --git a/test/Makefile.am b/test/Makefile.am index c7ba3e2..375275b 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -42,12 +42,12 @@ TEST_BINARIES = \ ## since they depend on stuff from this directory TESTS = \ ../bus/test-bus$(EXEEXT) \ - ../bus/test-bus-system$(EXEEXT) \ ../dbus/test-dbus$(EXEEXT) \ $(NULL) if DBUS_UNIX TESTS += ../bus/test-bus-launch-helper$(EXEEXT) +TESTS += ../bus/test-bus-system$(EXEEXT) endif else !DBUS_ENABLE_EMBEDDED_TESTS -- 2.1.0