Commit graph

2889 commits

Author SHA1 Message Date
Simon McVittie
d55b3efbde Give better diagnostics if --enable-tests=yes is given
We want to indicate why it's a problem that GLib, dbus-glib are missing.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37847
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-21 11:25:48 +01:00
Simon McVittie
5defa43b6f Check for Python; skip Python tests if not found
As with the optional test-dependencies on GLib and dbus-glib, we make this
a hard dependency if --enable-tests[=yes], but not if --enable-tests=auto.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37847
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-21 11:25:48 +01:00
Simon McVittie
7fc9c02666 Cope with platforms whose vsnprintf violates both POSIX and C99
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=11668
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-21 11:25:48 +01:00
Simon McVittie
029ecdf402 Add a semi-automatic test for _dbus_system_log
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39987
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-21 11:25:48 +01:00
Simon McVittie
a4e9dc6780 Cope with Unixes that don't have LOG_PERROR, like Solaris 10
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39987
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-21 11:25:48 +01:00
Simon McVittie
14ed371845 Make "make -C test clean" idempotent
Previously, it'd fail when done twice, because you can't rmdir a
nonexistent directory.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40004
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-21 11:25:48 +01:00
Simon McVittie
9708294c05 On Solaris, define CMSG_ALIGN, CMSG_LEN, CMSG_SPACE if undefined
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40235
Tested-by: Dagobert Michelsen <dam@opencsw.org>
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-21 11:25:48 +01:00
Simon McVittie
f4c02e7829 Fix maintainer-upload-docs target to work out-of-tree
The STATIC_DOCS, DTDS and all dist_ files except XMLTO_OUTPUT are in the
source tree. The XMLTO_OUTPUT and the man2html output are in the build
tree, and the BONUS_FILES already have $(srcdir) in their names.

Also change the rules that generate the dbus-docs directory so that if
they fail, they leave behind a temporary directory, rather than leaving
behind a dbus-docs directory that causes make to not run those rules
if re-run; and change the rules to scp files to the server, to put a
trailing "/" on paths, ensuring that the tarball won't be uploaded as
"www" if the www directory doesn't already exist.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41047
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-09-21 11:25:48 +01: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
Simon McVittie
2f183ac576 Don't build any of the reload-pipe code on non-Unix
In commit ab7b3f9, Ralf notes that handle_reload_watch() is (in principle)
cross-platform. However, there's no way to trigger it on Windows, because
nothing ever writes to the pipe. Make the entire pipe-to-self trick
Unix-specific instead.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40002
2011-08-26 15:02:30 +01:00
Simon McVittie
8c2ab410fb NEWS 2011-08-24 11:26:01 +01:00
Simon McVittie
584d4f60b9 Add missing inclusion of inttypes.h
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40313
Reviewed-by: Thiago Macieira <thiago@kde.org>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-08-24 11:01:45 +01:00
Simon McVittie
8c83422b5f Fix compilation of (no-op) alignment assertions on non-gcc
do {} while (0) isn't valid at file scope, so the non-gcc code path
was broken; in particular, this affected MSVC.

