]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Make various system-bus-related things Unix-only
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 11 Sep 2014 16:37:49 +0000 (17:37 +0100)
committerRalf Habacker <ralf.habacker@freenet.de>
Mon, 15 Sep 2014 11:33:21 +0000 (13:33 +0200)
There is no system bus on Windows, and there won't be until/unless
it can be secure.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83583
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
bus/Makefile.am
cmake/CMakeLists.txt
test/Makefile.am

index f335e30c86e65daaacaffa0678f947407afc8c34..25029b4f415c1fd42b6aae161468f5efdd958247 100644 (file)
@@ -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)
@@ -169,11 +171,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
@@ -203,11 +205,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,
index 41882d733cbd59e552b92f79dcb0c069b4bacccc..09e9cf8eabcd696ffccf49fd58954991d9f279c2 100644 (file)
@@ -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 "")
index 5d4701da6bc052fe426c298a3dde1e47232c235f..1ceb5b688def01f717dc72cc0800fb054ca75d9b 100644 (file)
@@ -75,12 +75,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