Commit graph

203 commits

Author SHA1 Message Date
Simon McVittie
b5d36dc27d Split DBUS_SESSION_BUS_DEFAULT_ADDRESS into listen, connect addresses and set better defaults
On Unix, the connect address should basically always be "autolaunch:"
but the listen address has to be something you can listen on.

On Windows, you can listen on "autolaunch:" or
"autolaunch:scope=*install-path", for instance, and the dbus-daemon is
involved in the auto-launching process.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38201
Reviewed-by: David Zeuthen <davidz@redhat.com>
[default address changed to autolaunch: for interop with GDBus -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-08-13 19:57:13 +01:00
Simon McVittie
05b0b9e65b cmake: use the same default system bus address as for autotools
The system bus is unsupported (and rather meaningless) on Windows anyway,
so we can use anything. Also, make it clear that it has to be a
"specific" address that can be listened on *and* connected to,
like unix:path=/xxx - a listen-only address like unix:tmpdir=/xxx or
nonce-tcp: would not be suitable.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38201
Reviewed-by: David Zeuthen <davidz@redhat.com>
2012-08-13 19:51:42 +01:00
Simon McVittie
b47f4c22ee On Unix, link libdbus to a platform-specific threading library
On Linux, this is libpthread; on other Unixes, in principle it might be
called libpthreads or libthreads or something.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=47237
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2012-06-15 14:42:19 +01:00
Alban Crequy
97c11fe286 doc: update documentation with own_prefix policy rules
https://bugs.freedesktop.org/show_bug.cgi?id=46886
2012-03-22 11:28:58 +00:00
Simon McVittie
f426c6cddd Add dbus-syntax.[ch]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39549
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2012-02-24 12:43:55 +00:00
Ralf Habacker
dd4038156d Windows compile fix
BUG: https://bugs.freedesktop.org/show_bug.cgi?id=45832
2012-02-09 14:58:43 +01:00
Simon McVittie
0a314ddbf8 Revert "keep cmake in sync with automake related to default bus addresses"
This reverts commit fdab4af0f4.
Further discussion required.

Related to https://bugs.freedesktop.org/show_bug.cgi?id=38201
2012-01-04 19:14:14 +00:00
Simon McVittie
f56a55af1a Revert "made session service dirs customizable: cmake part"
This reverts commit 89e453216c.
It makes the tests fail under autotools.
2012-01-04 18:20:15 +00:00
Ralf Habacker
e15ebf32a9 keep cmake in sync with automake related to default bus addresses
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38201
2011-12-22 12:51:27 +01:00
Ralf Habacker
66a4f22841 Merge branch 'dbus-1.4' 2011-12-21 20:42:21 +01:00
Ralf Habacker
ef8d0d75d5 Merge branch 'dbus-1.4' of ssh://git.freedesktop.org/git/dbus/dbus into dbus-1.4 2011-12-21 20:40:22 +01:00
Ralf Habacker
89e453216c made session service dirs customizable: cmake part 2011-11-21 12:21:01 +01:00
Ralf Habacker
7aed4eb923 refactored cmake version extracting from configure.ac 2011-10-29 00:25:18 +02:00
Ralf Habacker
797b511deb Install empty session.d config directory using cmake, otherwise dbus-daemon will not start
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41319
2011-10-17 15:45:49 +02:00
Simon McVittie
301fa555ac cmake: don't include -util sources in the shared library
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34976
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-10-12 18:14:51 +01:00
Simon McVittie
617eaa9ef9 Remove dbus-auth-script from the shared library
Only the tests use this.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34976
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-10-12 18:14:09 +01:00
Ralf Habacker
7973504156 Merged cmake and autotools session bus configuration
cmake and autotools session bus configuration templates are identical,
so cmake now uses the autotools.
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41319
2011-09-29 14:08:03 +02:00
Simon McVittie
c141af6147 Remove EXT variable from CMake, just use Automake-compatible EXEEXT
According to Ralf, there's no standard name for this in CMake, so we
might as well use the standard Automake name.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
2011-09-28 19:01:15 +01:00
Simon McVittie
e9f0378bbf Merge tests' cmake and autotools bus configuration
In Unix, the tests listened on both debug-pipe (which is a socketpair,
or a TCP emulation of socketpair on Windows) and a Unix socket.

In the Windows port, the tests were hard-coded to listen on a particular
port, which allowed the dispatch test to connect to that port, as long
as no two tests ran simultaneously (which I don't think was ever guaranteed -
make -j can violate this). That's valid out-of-process, and also
fully-specified, so they only needed one <listen> directive, so the
CMake input only had one.

To make the tests work under CMake on Unix, there was a hack: the string
substituted for the content of the <listen> directive contained
</listen><listen> to get the other address in, which is pretty nasty.

Instead of doing that, I've made both build systems, on both Unix and
Windows, use both debug-pipe and a more normal transport (Unix or TCP).
debug-pipe has a Windows implementation and it's used in
dbus-spawn-win.c, so it'd better work. The use of debug-pipe is now
hard-coded rather than being a configure parameter (there's no reason
to vary it in different builds), and I used TEST_LISTEN as the name of the
Unix/TCP address, because it's a "vague" address (no specific Unix path, no
TCP port), that you can listen on but not connect to.

