Commit graph

3466 commits

Author SHA1 Message Date
Ralf Habacker
15b2d2bb25 Rename the term 'unix_pid' to 'pid' in variables and functions.
Windows also has numeric process IDs that fit in an unsigned long, so
there's no reason this has to be Unix-specific.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61787
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-03-08 23:29:22 +01:00
Ralf Habacker
73df9770b3 Do not retrieve credential information from the wrong side of the connection.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61787
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-03-08 18:05:20 +01:00
Ralf Habacker
e53229e42c Debug message eol fix. 2013-03-08 08:34:03 +01:00
Ralf Habacker
57c35091a1 CMake linux fixes when using meinproc4 doc generator.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61637
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-03-04 18:27:08 +01:00
Ralf Habacker
76503373e6 Fix cmake linux build: dbus-1 and dbus-internal require to link to rt library
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61637
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-03-04 18:26:06 +01:00
Simon McVittie
71a2028f4c bus driver: factor out common code to get a named connection
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54445
Reviewed-by: Thiago Macieira <thiago@kde.org>
2013-02-27 19:34:36 +00:00
Simon McVittie
ef72d5df98 include sd-daemon.h for sd_booted() 2013-02-27 19:32:15 +00:00
Colin Walters
88642f6fee sysdeps: Don't use LOG_PERROR if systemd is booted
Otherwise we get duplicated log output, since stdout/stderr are
connected to the journal by default.

