Commit graph

2736 commits

Author SHA1 Message Date
Simon McVittie
de2ebdf245 Merge remote-tracking branch 'origin/dbus-1.4' into dbus-1.4 2011-04-26 19:18:35 +01:00
Simon McVittie
a902c51295 NEWS 2011-04-26 19:15:09 +01:00
Colin Walters
1d24cecc41 activation: Use _dbus_system_log for activation information
Log when we are activating something (and whether it's via systemd)
as well as when we fail to activate, and when one succeeds.

https://bugs.freedesktop.org/show_bug.cgi?id=35705
2011-04-26 14:12:10 -04:00
Simon McVittie
8d2957efa3 Add dbus-1-uninstalled.pc.in
See: http://smcv.pseudorandom.co.uk/2008/09/pc-uninstalled/

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32827
Reviewed-by: Colin Walters <walters@verbum.org>
2011-04-26 19:10:32 +01:00
Simon McVittie
8423a42999 Add support for --disable-gc-sections for broken toolchains
Also use AC_LINK_IFELSE rather than reinventing it as a shell function.
This was the last user of ld_supports_flag, so, delete it.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33466
Reviewed-by: Colin Walters <walters@verbum.org>
2011-04-26 18:55:10 +01:00
Simon McVittie
2040f53bd3 Drop outdated list of options from README, mention configure --help instead 2011-04-26 18:50:18 +01:00
Simon McVittie
bca24274b5 Release notes for the -fPIE change 2011-04-26 18:50:13 +01:00
Simon McVittie
53db0b73c4 Don't force use of -fPIE for the dbus-daemon if apparently supported
It's a minor security benefit, but not automatically beneficial (it
enables ASLR, but breaks prelinking, some buggy toolchains, and some gdb
versions). Distributions who know their infrastructure works well can
enable it just as easily via

    ./configure CFLAGS="-fPIE" LDFLAGS="-pie"

without extra support from us, and that's a generic solution applicable to
many packages.

Similarly, don't force libdbus and libdbus-internal to be PIC: libtool
knows better than we do whether that's necessary/beneficial on a
particular platform.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=16621
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=27215
Bug-NB: NB#171940
Reviewed-by: Colin Walters <walters@verbum.org>
2011-04-26 18:47:23 +01:00
Simon McVittie
b0acdedae1 Install dbus-daemon and dbus-daemon-launch-helper in the conventional way
Also remove some pointless indirection (extra_tests etc.), don't install
the unused directory $(libexecdir)/dbus-1 (we actually install the
launch helper directly into $(libexecdir)), and allow dbus_daemondir to be
set on Windows rather than forcing dbus-daemon to be installed to
$(bindir) there.

dbus_daemon_execdir has to contain "exec" so that the dbus-daemon will be
installed by "make install-exec" and not "make install-data".

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=14512
Reviewed-by: Colin Walters <walters@verbum.org>
2011-04-26 18:41:18 +01:00
Simon McVittie
59c6663293 When uploading docs, use rsync -p to set permissions
It turns out that rsync --chmod means "pretend the source files had
already had this chmod operation applied to them", and not "chmod the
destination files" like you'd expect.