This in turn means that we can merge the Autoconf .in and CMake .cmake
files, similar to Bug #41033.

You might wonder why I've kept debug-pipe. I did try to get rid of it, but
it turns out that the tests in dispatch.c rely on
dbus_connection_open_private() not blocking, and normal socket
connections block on connect(). Until we fix that by adding an async
version of dbus_connection_open_private(), it won't be safe to have a
test like dispatch.c that "talks to itself", unless it uses a transport
as trivial as debug-pipe in which neither end has to block on the other.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
2011-09-28 19:00:56 +01:00
Simon McVittie
2f2618294d cmake: remove unused TEST_SERVICE_DIR variable
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
2011-09-28 19:00:54 +01:00
Simon McVittie
33c43947cd Simplify substitution of test executables to use fewer variables
Also use EXEEXT in all the service files, even in the automake build
system.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
2011-09-28 19:00:49 +01:00
Simon McVittie
6934bc6927 Simplify generation of bus configuration files
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
2011-09-28 19:00:11 +01:00
Ralf Habacker
ba033709b5 Merge branch 'dbus-1.4' 2011-09-24 08:35:49 +02:00
Ralf Habacker
ff3f4860ef Use dbus/dbus-arch-deps.h.in as source for cmake too
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41033
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-09-23 15:38:12 +02:00
Ralf Habacker
443b8ec3da Merge branch 'dbus-1.4'
Conflicts:
	cmake/CMakeLists.txt
2011-09-22 21:26:43 +02:00
Ralf Habacker
1767840160 Added cmake 'help-options' target to print out all available configure options
cherry-picked 5a0c5663eb
2011-09-22 20:32:42 +02:00
Ralf Habacker
37a81fc981 fixed cmake error: doc says CACHE needs type *and* doc string
cherry-picked aba867f242
2011-09-22 20:27:59 +02:00
Ralf Habacker
2f3403c37b Limit batch file creating to windows
cherry-picked 84b03cae58
2011-09-22 20:27:58 +02:00
Ralf Habacker
b49e278667 Fixed cmake buildsystem - option command only supports boolean values
Conflicts:

	cmake/CMakeLists.txt