https://bugs.freedesktop.org/show_bug.cgi?id=61399
2013-02-25 19:36:17 -05:00
Simon McVittie
4d41d120d8 bump version to 1.7.1 2013-02-22 21:01:07 +00:00
Simon McVittie
60c1b41fbf Prepare release 1.7.0 (and specification 0.20) 2013-02-22 14:47:07 +00:00
Simon McVittie
4a0b41ee31 Include config.h as the first thing in every .c file
...except for CheckForAbstractSockets.c, which runs before config.h is
generated, and sd-daemon.c, which is externally-maintained.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59971
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
2013-02-22 13:08:27 +00:00
Simon McVittie
0e90efd5b2 Don't warn for functions deprecated since GLib 2.26
Also warn if we inadvertently use a function introduced since then.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59971
Reviewed-by: Colin Walters <walters@verbum.org>
2013-02-22 13:08:11 +00:00
Matt Fischer
0ebd4ae912 Add support for systems without syslog.h
This patch disables the use of syslog for systems which
do not have it, such as QNX.  Log messages are still
printed to stderr.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61176
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-21 13:12:39 +00:00
Matt Fischer
0484cf1a3c Fix inotify usage for QNX
QNX's copy of sys/inotify.h is broken, and doesn't include
stdint.h even though it refers to types from it.  Therefore,
it must be included manually.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61176
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-21 13:11:19 +00:00
Simon McVittie
16e69337a5 NEWS 2013-02-18 14:22:09 +00:00
Simon McVittie
b21d948900 Eliminate unwanted whitespace from the man pages' XML source
As demanded by the git commit hook set up by autogen.sh, this eliminates
trailing whitespace on each line, and blank lines at EOF. We might as
well do this now, since every line in these files has changed anyway.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-02-18 14:16:18 +00:00
Simon McVittie
4057fcb66f Remove doclifter "signature" from Docbook man pages' source
This no longer serves any purpose, and might mislead contributors
into thinking that this XML is not the source for the man pages.
(The man(7)-formatted man pages used to be the canonical source for
the XML, but now it's the other way round.)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-02-18 14:15:58 +00:00
Ralf Habacker
3b0b5c6b4a Removed precarious cross compile shell script.
CMake provides a standardized way to cross compile packages by
using -DCMAKE_TOOLCHAIN_FILE at configure time.

Also recent distributions like opensuse provides up to date native mingw
binary packages and cross compile packages which reduces the cross
compile setup to package installation and setup of a cross tool chain file
as documented at http://www.vtk.org/Wiki/CMake_Cross_Compiling.

https://bugs.freedesktop.org/show_bug.cgi?id=59733
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-18 12:32:47 +01:00
Simon McVittie
53c593b07d More NEWS 2013-02-14 13:49:02 +00:00
Simon McVittie
80402f2245 Add @DBUS_VERSION@ to the generated man pages
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
[split out of previous patch -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-14 13:28:04 +00:00
Simon McVittie
3f2286f13a Turn all man pages' source into configure-generated files
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
[dropped whitespace changes per Ralf's review -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-14 13:27:54 +00:00
Simon McVittie
af96b13d57 Use Docbook XML as the source for all man pages
This means we no longer need man2html, which is nice.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-14 13:27:48 +00:00
Simon McVittie
644e466b36 Fill in a manual and source for all man pages
I only filled in a version for dbus-daemon, whose XML is already
generated by configure.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-14 13:27:30 +00:00
Ralf Habacker
6997f56168 Generate man pages from xml docbook sources for cmake buildsystem.
[removed commented line -smcv]
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-14 13:27:28 +00:00
Ralf Habacker
60cf73ce64 Updated man docbook xml sources from man page source using doclifter.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-14 13:27:27 +00:00
Ralf Habacker
6676a7db9c Moved docbook sources used by cmake into doc subdir and adapted cmake build system.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-14 13:27:22 +00:00
Simon McVittie
b6769bc6a3 More NEWS for 1.7 2013-02-12 11:45:26 +00:00
Simon McVittie
b811228f91 Merge branch 'dbus-1.6' 2013-02-12 11:44:29 +00:00
Simon McVittie
74b4c3ac94 NEWS for 1.6 2013-02-12 11:44:11 +00:00
Matt Fischer
452484e831 Add poll constants for QNX
The QNX operating system uses different values for its poll
constants, so they must be added into dbus-sysdeps.h in order
for poll() to work correctly.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60339
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-12 11:15:58 +00:00
Simon McVittie
71992e9fd7 Update sd-daemon.[ch] from systemd
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=60681
2013-02-12 11:14:55 +00:00
Ralf Habacker
29a27c47e6 Fixed cmake cross compile timestamp creating.
We only need to distinct "Windows" from unix like systems

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59733
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-12 10:58:27 +00:00
Ralf Habacker
48fb808351 Uses cmake provided expat find package.
The cmake provided expat find package is more up to date.
There is no need to maintain an additional one.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59733
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-12 10:58:04 +00:00
Krzysztof Konopko
161b7d7007 Merge <servicehelper> from included config file
<servicehelper> is not supported in the included config file, i. e. it's
not merged in merge_included().  There's clearly no reason it shouldn't
be supported in the included config file along with <user>, <type>
and others.  It's quite reasonable for a client willing to override the
default servicehelper, e. g. in system-local.conf.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=51560
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-12 10:49:29 +00:00
Colin Walters
325c018c1f build: Dist autogen.sh
For convenience of people who have to patch the autotools.
See also http://people.gnome.org/~walters/docs/build-api.txt

https://bugs.freedesktop.org/show_bug.cgi?id=60330
2013-02-05 12:50:55 -05:00
Ralf Habacker
1e1e4c92ac CMake build system fix: Lets check for xmlto doc book generator first.
We shouldn't try to build the documentation with meinproc *and* xmlto.
Prefer xmlto, since it's also the one we use under Autotools.
We still need to support meinproc as a fallback, because xmlto isn't
available on Windows.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59733
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-01-29 20:02:10 +01:00
Ralf Habacker
3a600899d4 Fixed cmake warning related to WIN32 macro when configuring on cygwin
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59401
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-01-15 13:33:03 +01:00
Ralf Habacker
91f2dd5388 Create missing directories in cmake <build-root>/bus/session.d and <build-root>/bus/system.d
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41319
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-01-15 09:34:43 +01:00
Ralf Habacker
fccb9560b3 Create missing directories in cmake <build-root>/bus/session.d and <build-root>/bus/system.d
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41319
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-01-15 09:32:14 +01:00
Simon McVittie
d8e3f0d5a6 NEWS
As well as documenting recent changes, this sorts out some divergence
between the master and dbus-1.6 versions of NEWS, so the 1.6 entries
are the same as in the corresponding releases.
2012-11-19 15:21:57 +00:00
Simon McVittie
0b7ab6cf1c dbus-sysdeps-pthread.c: don't fail if !HAVE_MONOTONIC_CLOCK under -Werror=unused
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=47239
2012-11-19 15:14:17 +00:00
Simon McVittie
277675a40e configure: redo pthread check to check for more things
In principle, anything in the pthread namespace might either be in the
platform-specific thread library (libpthread or libpthreads or libthreads
or ...), or in libc.

In particular, it seems that pthread_mutexattr_init and
pthread_mutexattr_settype are in libpthread, not libc, on Linux. We
previously didn't (intentionally) look for them in libpthread, only
in libc; so this check deserved to fail.

However, a faulty configure check for pthread_cond_timedwait
worked around this on Linux by checking for -lpthread and adding it
to THREAD_LIBS if pthread_cond_timedwait *was* found in libc (even
though that behaviour makes no sense).

The practical impact was that D-Bus would fail to compile on platforms
where pthread_cond_timedwait is in a special threading library that
is not linked by default, and at least one of
(pthread_mutexattr_init, pthread_mutexattr_settype) is also in a
special threading library. This is the case on at least OpenBSD
(fd.o #54416).

So far I've only added checks for the new symbols introduced by
using recursive pthreads mutexes. If we get reports of compilation
failures on weird platforms, we can check for more symbols.

Also clarify the indentation, which was turning into quite a mess,
and use AS_IF instead of if/elif/else/fi in accordance with Autoconf
best-practice.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=47239
Reviewed-by: Colin Walters <walters@verbum.org>
2012-11-19 15:13:42 +00:00
Simon McVittie
16d0564f30 Don't include generated documentation in the tarball
Building it unconditionally causes problems for minimal installations
(OSTree), and building it opportunistically means the tarball isn't
guaranteed to contain it, depending who releases libdbus and which
packages they happen to have installed at the time. If this documentation
is important enough that we need to ship it precompiled in tarballs,
we should guarantee it; or if it isn't important enough to justify that,
we should just drop it.

I don't think we really need it in the tarballs at all: most users
will get their libdbus from a binary distribution (in which case I expect
the distribution's dbus maintainers to set appropriate
build-dependencies), and those who build from source can either
install xmlto, read the documentation on our website, or at worst,
read the source XML. (We don't put the Doxygen-generated API reference
HTML in the tarball either, and I haven't heard any complaints.)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55426
Reviewed-by: Colin Walters <walters@verbum.org>
2012-11-13 16:13:26 +00:00
Michel HERMIER
b8b3feb986 Remove redundant close() calls
The dup2() calls immediately afterwards will close the "destination" fd
if necessary.

[commit message added -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-11-09 16:07:53 +00:00
Simon McVittie
5847982adb Merge branch 'dbus-1.6'
Conflicts:
	NEWS
2012-11-09 16:07:44 +00:00
Simon McVittie
9b04b927ee NEWS 2012-11-09 16:02:53 +00:00
Michel HERMIER
9a9b0e2736 Don't leak temporary fds pointing to /dev/null
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=56927
[commit message added -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-11-09 16:02:01 +00:00
Simon McVittie
1e494ecc60 Use InterlockedExchange to get a full memory barrier on Windows
See the bug for extensive discussion.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41423
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2012-11-09 15:31:30 +00:00
Simon McVittie
96cb1542c2 include README.valgrind in tarballs 2012-11-09 15:28:16 +00:00
Arun Raghavan
ad6e1b0420 Add documentation on running clients with Valgrind
Quick documentation on how Valgrind can be run in clients without
triggering false positives.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55933
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-11-09 15:27:27 +00:00