Commit graph

4536 commits

Author SHA1 Message Date
Simon McVittie
4e06dcf35b 1.11.2 2016-03-07 19:36:01 +00:00
Simon McVittie
f5a0ff67eb Merge branch 'dbus-1.10' 2016-03-07 19:33:04 +00:00
Simon McVittie
ffa99f343d 1.10.9 2016-03-07 19:31:52 +00:00
Simon McVittie
dc8f8c5294 1.10.8
Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-07 16:07:20 +00:00
Simon McVittie
3fb0baf189 Merge branch 'dbus-1.10-ci' 2016-03-03 07:31:42 +00:00
Simon McVittie
4b069c8a4c Disable travis-ci apt source for Google Chrome
This prevents adding i386 as a foreign architecture. We don't need
Chrome anyway.

Signed-off-by: Simon McVittie <smcv@debian.org>
2016-03-02 22:26:47 +00:00
Simon McVittie
27d18ba536 Update NEWS for 1.11.2 2016-03-02 19:15:07 +00:00
Simon McVittie
e691124e28 Merge branch 'dbus-1.10' 2016-03-02 19:00:00 +00:00
Simon McVittie
735cf7b844 Merge branch 'dbus-1.10' into dbus-1.10-ci 2016-03-02 18:52:34 +00:00
Simon McVittie
42ccc7dc39 update NEWS 2016-03-02 18:24:11 +00:00
Dmitri Iouchtchenko
bfd9c8a3b3 dbus-test-tool echo: fix sleep documentation
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94244
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-03-02 18:19:35 +00:00
Simon McVittie
64d6dbd190 Statically assert that the DBusMessageIter struct has no padding
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Thiago Macieira <thiago@kde.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94136
2016-03-02 18:17:57 +00:00
Simon McVittie
38a5c3028e DBusMessageIter: eliminate padding on 64-bit platforms
Previously, 64-bit (LP64 or LLP64) platforms would have had 32 bits
of padding between pad2 and pad3. We want to guarantee that an ISO C
compiler will copy the entire struct when assigning between structs,
but padding is not guaranteed to be copied, so we want to ensure that
the struct is "packed".

Statically assert that the old ABI is compatible with the new ABI.

Reviewed-by: Thiago Macieira <thiago@kde.org>
[smcv: change >= to == as Thiago requested]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94136
2016-03-02 18:16:26 +00:00
Simon McVittie
338cfa1599 DBusMessage: assert the properties we need DBusMessageIter to have
We already asserted that DBusMessageIter must be at least as large
as DBusMessageRealIter (so that casting DBusMessageIter * to
DBusMessageRealIter * does not result in overflowing the stack
variable). Also assert that it must have alignment requirements at
least as strict as those of DBusMessageRealIter * (so that casting
does not increase the required alignment).

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Thiago Macieira <thiago@kde.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94136
2016-03-02 18:15:36 +00:00
Simon McVittie
ca9ea25e11 dbus-internals: add _DBUS_ALIGNOF
This is useful when making static assertions about our types'
properties.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Thiago Macieira <thiago@kde.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94136
2016-03-02 18:15:12 +00:00
Simon McVittie
9abba2d935 NEWS so far 2016-02-24 10:50:22 +00:00
Simon McVittie
753b897d5c Move _dbus_hash_table_{to,from}_array out of #ifdef DBUS_ENABLE_EMBEDDED_TESTS
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-02-12 15:39:36 +00:00
Simon McVittie
d29534c075 Merge branch 'dbus-1.10' into dbus-1.10-ci 2016-02-12 15:32:38 +00:00
Ralf Habacker
ca5f51df3b Add new functions _dbus_hash_table_to_array() and _dbus_hash_table_from_array() from related activation code.
These functions are required for dbus-run-session.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-02-12 15:26:39 +00:00
Ralf Habacker
c0857fd044 Rename function string_array_length() to _dbus_string_array_length() and move it to dbus-internals.c.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-02-12 15:26:36 +00:00
Simon McVittie
ec6b220e4d name-test: run most C tests directly, not via run-test.sh
The exception is test-autolaunch, which is really not particularly
useful as a build-time test. The only way we can really test
autolaunch is as a whole-system integration test, and "make check"
is not that.

