summaryrefslogtreecommitdiffstats
path: root/meta/packages/dbus
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/dbus')
-rw-r--r--meta/packages/dbus/dbus-0.60/dbus-1.init86
-rw-r--r--meta/packages/dbus/dbus-0.60/no-bindings.patch12
-rw-r--r--meta/packages/dbus/dbus-0.60/no-introspect.patch14
-rw-r--r--meta/packages/dbus/dbus-native_0.50.bb19
-rw-r--r--meta/packages/dbus/dbus-native_0.60.bb19
-rw-r--r--meta/packages/dbus/dbus.inc65
-rw-r--r--meta/packages/dbus/dbus/0.23.1.diff308
-rw-r--r--meta/packages/dbus/dbus/config.diff17
-rw-r--r--meta/packages/dbus/dbus/cross.patch15
-rw-r--r--meta/packages/dbus/dbus/dbus-1.init86
-rw-r--r--meta/packages/dbus/dbus/dbus-monitor.patch150
-rw-r--r--meta/packages/dbus/dbus/dbus-quiesce-startup-errors.patch23
-rw-r--r--meta/packages/dbus/dbus/dbussend.patch399
-rw-r--r--meta/packages/dbus/dbus/gettext.patch164
-rw-r--r--meta/packages/dbus/dbus/no-bindings.patch12
-rw-r--r--meta/packages/dbus/dbus/no-examples.patch8
-rw-r--r--meta/packages/dbus/dbus/no-introspect.patch19
-rw-r--r--meta/packages/dbus/dbus/spawn-priority.diff17
-rw-r--r--meta/packages/dbus/dbus/tmpdir.patch30
-rw-r--r--meta/packages/dbus/dbus/tools.diff12
-rw-r--r--meta/packages/dbus/dbus_0.60.bb13
-rw-r--r--meta/packages/dbus/dbus_0.60.inc64
22 files changed, 1552 insertions, 0 deletions
diff --git a/meta/packages/dbus/dbus-0.60/dbus-1.init b/meta/packages/dbus/dbus-0.60/dbus-1.init
new file mode 100644
index 0000000000..60440b7223
--- /dev/null
+++ b/meta/packages/dbus/dbus-0.60/dbus-1.init
@@ -0,0 +1,86 @@
1#! /bin/sh
2# -*- coding: utf-8 -*-
3# Debian init.d script for D-BUS
4# Copyright © 2003 Colin Walters <walters@debian.org>
5
6set -e
7
8DAEMON=/usr/bin/dbus-daemon
9NAME=dbus-1
10DAEMONUSER=messagebus
11PIDDIR=/var/run/dbus
12PIDFILE=$PIDDIR/pid
13DESC="system message bus"
14EVENTDIR=/etc/dbus-1/event.d
15
16test -x $DAEMON || exit 0
17
18# Source defaults file; edit that file to configure this script.
19ENABLED=1
20PARAMS=""
21if [ -e /etc/default/dbus-1 ]; then
22 . /etc/default/dbus-1
23fi
24
25test "$ENABLED" != "0" || exit 0
26
27start_it_up()
28{
29 if [ ! -d $PIDDIR ]; then
30 mkdir -p $PIDDIR
31 chown $DAEMONUSER $PIDDIR
32 chgrp $DAEMONUSER $PIDDIR
33 fi
34 if [ -e $PIDFILE ]; then
35 PIDDIR=/proc/$(cat $PIDFILE)
36 if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
37 echo "$DESC already started; not starting."
38 else
39 echo "Removing stale PID file $PIDFILE."
40 rm -f $PIDFILE
41 fi
42 fi
43 echo -n "Starting $DESC: "
44 start-stop-daemon --start --quiet --pidfile $PIDFILE \
45 --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS
46 echo "$NAME."
47 if [ -d $EVENTDIR ]; then
48 run-parts --arg=start $EVENTDIR
49 fi
50}
51
52shut_it_down()
53{
54 if [ -d $EVENTDIR ]; then
55 run-parts --reverse --arg=stop $EVENTDIR
56 fi
57 echo -n "Stopping $DESC: "
58 start-stop-daemon --stop --quiet --pidfile $PIDFILE \
59 --user $DAEMONUSER
60 # We no longer include these arguments so that start-stop-daemon
61 # can do its job even given that we may have been upgraded.
62 # We rely on the pidfile being sanely managed
63 # --exec $DAEMON -- --system $PARAMS
64 echo "$NAME."
65 rm -f $PIDFILE
66}
67
68case "$1" in
69 start)
70 start_it_up
71 ;;
72 stop)
73 shut_it_down
74 ;;
75 restart|force-reload)
76 shut_it_down
77 sleep 1
78 start_it_up
79 ;;
80 *)
81 echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2
82 exit 1
83 ;;
84esac
85
86exit 0
diff --git a/meta/packages/dbus/dbus-0.60/no-bindings.patch b/meta/packages/dbus/dbus-0.60/no-bindings.patch
new file mode 100644
index 0000000000..ccfc3f88b2
--- /dev/null
+++ b/meta/packages/dbus/dbus-0.60/no-bindings.patch
@@ -0,0 +1,12 @@
1--- dbus-0.50/tools/Makefile.am.orig 2005-09-07 10:05:38 +0200
2+++ dbus-0.50/tools/Makefile.am 2005-09-07 10:06:30 +0200
3@@ -6,9 +6,6 @@
4 nodist_libdbus_glib_HEADERS = dbus-glib-bindings.h
5 libdbus_glibdir = $(includedir)/dbus-1.0/dbus
6
7-dbus-glib-bindings.h: dbus-bus-introspect.xml $(top_builddir)/glib/dbus-binding-tool$(EXEEXT)
8- $(top_builddir)/glib/dbus-binding-tool --mode=glib-client --output=dbus-glib-bindings.h dbus-bus-introspect.xml
9-
10 BUILT_SOURCES = dbus-glib-bindings.h dbus-bus-introspect.xml
11
12 else
diff --git a/meta/packages/dbus/dbus-0.60/no-introspect.patch b/meta/packages/dbus/dbus-0.60/no-introspect.patch
new file mode 100644
index 0000000000..1e43dd121b
--- /dev/null
+++ b/meta/packages/dbus/dbus-0.60/no-introspect.patch
@@ -0,0 +1,14 @@
1--- dbus-0.50/tools/Makefile.am.orig 2005-09-07 10:03:49 +0200
2+++ dbus-0.50/tools/Makefile.am 2005-09-07 10:04:28 +0200
3@@ -21,11 +21,6 @@
4 GTK_TOOLS=
5 endif
6
7-if HAVE_GLIB
8-dbus-bus-introspect.xml: $(top_builddir)/bus/dbus-daemon$(EXEEXT) dbus-launch$(EXEEXT) dbus-send$(EXEEXT) $(top_builddir)/bus/dbus-daemon$(EXEEXT) Makefile
9- DBUS_TOP_BUILDDIR=$(top_builddir) $(srcdir)/run-with-tmp-session-bus.sh ./dbus-send --print-reply=literal --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.Introspectable.Introspect > dbus-bus-introspect.xml.tmp && mv dbus-bus-introspect.xml.tmp dbus-bus-introspect.xml
10-endif
11-
12 bin_PROGRAMS=dbus-send $(GLIB_TOOLS) dbus-launch dbus-cleanup-sockets $(GTK_TOOLS)
13
14 dbus_send_SOURCES= \
diff --git a/meta/packages/dbus/dbus-native_0.50.bb b/meta/packages/dbus/dbus-native_0.50.bb
new file mode 100644
index 0000000000..9e661dbccf
--- /dev/null
+++ b/meta/packages/dbus/dbus-native_0.50.bb
@@ -0,0 +1,19 @@
1include dbus_${PV}.inc
2
3SRC_URI_EXTRA=""
4
5inherit native
6
7S = "${WORKDIR}/dbus-${PV}"
8FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/dbus"
9DEPENDS = "glib-2.0-native"
10
11PR = "r1"
12
13do_stage() {
14 oe_runmake install
15 install -d ${STAGING_DATADIR}/dbus
16 install -m 0644 tools/dbus-bus-introspect.xml ${STAGING_DATADIR}/dbus
17 install -m 0644 tools/dbus-glib-bindings.h ${STAGING_DATADIR}/dbus
18}
19
diff --git a/meta/packages/dbus/dbus-native_0.60.bb b/meta/packages/dbus/dbus-native_0.60.bb
new file mode 100644
index 0000000000..9e661dbccf
--- /dev/null
+++ b/meta/packages/dbus/dbus-native_0.60.bb
@@ -0,0 +1,19 @@
1include dbus_${PV}.inc
2
3SRC_URI_EXTRA=""
4
5inherit native
6
7S = "${WORKDIR}/dbus-${PV}"
8FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/dbus"
9DEPENDS = "glib-2.0-native"
10
11PR = "r1"
12
13do_stage() {
14 oe_runmake install
15 install -d ${STAGING_DATADIR}/dbus
16 install -m 0644 tools/dbus-bus-introspect.xml ${STAGING_DATADIR}/dbus
17 install -m 0644 tools/dbus-glib-bindings.h ${STAGING_DATADIR}/dbus
18}
19
diff --git a/meta/packages/dbus/dbus.inc b/meta/packages/dbus/dbus.inc
new file mode 100644
index 0000000000..1c63c37fdf
--- /dev/null
+++ b/meta/packages/dbus/dbus.inc
@@ -0,0 +1,65 @@
1SECTION = "base"
2PR = "r0"
3HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
4DESCRIPTION = "message bus system for applications to talk to one another"
5LICENSE = "GPL"
6DEPENDS = "expat glib-2.0 virtual/libintl"
7DEFAULT_PREFERENCE = "-1"
8
9SRC_URI = "http://freedesktop.org/software/dbus/releases/dbus-${PV}.tar.gz \
10 file://cross.patch;patch=1 \
11 file://tmpdir.patch;patch=1 \
12 file://dbus-1.init \
13 ${SRC_URI_EXTRA}"
14
15
16inherit autotools pkgconfig update-rc.d gettext
17
18INITSCRIPT_NAME = "dbus-1"
19INITSCRIPT_PARAMS = "defaults"
20
21CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
22
23FILES_${PN} = "${bindir}/dbus-daemon-1 ${bindir}/dbus-launch ${bindir}/dbus-cleanup-sockets ${bindir}/dbus-send ${bindir}/dbus-monitor ${sysconfdir} ${datadir}/dbus-1/services ${libdir}/lib*.so.*"
24FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
25
26pkg_postinst_dbus() {
27#!/bin/sh
28
29# can't do adduser stuff offline
30if [ "x$D" != "x" ]; then
31 exit 1
32fi
33
34MESSAGEUSER=messagebus
35MESSAGEHOME=/var/run/dbus
36
37mkdir -p $MESSAGEHOME || true
38chgrp "$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || addgroup "$MESSAGEUSER"
39chown "$MESSAGEUSER"."$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || adduser --system --home "$MESSAGEHOME" --no-create-home --disabled-password --ingroup "$MESSAGEUSER" "$MESSAGEUSER"
40}
41
42EXTRA_OECONF = "--disable-qt --disable-gtk --disable-tests \
43 --disable-checks --disable-xml-docs --disable-doxygen-docs \
44 --with-xml=expat --without-x"
45
46
47do_stage () {
48 oe_libinstall -so -C dbus libdbus-1 ${STAGING_LIBDIR}
49 oe_libinstall -so -C glib libdbus-glib-1 ${STAGING_LIBDIR}
50
51 autotools_stage_includes
52
53 mkdir -p ${STAGING_LIBDIR}/dbus-1.0/include/dbus/
54 install -m 0644 dbus/dbus-arch-deps.h ${STAGING_LIBDIR}/dbus-1.0/include/dbus/
55}
56
57do_install_append () {
58 install -d ${D}${sysconfdir}/init.d
59 install -m 0755 ${WORKDIR}/dbus-1.init ${D}${sysconfdir}/init.d/dbus-1
60}
61
62python populate_packages_prepend () {
63 if (bb.data.getVar('DEBIAN_NAMES', d, 1)):
64 bb.data.setVar('PKG_dbus', 'dbus-1', d)
65}
diff --git a/meta/packages/dbus/dbus/0.23.1.diff b/meta/packages/dbus/dbus/0.23.1.diff
new file mode 100644
index 0000000000..d56e1afc9c
--- /dev/null
+++ b/meta/packages/dbus/dbus/0.23.1.diff
@@ -0,0 +1,308 @@
1diff -ur dbus-0.23/ChangeLog dbus-0.23.1/ChangeLog
2--- dbus-0.23/ChangeLog 2005-01-13 00:48:43.000000000 +0200
3+++ dbus-0.23.1/ChangeLog 2005-02-11 20:25:48.000000000 +0200
4@@ -1,3 +1,33 @@
5+2005-02-11 Joe Shaw <joeshaw@novell.com>
6+
7+ * NEWS: Update for 0.23.1
8+
9+ * configure.in: Release 0.23.1
10+
11+2005-02-10 Joe Shaw <joeshaw@novell.com>
12+
13+ * dbus/dbus-connection.c
14+ (_dbus_connection_queue_received_message_link,
15+ _dbus_connection_message_sent): Add the path to
16+ the verbose output.
17+ (_dbus_connection_send_preallocated_and_unlock): Added. Calls
18+ _dbus_connection_send_preallocated_unlocked(), updated the
19+ dispatch status, and unlocks. Fixes a bug where certain
20+ situations (like a broken pipe) could cause a Disconnect message
21+ to not be sent, tricking the bus into thinking a service was still
22+ there when the process had quit.
23+ (_dbus_connection_send_preallocated): Call
24+ _dbus_connection_send_preallocated_and_unlock().
25+ (_dbus_connection_send_and_unlock): Added. Calls
26+ _dbus_connection_send_preallocated_and_unlock().
27+ (dbus_connection_send): Call _dbus_connection_send_and_unlock().
28+ (dbus_connection_send_with_reply): Update the dispatch status and
29+ unlock.
30+
31+ * mono/Service.cs (~Service): Added. Removes the filter so that
32+ we don't get unmanaged code calling back into a GCed delegate.
33+ (RemoveFilter); Added.
34+
35 2005-01-12 Joe Shaw <joeshaw@novell.com>
36
37 * NEWS: Update for 0.23.
38diff -ur dbus-0.23/NEWS dbus-0.23.1/NEWS
39--- dbus-0.23/NEWS 2005-01-13 00:20:40.000000000 +0200
40+++ dbus-0.23.1/NEWS 2005-02-11 20:25:16.000000000 +0200
41@@ -1,3 +1,11 @@
42+D-BUS 0.23.1 (11 Feb 2005)
43+===
44+- fix a bug in which the bus daemon wouldn't recognize that a service
45+ owner quit
46+- fix a bug in the mono bindings that would cause unmanaged code to
47+ call back into a delegate that had been garbage collected and
48+ crashed.
49+
50 D-BUS 0.23 (11 Jan 2005)
51 ===
52
53diff -ur dbus-0.23/configure dbus-0.23.1/configure
54--- dbus-0.23/configure 2005-01-13 00:21:25.000000000 +0200
55+++ dbus-0.23.1/configure 2005-02-11 19:53:33.000000000 +0200
56@@ -1826,7 +1826,7 @@
57
58 # Define the identity of the package.
59 PACKAGE=dbus
60- VERSION=0.23
61+ VERSION=0.23.1
62
63
64 cat >>confdefs.h <<_ACEOF
65diff -ur dbus-0.23/configure.in dbus-0.23.1/configure.in
66--- dbus-0.23/configure.in 2005-01-13 00:20:40.000000000 +0200
67+++ dbus-0.23.1/configure.in 2005-02-11 19:53:09.000000000 +0200
68@@ -3,7 +3,7 @@
69
70 AC_INIT(dbus/dbus.h)
71
72-AM_INIT_AUTOMAKE(dbus, 0.23)
73+AM_INIT_AUTOMAKE(dbus, 0.23.1)
74
75 AM_CONFIG_HEADER(config.h)
76
77diff -ur dbus-0.23/dbus/dbus-connection.c dbus-0.23.1/dbus/dbus-connection.c
78--- dbus-0.23/dbus/dbus-connection.c 2005-01-11 21:31:56.000000000 +0200
79+++ dbus-0.23.1/dbus/dbus-connection.c 2005-02-11 19:52:47.000000000 +0200
80@@ -358,9 +358,10 @@
81
82 _dbus_connection_wakeup_mainloop (connection);
83
84- _dbus_verbose ("Message %p (%d %s %s '%s') added to incoming queue %p, %d incoming\n",
85+ _dbus_verbose ("Message %p (%d %s %s %s '%s') added to incoming queue %p, %d incoming\n",
86 message,
87 dbus_message_get_type (message),
88+ dbus_message_get_path (message),
89 dbus_message_get_interface (message) ?
90 dbus_message_get_interface (message) :
91 "no interface",
92@@ -473,9 +474,10 @@
93
94 connection->n_outgoing -= 1;
95
96- _dbus_verbose ("Message %p (%d %s %s '%s') removed from outgoing queue %p, %d left to send\n",
97+ _dbus_verbose ("Message %p (%d %s %s %s '%s') removed from outgoing queue %p, %d left to send\n",
98 message,
99 dbus_message_get_type (message),
100+ dbus_message_get_path (message),
101 dbus_message_get_interface (message) ?
102 dbus_message_get_interface (message) :
103 "no interface",
104@@ -1572,9 +1574,10 @@
105 }
106 #endif
107
108- _dbus_verbose ("Message %p (%d %s %s '%s') added to outgoing queue %p, %d pending to send\n",
109+ _dbus_verbose ("Message %p (%d %s %s %s '%s') added to outgoing queue %p, %d pending to send\n",
110 message,
111 dbus_message_get_type (message),
112+ dbus_message_get_path (message),
113 dbus_message_get_interface (message) ?
114 dbus_message_get_interface (message) :
115 "no interface",
116@@ -1606,12 +1609,30 @@
117 _dbus_connection_do_iteration (connection,
118 DBUS_ITERATION_DO_WRITING,
119 -1);
120-
121+
122 /* If stuff is still queued up, be sure we wake up the main loop */
123 if (connection->n_outgoing > 0)
124 _dbus_connection_wakeup_mainloop (connection);
125 }
126
127+static void
128+_dbus_connection_send_preallocated_and_unlock (DBusConnection *connection,
129+ DBusPreallocatedSend *preallocated,
130+ DBusMessage *message,
131+ dbus_uint32_t *client_serial)
132+{
133+ DBusDispatchStatus status;
134+
135+ _dbus_connection_send_preallocated_unlocked (connection,
136+ preallocated,
137+ message, client_serial);
138+
139+ status = _dbus_connection_get_dispatch_status_unlocked (connection);
140+
141+ /* this calls out to user code */
142+ _dbus_connection_update_dispatch_status_and_unlock (connection, status);
143+}
144+
145 /**
146 * Sends a message using preallocated resources. This function cannot fail.
147 * It works identically to dbus_connection_send() in other respects.
148@@ -1642,10 +1663,9 @@
149 dbus_message_get_member (message) != NULL));
150
151 CONNECTION_LOCK (connection);
152- _dbus_connection_send_preallocated_unlocked (connection,
153- preallocated,
154- message, client_serial);
155- CONNECTION_UNLOCK (connection);
156+ _dbus_connection_send_preallocated_and_unlock (connection,
157+ preallocated,
158+ message, client_serial);
159 }
160
161 static dbus_bool_t
162@@ -1670,6 +1690,27 @@
163 return TRUE;
164 }
165
166+static dbus_bool_t
167+_dbus_connection_send_and_unlock (DBusConnection *connection,
168+ DBusMessage *message,
169+ dbus_uint32_t *client_serial)
170+{
171+ DBusPreallocatedSend *preallocated;
172+
173+ _dbus_assert (connection != NULL);
174+ _dbus_assert (message != NULL);
175+
176+ preallocated = _dbus_connection_preallocate_send_unlocked (connection);
177+ if (preallocated == NULL)
178+ return FALSE;
179+
180+ _dbus_connection_send_preallocated_and_unlock (connection,
181+ preallocated,
182+ message,
183+ client_serial);
184+ return TRUE;
185+}
186+
187 /**
188 * Adds a message to the outgoing message queue. Does not block to
189 * write the message to the network; that happens asynchronously. To
190@@ -1698,14 +1739,9 @@
191
192 CONNECTION_LOCK (connection);
193
194- if (!_dbus_connection_send_unlocked (connection, message, client_serial))
195- {
196- CONNECTION_UNLOCK (connection);
197- return FALSE;
198- }
199-
200- CONNECTION_UNLOCK (connection);
201- return TRUE;
202+ return _dbus_connection_send_and_unlock (connection,
203+ message,
204+ client_serial);
205 }
206
207 static dbus_bool_t
208@@ -1784,6 +1820,7 @@
209 DBusMessage *reply;
210 DBusList *reply_link;
211 dbus_int32_t serial = -1;
212+ DBusDispatchStatus status;
213
214 _dbus_return_val_if_fail (connection != NULL, FALSE);
215 _dbus_return_val_if_fail (message != NULL, FALSE);
216@@ -1845,8 +1882,11 @@
217 else
218 dbus_pending_call_unref (pending);
219
220- CONNECTION_UNLOCK (connection);
221-
222+ status = _dbus_connection_get_dispatch_status_unlocked (connection);
223+
224+ /* this calls out to user code */
225+ _dbus_connection_update_dispatch_status_and_unlock (connection, status);
226+
227 return TRUE;
228
229 error:
230@@ -2256,9 +2296,10 @@
231 link = _dbus_list_pop_first_link (&connection->incoming_messages);
232 connection->n_incoming -= 1;
233
234- _dbus_verbose ("Message %p (%d %s %s '%s') removed from incoming queue %p, %d incoming\n",
235+ _dbus_verbose ("Message %p (%d %s %s %s '%s') removed from incoming queue %p, %d incoming\n",
236 link->data,
237 dbus_message_get_type (link->data),
238+ dbus_message_get_path (link->data),
239 dbus_message_get_interface (link->data) ?
240 dbus_message_get_interface (link->data) :
241 "no interface",
242diff -ur dbus-0.23/mono/Service.cs dbus-0.23.1/mono/Service.cs
243--- dbus-0.23/mono/Service.cs 2004-08-31 06:59:14.000000000 +0300
244+++ dbus-0.23.1/mono/Service.cs 2005-02-11 19:52:47.000000000 +0200
245@@ -23,6 +23,9 @@
246 private static AssemblyBuilder proxyAssembly;
247 private ModuleBuilder module = null;
248
249+ // Add a match for signals. FIXME: Can we filter the service?
250+ private const string MatchRule = "type='signal'";
251+
252 internal Service(string name, Connection connection)
253 {
254 this.name = name;
255@@ -47,6 +50,12 @@
256 this.local = true;
257 }
258
259+ ~Service ()
260+ {
261+ if (this.filterCalled != null)
262+ RemoveFilter ();
263+ }
264+
265 public static bool Exists(Connection connection, string name)
266 {
267 Error error = new Error();
268@@ -113,9 +122,17 @@
269 IntPtr.Zero))
270 throw new OutOfMemoryException();
271
272- // Add a match for signals. FIXME: Can we filter the service?
273- string rule = "type='signal'";
274- dbus_bus_add_match(connection.RawConnection, rule, IntPtr.Zero);
275+ dbus_bus_add_match(connection.RawConnection, MatchRule, IntPtr.Zero);
276+ }
277+
278+ private void RemoveFilter()
279+ {
280+ dbus_connection_remove_filter (Connection.RawConnection,
281+ this.filterCalled,
282+ IntPtr.Zero);
283+ this.filterCalled = null;
284+
285+ dbus_bus_remove_match (connection.RawConnection, MatchRule, IntPtr.Zero);
286 }
287
288 private int Service_FilterCalled(IntPtr rawConnection,
289@@ -200,9 +217,19 @@
290 IntPtr freeData);
291
292 [DllImport("dbus-1")]
293+ private extern static void dbus_connection_remove_filter(IntPtr rawConnection,
294+ DBusHandleMessageFunction filter,
295+ IntPtr userData);
296+
297+ [DllImport("dbus-1")]
298 private extern static void dbus_bus_add_match(IntPtr rawConnection,
299 string rule,
300 IntPtr erro);
301
302+ [DllImport("dbus-1")]
303+ private extern static void dbus_bus_remove_match(IntPtr rawConnection,
304+ string rule,
305+ IntPtr erro);
306+
307 }
308 }
diff --git a/meta/packages/dbus/dbus/config.diff b/meta/packages/dbus/dbus/config.diff
new file mode 100644
index 0000000000..b67c8d72fe
--- /dev/null
+++ b/meta/packages/dbus/dbus/config.diff
@@ -0,0 +1,17 @@
1Only in /home/kihamala/svn/dbus/bus: .svn
2diff -ur bus/session.conf.in /home/kihamala/svn/dbus/bus/session.conf.in
3--- bus/session.conf.in 2004-10-25 21:48:58.000000000 +0300
4+++ /home/kihamala/svn/dbus/bus/session.conf.in 2005-02-15 11:03:26.000000000 +0200
5@@ -8,9 +8,10 @@
6 <!-- Our well-known bus type, don't change this -->
7 <type>session</type>
8
9- <listen>unix:tmpdir=@DBUS_SESSION_SOCKET_DIR@</listen>
10+ <listen>unix:path=/tmp/session_bus_socket</listen>
11
12- <servicedir>@EXPANDED_DATADIR@/dbus-1/services</servicedir>
13+ <servicedir>@EXPANDED_LIBDIR@/dbus-1.0/services</servicedir>
14+ <!-- <servicedir>/var/lib/install/usr/lib/dbus-1.0/services</servicedir> -->
15
16 <policy context="default">
17 <!-- Allow everything to be sent -->
diff --git a/meta/packages/dbus/dbus/cross.patch b/meta/packages/dbus/dbus/cross.patch
new file mode 100644
index 0000000000..6d1d9d8e7e
--- /dev/null
+++ b/meta/packages/dbus/dbus/cross.patch
@@ -0,0 +1,15 @@
1
2#
3# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4#
5
6--- dbus-0.20/configure.in~cross
7+++ dbus-0.20/configure.in
8@@ -466,6 +466,7 @@
9 exit (0);
10 ]])],
11 [have_abstract_sockets=yes],
12+ [have_abstract_sockets=no],
13 [have_abstract_sockets=no])
14 AC_LANG_POP(C)
15 AC_MSG_RESULT($have_abstract_sockets)
diff --git a/meta/packages/dbus/dbus/dbus-1.init b/meta/packages/dbus/dbus/dbus-1.init
new file mode 100644
index 0000000000..adefe7c5b1
--- /dev/null
+++ b/meta/packages/dbus/dbus/dbus-1.init
@@ -0,0 +1,86 @@
1#! /bin/sh
2# -*- coding: utf-8 -*-
3# Debian init.d script for D-BUS
4# Copyright © 2003 Colin Walters <walters@debian.org>
5
6set -e
7
8DAEMON=/usr/bin/dbus-daemon-1
9NAME=dbus-1
10DAEMONUSER=messagebus
11PIDDIR=/var/run/dbus
12PIDFILE=$PIDDIR/pid
13DESC="system message bus"
14EVENTDIR=/etc/dbus-1/event.d
15
16test -x $DAEMON || exit 0
17
18# Source defaults file; edit that file to configure this script.
19ENABLED=1
20PARAMS=""
21if [ -e /etc/default/dbus-1 ]; then
22 . /etc/default/dbus-1
23fi
24
25test "$ENABLED" != "0" || exit 0
26
27start_it_up()
28{
29 if [ ! -d $PIDDIR ]; then
30 mkdir -p $PIDDIR
31 chown $DAEMONUSER $PIDDIR
32 chgrp $DAEMONUSER $PIDDIR
33 fi
34 if [ -e $PIDFILE ]; then
35 PIDDIR=/proc/$(cat $PIDFILE)
36 if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
37 echo "$DESC already started; not starting."
38 else
39 echo "Removing stale PID file $PIDFILE."
40 rm -f $PIDFILE
41 fi
42 fi
43 echo -n "Starting $DESC: "
44 start-stop-daemon --start --quiet --pidfile $PIDFILE \
45 --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS
46 echo "$NAME."
47 if [ -d $EVENTDIR ]; then
48 run-parts --arg=start $EVENTDIR
49 fi
50}
51
52shut_it_down()
53{
54 if [ -d $EVENTDIR ]; then
55 run-parts --reverse --arg=stop $EVENTDIR
56 fi
57 echo -n "Stopping $DESC: "
58 start-stop-daemon --stop --quiet --pidfile $PIDFILE \
59 --user $DAEMONUSER
60 # We no longer include these arguments so that start-stop-daemon
61 # can do its job even given that we may have been upgraded.
62 # We rely on the pidfile being sanely managed
63 # --exec $DAEMON -- --system $PARAMS
64 echo "$NAME."
65 rm -f $PIDFILE
66}
67
68case "$1" in
69 start)
70 start_it_up
71 ;;
72 stop)
73 shut_it_down
74 ;;
75 restart|force-reload)
76 shut_it_down
77 sleep 1
78 start_it_up
79 ;;
80 *)
81 echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2
82 exit 1
83 ;;
84esac
85
86exit 0
diff --git a/meta/packages/dbus/dbus/dbus-monitor.patch b/meta/packages/dbus/dbus/dbus-monitor.patch
new file mode 100644
index 0000000000..c2f90c885b
--- /dev/null
+++ b/meta/packages/dbus/dbus/dbus-monitor.patch
@@ -0,0 +1,150 @@
1diff -urN dbus-0.22.orig/tools/dbus-monitor.1 dbus-0.22/tools/dbus-monitor.1
2--- dbus-0.22.orig/tools/dbus-monitor.1 2004-10-10 20:47:19.906823680 +1000
3+++ dbus-0.22/tools/dbus-monitor.1 2004-10-10 20:47:27.791625008 +1000
4@@ -9,6 +9,7 @@
5 .PP
6 .B dbus-monitor
7 [\-\-system | \-\-session]
8+[watch expressions]
9
10 .SH DESCRIPTION
11
12@@ -25,6 +26,11 @@
13 monitor the system or session buses respectively. If neither is
14 specified, \fIdbus-monitor\fP monitors the session bus.
15
16+.PP
17+In order to get \fIdbus-monitor\fP to see the messages you are interested
18+in, you should specify a set of watch expressions as you would expect to
19+be passed to the \fIdbus_bus_add_watch\fP function.
20+
21 .PP
22 The message bus configuration may keep \fIdbus-monitor\fP from seeing
23 all messages, especially if you run the monitor as a non-root user.
24@@ -37,6 +43,15 @@
25 .I "--session"
26 Monitor the session message bus. (This is the default.)
27
28+.SH EXAMPLE
29+Here is an example of using dbus-monitor to watch for the gnome typing
30+monitor to say things
31+.nf
32+
33+ dbus-monitor "type='signal',sender='org.gnome.TypingMonitor',interface='org.gnome.TypingMonitor'"
34+
35+.fi
36+
37 .SH AUTHOR
38 dbus-monitor was written by Philip Blundell.
39
40--- dbus-0.22-1ubuntu1/tools/dbus-monitor.c 2004-08-10 13:03:37.000000000 +1000
41+++ dbus-0.22/tools/dbus-monitor.c 2004-10-10 21:38:08.532362152 +1000
42@@ -45,7 +45,7 @@
43 static void
44 usage (char *name, int ecode)
45 {
46- fprintf (stderr, "Usage: %s [--system | --session]\n", name);
47+ fprintf (stderr, "Usage: %s [--system | --session] [watch expressions]\n", name);
48 exit (ecode);
49 }
50
51@@ -56,8 +56,8 @@
52 DBusError error;
53 DBusBusType type = DBUS_BUS_SESSION;
54 GMainLoop *loop;
55- int i;
56-
57+ int i = 0, j = 0, numFilters = 0;
58+ char **filters = NULL;
59 for (i = 1; i < argc; i++)
60 {
61 char *arg = argv[i];
62@@ -69,14 +69,18 @@
63 else if (!strcmp (arg, "--help"))
64 usage (argv[0], 0);
65 else if (!strcmp (arg, "--"))
66- break;
67+ continue;
68 else if (arg[0] == '-')
69 usage (argv[0], 1);
70+ else {
71+ numFilters++;
72+ filters = (char **)realloc(filters, numFilters * sizeof(char *));
73+ filters[j] = (char *)malloc((strlen(arg) + 1) * sizeof(char *));
74+ snprintf(filters[j], strlen(arg) + 1, "%s", arg);
75+ j++;
76+ }
77 }
78
79- if (argc > 2)
80- usage (argv[0], 1);
81-
82 loop = g_main_loop_new (NULL, FALSE);
83
84 dbus_error_init (&error);
85@@ -92,26 +102,45 @@
86
87 dbus_connection_setup_with_g_main (connection, NULL);
88
89- dbus_bus_add_match (connection,
90- "type='signal'",
91- &error);
92- if (dbus_error_is_set (&error))
93- goto lose;
94- dbus_bus_add_match (connection,
95- "type='method_call'",
96- &error);
97- if (dbus_error_is_set (&error))
98- goto lose;
99- dbus_bus_add_match (connection,
100- "type='method_return'",
101- &error);
102- if (dbus_error_is_set (&error))
103- goto lose;
104- dbus_bus_add_match (connection,
105- "type='error'",
106- &error);
107- if (dbus_error_is_set (&error))
108- goto lose;
109+ if (numFilters)
110+ {
111+ for (i = 0; i < j; i++)
112+ {
113+ dbus_bus_add_match (connection, filters[i], &error);
114+ if (dbus_error_is_set (&error))
115+ {
116+ fprintf (stderr, "Failed to setup match \"%s\": %s\n",
117+ filters[i], error.message);
118+ dbus_error_free (&error);
119+ exit (1);
120+ }
121+ free(filters[i]);
122+ }
123+ }
124+ else
125+ {
126+ dbus_bus_add_match (connection,
127+ "type='signal'",
128+ &error);
129+ if (dbus_error_is_set (&error))
130+ goto lose;
131+ dbus_bus_add_match (connection,
132+ "type='method_call'",
133+ &error);
134+ if (dbus_error_is_set (&error))
135+ goto lose;
136+ dbus_bus_add_match (connection,
137+ "type='method_return'",
138+ &error);
139+ if (dbus_error_is_set (&error))
140+ goto lose;
141+ dbus_bus_add_match (connection,
142+ "type='error'",
143+ &error);
144+ if (dbus_error_is_set (&error))
145+ goto lose;
146+ }
147+
148 if (!dbus_connection_add_filter (connection, filter_func, NULL, NULL)) {
149 fprintf (stderr, "Couldn't add filter!\n");
150 exit (1);
diff --git a/meta/packages/dbus/dbus/dbus-quiesce-startup-errors.patch b/meta/packages/dbus/dbus/dbus-quiesce-startup-errors.patch
new file mode 100644
index 0000000000..ba5142af2f
--- /dev/null
+++ b/meta/packages/dbus/dbus/dbus-quiesce-startup-errors.patch
@@ -0,0 +1,23 @@
1--- dbus-0.20-virgin-patches/bus/config-parser.c 2003-10-14 21:30:21.000000000 +0100
2+++ dbus-0.20/bus/config-parser.c 2004-02-10 00:40:05.000000000 +0000
3@@ -1710,8 +1710,18 @@
4 {
5 if (!include_file (parser, &full_path, TRUE, error))
6 {
7- _dbus_string_free (&full_path);
8- goto failed;
9+ /* Debian patch to skip malformed /etc/dbus-1/system.d entries */
10+ /*
11+ * _dbus_string_free (&full_path);
12+ * goto failed;
13+ */
14+ if (dbus_error_is_set (error))
15+ {
16+ _dbus_warn("\nEncountered error '%s' while parsing '%s'\n",
17+ error->message,
18+ _dbus_string_get_const_data(&full_path));
19+ dbus_error_free (error);
20+ }
21 }
22 }
23
diff --git a/meta/packages/dbus/dbus/dbussend.patch b/meta/packages/dbus/dbus/dbussend.patch
new file mode 100644
index 0000000000..49a251bbb0
--- /dev/null
+++ b/meta/packages/dbus/dbus/dbussend.patch
@@ -0,0 +1,399 @@
1Index: dbus-send.1
2===================================================================
3--- tools/dbus-send.1 (revision 691)
4+++ tools/dbus-send.1 (working copy)
5@@ -36,8 +36,8 @@
6 specified. Following arguments, if any, are the message contents
7 (message arguments). These are given as a type name, a colon, and
8 then the value of the argument. The possible type names are: string,
9-int32, uint32, double, byte, boolean. (D-BUS supports more types than
10-these, but \fIdbus-send\fP currently does not.)
11+int32, uint32, double, byte, boolean, array. (D-BUS supports more types
12+than these, but \fIdbus-send\fP currently does not.)
13
14 .PP
15 Here is an example invocation:
16@@ -46,7 +46,8 @@
17 dbus-send \-\-dest='org.freedesktop.ExampleService' \\
18 /org/freedesktop/sample/object/name \\
19 org.freedesktop.ExampleInterface.ExampleMethod \\
20- int32:47 string:'hello world' double:65.32
21+ int32:47 string:'hello world' double:65.32 \\
22+ array:byte[0,1,2]
23
24 .fi
25
26Index: dbus-print-message.c
27===================================================================
28--- tools/dbus-print-message.c (revision 691)
29+++ tools/dbus-print-message.c (working copy)
30@@ -39,6 +39,78 @@
31 }
32 }
33
34+static void
35+iterate (DBusMessageIter* iter, int entry_type)
36+{
37+ do
38+ {
39+ char *str;
40+ dbus_uint32_t uint32;
41+ dbus_int32_t int32;
42+ double d;
43+ unsigned char byte;
44+ dbus_bool_t boolean;
45+ int type = dbus_message_iter_get_arg_type (iter);
46+
47+ DBusMessageIter array_iter;
48+ int array_type = DBUS_TYPE_INVALID;
49+
50+ if (type == DBUS_TYPE_INVALID)
51+ {
52+ if (entry_type == DBUS_TYPE_INVALID)
53+ break;
54+ else
55+ type == entry_type;
56+ }
57+
58+ switch (type)
59+ {
60+ case DBUS_TYPE_STRING:
61+ str = dbus_message_iter_get_string (iter);
62+ printf ("string:%s\n", str);
63+ break;
64+
65+ case DBUS_TYPE_INT32:
66+ int32 = dbus_message_iter_get_int32 (iter);
67+ printf ("int32:%d\n", int32);
68+ break;
69+
70+ case DBUS_TYPE_UINT32:
71+ uint32 = dbus_message_iter_get_uint32 (iter);
72+ printf ("int32:%u\n", uint32);
73+ break;
74+
75+ case DBUS_TYPE_DOUBLE:
76+ d = dbus_message_iter_get_double (iter);
77+ printf ("double:%f\n", d);
78+ break;
79+
80+ case DBUS_TYPE_BYTE:
81+ byte = dbus_message_iter_get_byte (iter);
82+ printf ("byte:%d\n", byte);
83+ break;
84+
85+ case DBUS_TYPE_BOOLEAN:
86+ boolean = dbus_message_iter_get_boolean (iter);
87+ printf ("boolean:%s\n", boolean ? "true" : "false");
88+ break;
89+
90+ case DBUS_TYPE_ARRAY:
91+ dbus_message_iter_init_array_iterator (iter,
92+ &array_iter,
93+ &array_type);
94+ printf ("array[\n");
95+ iterate (&array_iter, array_type);
96+ printf ("]\n");
97+ break;
98+
99+ default:
100+ printf ("(unknown arg type %d)\n", type);
101+ break;
102+ }
103+ } while (dbus_message_iter_next (iter));
104+}
105+
106 void
107 print_message (DBusMessage *message)
108 {
109@@ -81,55 +153,6 @@
110
111 dbus_message_iter_init (message, &iter);
112
113- do
114- {
115- int type = dbus_message_iter_get_arg_type (&iter);
116- char *str;
117- dbus_uint32_t uint32;
118- dbus_int32_t int32;
119- double d;
120- unsigned char byte;
121- dbus_bool_t boolean;
122-
123- if (type == DBUS_TYPE_INVALID)
124- break;
125-
126- switch (type)
127- {
128- case DBUS_TYPE_STRING:
129- str = dbus_message_iter_get_string (&iter);
130- printf ("string:%s\n", str);
131- break;
132-
133- case DBUS_TYPE_INT32:
134- int32 = dbus_message_iter_get_int32 (&iter);
135- printf ("int32:%d\n", int32);
136- break;
137-
138- case DBUS_TYPE_UINT32:
139- uint32 = dbus_message_iter_get_uint32 (&iter);
140- printf ("int32:%u\n", uint32);
141- break;
142-
143- case DBUS_TYPE_DOUBLE:
144- d = dbus_message_iter_get_double (&iter);
145- printf ("double:%f\n", d);
146- break;
147-
148- case DBUS_TYPE_BYTE:
149- byte = dbus_message_iter_get_byte (&iter);
150- printf ("byte:%d\n", byte);
151- break;
152-
153- case DBUS_TYPE_BOOLEAN:
154- boolean = dbus_message_iter_get_boolean (&iter);
155- printf ("boolean:%s\n", boolean ? "true" : "false");
156- break;
157-
158- default:
159- printf ("(unknown arg type %d)\n", type);
160- break;
161- }
162- } while (dbus_message_iter_next (&iter));
163+ iterate (&iter, DBUS_TYPE_INVALID);
164 }
165
166Index: dbus-send.c
167===================================================================
168--- tools/dbus-send.c (revision 691)
169+++ tools/dbus-send.c (working copy)
170@@ -34,6 +34,146 @@
171 exit (ecode);
172 }
173
174+
175+static int
176+get_type (char **argv, char *arg)
177+{
178+ int type;
179+
180+ if (arg[0] == 0 || !strcmp (arg, "string"))
181+ type = DBUS_TYPE_STRING;
182+ else if (!strcmp (arg, "int32"))
183+ type = DBUS_TYPE_INT32;
184+ else if (!strcmp (arg, "uint32"))
185+ type = DBUS_TYPE_UINT32;
186+ else if (!strcmp (arg, "double"))
187+ type = DBUS_TYPE_DOUBLE;
188+ else if (!strcmp (arg, "byte"))
189+ type = DBUS_TYPE_BYTE;
190+ else if (!strcmp (arg, "boolean"))
191+ type = DBUS_TYPE_BOOLEAN;
192+ else if (!strcmp (arg, "array"))
193+ type = DBUS_TYPE_ARRAY;
194+ else
195+ {
196+ fprintf (stderr, "%s: Unknown type \"%s\"\n", argv[0], arg);
197+ exit (1);
198+ }
199+
200+ return type;
201+}
202+
203+
204+static void
205+append (char **argv, char *arg, char *c, DBusMessageIter *iter)
206+{
207+ int type, atype = 0;
208+ dbus_uint32_t uint32;
209+ dbus_int32_t int32;
210+ double d;
211+ unsigned char byte;
212+ DBusMessageIter array_iter;
213+ int end_found = 0;
214+ char *next;
215+
216+ /* FIXME - we are ignoring OOM returns on all these functions */
217+
218+ type = get_type(argv, arg);
219+ if (type == DBUS_TYPE_ARRAY)
220+ {
221+ arg = c;
222+ c = strchr (c, '[');
223+ if (c == NULL)
224+ {
225+ fprintf (stderr, "%s: Data item \"%s\" is badly formed\n", argv[0], arg);
226+ exit (1);
227+ }
228+
229+ if (strchr(c, ']') == NULL)
230+ {
231+ fprintf (stderr, "%s: Data item \"%s\" is badly formed\n", argv[0], arg);
232+ exit (1);
233+ }
234+
235+ *(c++) = 0;
236+
237+ atype = get_type(argv, arg);
238+ }
239+
240+
241+ switch (type)
242+ {
243+ case DBUS_TYPE_BYTE:
244+ byte = strtoul (c, NULL, 0);
245+ dbus_message_iter_append_byte (iter, byte);
246+ break;
247+
248+ case DBUS_TYPE_DOUBLE:
249+ d = strtod (c, NULL);
250+ dbus_message_iter_append_double (iter, d);
251+ break;
252+
253+ case DBUS_TYPE_INT32:
254+ int32 = strtol (c, NULL, 0);
255+ dbus_message_iter_append_int32 (iter, int32);
256+ break;
257+
258+ case DBUS_TYPE_UINT32:
259+ uint32 = strtoul (c, NULL, 0);
260+ dbus_message_iter_append_uint32 (iter, uint32);
261+ break;
262+
263+ case DBUS_TYPE_STRING:
264+ dbus_message_iter_append_string (iter, c);
265+ break;
266+
267+ case DBUS_TYPE_BOOLEAN:
268+ if (strcmp(c, "true") == 0)
269+ dbus_message_iter_append_boolean (iter, TRUE);
270+ else if (strcmp(c, "false") == 0)
271+ dbus_message_iter_append_boolean (iter, FALSE);
272+ else
273+ {
274+ fprintf (stderr, "%s: Expected \"true\" or \"false\" instead of \"%s\"\n", argv[0], c);
275+ exit (1);
276+ }
277+ break;
278+
279+ case DBUS_TYPE_ARRAY:
280+ /* Decompose parameters and put it as array */
281+ dbus_message_iter_append_array(iter, &array_iter, atype);
282+
283+ while(!end_found)
284+ {
285+ next = strchr(c, ',');
286+ if (next == NULL)
287+ {
288+ next = strchr(c, ']');
289+
290+ if (next != NULL)
291+ next[0] = 0;
292+ else
293+ break;
294+
295+ end_found = 1;
296+ }
297+ else
298+ {
299+ next[0] = 0;
300+ next++;
301+ }
302+
303+ append (argv, arg, c, &array_iter);
304+ c = next;
305+ }
306+ break;
307+
308+ default:
309+ fprintf (stderr, "%s: Unsupported data type\n", argv[0]);
310+ exit (1);
311+ }
312+}
313+
314 int
315 main (int argc, char *argv[])
316 {
317@@ -174,12 +314,7 @@
318 {
319 char *arg;
320 char *c;
321- int type;
322- dbus_uint32_t uint32;
323- dbus_int32_t int32;
324- double d;
325- unsigned char byte;
326-
327+
328 type = DBUS_TYPE_INVALID;
329 arg = argv[i++];
330 c = strchr (arg, ':');
331@@ -192,67 +327,7 @@
332
333 *(c++) = 0;
334
335- if (arg[0] == 0 || !strcmp (arg, "string"))
336- type = DBUS_TYPE_STRING;
337- else if (!strcmp (arg, "int32"))
338- type = DBUS_TYPE_INT32;
339- else if (!strcmp (arg, "uint32"))
340- type = DBUS_TYPE_UINT32;
341- else if (!strcmp (arg, "double"))
342- type = DBUS_TYPE_DOUBLE;
343- else if (!strcmp (arg, "byte"))
344- type = DBUS_TYPE_BYTE;
345- else if (!strcmp (arg, "boolean"))
346- type = DBUS_TYPE_BOOLEAN;
347- else
348- {
349- fprintf (stderr, "%s: Unknown type \"%s\"\n", argv[0], arg);
350- exit (1);
351- }
352-
353- /* FIXME - we are ignoring OOM returns on all these functions */
354- switch (type)
355- {
356- case DBUS_TYPE_BYTE:
357- byte = strtoul (c, NULL, 0);
358- dbus_message_iter_append_byte (&iter, byte);
359- break;
360-
361- case DBUS_TYPE_DOUBLE:
362- d = strtod (c, NULL);
363- dbus_message_iter_append_double (&iter, d);
364- break;
365-
366- case DBUS_TYPE_INT32:
367- int32 = strtol (c, NULL, 0);
368- dbus_message_iter_append_int32 (&iter, int32);
369- break;
370-
371- case DBUS_TYPE_UINT32:
372- uint32 = strtoul (c, NULL, 0);
373- dbus_message_iter_append_uint32 (&iter, uint32);
374- break;
375-
376- case DBUS_TYPE_STRING:
377- dbus_message_iter_append_string (&iter, c);
378- break;
379-
380- case DBUS_TYPE_BOOLEAN:
381- if (strcmp(c, "true") == 0)
382- dbus_message_iter_append_boolean (&iter, TRUE);
383- else if (strcmp(c, "false") == 0)
384- dbus_message_iter_append_boolean (&iter, FALSE);
385- else
386- {
387- fprintf (stderr, "%s: Expected \"true\" or \"false\" instead of \"%s\"\n", argv[0], c);
388- exit (1);
389- }
390- break;
391-
392- default:
393- fprintf (stderr, "%s: Unsupported data type\n", argv[0]);
394- exit (1);
395- }
396+ append (argv, arg, c, &iter);
397 }
398
399 if (print_reply)
diff --git a/meta/packages/dbus/dbus/gettext.patch b/meta/packages/dbus/dbus/gettext.patch
new file mode 100644
index 0000000000..7042bd0903
--- /dev/null
+++ b/meta/packages/dbus/dbus/gettext.patch
@@ -0,0 +1,164 @@
1Index: dbus-0.23/configure.in
2===================================================================
3--- dbus-0.23.orig/configure.in 2005-04-02 17:14:37.780040976 -0500
4+++ dbus-0.23/configure.in 2005-04-02 17:14:38.024003888 -0500
5@@ -22,6 +22,9 @@
6 AC_ISC_POSIX
7 AC_HEADER_STDC
8
9+AM_GNU_GETTEXT_VERSION(0.11.5)
10+AM_GNU_GETTEXT([external], [need-ngettext])
11+
12 AC_ARG_ENABLE(qt, [ --enable-qt enable Qt-friendly client library],enable_qt=$enableval,enable_qt=auto)
13 AC_ARG_ENABLE(glib, [ --enable-glib enable GLib-friendly client library],enable_glib=$enableval,enable_glib=auto)
14 AC_ARG_ENABLE(gtk, [ --enable-gtk enable GTK-requiring executables],enable_gtk=$enableval,enable_gtk=auto)
15Index: dbus-0.23/glib/Makefile.am
16===================================================================
17--- dbus-0.23.orig/glib/Makefile.am 2004-07-29 04:00:45.000000000 -0400
18+++ dbus-0.23/glib/Makefile.am 2005-04-02 17:22:27.302662688 -0500
19@@ -15,7 +15,7 @@
20 dbus-gvalue.c \
21 dbus-gvalue.h
22
23-libdbus_glib_1_la_LIBADD= $(DBUS_GLIB_LIBS) $(top_builddir)/dbus/libdbus-1.la
24+libdbus_glib_1_la_LIBADD= $(DBUS_GLIB_LIBS) $(LIBINTL) $(top_builddir)/dbus/libdbus-1.la
25 ## don't export symbols that start with "_" (we use this
26 ## convention for internal symbols)
27 libdbus_glib_1_la_LDFLAGS= -export-symbols-regex "^[^_].*"
28Index: dbus-0.23/glib/dbus-glib-tool.c
29===================================================================
30--- dbus-0.23.orig/glib/dbus-glib-tool.c 2004-08-09 23:07:00.000000000 -0400
31+++ dbus-0.23/glib/dbus-glib-tool.c 2005-04-02 17:14:38.024003888 -0500
32@@ -26,8 +26,13 @@
33 #include "dbus-gparser.h"
34 #include "dbus-gutils.h"
35 #include <locale.h>
36+
37+#ifdef HAVE_GETTEXT
38 #include <libintl.h>
39 #define _(x) dgettext (GETTEXT_PACKAGE, x)
40+#else
41+#define _(x) x
42+#endif
43 #define N_(x) x
44 #include <stdio.h>
45 #include <stdlib.h>
46Index: dbus-0.23/glib/dbus-glib.c
47===================================================================
48--- dbus-0.23.orig/glib/dbus-glib.c 2004-08-09 23:07:00.000000000 -0400
49+++ dbus-0.23/glib/dbus-glib.c 2005-04-02 17:14:38.024003888 -0500
50@@ -27,8 +27,12 @@
51 #include "dbus-gtest.h"
52 #include "dbus-gutils.h"
53
54+#ifdef HAVE_GETTEXT
55 #include <libintl.h>
56 #define _(x) dgettext (GETTEXT_PACKAGE, x)
57+#else
58+#define _(x) x
59+#endif
60 #define N_(x) x
61
62 /**
63Index: dbus-0.23/glib/dbus-gmain.c
64===================================================================
65--- dbus-0.23.orig/glib/dbus-gmain.c 2004-11-13 02:07:47.000000000 -0500
66+++ dbus-0.23/glib/dbus-gmain.c 2005-04-02 17:14:38.025003736 -0500
67@@ -27,8 +27,12 @@
68 #include "dbus-gtest.h"
69 #include "dbus-gutils.h"
70
71+#ifdef HAVE_GETTEXT
72 #include <libintl.h>
73 #define _(x) dgettext (GETTEXT_PACKAGE, x)
74+#else
75+#define _(x) x
76+#endif
77 #define N_(x) x
78
79 /**
80Index: dbus-0.23/glib/dbus-gparser.c
81===================================================================
82--- dbus-0.23.orig/glib/dbus-gparser.c 2004-08-09 23:07:00.000000000 -0400
83+++ dbus-0.23/glib/dbus-gparser.c 2005-04-02 17:14:38.025003736 -0500
84@@ -20,12 +20,18 @@
85 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
86 *
87 */
88+
89+#include <config.h>
90 #include "dbus-gparser.h"
91 #include "dbus-gidl.h"
92 #include <string.h>
93
94+#ifdef HAVE_GETTEXT
95 #include <libintl.h>
96 #define _(x) gettext ((x))
97+#else
98+#define _(x) x
99+#endif
100 #define N_(x) x
101
102 #ifndef DOXYGEN_SHOULD_SKIP_THIS
103Index: dbus-0.23/tools/Makefile.am
104===================================================================
105--- dbus-0.23.orig/tools/Makefile.am 2004-04-21 17:29:07.000000000 -0400
106+++ dbus-0.23/tools/Makefile.am 2005-04-02 17:22:00.712704976 -0500
107@@ -37,8 +37,8 @@
108
109 dbus_send_LDADD= $(top_builddir)/dbus/libdbus-1.la
110 dbus_monitor_LDADD= $(top_builddir)/glib/libdbus-glib-1.la
111-dbus_launch_LDADD= $(DBUS_X_LIBS)
112-dbus_viewer_LDADD= $(DBUS_GLIB_TOOL_LIBS) $(top_builddir)/glib/libdbus-gtool.la $(DBUS_GTK_LIBS)
113+dbus_launch_LDADD= $(DBUS_X_LIBS) $(LIBINTL)
114+dbus_viewer_LDADD= $(DBUS_GLIB_TOOL_LIBS) $(LIBINTL) $(top_builddir)/glib/libdbus-gtool.la $(DBUS_GTK_LIBS)
115
116 man_MANS = dbus-send.1 dbus-monitor.1 dbus-launch.1 dbus-cleanup-sockets.1
117 EXTRA_DIST = $(man_MANS)
118Index: dbus-0.23/tools/dbus-launch.c
119===================================================================
120--- dbus-0.23.orig/tools/dbus-launch.c 2004-08-09 23:07:01.000000000 -0400
121+++ dbus-0.23/tools/dbus-launch.c 2005-04-02 17:14:38.026003584 -0500
122@@ -22,6 +22,8 @@
123 */
124 #include <config.h>
125 #include <stdlib.h>
126+#include <sys/time.h>
127+#include <sys/types.h>
128 #include <unistd.h>
129 #include <fcntl.h>
130 #include <signal.h>
131Index: dbus-0.23/tools/dbus-tree-view.c
132===================================================================
133--- dbus-0.23.orig/tools/dbus-tree-view.c 2004-08-09 23:07:01.000000000 -0400
134+++ dbus-0.23/tools/dbus-tree-view.c 2005-04-02 17:14:38.026003584 -0500
135@@ -24,8 +24,12 @@
136 #include <config.h>
137 #include "dbus-tree-view.h"
138
139+#ifdef HAVE_GETTEXT
140 #include <libintl.h>
141 #define _(x) dgettext (GETTEXT_PACKAGE, x)
142+#else
143+#define _(x) x
144+#endif
145 #define N_(x) x
146
147 enum
148Index: dbus-0.23/tools/dbus-viewer.c
149===================================================================
150--- dbus-0.23.orig/tools/dbus-viewer.c 2004-08-09 23:07:01.000000000 -0400
151+++ dbus-0.23/tools/dbus-viewer.c 2005-04-02 17:14:38.027003432 -0500
152@@ -30,8 +30,12 @@
153 #include <glib/dbus-gparser.h>
154 #include <glib/dbus-gutils.h>
155
156+#ifdef HAVE_GETTEXT
157 #include <libintl.h>
158 #define _(x) dgettext (GETTEXT_PACKAGE, x)
159+#else
160+#define _(x) x
161+#endif
162 #define N_(x) x
163
164 typedef struct
diff --git a/meta/packages/dbus/dbus/no-bindings.patch b/meta/packages/dbus/dbus/no-bindings.patch
new file mode 100644
index 0000000000..12ba00ff70
--- /dev/null
+++ b/meta/packages/dbus/dbus/no-bindings.patch
@@ -0,0 +1,12 @@
1--- dbus-0.34/tools/Makefile.am.old 2005-06-27 21:48:44.000000000 +0100
2+++ dbus-0.34/tools/Makefile.am 2005-06-27 21:49:04.000000000 +0100
3@@ -6,9 +6,6 @@
4 nodist_libdbus_glib_HEADERS = dbus-glib-bindings.h
5 libdbus_glibdir = $(includedir)/dbus-1.0/dbus
6
7-dbus-glib-bindings.h: dbus-bus-introspect.xml $(top_builddir)/glib/dbus-binding-tool
8- $(top_builddir)/glib/dbus-binding-tool --mode=glib-client --output=dbus-glib-bindings.h dbus-bus-introspect.xml
9-
10 BUILT_SOURCES = dbus-glib-bindings.h dbus-bus-introspect.xml
11
12 else
diff --git a/meta/packages/dbus/dbus/no-examples.patch b/meta/packages/dbus/dbus/no-examples.patch
new file mode 100644
index 0000000000..8767705cee
--- /dev/null
+++ b/meta/packages/dbus/dbus/no-examples.patch
@@ -0,0 +1,8 @@
1--- dbus-0.36.2/glib/Makefile.am.orig 2005-09-06 17:30:26 +0200
2+++ dbus-0.36.2/glib/Makefile.am 2005-09-06 17:30:34 +0200
3@@ -1,4 +1,4 @@
4-SUBDIRS = . examples
5+SUBDIRS = .
6
7 INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_GLIB_TOOL_CFLAGS) -DDBUS_COMPILATION=1 -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\"
8
diff --git a/meta/packages/dbus/dbus/no-introspect.patch b/meta/packages/dbus/dbus/no-introspect.patch
new file mode 100644
index 0000000000..d7ae8e4cad
--- /dev/null
+++ b/meta/packages/dbus/dbus/no-introspect.patch
@@ -0,0 +1,19 @@
1--- dbus-0.34/tools/Makefile.am.old 2005-06-27 20:54:36.000000000 +0100
2+++ dbus-0.34/tools/Makefile.am 2005-06-27 20:54:43.000000000 +0100
3@@ -21,16 +21,6 @@
4 GTK_TOOLS=
5 endif
6
7-if HAVE_GLIB
8-noinst_PROGRAMS = print-introspect
9-
10-print_introspect_SOURCES = print-introspect.c
11-print_introspect_LDADD = $(top_builddir)/glib/libdbus-glib-1.la
12-
13-dbus-bus-introspect.xml: $(top_builddir)/bus/dbus-daemon dbus-launch print-introspect $(top_builddir)/bus/dbus-daemon
14- DBUS_TOP_BUILDDIR=$(top_builddir) $(srcdir)/run-with-tmp-session-bus.sh ./print-introspect org.freedesktop.DBus /org/freedesktop/DBus > dbus-bus-introspect.xml.tmp && mv dbus-bus-introspect.xml.tmp dbus-bus-introspect.xml
15-endif
16-
17 bin_PROGRAMS=dbus-send $(GLIB_TOOLS) dbus-launch dbus-cleanup-sockets $(GTK_TOOLS)
18
19 dbus_send_SOURCES= \
diff --git a/meta/packages/dbus/dbus/spawn-priority.diff b/meta/packages/dbus/dbus/spawn-priority.diff
new file mode 100644
index 0000000000..954d2512fa
--- /dev/null
+++ b/meta/packages/dbus/dbus/spawn-priority.diff
@@ -0,0 +1,17 @@
1diff -ur dbus/dbus/dbus-spawn.c dbus.work/dbus/dbus-spawn.c
2--- dbus/dbus/dbus-spawn.c 2005-03-14 14:25:02.849823496 +0200
3+++ dbus.work/dbus/dbus-spawn.c 2005-03-14 14:34:43.947483224 +0200
4@@ -1117,6 +1117,12 @@
5 }
6 else if (grandchild_pid == 0)
7 {
8+ int p;
9+ errno = 0;
10+ p = getpriority(PRIO_PROCESS, 0);
11+ if (!errno && p < 0) {
12+ setpriority(PRIO_PROCESS, 0, 0);
13+ }
14 do_exec (child_err_report_pipe[WRITE_END],
15 argv,
16 child_setup, user_data);
17Only in dbus.work/dbus: dbus-spawn.c~
diff --git a/meta/packages/dbus/dbus/tmpdir.patch b/meta/packages/dbus/dbus/tmpdir.patch
new file mode 100644
index 0000000000..838b903f0a
--- /dev/null
+++ b/meta/packages/dbus/dbus/tmpdir.patch
@@ -0,0 +1,30 @@
1--- dbus-0.22/configure.in.orig 2004-08-13 00:57:16.000000000 +0200
2+++ dbus-0.22/configure.in 2004-12-30 21:15:57.000000000 +0100
3@@ -1047,15 +1048,18 @@
4 AC_SUBST(ABSOLUTE_TOP_BUILDDIR)
5
6 #### Find socket directories
7-if ! test -z "$TMPDIR" ; then
8- DEFAULT_SOCKET_DIR=$TMPDIR
9-elif ! test -z "$TEMP" ; then
10- DEFAULT_SOCKET_DIR=$TEMP
11-elif ! test -z "$TMP" ; then
12- DEFAULT_SOCKET_DIR=$TMP
13-else
14- DEFAULT_SOCKET_DIR=/tmp
15-fi
16+#if ! test -z "$TMPDIR" ; then
17+# DEFAULT_SOCKET_DIR=$TMPDIR
18+#elif ! test -z "$TEMP" ; then
19+# DEFAULT_SOCKET_DIR=$TEMP
20+#elif ! test -z "$TMP" ; then
21+# DEFAULT_SOCKET_DIR=$TMP
22+#else
23+# DEFAULT_SOCKET_DIR=/tmp
24+#fi
25+
26+# checks disabled to avoid expanding this at build time
27+DEFAULT_SOCKET_DIR=/tmp
28
29 if ! test -z "$with_test_socket_dir" ; then
30 TEST_SOCKET_DIR="$with_test_socket_dir"
diff --git a/meta/packages/dbus/dbus/tools.diff b/meta/packages/dbus/dbus/tools.diff
new file mode 100644
index 0000000000..d9e8712983
--- /dev/null
+++ b/meta/packages/dbus/dbus/tools.diff
@@ -0,0 +1,12 @@
1Only in /home/kihamala/svn/dbus/tools: .svn
2diff -ur tools/dbus-launch.c /home/kihamala/svn/dbus/tools/dbus-launch.c
3--- tools/dbus-launch.c 2004-08-10 06:07:01.000000000 +0300
4+++ /home/kihamala/svn/dbus/tools/dbus-launch.c 2005-02-09 17:59:05.000000000 +0200
5@@ -20,6 +20,7 @@
6 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
7 *
8 */
9+#include <sys/select.h>
10 #include <config.h>
11 #include <stdlib.h>
12 #include <unistd.h>
diff --git a/meta/packages/dbus/dbus_0.60.bb b/meta/packages/dbus/dbus_0.60.bb
new file mode 100644
index 0000000000..e827457371
--- /dev/null
+++ b/meta/packages/dbus/dbus_0.60.bb
@@ -0,0 +1,13 @@
1include dbus_${PV}.inc
2
3
4DEPENDS = "expat glib-2.0 virtual/libintl dbus-native"
5SRC_URI_EXTRA = "file://no-introspect.patch;patch=1 file://no-bindings.patch;patch=1"
6
7FILES_${PN} += "${bindir}/dbus-daemon"
8FILES_${PN}-dev += "${bindir}/dbus-binding-tool"
9
10do_configure_prepend() {
11 install -m 0644 ${STAGING_DIR}/${BUILD_SYS}/share/dbus/dbus-bus-introspect.xml ${S}/tools/
12 install -m 0644 ${STAGING_DIR}/${BUILD_SYS}/share/dbus/dbus-glib-bindings.h ${S}/tools/
13}
diff --git a/meta/packages/dbus/dbus_0.60.inc b/meta/packages/dbus/dbus_0.60.inc
new file mode 100644
index 0000000000..70546ed5b1
--- /dev/null
+++ b/meta/packages/dbus/dbus_0.60.inc
@@ -0,0 +1,64 @@
1SECTION = "base"
2PR = "r0"
3HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
4DESCRIPTION = "message bus system for applications to talk to one another"
5LICENSE = "GPL"
6DEPENDS = "expat glib-2.0 virtual/libintl"
7
8SRC_URI = "http://freedesktop.org/software/dbus/releases/dbus-${PV}.tar.gz \
9 file://cross.patch;patch=1 \
10 file://tmpdir.patch;patch=1 \
11 file://dbus-1.init \
12 file://no-examples.patch;patch=1 \
13 ${SRC_URI_EXTRA}"
14
15inherit autotools pkgconfig update-rc.d gettext
16
17INITSCRIPT_NAME = "dbus-1"
18INITSCRIPT_PARAMS = "defaults"
19
20CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
21
22FILES_${PN} = "${bindir}/dbus-daemon ${bindir}/dbus-launch ${bindir}/dbus-cleanup-sockets ${bindir}/dbus-send ${bindir}/dbus-monitor ${sysconfdir} ${datadir}/dbus-1/services ${libdir}/lib*.so.*"
23FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
24
25pkg_postinst_dbus() {
26#!/bin/sh
27
28# can't do adduser stuff offline
29if [ "x$D" != "x" ]; then
30 exit 1
31fi
32
33MESSAGEUSER=messagebus
34MESSAGEHOME=/var/run/dbus
35
36mkdir -p $MESSAGEHOME || true
37chgrp "$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || addgroup "$MESSAGEUSER"
38chown "$MESSAGEUSER"."$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || adduser --system --home "$MESSAGEHOME" --no-create-home --disabled-password --ingroup "$MESSAGEUSER" "$MESSAGEUSER"
39}
40
41EXTRA_OECONF = "--disable-qt --disable-gtk --disable-tests \
42 --disable-checks --disable-xml-docs --disable-doxygen-docs \
43 --with-xml=expat --without-x"
44
45
46do_stage () {
47 oe_libinstall -so -C dbus libdbus-1 ${STAGING_LIBDIR}
48 oe_libinstall -so -C glib libdbus-glib-1 ${STAGING_LIBDIR}
49
50 autotools_stage_includes
51
52 mkdir -p ${STAGING_LIBDIR}/dbus-1.0/include/dbus/
53 install -m 0644 dbus/dbus-arch-deps.h ${STAGING_LIBDIR}/dbus-1.0/include/dbus/
54}
55
56do_install_append () {
57 install -d ${D}${sysconfdir}/init.d
58 install -m 0755 ${WORKDIR}/dbus-1.init ${D}${sysconfdir}/init.d/dbus-1
59}
60
61python populate_packages_prepend () {
62 if (bb.data.getVar('DEBIAN_NAMES', d, 1)):
63 bb.data.setVar('PKG_dbus', 'dbus-1', d)
64}