Reviewed-by:Ralf Habacker <ralf.habacker@freenet.de>
2011-08-15 17:31:50 +02:00
Simon McVittie
9929df06bf NEWS 2011-08-15 10:26:42 +01:00
Chris Mayo
c82a83fb1b Install diagrams in htmldir
diagram.png and diagram.svg are linked from dbus-tutorial.html but recent
changes to doc/Makefile.am mean that if htmldir is set with configure they are
installed such that the relative link from dbus-tutorial.html does not work.

Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-08-15 10:23:04 +01: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
Simon McVittie
486c0373f1 NEWS 2011-08-12 10:26:04 +01:00
Simon McVittie
bc643f81a5 Fix compiler warnings when cross-compiling dbus-daemon test for mingw32
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40003
Reviewed-by: Colin Walters <walters@verbum.org>
2011-08-12 10:21:50 +01:00
Simon McVittie
0b9e2b8b49 NEWS for 1.4.x 2011-08-11 11:53:45 +01:00
Simon McVittie
6327adafe2 dbus-marshal-basic: assert that the size and (on gcc) alignment of all types is as expected
The __alignof__() checks here will fail if compiling for an architecture
where more-than-natural alignment is needed.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39636
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-11 11:51:55 +01:00
Simon McVittie
213acdb71c Add _DBUS_STATIC_ASSERT (based on GLib's G_STATIC_ASSERT) and use it
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39636
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-11 11:51:43 +01:00
Steve Grubb
70fb675a10 capng: Drop supplemental groups when switching to daemon user
This patch ensures the daemon process doesn't inherit any supplemental
groups for the root user from an administrator login via an init
script.

This is only an issue for pre-systemd systems.

https://bugzilla.redhat.com/show_bug.cgi?id=726953
2011-08-11 10:54:45 +01:00
Colin Walters
93731e6c9c autogen.sh: Don't run configure if NOCONFIGURE is set
See http://people.gnome.org/~walters/docs/build-api.txt
2011-08-11 10:54:45 +01:00
Ralf Habacker
995bfef416 Clean up cygwin readme 2011-08-06 00:37:39 +02:00
Ralf Habacker
7c19592a9b Reduce duplicates from authors list
Some duplicates are there by accident mostly because of the git
learning curve (as in my case). Other duplicates could be outdated
and may be candidates for additional mappings.
2011-08-06 00:11:11 +02:00
Ralf Habacker
f3ac2c2b3e Clean author list 2011-08-05 23:26:41 +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
2a6c14cd2e NEWS 2011-08-05 15:03:39 +01:00
Simon McVittie
6c6ae1efcd Add a regression test for fd.o #38005
(The dbus-1.4 version.)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39836
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-05 14:46:31 +01:00
Simon McVittie
9f64c1930a relay test: don't leak the server's address
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39836
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-05 14:46:09 +01:00
Simon McVittie
20e2dc7c74 _dbus_server_new_for_domain_socket: don't try to unlink abstract sockets
Our abstract socket names look like filenames (/tmp/dbus-MwozdykBNK or
whatever), so if we incorrectly unlink the abstract socket name, in
highly unlikely circumstances we could accidentally unlink a non-abstract
socket belonging to another process!

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38656
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-05 14:39:52 +01:00
Simon McVittie
ba2892396a bus signal_handler: call _exit in the unlikely event that the pipe is full or invalid
On OSs with abstract sockets, this is close enough. On OSs without
abstract sockets, this results in failing to clean up Unix sockets
in /tmp if someone has sent us thousands of SIGHUP signals since we
last entered the main loop - I think that's acceptable.

The reload pipe should never get closed, but if it is for some reason,
we want a SIGTERM after that to cause an exit too.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38656
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-05 14:39:34 +01:00
Simon McVittie
05389054bd bus signal_handler: comment why it's OK if the reload pipe gets full
Backported to dbus-1.4, originally part of commit c7ef3ead55.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33336
Reviewed-by: Thiago Macieira <thiago@kde.org>
2011-08-05 14:39:27 +01:00
Simon McVittie
e90e7e9e71 bus signal_handler: don't pretend to be portable away from Unix
Signals are POSIX but not ISO C, so guard it with DBUS_UNIX.

dbus-sysdeps-util-win doesn't actually implement _dbus_set_signal_handler
anyway, so not compiling this code on non-Unix seems more honest.

Backported to dbus-1.4, originally part of commit c7ef3ead55.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33336
Reviewed-by: Thiago Macieira <thiago@kde.org>
2011-08-05 14:39:24 +01:00
Simon McVittie
3cf9fa4dc7 Conditionalize inclusion of unistd.h
Windows doesn't have it, for instance.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38656
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-08-05 14:39:04 +01:00
Brian Cameron
94e7a1df3e Handle SIGTERM again, to avoid leaving /tmp/dbus-XXX sockets on Solaris
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38656
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-08-05 14:38:55 +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
2dfee7317c micro version 2011-07-29 16:17:32 +01:00
Simon McVittie
7c15271a17 1.4.14 2011-07-29 14:28:54 +01:00
Simon McVittie
bae9bb547f NEWS 2011-07-29 12:51:42 +01:00
Simon McVittie
89906f3e3d Implement _dbus_atomic_get directly, rather than via inc + dec
The Windows implementation is untested, but does at least (cross-)compile,
and matches what GLib does.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2011-07-29 12:29:42 +01:00
Lennart Poettering
0614a49274 sysdeps-unix: remove some redundant assignments 2011-07-28 21:42:48 +02:00
Lennart Poettering
d837d937c5 activation: add /lib/dbus-1/system-services to the search path for services
In order to allow D-Bus usage during early boot (where /usr is not
accessible) also search for bus activation files in
/lib/dbus-1/system-services/. This is only a first step in the right
direction, before we really can boot without /usr we'd need to move all
current activation files (or possibly replace
/usr/dbus-1/system-services to a symlink to
/lib/dbus-1/system-services).
2011-07-28 21:22:07 +02:00
Simon McVittie
736ddc7f01 Add a note about bootstrapping new platforms to README 2011-07-28 16:23:19 +01:00
Simon McVittie
4335a09280 man pages: replace all unescaped hyphen/minus characters with \-
In a man page, "-" officially means a typographical (Unicode) hyphen,
which frequently breaks the ability to copy and paste code examples from
a man page. "\-" means the ASCII hyphen/minus character. See
<http://lintian.debian.org/tags/hyphen-used-as-minus-sign.html> for
more details.

Rather than trying to distinguish between hyphens, em-dashes and
hyphen/minus, I just replaced all ambiguous hyphens with \- by applying
this vim command repeatedly until it didn't find anything:

     %s/\(^\|[^\\]\)-/\1\\-/g

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38284
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2011-07-28 11:06:10 +01:00
Simon McVittie
638828526a Fix spelling/grammatical mistakes detected by Debian's lintian(1)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38284
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2011-07-28 11:05:43 +01:00
Sascha Silbe
2c776890bf list_allows_user: fix debug output for groups
Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-07-27 18:51:03 +01:00
Simon McVittie
104dc9383c NEWS 2011-07-26 17:59:23 +01:00
Simon McVittie
438595294c DBusMessage: always access refcount atomically, even for assertions/initial ref
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
2011-07-26 17:42:16 +01:00
Simon McVittie
ef0f6ec935 dbus-memory: use atomic accesses to block count, even for assertions
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
2011-07-26 17:41:38 +01:00