The two tests written in Python and one test based on dbus-send
are also not run directly yet; in particular, that includes both
the tests in run-test-systemserver.sh.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-02-12 15:26:33 +00:00
Simon McVittie
c7e179f549 name-test C tests: produce structured (TAP) output
Similar to commit 58eefa1031.

test-privserver is a helper executable, not a test. I moved its output
from stdout to stderr so it can't be misinterpreted as the test's
stdout.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-02-12 15:26:30 +00:00
Simon McVittie
c7f3df0271 Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCH
Instead of using $DBUS_USE_TEST_BINARY to control whether to use the
hard-coded test binary TEST_BUS_LAUNCH_BINARY, we can just use
$DBUS_TEST_DBUS_LAUNCH to control what we launch directly, as we
were already doing for $DBUS_TEST_DAEMON.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-02-12 15:26:23 +00:00
Simon McVittie
b1a8a52208 Merge branch 'dbus-1.10' 2016-02-12 15:26:00 +00:00
Simon McVittie
384c924c77 Revert "Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCH"
This reverts commit 8fd2be6013.
This change was intended for 1.11.
2016-02-12 15:25:15 +00:00
Simon McVittie
9843c724c6 Revert "name-test C tests: produce structured (TAP) output"
This reverts commit fec99c9b3d.
This change was intended for 1.11.
2016-02-12 15:25:13 +00:00
Simon McVittie
c285a053d6 Revert "name-test: run most C tests directly, not via run-test.sh"
This reverts commit d893121efd.
This change was intended for 1.11.
2016-02-12 15:25:12 +00:00
Simon McVittie
1aa36b48cc Revert "Rename function string_array_length() to _dbus_string_array_length() and move it to dbus-internals.c."
This reverts commit 1370b44035.
This change was intended for 1.11.
2016-02-12 15:25:09 +00:00
Simon McVittie
554dba974c Revert "Add new functions _dbus_hash_table_to_array() and _dbus_hash_table_from_array() from related activation code."
This reverts commit 610ff8d964.
This change was intended for 1.11.
2016-02-12 15:24:55 +00:00
Ralf Habacker
610ff8d964 Add new functions _dbus_hash_table_to_array() and _dbus_hash_table_from_array() from related activation code.
These functions are required for dbus-run-session.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-02-11 23:43:09 +01:00
Ralf Habacker
fb9aa3aa6f Enable -Wpointer-sign warnings for autotools and cmake.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-02-11 23:26:50 +01:00
Ralf Habacker
41427560af Keep cmake gcc builds in sync with autotools warnings.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-02-11 23:26:50 +01:00
Ralf Habacker
15006d7d12 Refactored cmake part dealing with compiler warnings to use warnings identifier.
It is now possible to use msvc warnings identifiers
(e.g. '4114') or gcc warnings keys (e.g. 'pointer-sign').

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93069
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-02-11 23:26:50 +01:00
hyeric
0734f12f42 Add missing include
- included <dbus/dbus.h> for dbus_bool_t

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94094
[smcv: use conventional spacing]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-02-11 20:31:31 +00:00
Ralf Habacker
1370b44035 Rename function string_array_length() to _dbus_string_array_length() and move it to dbus-internals.c.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-02-11 02:41:12 +01:00
Simon McVittie
d893121efd name-test: run most C tests directly, not via run-test.sh
The exception is test-autolaunch, which is really not particularly
useful as a build-time test. The only way we can really test
autolaunch is as a whole-system integration test, and "make check"
is not that.