As a result, the -p (--perms) option is also needed, so that rsync will
"preserve" the modified permissions. Otherwise, the docs will not be
group-writeable as intended, and only the person who made the previous
upload will be able to upload them next time.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36130
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-04-12 11:26:49 +01:00
Simon McVittie
4a0e7d29a4 development version 2011-04-08 15:22:31 +01:00
Simon McVittie
c34b6747eb Prepare version 1.4.8 2011-04-08 14:30:23 +01:00
Colin Walters
171934b377 activation: Strip out code to compare by Exec=
In commit:
 075945f6        (John (J5) Palmieri     2005-07-14 20:44:15 +0000

some code was added to compare services by Exec key.  The changelog is
not pariticularly informative as to why this was added. But while
debugging other code, we noticed this.

Comparing by Exec key is not in the specification, and triggered a
problem where while converting services to use systemd for activation,
a change was made to use Exec=/bin/false and simply rely on systemd
to activate.

While I think it was broken for the service files to be changed
to Exec=/bin/false, we shouldn't be doing something here that's
not in the spec either.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35750
2011-04-08 13:17:32 +01:00
Simon McVittie
aa009ba18b oops, fix XML mis-nesting 2011-04-07 18:27:52 +01:00
Sven Herzberg
136b8b8c86 list which parts of the Desktop Entry spec apply to service files
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19159
2011-04-07 18:26:17 +01:00
Simon McVittie
75cecfc374 Break up the monster conditional in config-parser so gcov can cope
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=10887
Reviewed-by: Colin Walters <walters@verbum.org>
2011-04-07 11:25:54 +01:00
Simon McVittie
84dc815d41 Update NEWS 2011-03-14 11:58:28 +00:00
Simon McVittie
2adf484fb3 Revert merge of master (dbus-1.5) into dbus-1.4
This reverts commits d1d395774435..09c9d6406b75f, keeping Lennart's
addition of UnknownInterface etc.
2011-03-14 11:53:09 +00:00
Lennart Poettering
2c34514620 protocol: introduce four new errors
UnknownInterface, UnknownObject, UnknownProperty and PropertyReadOnly,
as discussed on the ML.

The first two are already used by various bindings, such as the Qt and
Java binding, but have never been made official.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34527
Reviewed-by: David Zeuthen <davidz@redhat.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-03-10 21:10:31 +01:00
Simon McVittie
09c9d6406b Make dbus_type_is_valid into public API
This is just as useful for bindings as dbus_signature_validate, and I
think it's a good design principle to say that anything checked in a
_dbus_return_if_fail should be something the caller could check
for themselves.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=20496
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-03-10 19:14:55 +00:00
Simon McVittie
8299a41aa6 Merge branch 'dbus-1.4' 2011-03-10 19:07:15 +00:00
Simon McVittie
d1d3957744 add doxygen.stamp to .gitignore
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35182
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-03-10 19:06:27 +00:00
Simon McVittie
1aa5aaa9e2 _dbus_marshal_write_fixed_multi: remove obsolete FIXME comment
As far as I can tell, we've never accepted out-of-range booleans and
canonicalized them, ever since this was first committed in 2004. If sent,
they'd be considered to be invalid by recipients, so they're unambiguously
an error.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35182
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-03-10 19:06:20 +00:00
Simon McVittie
abdd6adf06 dbus_message_iter_append_basic: remove misleading documentation
This function specifically doesn't support Unix fds and is documented as
such.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35182
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-03-10 19:05:51 +00:00
Simon McVittie
23d4a2ec5d Implement uninstallation and cleanup for Doxygen docs, fixing distcheck
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-03-10 19:00:23 +00:00
Simon McVittie
4012b00955 Merge branch 'validate-when-sending-16338' into dbus-1.4
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-03-10 18:59:29 +00:00
Simon McVittie
d60cc351fe dbus_type_is_basic etc.: it is an error to pass in bad typecodes
Previously, the comments said "this function will crash", but that's not
strictly true (checks can be disabled or made non-fatal). Their behaviour
is undefined if you do that, though.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=20496
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-03-10 18:58:37 +00:00
Simon McVittie
9759973233 Require specific user action to compile without 64-bit support
The D-Bus type system isn't implementable without 64-bit support, although
for historical reasons we have some sort of semi-working support for
platforms with no 64-bit integers. Let's find out whether any
practically relevant platform still lacks these types...

(GLib appears to have required 64-bit integer types since 2001.)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35114
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2011-03-10 12:16:24 +00:00
Simon McVittie
24cdbddbe6 Merge branch 'dbus-1.4' 2011-03-10 12:15:56 +00:00
Lennart Poettering
eb6d268f58 autogen: add -I m4 to aclocal path
This fixes 2b5959882a which forgot to add
m4/ to the command line of aclocal but moved scripts there.
2011-03-10 03:56:23 +01:00
Simon McVittie
257a6ef496 Merge branch 'dbus-1.4' 2011-03-08 12:35:46 +00:00
Simon McVittie
9ad0881fff Update NEWS 2011-03-08 12:35:39 +00:00
Simon McVittie
3013fafae5 Merge branch 'dbus-1.4' 2011-03-07 14:51:46 +00:00
Simon McVittie
2e40818280 Fix some more stray occurrences of ELEMENT_TYPE 2011-03-07 13:55:10 +00:00
Andre Heinecke
e0fc90bdf2 Do not use the name ELEMENT_TYPE
On Windows Systems ELEMENT_TYPE is already defined
in Winioctl.h this header is included indirectly
in dbus-sysdeps.h. By avoiding the use of the Name
ELEMENT_TYPE it is ensured that config-parser-common.h
can be included together with dbus-sysdeps.h

Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-03-07 13:50:38 +00:00
Simon McVittie
a9cbeecfcc dbus_message_iter_append_fixed_array: add a check for valid booleans
The reasoning is the same as for dbus_message_iter_append_basic.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=16338
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-03-04 12:40:40 +00:00
Simon McVittie
bb32afe831 dbus_message_iter_append_basic: validate booleans too
Sending, for instance, ((dbus_bool_t) 666) is a programming error and
should be diagnosed as such.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=16338
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-03-04 12:40:30 +00:00
Simon McVittie
b1d29497d6 dbus_message_iter_append_basic: check string-like arguments for validity
Strings: UTF-8 with no embedded NULs, by adding a new internal function,
_dbus_check_is_valid_utf8

Object paths, signatures: the obvious syntactic checks

This moves some of the burden of validation to the sender.

When sending <http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt>
10240 times with up to 1024 parallel calls pending, on a single-core ARM
Linux device, I found that user CPU time in dbus-spam increased by up to 80%
as a result of the validation. However, when sending messages to dbus-daemon,
overall throughput only reduced by 15%, and when sending messages to an echo
service, overall throughput actually improved by around 14% (presumably
because making the sender CPU-bound influenced kernel scheduling).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=16338
Bug-NB: NB#223152
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-03-04 12:39:59 +00:00
Simon McVittie
07d2ca2b52 Merge branch 'dbus-1.4'
Conflicts:
	NEWS
2011-02-25 15:49:55 +00:00
Simon McVittie
f1ba52066c Merge branch 'doxygenate' into dbus-1.4
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Conflicts:
	configure.ac
	doc/Makefile.am
2011-02-25 15:49:19 +00:00
Simon McVittie
c728addb61 NEWS so far 2011-02-25 12:08:48 +00:00
Simon McVittie
c35e12fda9 Merge branch 'changequote' into dbus-1.4
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-02-25 12:02:02 +00:00
Simon McVittie
be5e2b23c9 Merge branch 'require-display-for-autolaunch-19997' into dbus-1.4
Reviewed-by: Colin Walters <walters@verbum.org>
2011-02-25 12:01:33 +00:00
Simon McVittie
20d2f1702f Merge branch 'modern-autofoo-32245' into dbus-1.4 2011-02-25 11:30:17 +00:00
Simon McVittie
f04e52a2e5 Allow X11 autolaunch to be disabled even if the headers/libraries are there
In an embedded system where the D-Bus session is a core part of the
environment, like Maemo, accidentally auto-launching a second session bus
(for instance for a concurrent ssh session) is a bad idea - it can lead
to a "split brain" situation where half the applications in the GUI are
using a different bus. In these controlled environments, it'd be useful
to prevent autolaunch from ever happening.

(As a side benefit, the changes to configure.in also mean that packagers
can explicitly --enable-x11-autolaunch, to make sure that failure to find
X will make compilation fail cleanly.)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19997
Bug-NB: NB#219964
2011-02-24 18:58:18 +00:00
Simon McVittie
407c111672 Don't attempt Unix X11 autolaunching if DISPLAY isn't set
The known use cases for autolaunching (ssh -Y firefox,
run konqueror in legacy DE) all need $DISPLAY too.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19997
2011-02-24 18:43:34 +00:00
Simon McVittie
31a1b24c93 Merge branch 'dbus-1.4' 2011-02-24 18:40:31 +00:00
Simon McVittie
7848abe6c2 config-parser regression test: don't require that fd.o #34496 exists
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-02-24 18:40:11 +00:00
Simon McVittie
d9e1959dcf Merge branch 'dbus-1.4' 2011-02-24 17:17:36 +00:00
Simon McVittie
3681753421 Give XDG_DATA_HOME priority over XDG_DATA_DIRS for servicedirs
According to the XDG Base Directory Specification, “the base directory
defined by $XDG_DATA_HOME is considered more important than any of the
base directories defined by $XDG_DATA_DIRS.”  This makes it easier to
override a system service file as a normal user.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34496
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-02-24 17:17:22 +00:00