cherry picked 4ee7b07b20 from master
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-09-22 20:03:48 +02:00
Ralf Habacker
e41d163083 cmake fix: generate build timestamp
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41029
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-09-22 19:55:13 +02:00
Ralf Habacker
692baa9d6a Simplified cmake xml parser dependencies.
Find either expat or libxml2 xml parser libraries, depending on -DDBUS_USE_EXPAT=ON|OFF

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41027
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-09-22 19:33:32 +02:00
Ralf Habacker
c1989c1a4f Merge branch 'dbus-1.4' 2011-09-20 19:37:39 +02:00
Ralf Habacker
70b0ffd501 cmake fix: install version string
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40905
2011-09-20 19:34:38 +02:00
Ralf Habacker
4a3e5b0af4 Fix compilation on MSVC, which doesn't understand "inline" with its C99 meaning.
This fix is limited to msvc compilers only.

Reviewed-by:Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-08-13 22:08:26 +02:00
Ralf Habacker
b0b5f9b134 Win32 compile fix.
msvc compilers define 'inline' only for c++ code, so wrap it
with a platform independent DBUS_INLINE define in cmake
generated config.h.
2011-08-05 23:01:10 +02:00
Simon McVittie
d6ad37c304 Merge branch 'dbus-1.4' 2011-08-05 14:18:27 +01:00
Simon McVittie
c1bcd2269c cmake: always enable GNU and recent-POSIX extensions, like autoconf does
If the C library is (e)glibc, this allows use of POSIX, BSD, SVID, GNU,
etc., extensions to ISO C, regardless of using -ansi or not.

Not doing this broke the cmake build on Linux since commit 18b08180,
which added AC_USE_SYSTEM_EXTENSIONS to configure.ac (and removed
_GNU_SOURCE from files that use it) without also updating the cmake
build system. SO_PEERCRED is defined unconditionally, but struct ucred
is considered to be a GNU extension, so can't be used under _GNU_SOURCE.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29228
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-05 14:17:51 +01:00
Simon McVittie
e3c12a86d6 Remove remnants of dbus-viewer
Parts of it were already missing, it wasn't compiled, and it depends on
dbus-glib and Gtk.
2011-07-29 11:49:20 +01:00
Simon McVittie
274e0fbc20 Simplify linking for tests that use libdbus-testutils
This is the library used by tests that link libdbus-internal and DBusLoop.
By linking libdbus-internal into it, we can avoid having to repeat that
dependency all over the place - libtool and cmake both know how to follow
recursive dependencies.

In cmake, also use libdbus-testutils for more tests, in preference to
repeating its source files.
2011-07-29 11:17:17 +01:00
Simon McVittie
44a7524dde Stop defining DBUS_API_SUBJECT_TO_CHANGE
Seriously.
2011-07-29 11:06:50 +01:00
Simon McVittie
0ecd0a02b9 Merge remote-tracking branch 'origin/dbus-1.4' 2011-07-11 13:23:38 +01:00
Ralf Habacker
110e06a78c Added DBUS_ENABLE_STATS option to cmake buildsystem to keep in sync with autotools. 2011-07-08 10:55:46 +02:00
Ralf Habacker
836b84a05a Collected cmake doc into README.cmake. 2011-07-08 10:55:03 +02:00
Ralf Habacker
4ee7b07b20 Fixed cmake buildsystem - option command only supports boolean values 2011-07-04 23:47:45 +02:00
Ralf Habacker
84b03cae58 Limit batch file creating to windows 2011-07-03 01:39:09 +02:00
Ralf Habacker
b77885c1db Fixed cmake buildsystem on unix - option command only supports boolean values 2011-07-03 01:36:48 +02:00
Ralf Habacker
6321a98492 Collected cmake doc into README.cmake. 2011-07-02 21:02:46 +02:00
Ralf Habacker
a7f98d8819 Added DBUS_ENABLE_STATS option to cmake buildsystem to keep in sync with autotools. 2011-07-02 00:53:23 +02:00
Ralf Habacker
736445ee44 CMake fix: Do not use FORCE in variables which should be changeable by the user. 2011-06-20 09:29:12 +02:00
Ralf Habacker
aba867f242 fixed cmake error: doc says CACHE needs type *and* doc string 2011-06-14 18:45:46 +02:00