The two tests written in Python and one test based on dbus-send
are also not run directly yet; in particular, that includes both
the tests in run-test-systemserver.sh.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-02-11 02:37:17 +01:00
Simon McVittie
fec99c9b3d name-test C tests: produce structured (TAP) output
Similar to commit 58eefa1031.

test-privserver is a helper executable, not a test. I moved its output
from stdout to stderr so it can't be misinterpreted as the test's
stdout.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-02-11 02:37:14 +01:00
Simon McVittie
8fd2be6013 Replace $DBUS_USE_TEST_BINARY with $DBUS_TEST_DBUS_LAUNCH
Instead of using $DBUS_USE_TEST_BINARY to control whether to use the
hard-coded test binary TEST_BUS_LAUNCH_BINARY, we can just use
$DBUS_TEST_DBUS_LAUNCH to control what we launch directly, as we
were already doing for $DBUS_TEST_DAEMON.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-02-11 02:37:11 +01:00
Simon McVittie
ab8cb96e56 _dbus_read_socket_with_unix_fds: make n_fds unsigned
This makes it consistent with _dbus_message_loader_get_unix_fds().

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93069
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-02-11 02:06:16 +01:00
Simon McVittie
881d7cb064 AppArmor: do not mix dbus_bool_t with int
libdbus uses dbus_bool_t for booleans; that type is unsigned 32-bit.
However, libapparmor uses int, which is signed, leading to
-Wpointer-sign warnings when we pass a dbus_bool_t * where an int *
was expected.

This file is Linux-specific, and all Linux platforms have 32-bit int
and an in-memory representation of the integers 0 and 1 that is
independent of signedness, so the previous code was harmless
in practice.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93069
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-02-11 02:06:02 +01:00
Simon McVittie
5d67d56f5f string_squash_nonprintable: correct signedness mismatch
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93069
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-02-11 02:05:19 +01:00
Simon McVittie
15868d2a39 Consistently use socklen_t for getsockname, getsockopt etc.
This fixes signedness mismatch warnings on platforms where socklen_t
is unsigned, notably Linux (where it's an unsigned int).

We still use int for the fallback case where the platform does not
define socklen_t, because that was the traditional (pre-POSIX) type:
for details see NOTES in Linux accept(2),
<http://manpages.debian.org/cgi-bin/man.cgi?query=accept&sektion=2>.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93069
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2016-02-11 02:04:53 +01:00
Ralf Habacker
93895bc3a5 Do not require binfmt support for running cross compiled test applications.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88966
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-02-08 23:16:23 +01:00
Simon McVittie
01c3422731 Merge branch 'dbus-1.10' 2016-02-08 19:21:13 +00:00
Simon McVittie
d5a1917ec3 Merge branch 'dbus-1.10' into dbus-1.10-ci 2016-02-08 19:21:02 +00:00
Nick Lewycky
b065413b0e marshal-validate: run all the tests instead of just the even ones
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93908
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
[smcv: Re-enable the failing test that Nick disabled, and fix the
expected result; the result given by our current implementation is
reasonable.]
2016-02-08 17:43:50 +00:00
Simon McVittie
ac494ece06 Merge branch 'dbus-1.10' into dbus-1.10-ci 2016-02-08 17:35:51 +00:00
Simon McVittie
3be74413ae Merge branch 'dbus-1.10' 2016-02-08 17:25:48 +00:00
Simon McVittie
96ffc2a07e configure.ac: support large-file for stat64
dbus-daemon is not expected to open files with large *sizes*, but without
large file support, calling [f]stat() on a file that happens to have a
large inode number will fail with EOVERFLOW (see stat(2)). For example,
files mounted from an NFS server might have large inode numbers.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93545
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
[smcv: shorten and clarify commit message; move AC_SYS_LARGEFILE
after AC_USE_SYSTEM_EXTENSIONS because nothing should compile C before
that point]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-02-08 17:25:38 +00:00
Simon McVittie
67e627ef6c Merge branch 'dbus-1.10' 2016-01-25 15:06:43 +00:00