diff options
author | Cristian Iorga <cristian.iorga@intel.com> | 2013-07-11 15:41:43 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-07-13 18:23:37 +0100 |
commit | a6c5549ac3907839da0115d1de899c7a943785fe (patch) | |
tree | c04284aa4474c5e9de3a5d5407dd0e47bf91ba5a | |
parent | 0ef252e7de86d1fa8c5985234381f1bcd62961ff (diff) | |
download | poky-a6c5549ac3907839da0115d1de899c7a943785fe.tar.gz |
dbus: upgrade to 1.6.10
dbus-ptest also upgraded to 1.6.10
systemd-address.patch removed; included in upstream.
(From OE-Core rev: e516f18d663447954082b5d2df6c1033cb9b4e65)
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init (renamed from meta/recipes-core/dbus/dbus-1.6.8/dbus-1.init) | 0 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus-1.6.10/ptest.patch (renamed from meta/recipes-core/dbus/dbus-1.6.8/ptest.patch) | 0 | ||||
-rwxr-xr-x | meta/recipes-core/dbus/dbus-1.6.10/run-ptest (renamed from meta/recipes-core/dbus/dbus-1.6.8/run-ptest) | 0 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch (renamed from meta/recipes-core/dbus/dbus-1.6.8/test-run-path.patch) | 0 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch (renamed from meta/recipes-core/dbus/dbus-1.6.8/tmpdir.patch) | 0 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus-1.6.8/systemd-address.patch | 187 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus-ptest_1.6.10.bb (renamed from meta/recipes-core/dbus/dbus-ptest_1.6.8.bb) | 4 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus.inc | 1 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus_1.6.10.bb | 6 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus_1.6.8.bb | 6 |
10 files changed, 8 insertions, 196 deletions
diff --git a/meta/recipes-core/dbus/dbus-1.6.8/dbus-1.init b/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init index 64f2170255..64f2170255 100644 --- a/meta/recipes-core/dbus/dbus-1.6.8/dbus-1.init +++ b/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init | |||
diff --git a/meta/recipes-core/dbus/dbus-1.6.8/ptest.patch b/meta/recipes-core/dbus/dbus-1.6.10/ptest.patch index 263d17eff7..263d17eff7 100644 --- a/meta/recipes-core/dbus/dbus-1.6.8/ptest.patch +++ b/meta/recipes-core/dbus/dbus-1.6.10/ptest.patch | |||
diff --git a/meta/recipes-core/dbus/dbus-1.6.8/run-ptest b/meta/recipes-core/dbus/dbus-1.6.10/run-ptest index e08ecb1a63..e08ecb1a63 100755 --- a/meta/recipes-core/dbus/dbus-1.6.8/run-ptest +++ b/meta/recipes-core/dbus/dbus-1.6.10/run-ptest | |||
diff --git a/meta/recipes-core/dbus/dbus-1.6.8/test-run-path.patch b/meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch index 5c08c9354a..5c08c9354a 100644 --- a/meta/recipes-core/dbus/dbus-1.6.8/test-run-path.patch +++ b/meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch | |||
diff --git a/meta/recipes-core/dbus/dbus-1.6.8/tmpdir.patch b/meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch index bf086e1788..bf086e1788 100644 --- a/meta/recipes-core/dbus/dbus-1.6.8/tmpdir.patch +++ b/meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch | |||
diff --git a/meta/recipes-core/dbus/dbus-1.6.8/systemd-address.patch b/meta/recipes-core/dbus/dbus-1.6.8/systemd-address.patch deleted file mode 100644 index ae1291c947..0000000000 --- a/meta/recipes-core/dbus/dbus-1.6.8/systemd-address.patch +++ /dev/null | |||
@@ -1,187 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
3 | |||
4 | From d728fdc655f17031da3bb129ab2fd17dadf0fe3a Mon Sep 17 00:00:00 2001 | ||
5 | From: Simon Peeters <peeters.simon@gmail.com> | ||
6 | Date: Sun, 07 Oct 2012 14:59:30 +0000 | ||
7 | Subject: Set correct address when using --address=systemd: | ||
8 | |||
9 | When dbus gets launched through systemd, we need to create an address | ||
10 | string based on the sockets passed. | ||
11 | |||
12 | The _dbus_append_addres_from_socket() function is responsible for | ||
13 | extracting the address information from the file-descriptor and | ||
14 | formatting it in a dbus friendly way. | ||
15 | |||
16 | This fixes bus activation when running dbus under a systemd session. | ||
17 | |||
18 | https://bugs.freedesktop.org/show_bug.cgi?id=50962 | ||
19 | |||
20 | Signed-off-by: Simon Peeters <peeters.simon@gmail.com> | ||
21 | --- | ||
22 | diff --git a/dbus/dbus-server-unix.c b/dbus/dbus-server-unix.c | ||
23 | index 130f66e..d995240 100644 | ||
24 | --- a/dbus/dbus-server-unix.c | ||
25 | +++ b/dbus/dbus-server-unix.c | ||
26 | @@ -149,7 +149,7 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry, | ||
27 | } | ||
28 | else if (strcmp (method, "systemd") == 0) | ||
29 | { | ||
30 | - int n, *fds; | ||
31 | + int i, n, *fds; | ||
32 | DBusString address; | ||
33 | |||
34 | n = _dbus_listen_systemd_sockets (&fds, error); | ||
35 | @@ -159,27 +159,39 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry, | ||
36 | return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; | ||
37 | } | ||
38 | |||
39 | - _dbus_string_init_const (&address, "systemd:"); | ||
40 | + if (!_dbus_string_init (&address)) | ||
41 | + goto systemd_oom; | ||
42 | |||
43 | - *server_p = _dbus_server_new_for_socket (fds, n, &address, NULL); | ||
44 | - if (*server_p == NULL) | ||
45 | + for (i = 0; i < n; i++) | ||
46 | { | ||
47 | - int i; | ||
48 | - | ||
49 | - for (i = 0; i < n; i++) | ||
50 | + if (i > 0) | ||
51 | { | ||
52 | - _dbus_close_socket (fds[i], NULL); | ||
53 | + if (!_dbus_string_append (&address, ";")) | ||
54 | + goto systemd_oom; | ||
55 | } | ||
56 | - dbus_free (fds); | ||
57 | - | ||
58 | - dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); | ||
59 | - return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; | ||
60 | + if (!_dbus_append_address_from_socket (fds[i], &address, error)) | ||
61 | + goto systemd_err; | ||
62 | } | ||
63 | |||
64 | + *server_p = _dbus_server_new_for_socket (fds, n, &address, NULL); | ||
65 | + if (*server_p == NULL) | ||
66 | + goto systemd_oom; | ||
67 | + | ||
68 | dbus_free (fds); | ||
69 | |||
70 | return DBUS_SERVER_LISTEN_OK; | ||
71 | - } | ||
72 | + systemd_oom: | ||
73 | + _DBUS_SET_OOM (error); | ||
74 | + systemd_err: | ||
75 | + for (i = 0; i < n; i++) | ||
76 | + { | ||
77 | + _dbus_close_socket (fds[i], NULL); | ||
78 | + } | ||
79 | + dbus_free (fds); | ||
80 | + _dbus_string_free (&address); | ||
81 | + | ||
82 | + return DBUS_SERVER_LISTEN_DID_NOT_CONNECT; | ||
83 | + } | ||
84 | #ifdef DBUS_ENABLE_LAUNCHD | ||
85 | else if (strcmp (method, "launchd") == 0) | ||
86 | { | ||
87 | diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c | ||
88 | index b4ecc96..55743b1 100644 | ||
89 | --- a/dbus/dbus-sysdeps-unix.c | ||
90 | +++ b/dbus/dbus-sysdeps-unix.c | ||
91 | @@ -55,6 +55,7 @@ | ||
92 | #include <netinet/in.h> | ||
93 | #include <netdb.h> | ||
94 | #include <grp.h> | ||
95 | +#include <arpa/inet.h> | ||
96 | |||
97 | #ifdef HAVE_ERRNO_H | ||
98 | #include <errno.h> | ||
99 | @@ -4160,4 +4161,71 @@ _dbus_check_setuid (void) | ||
100 | #endif | ||
101 | } | ||
102 | |||
103 | +/** | ||
104 | + * Read the address from the socket and append it to the string | ||
105 | + * | ||
106 | + * @param fd the socket | ||
107 | + * @param address | ||
108 | + * @param error return location for error code | ||
109 | + */ | ||
110 | +dbus_bool_t | ||
111 | +_dbus_append_address_from_socket (int fd, | ||
112 | + DBusString *address, | ||
113 | + DBusError *error) | ||
114 | +{ | ||
115 | + union { | ||
116 | + struct sockaddr sa; | ||
117 | + struct sockaddr_storage storage; | ||
118 | + struct sockaddr_un un; | ||
119 | + struct sockaddr_in ipv4; | ||
120 | + struct sockaddr_in6 ipv6; | ||
121 | + } socket; | ||
122 | + char hostip[INET6_ADDRSTRLEN]; | ||
123 | + int size = sizeof (socket); | ||
124 | + | ||
125 | + if (getsockname (fd, &socket.sa, &size)) | ||
126 | + goto err; | ||
127 | + | ||
128 | + switch (socket.sa.sa_family) | ||
129 | + { | ||
130 | + case AF_UNIX: | ||
131 | + if (socket.un.sun_path[0]=='\0') | ||
132 | + { | ||
133 | + if (_dbus_string_append_printf (address, "unix:abstract=%s", &(socket.un.sun_path[1]))) | ||
134 | + return TRUE; | ||
135 | + } | ||
136 | + else | ||
137 | + { | ||
138 | + if (_dbus_string_append_printf (address, "unix:path=%s", socket.un.sun_path)) | ||
139 | + return TRUE; | ||
140 | + } | ||
141 | + break; | ||
142 | + case AF_INET: | ||
143 | + if (inet_ntop (AF_INET, &socket.ipv4.sin_addr, hostip, sizeof (hostip))) | ||
144 | + if (_dbus_string_append_printf (address, "tcp:family=ipv4,host=%s,port=%u", | ||
145 | + hostip, ntohs (socket.ipv4.sin_port))) | ||
146 | + return TRUE; | ||
147 | + break; | ||
148 | +#ifdef AF_INET6 | ||
149 | + case AF_INET6: | ||
150 | + if (inet_ntop (AF_INET6, &socket.ipv6.sin6_addr, hostip, sizeof (hostip))) | ||
151 | + if (_dbus_string_append_printf (address, "tcp:family=ipv6,host=%s,port=%u", | ||
152 | + hostip, ntohs (socket.ipv6.sin6_port))) | ||
153 | + return TRUE; | ||
154 | + break; | ||
155 | +#endif | ||
156 | + default: | ||
157 | + dbus_set_error (error, | ||
158 | + _dbus_error_from_errno (EINVAL), | ||
159 | + "Failed to read address from socket: Unknown socket type."); | ||
160 | + return FALSE; | ||
161 | + } | ||
162 | + err: | ||
163 | + dbus_set_error (error, | ||
164 | + _dbus_error_from_errno (errno), | ||
165 | + "Failed to open socket: %s", | ||
166 | + _dbus_strerror (errno)); | ||
167 | + return FALSE; | ||
168 | +} | ||
169 | + | ||
170 | /* tests in dbus-sysdeps-util.c */ | ||
171 | diff --git a/dbus/dbus-sysdeps-unix.h b/dbus/dbus-sysdeps-unix.h | ||
172 | index 9b70896..a265b33 100644 | ||
173 | --- a/dbus/dbus-sysdeps-unix.h | ||
174 | +++ b/dbus/dbus-sysdeps-unix.h | ||
175 | @@ -138,6 +138,10 @@ dbus_bool_t _dbus_parse_uid (const DBusString *uid_str, | ||
176 | |||
177 | void _dbus_close_all (void); | ||
178 | |||
179 | +dbus_bool_t _dbus_append_address_from_socket (int fd, | ||
180 | + DBusString *address, | ||
181 | + DBusError *error); | ||
182 | + | ||
183 | /** @} */ | ||
184 | |||
185 | DBUS_END_DECLS | ||
186 | -- | ||
187 | cgit v0.9.0.2-2-gbebe | ||
diff --git a/meta/recipes-core/dbus/dbus-ptest_1.6.8.bb b/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb index 8d21666c57..6c0f4040f8 100644 --- a/meta/recipes-core/dbus/dbus-ptest_1.6.8.bb +++ b/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb | |||
@@ -16,8 +16,8 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ | |||
16 | file://run-ptest \ | 16 | file://run-ptest \ |
17 | " | 17 | " |
18 | 18 | ||
19 | SRC_URI[md5sum] = "3bf059c7dd5eda5f539a1b7cfe7a14a2" | 19 | SRC_URI[md5sum] = "de4970c20629aeb958a12132415b3630" |
20 | SRC_URI[sha256sum] = "fc1370ef38abeeb13f55c905ec002e60705fb0bfde3b8d21c8d6eb8056c11bac" | 20 | SRC_URI[sha256sum] = "1f3d6f4a53a7121328f6cd685fc14440d72e6c0006ecb3312cc779c495915e86" |
21 | 21 | ||
22 | S="${WORKDIR}/dbus-${PV}" | 22 | S="${WORKDIR}/dbus-${PV}" |
23 | FILESPATH = "${FILE_DIRNAME}/dbus-${PV}" | 23 | FILESPATH = "${FILE_DIRNAME}/dbus-${PV}" |
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc index 8055824aee..b07aefa3b5 100644 --- a/meta/recipes-core/dbus/dbus.inc +++ b/meta/recipes-core/dbus/dbus.inc | |||
@@ -16,7 +16,6 @@ INC_PR = "r6" | |||
16 | 16 | ||
17 | SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ | 17 | SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ |
18 | file://tmpdir.patch; \ | 18 | file://tmpdir.patch; \ |
19 | file://systemd-address.patch \ | ||
20 | file://dbus-1.init" | 19 | file://dbus-1.init" |
21 | 20 | ||
22 | inherit useradd autotools pkgconfig gettext update-rc.d | 21 | inherit useradd autotools pkgconfig gettext update-rc.d |
diff --git a/meta/recipes-core/dbus/dbus_1.6.10.bb b/meta/recipes-core/dbus/dbus_1.6.10.bb new file mode 100644 index 0000000000..5b8220c8ff --- /dev/null +++ b/meta/recipes-core/dbus/dbus_1.6.10.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | include dbus.inc | ||
2 | |||
3 | PR = "${INC_PR}.0" | ||
4 | |||
5 | SRC_URI[md5sum] = "de4970c20629aeb958a12132415b3630" | ||
6 | SRC_URI[sha256sum] = "1f3d6f4a53a7121328f6cd685fc14440d72e6c0006ecb3312cc779c495915e86" | ||
diff --git a/meta/recipes-core/dbus/dbus_1.6.8.bb b/meta/recipes-core/dbus/dbus_1.6.8.bb deleted file mode 100644 index facc02ee63..0000000000 --- a/meta/recipes-core/dbus/dbus_1.6.8.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | include dbus.inc | ||
2 | |||
3 | PR = "${INC_PR}.0" | ||
4 | |||
5 | SRC_URI[md5sum] = "3bf059c7dd5eda5f539a1b7cfe7a14a2" | ||
6 | SRC_URI[sha256sum] = "fc1370ef38abeeb13f55c905ec002e60705fb0bfde3b8d21c8d6eb8056c11bac" | ||