Merge lp:~alan-griffiths/mir/nested-server-uses-host-graphics-platform into lp:mir
- nested-server-uses-host-graphics-platform
- Merge into development-branch
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Alexandros Frantzis | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 3244 | ||||
Proposed branch: | lp:~alan-griffiths/mir/nested-server-uses-host-graphics-platform | ||||
Merge into: | lp:mir | ||||
Prerequisite: | lp:~alan-griffiths/mir/merge-0.18 | ||||
Diff against target: |
851 lines (+335/-33) 31 files modified
examples/basic.c (+12/-0) include/client/mir_toolkit/client_types.h (+15/-0) include/client/mir_toolkit/mir_connection.h (+11/-0) include/common/mir/libname.h (+35/-0) include/platform/mir/graphics/platform_ipc_package.h (+7/-0) include/platform/mir/module_properties.h (+7/-1) src/client/mir_connection.cpp (+26/-0) src/client/mir_connection.h (+1/-0) src/client/mir_connection_api.cpp (+14/-0) src/client/symbols.map (+7/-1) src/common/CMakeLists.txt (+2/-1) src/common/libname.cpp (+29/-0) src/common/symbols.map (+3/-2) src/platforms/android/server/ipc_operations.cpp (+17/-2) src/platforms/android/server/platform.cpp (+7/-2) src/platforms/evdev/platform_factory.cpp (+6/-2) src/platforms/mesa/server/common/ipc_operations.cpp (+12/-1) src/platforms/mesa/server/kms/platform_symbols.cpp (+7/-2) src/platforms/mesa/server/x11/graphics/graphics.cpp (+9/-3) src/platforms/mesa/server/x11/input/input.cpp (+4/-2) src/protobuf/mir_protobuf.proto (+11/-0) src/protobuf/symbols.map (+27/-0) src/server/frontend/session_mediator.cpp (+12/-0) src/server/graphics/default_configuration.cpp (+16/-10) src/server/graphics/nested/host_connection.h (+1/-0) src/server/graphics/nested/mir_client_host_connection.cpp (+14/-0) src/server/graphics/nested/mir_client_host_connection.h (+1/-0) tests/include/mir/test/doubles/stub_host_connection.h (+2/-0) tests/mir_test_framework/platform_graphics_dummy.cpp (+2/-1) tests/mir_test_framework/stub_input.cpp (+5/-2) tests/mir_test_framework/stubbed_graphics_platform.cpp (+13/-1) |
||||
To merge this branch: | bzr merge lp:~alan-griffiths/mir/nested-server-uses-host-graphics-platform | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Brandon Schaefer (community) | Approve | ||
Alberto Aguirre (community) | Approve | ||
Kevin DuBois (community) | Approve | ||
Mir CI Bot | continuous-integration | Approve | |
Alexandros Frantzis (community) | Approve | ||
Cemil Azizoglu (community) | Approve | ||
Review via email:
|
Commit message
Provide information on the selected graphics platform through the client API and use it in nested servers to select the same module. (LP:1515558)
Description of the change
Provide information on the selected graphics platform through the client API and use it in nested servers to select the same module.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3237
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3239
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3240
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3240
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Daniel van Vugt (vanvugt) wrote : | # |
I'm liking the implication of the branch name. Haven't got to a review yet.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3241
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3241
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alexandros Frantzis (afrantzis) wrote : | # |
+#if 0
+ printf("Graphics module: %s (%d.%d%d) - file: %s\n",
+ properties.name,
+ properties.
+ properties.
+ properties.
+ properties.file);
+#endif
Not needed.
+ "mir:android"
Does the "mir:..." prefix denote that the module is provided by the mir team, or does it have some other meaning?
Looks good otherwise.
Needs fixing/info
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alexandros Frantzis (afrantzis) wrote : | # |
Looks good.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3243
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Kevin DuBois (kdub) wrote : | # |
44: + char const *file;
I guess a minor needs fixing, its not immediately obvious what the contents of 'file' are. (maybe rename to "library_filename" ?)
A followup (nonblocking) question (and maybe a followup MP) would be: would it be helpful to send both the server and client module names for the graphics platform? Perhaps by having:
mir_connection_
mir_connection_
mir_connection_
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3243
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alan Griffiths (alan-griffiths) wrote : | # |
> 44: + char const *file;
>
> I guess a minor needs fixing, its not immediately obvious what the contents of
> 'file' are. (maybe rename to "library_filename" ?)
It ought to be "module" rather than "library", but that is somewhat redundant in a struct called MirModuleProper
I guess "filename" is a little clearer than "file" though.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3244
https:/
Executed test runs:
None: https:/
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Brandon Schaefer (brandontschaefer) wrote : | # |
lgtm
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3244
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'examples/basic.c' |
2 | --- examples/basic.c 2015-09-17 20:32:32 +0000 |
3 | +++ examples/basic.c 2016-01-14 15:13:04 +0000 |
4 | @@ -117,6 +117,18 @@ |
5 | assert(0 <= platform_package.fd_items); |
6 | } |
7 | |
8 | + { |
9 | + MirModuleProperties properties = { NULL, -1, -1, -1, NULL }; |
10 | + |
11 | + mir_connection_get_graphics_module(mcd.connection, &properties); |
12 | + |
13 | + assert(NULL != properties.name); |
14 | + assert(0 <= properties.major_version); |
15 | + assert(0 <= properties.minor_version); |
16 | + assert(0 <= properties.micro_version); |
17 | + assert(NULL != properties.filename); |
18 | + } |
19 | + |
20 | // Identify a supported pixel format |
21 | MirPixelFormat pixel_format = mir_pixel_format_invalid; |
22 | unsigned int valid_formats; |
23 | |
24 | === modified file 'include/client/mir_toolkit/client_types.h' |
25 | --- include/client/mir_toolkit/client_types.h 2015-09-02 16:33:14 +0000 |
26 | +++ include/client/mir_toolkit/client_types.h 2016-01-14 15:13:04 +0000 |
27 | @@ -192,6 +192,21 @@ |
28 | int fd[mir_platform_package_max]; |
29 | } MirPlatformPackage; |
30 | |
31 | +/** |
32 | + * Retrieved information about a loadable module. This allows clients to |
33 | + * identify the underlying platform. E.g. whether the graphics are |
34 | + * "mir:android" or "mir:mesa". |
35 | + * Third party graphics platforms do not currently exist but should be |
36 | + * named according to the vendor and platform. Vis: "<vendor>:<platform>" |
37 | + */ |
38 | +typedef struct MirModuleProperties |
39 | +{ |
40 | + char const *name; |
41 | + int major_version; |
42 | + int minor_version; |
43 | + int micro_version; |
44 | + char const *filename; |
45 | +} MirModuleProperties; |
46 | |
47 | /** |
48 | * Retrieved information about a MirSurface. This is most useful for learning |
49 | |
50 | === modified file 'include/client/mir_toolkit/mir_connection.h' |
51 | --- include/client/mir_toolkit/mir_connection.h 2015-11-17 12:46:14 +0000 |
52 | +++ include/client/mir_toolkit/mir_connection.h 2016-01-14 15:13:04 +0000 |
53 | @@ -95,6 +95,17 @@ |
54 | void mir_connection_get_platform(MirConnection *connection, MirPlatformPackage *platform_package); |
55 | |
56 | /** |
57 | + * Query graphics platform module. |
58 | + * |
59 | + * \note The char pointers in MirModuleProperties are owned by the connection and should not be |
60 | + * freed. They remain valid until the connection is released. |
61 | + * |
62 | + * \param [in] connection The connection |
63 | + * \param [out] properties Structure to be populated |
64 | + */ |
65 | +void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties); |
66 | + |
67 | +/** |
68 | * Register a callback to be called when a Lifecycle state change occurs. |
69 | * \param [in] connection The connection |
70 | * \param [in] callback The function to be called when the state change occurs |
71 | |
72 | === added file 'include/common/mir/libname.h' |
73 | --- include/common/mir/libname.h 1970-01-01 00:00:00 +0000 |
74 | +++ include/common/mir/libname.h 2016-01-14 15:13:04 +0000 |
75 | @@ -0,0 +1,35 @@ |
76 | +/* |
77 | + * Copyright © 2016 Canonical Ltd. |
78 | + * |
79 | + * This program is free software: you can redistribute it and/or modify it |
80 | + * under the terms of the GNU Lesser General Public License version 3, |
81 | + * as published by the Free Software Foundation. |
82 | + * |
83 | + * This program is distributed in the hope that it will be useful, |
84 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
85 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
86 | + * GNU Lesser General Public License for more details. |
87 | + * |
88 | + * You should have received a copy of the GNU Lesser General Public License |
89 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
90 | + * |
91 | + * Authored by: Alan Griffiths <alan@octopull.co.uk> |
92 | + */ |
93 | + |
94 | +#ifndef MIR_LIBNAME_H |
95 | +#define MIR_LIBNAME_H |
96 | + |
97 | +namespace mir |
98 | +{ |
99 | +namespace detail { char const* libname_impl(void* libname); } |
100 | + |
101 | +namespace |
102 | +{ |
103 | +inline char const* libname() |
104 | +{ |
105 | + return detail::libname_impl(reinterpret_cast<void*>(&libname)); |
106 | +} |
107 | +} |
108 | +} |
109 | + |
110 | +#endif //MIR_LIBNAME_H_H |
111 | |
112 | === modified file 'include/platform/mir/graphics/platform_ipc_package.h' |
113 | --- include/platform/mir/graphics/platform_ipc_package.h 2015-02-22 07:46:25 +0000 |
114 | +++ include/platform/mir/graphics/platform_ipc_package.h 2016-01-14 15:13:04 +0000 |
115 | @@ -24,6 +24,8 @@ |
116 | |
117 | namespace mir |
118 | { |
119 | +struct ModuleProperties; |
120 | + |
121 | namespace graphics |
122 | { |
123 | |
124 | @@ -32,8 +34,13 @@ |
125 | */ |
126 | struct PlatformIPCPackage |
127 | { |
128 | + PlatformIPCPackage() : graphics_module(nullptr) {} |
129 | + explicit PlatformIPCPackage(ModuleProperties const* graphics_module) : graphics_module(graphics_module) {} |
130 | + |
131 | std::vector<int32_t> ipc_data; |
132 | std::vector<int32_t> ipc_fds; |
133 | + |
134 | + ModuleProperties const* graphics_module; |
135 | }; |
136 | |
137 | } |
138 | |
139 | === modified file 'include/platform/mir/module_properties.h' |
140 | --- include/platform/mir/module_properties.h 2015-04-28 07:54:10 +0000 |
141 | +++ include/platform/mir/module_properties.h 2016-01-14 15:13:04 +0000 |
142 | @@ -23,7 +23,12 @@ |
143 | { |
144 | |
145 | /** |
146 | - * Describes a platform module |
147 | + * Describes a platform module. Mir provides the following graphics platforms: |
148 | + * "mir:mesa-kms", "mir:mesa-x11" and "mir:android". |
149 | + * Mir provides "mir:evdev-input" input platform. |
150 | + * |
151 | + * Third party platforms should be named according to the vendor and platform: |
152 | + * "<vendor>:<platform>" |
153 | */ |
154 | struct ModuleProperties |
155 | { |
156 | @@ -31,6 +36,7 @@ |
157 | int major_version; |
158 | int minor_version; |
159 | int micro_version; |
160 | + char const* file; |
161 | }; |
162 | } |
163 | |
164 | |
165 | === modified file 'src/client/mir_connection.cpp' |
166 | --- src/client/mir_connection.cpp 2016-01-13 19:08:38 +0000 |
167 | +++ src/client/mir_connection.cpp 2016-01-14 15:13:04 +0000 |
168 | @@ -643,6 +643,32 @@ |
169 | } |
170 | } |
171 | |
172 | +void MirConnection::populate_graphics_module(MirModuleProperties& properties) |
173 | +{ |
174 | + // connect_result is write-once: once it's valid, we don't need to lock |
175 | + // to use it. |
176 | + if (connect_done && |
177 | + !connect_result->has_error() && |
178 | + connect_result->has_platform() && |
179 | + connect_result->platform().has_graphics_module()) |
180 | + { |
181 | + auto const& graphics_module = connect_result->platform().graphics_module(); |
182 | + properties.name = graphics_module.name().c_str(); |
183 | + properties.major_version = graphics_module.major_version(); |
184 | + properties.minor_version = graphics_module.minor_version(); |
185 | + properties.micro_version = graphics_module.micro_version(); |
186 | + properties.filename = graphics_module.file().c_str(); |
187 | + } |
188 | + else |
189 | + { |
190 | + properties.name = "(unknown)"; |
191 | + properties.major_version = 0; |
192 | + properties.minor_version = 0; |
193 | + properties.micro_version = 0; |
194 | + properties.filename = nullptr; |
195 | + } |
196 | +} |
197 | + |
198 | MirDisplayConfiguration* MirConnection::create_copy_of_display_config() |
199 | { |
200 | std::lock_guard<decltype(mutex)> lock(mutex); |
201 | |
202 | === modified file 'src/client/mir_connection.h' |
203 | --- src/client/mir_connection.h 2016-01-11 14:27:36 +0000 |
204 | +++ src/client/mir_connection.h 2016-01-14 15:13:04 +0000 |
205 | @@ -129,6 +129,7 @@ |
206 | void register_display_change_callback(mir_display_config_callback callback, void* context); |
207 | |
208 | void populate(MirPlatformPackage& platform_package); |
209 | + void populate_graphics_module(MirModuleProperties& properties); |
210 | MirDisplayConfiguration* create_copy_of_display_config(); |
211 | void available_surface_formats(MirPixelFormat* formats, |
212 | unsigned int formats_size, unsigned int& valid_formats); |
213 | |
214 | === modified file 'src/client/mir_connection_api.cpp' |
215 | --- src/client/mir_connection_api.cpp 2015-11-11 11:50:42 +0000 |
216 | +++ src/client/mir_connection_api.cpp 2016-01-14 15:13:04 +0000 |
217 | @@ -22,6 +22,7 @@ |
218 | #include "mir_toolkit/mir_connection.h" |
219 | #include "mir/default_configuration.h" |
220 | #include "mir/raii.h" |
221 | +#include "mir/require.h" |
222 | |
223 | #include "mir_connection.h" |
224 | #include "default_connection_configuration.h" |
225 | @@ -186,6 +187,19 @@ |
226 | connection->populate(*platform_package); |
227 | } |
228 | |
229 | +void mir_connection_get_graphics_module(MirConnection *connection, MirModuleProperties *properties) |
230 | +try |
231 | +{ |
232 | + mir::require(mir_connection_is_valid(connection)); |
233 | + mir::require(properties != nullptr); |
234 | + |
235 | + connection->populate_graphics_module(*properties); |
236 | +} |
237 | +catch (std::exception const& ex) |
238 | +{ |
239 | + MIR_LOG_UNCAUGHT_EXCEPTION(ex); |
240 | +} |
241 | + |
242 | void mir_connection_set_lifecycle_event_callback( |
243 | MirConnection* connection, |
244 | mir_lifecycle_event_callback callback, |
245 | |
246 | === modified file 'src/client/symbols.map' |
247 | --- src/client/symbols.map 2016-01-08 09:23:17 +0000 |
248 | +++ src/client/symbols.map 2016-01-14 15:13:04 +0000 |
249 | @@ -207,6 +207,13 @@ |
250 | *; |
251 | } MIR_CLIENT_9v17; |
252 | |
253 | +MIR_CLIENT_unreleased { |
254 | + global: |
255 | + mir_connection_get_graphics_module; |
256 | + local: |
257 | + *; |
258 | +} MIR_CLIENT_9v18; |
259 | + |
260 | MIR_CLIENT_DETAIL_9 { |
261 | global: |
262 | extern "C++" { |
263 | @@ -261,4 +268,3 @@ |
264 | local: |
265 | *; |
266 | } MIR_CLIENT_DETAIL_9v18; |
267 | - |
268 | |
269 | === modified file 'src/common/CMakeLists.txt' |
270 | --- src/common/CMakeLists.txt 2015-11-13 20:48:52 +0000 |
271 | +++ src/common/CMakeLists.txt 2016-01-14 15:13:04 +0000 |
272 | @@ -20,7 +20,8 @@ |
273 | $<TARGET_OBJECTS:mirfatal> |
274 | $<TARGET_OBJECTS:android-input-common> |
275 | ${CMAKE_CURRENT_SOURCE_DIR}/log.cpp |
276 | - ) |
277 | + ${CMAKE_CURRENT_SOURCE_DIR}/libname.cpp ${PROJECT_SOURCE_DIR}/include/common/mir/libname.h |
278 | +) |
279 | |
280 | set(PREFIX "${CMAKE_INSTALL_PREFIX}") |
281 | set(EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}") |
282 | |
283 | === added file 'src/common/libname.cpp' |
284 | --- src/common/libname.cpp 1970-01-01 00:00:00 +0000 |
285 | +++ src/common/libname.cpp 2016-01-14 15:13:04 +0000 |
286 | @@ -0,0 +1,29 @@ |
287 | +/* |
288 | + * Copyright © 2016 Canonical Ltd. |
289 | + * |
290 | + * This program is free software: you can redistribute it and/or modify it |
291 | + * under the terms of the GNU Lesser General Public License version 3, |
292 | + * as published by the Free Software Foundation. |
293 | + * |
294 | + * This program is distributed in the hope that it will be useful, |
295 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
296 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
297 | + * GNU Lesser General Public License for more details. |
298 | + * |
299 | + * You should have received a copy of the GNU Lesser General Public License |
300 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
301 | + * |
302 | + * Authored by: Alan Griffiths <alan@octopull.co.uk> |
303 | + */ |
304 | + |
305 | +#include "mir/libname.h" |
306 | + |
307 | +#include <dlfcn.h> |
308 | + |
309 | +char const* mir::detail::libname_impl(void* libname) |
310 | +{ |
311 | + Dl_info info; |
312 | + |
313 | + dladdr(libname, &info); |
314 | + return info.dli_fname; |
315 | +} |
316 | |
317 | === modified file 'src/common/symbols.map' |
318 | --- src/common/symbols.map 2015-12-17 12:25:31 +0000 |
319 | +++ src/common/symbols.map 2016-01-14 15:13:04 +0000 |
320 | @@ -201,12 +201,13 @@ |
321 | local: *; |
322 | } MIR_COMMON_5; |
323 | |
324 | -MIR_COMMON_unreleased { |
325 | +MIR_COMMON_unreleased { # New functions in Mir 0.19 |
326 | global: |
327 | extern "C++" { |
328 | typeinfo?for?mir::logging::SharedLibraryProberReport; |
329 | typeinfo?for?mir::time::SteadyClock; |
330 | typeinfo?for?android::InputChannel; |
331 | typeinfo?for?mir::logging::DumbConsoleLogger; |
332 | + mir::detail::libname_impl*; |
333 | }; |
334 | -} MIR_COMMON_5; |
335 | +} MIR_COMMON_5.1; |
336 | |
337 | === modified file 'src/platforms/android/server/ipc_operations.cpp' |
338 | --- src/platforms/android/server/ipc_operations.cpp 2016-01-07 11:55:03 +0000 |
339 | +++ src/platforms/android/server/ipc_operations.cpp 2016-01-14 15:13:04 +0000 |
340 | @@ -17,13 +17,17 @@ |
341 | */ |
342 | |
343 | #include "mir/graphics/platform_ipc_package.h" |
344 | +#include "mir/module_properties.h" |
345 | #include "mir/graphics/buffer.h" |
346 | #include "mir/graphics/buffer_ipc_message.h" |
347 | #include "mir/graphics/platform_operation_message.h" |
348 | +#include "mir/libname.h" |
349 | #include "android_native_buffer.h" |
350 | #include "ipc_operations.h" |
351 | + |
352 | +#include <boost/throw_exception.hpp> |
353 | + |
354 | #include <stdexcept> |
355 | -#include <boost/throw_exception.hpp> |
356 | |
357 | namespace mg = mir::graphics; |
358 | namespace mga = mir::graphics::android; |
359 | @@ -66,9 +70,20 @@ |
360 | { |
361 | } |
362 | |
363 | +namespace |
364 | +{ |
365 | +mir::ModuleProperties const properties = { |
366 | + "mir:android", |
367 | + MIR_VERSION_MAJOR, |
368 | + MIR_VERSION_MINOR, |
369 | + MIR_VERSION_MICRO, |
370 | + mir::libname() |
371 | +}; |
372 | +} |
373 | + |
374 | std::shared_ptr<mg::PlatformIPCPackage> mga::IpcOperations::connection_ipc_package() |
375 | { |
376 | - return std::make_shared<mg::PlatformIPCPackage>(); |
377 | + return std::make_shared<mg::PlatformIPCPackage>(&properties); |
378 | } |
379 | |
380 | mg::PlatformOperationMessage mga::IpcOperations::platform_operation( |
381 | |
382 | === modified file 'src/platforms/android/server/platform.cpp' |
383 | --- src/platforms/android/server/platform.cpp 2016-01-07 11:55:03 +0000 |
384 | +++ src/platforms/android/server/platform.cpp 2016-01-14 15:13:04 +0000 |
385 | @@ -37,6 +37,7 @@ |
386 | #include "mir/options/configuration.h" |
387 | #include "mir/abnormal_exit.h" |
388 | #include "mir/assert_module_entry_point.h" |
389 | +#include "mir/libname.h" |
390 | |
391 | #include <boost/throw_exception.hpp> |
392 | #include <stdexcept> |
393 | @@ -197,12 +198,16 @@ |
394 | return err < 0 ? mg::PlatformPriority::unsupported : mg::PlatformPriority::best; |
395 | } |
396 | |
397 | +namespace |
398 | +{ |
399 | mir::ModuleProperties const description = { |
400 | - "android", |
401 | + "mir:android", |
402 | MIR_VERSION_MAJOR, |
403 | MIR_VERSION_MINOR, |
404 | - MIR_VERSION_MICRO |
405 | + MIR_VERSION_MICRO, |
406 | + mir::libname() |
407 | }; |
408 | +} |
409 | |
410 | mir::ModuleProperties const* describe_graphics_module() |
411 | { |
412 | |
413 | === modified file 'src/platforms/evdev/platform_factory.cpp' |
414 | --- src/platforms/evdev/platform_factory.cpp 2015-11-25 20:26:59 +0000 |
415 | +++ src/platforms/evdev/platform_factory.cpp 2016-01-14 15:13:04 +0000 |
416 | @@ -20,6 +20,7 @@ |
417 | #include "mir/udev/wrapper.h" |
418 | #include "mir/fd.h" |
419 | #include "mir/assert_module_entry_point.h" |
420 | +#include "mir/libname.h" |
421 | |
422 | #include <sys/types.h> |
423 | #include <sys/stat.h> |
424 | @@ -37,12 +38,15 @@ |
425 | namespace |
426 | { |
427 | char const* const host_socket_opt = "host-socket"; |
428 | + |
429 | mir::ModuleProperties const description = { |
430 | - "evdev-input", |
431 | + "mir:evdev-input", |
432 | MIR_VERSION_MAJOR, |
433 | MIR_VERSION_MINOR, |
434 | - MIR_VERSION_MICRO |
435 | + MIR_VERSION_MICRO, |
436 | + mir::libname() |
437 | }; |
438 | + |
439 | bool can_open_input_devices() |
440 | { |
441 | mu::Enumerator input_enumerator{std::make_shared<mu::Context>()}; |
442 | |
443 | === modified file 'src/platforms/mesa/server/common/ipc_operations.cpp' |
444 | --- src/platforms/mesa/server/common/ipc_operations.cpp 2015-07-23 02:39:20 +0000 |
445 | +++ src/platforms/mesa/server/common/ipc_operations.cpp 2016-01-14 15:13:04 +0000 |
446 | @@ -19,8 +19,10 @@ |
447 | #include "mir/graphics/buffer.h" |
448 | #include "mir/graphics/buffer_ipc_message.h" |
449 | #include "mir/graphics/platform_ipc_package.h" |
450 | +#include "mir/graphics/platform.h" |
451 | #include "mir/graphics/nested_context.h" |
452 | #include "mir/graphics/platform_operation_message.h" |
453 | +#include "mir/libname.h" |
454 | #include "display_helpers.h" |
455 | #include "drm_authentication.h" |
456 | #include "drm_close_threadsafe.h" |
457 | @@ -38,9 +40,18 @@ |
458 | |
459 | namespace |
460 | { |
461 | +mir::ModuleProperties const description = { |
462 | + "mir:mesa", |
463 | + MIR_VERSION_MAJOR, |
464 | + MIR_VERSION_MINOR, |
465 | + MIR_VERSION_MICRO, |
466 | + mir::libname() |
467 | +}; |
468 | + |
469 | struct MesaPlatformIPCPackage : public mg::PlatformIPCPackage |
470 | { |
471 | - MesaPlatformIPCPackage(int drm_auth_fd) |
472 | + MesaPlatformIPCPackage(int drm_auth_fd) : |
473 | + mg::PlatformIPCPackage(&description) |
474 | { |
475 | ipc_fds.push_back(drm_auth_fd); |
476 | } |
477 | |
478 | === modified file 'src/platforms/mesa/server/kms/platform_symbols.cpp' |
479 | --- src/platforms/mesa/server/kms/platform_symbols.cpp 2016-01-07 11:55:03 +0000 |
480 | +++ src/platforms/mesa/server/kms/platform_symbols.cpp 2016-01-14 15:13:04 +0000 |
481 | @@ -24,6 +24,7 @@ |
482 | #include "mir/udev/wrapper.h" |
483 | #include "mir/module_deleter.h" |
484 | #include "mir/assert_module_entry_point.h" |
485 | +#include "mir/libname.h" |
486 | |
487 | #include <fcntl.h> |
488 | #include <sys/ioctl.h> |
489 | @@ -211,12 +212,16 @@ |
490 | mg::PlatformPriority::supported - 1); |
491 | } |
492 | |
493 | +namespace |
494 | +{ |
495 | mir::ModuleProperties const description = { |
496 | - "mesa-kms", |
497 | + "mir:mesa-kms", |
498 | MIR_VERSION_MAJOR, |
499 | MIR_VERSION_MINOR, |
500 | - MIR_VERSION_MICRO |
501 | + MIR_VERSION_MICRO, |
502 | + mir::libname() |
503 | }; |
504 | +} |
505 | |
506 | mir::ModuleProperties const* describe_graphics_module() |
507 | { |
508 | |
509 | === modified file 'src/platforms/mesa/server/x11/graphics/graphics.cpp' |
510 | --- src/platforms/mesa/server/x11/graphics/graphics.cpp 2016-01-07 11:55:03 +0000 |
511 | +++ src/platforms/mesa/server/x11/graphics/graphics.cpp 2016-01-14 15:13:04 +0000 |
512 | @@ -20,9 +20,11 @@ |
513 | #include "platform.h" |
514 | #include "guest_platform.h" |
515 | #include "../X11_resources.h" |
516 | -#include <boost/throw_exception.hpp> |
517 | #include "mir/module_deleter.h" |
518 | #include "mir/assert_module_entry_point.h" |
519 | +#include "mir/libname.h" |
520 | + |
521 | +#include <boost/throw_exception.hpp> |
522 | |
523 | namespace mo = mir::options; |
524 | namespace mg = mir::graphics; |
525 | @@ -96,12 +98,16 @@ |
526 | return mg::PlatformPriority::unsupported; |
527 | } |
528 | |
529 | +namespace |
530 | +{ |
531 | mir::ModuleProperties const description = { |
532 | - "mesa-x11", |
533 | + "mir:mesa-x11", |
534 | MIR_VERSION_MAJOR, |
535 | MIR_VERSION_MINOR, |
536 | - MIR_VERSION_MICRO |
537 | + MIR_VERSION_MICRO, |
538 | + mir::libname() |
539 | }; |
540 | +} |
541 | |
542 | mir::ModuleProperties const* describe_graphics_module() |
543 | { |
544 | |
545 | === modified file 'src/platforms/mesa/server/x11/input/input.cpp' |
546 | --- src/platforms/mesa/server/x11/input/input.cpp 2015-12-02 13:06:44 +0000 |
547 | +++ src/platforms/mesa/server/x11/input/input.cpp 2016-01-14 15:13:04 +0000 |
548 | @@ -20,6 +20,7 @@ |
549 | #include "../X11_resources.h" |
550 | #include "mir/module_properties.h" |
551 | #include "mir/assert_module_entry_point.h" |
552 | +#include "mir/libname.h" |
553 | |
554 | namespace mo = mir::options; |
555 | namespace mi = mir::input; |
556 | @@ -61,10 +62,11 @@ |
557 | namespace |
558 | { |
559 | mir::ModuleProperties const description = { |
560 | - "x11-input", |
561 | + "mir:x11-input", |
562 | MIR_VERSION_MAJOR, |
563 | MIR_VERSION_MINOR, |
564 | - MIR_VERSION_MICRO |
565 | + MIR_VERSION_MICRO, |
566 | + mir::libname() |
567 | }; |
568 | } |
569 | |
570 | |
571 | === modified file 'src/protobuf/mir_protobuf.proto' |
572 | --- src/protobuf/mir_protobuf.proto 2015-10-16 17:34:48 +0000 |
573 | +++ src/protobuf/mir_protobuf.proto 2016-01-14 15:13:04 +0000 |
574 | @@ -142,10 +142,21 @@ |
575 | optional string error = 127; |
576 | } |
577 | |
578 | +message ModuleProperties |
579 | +{ |
580 | + required string name = 1; |
581 | + required uint32 major_version = 2; |
582 | + required uint32 minor_version = 3; |
583 | + required uint32 micro_version = 4; |
584 | + required string file = 5; |
585 | +}; |
586 | + |
587 | + |
588 | message Platform { |
589 | repeated sint32 fd = 1; |
590 | repeated int32 data = 2; |
591 | optional int32 fds_on_side_channel = 3; |
592 | + optional ModuleProperties graphics_module = 4; |
593 | |
594 | optional string error = 127; |
595 | } |
596 | |
597 | === modified file 'src/protobuf/symbols.map' |
598 | --- src/protobuf/symbols.map 2015-11-02 17:40:57 +0000 |
599 | +++ src/protobuf/symbols.map 2016-01-14 15:13:04 +0000 |
600 | @@ -975,3 +975,30 @@ |
601 | }; |
602 | local: *; |
603 | }; |
604 | + |
605 | +MIR_PROTOBUF_3_unreleased { |
606 | + global: |
607 | + extern "C++" { |
608 | + mir::protobuf::ModuleProperties::ByteSize*; |
609 | + mir::protobuf::ModuleProperties::CheckTypeAndMergeFrom*; |
610 | + mir::protobuf::ModuleProperties::Clear*; |
611 | + mir::protobuf::ModuleProperties::?ModuleProperties*; |
612 | + mir::protobuf::ModuleProperties::ModuleProperties*; |
613 | + mir::protobuf::ModuleProperties::CopyFrom*; |
614 | + mir::protobuf::ModuleProperties::default_instance*; |
615 | + mir::protobuf::ModuleProperties::DiscardUnknownFields*; |
616 | + mir::protobuf::ModuleProperties::GetTypeName*; |
617 | + mir::protobuf::ModuleProperties::IsInitialized*; |
618 | + mir::protobuf::ModuleProperties::kDisplayConfigurationFieldNumber*; |
619 | + mir::protobuf::ModuleProperties::kDisplayOutputFieldNumber*; |
620 | + mir::protobuf::ModuleProperties::kErrorFieldNumber*; |
621 | + mir::protobuf::ModuleProperties::kPlatformFieldNumber*; |
622 | + mir::protobuf::ModuleProperties::kSurfacePixelFormatFieldNumber*; |
623 | + mir::protobuf::ModuleProperties::MergeFrom*; |
624 | + mir::protobuf::ModuleProperties::MergePartialFromCodedStream*; |
625 | + mir::protobuf::ModuleProperties::New*; |
626 | + mir::protobuf::ModuleProperties::SerializeWithCachedSizes*; |
627 | + mir::protobuf::ModuleProperties::Swap*; |
628 | + typeinfo?for?mir::protobuf::ModuleProperties; |
629 | + }; |
630 | +} MIR_PROTOBUF_3; |
631 | |
632 | === modified file 'src/server/frontend/session_mediator.cpp' |
633 | --- src/server/frontend/session_mediator.cpp 2015-12-16 11:57:27 +0000 |
634 | +++ src/server/frontend/session_mediator.cpp 2016-01-14 15:13:04 +0000 |
635 | @@ -50,6 +50,7 @@ |
636 | #include "mir/scene/prompt_session_creation_parameters.h" |
637 | #include "mir/fd.h" |
638 | #include "mir/cookie_factory.h" |
639 | +#include "mir/module_properties.h" |
640 | |
641 | #include "mir/geometry/rectangles.h" |
642 | #include "buffer_stream_tracker.h" |
643 | @@ -144,6 +145,17 @@ |
644 | for (auto& ipc_fds : ipc_package->ipc_fds) |
645 | platform->add_fd(ipc_fds); |
646 | |
647 | + if (auto const graphics_module = ipc_package->graphics_module) |
648 | + { |
649 | + auto const module = platform->mutable_graphics_module(); |
650 | + |
651 | + module->set_name(graphics_module->name); |
652 | + module->set_major_version(graphics_module->major_version); |
653 | + module->set_minor_version(graphics_module->minor_version); |
654 | + module->set_micro_version(graphics_module->micro_version); |
655 | + module->set_file(graphics_module->file); |
656 | + } |
657 | + |
658 | auto display_config = display_changer->base_configuration(); |
659 | auto protobuf_config = response->mutable_display_configuration(); |
660 | mfd::pack_protobuf_display_configuration(*protobuf_config, *display_config); |
661 | |
662 | === modified file 'src/server/graphics/default_configuration.cpp' |
663 | --- src/server/graphics/default_configuration.cpp 2015-11-05 18:24:29 +0000 |
664 | +++ src/server/graphics/default_configuration.cpp 2016-01-14 15:13:04 +0000 |
665 | @@ -73,6 +73,21 @@ |
666 | [this]()->std::shared_ptr<mg::Platform> |
667 | { |
668 | std::shared_ptr<mir::SharedLibrary> platform_library; |
669 | + |
670 | + // if a host socket is set we should use the host graphics module to create a "guest" platform |
671 | + if (the_options()->is_set(options::host_socket_opt)) |
672 | + { |
673 | + auto const host_connection = the_host_connection(); |
674 | + |
675 | + platform_library = std::make_shared<mir::SharedLibrary>(host_connection->graphics_platform_library()); |
676 | + |
677 | + auto create_guest_platform = platform_library->load_function<mg::CreateGuestPlatform>( |
678 | + "create_guest_platform", |
679 | + MIR_SERVER_GRAPHICS_PLATFORM_VERSION); |
680 | + |
681 | + return create_guest_platform(the_display_report(), host_connection); |
682 | + } |
683 | + |
684 | // fallback to standalone if host socket is unset |
685 | if (the_options()->is_set(options::platform_graphics_lib)) |
686 | { |
687 | @@ -92,9 +107,6 @@ |
688 | auto create_host_platform = platform_library->load_function<mg::CreateHostPlatform>( |
689 | "create_host_platform", |
690 | MIR_SERVER_GRAPHICS_PLATFORM_VERSION); |
691 | - auto create_guest_platform = platform_library->load_function<mg::CreateGuestPlatform>( |
692 | - "create_guest_platform", |
693 | - MIR_SERVER_GRAPHICS_PLATFORM_VERSION); |
694 | auto describe_module = platform_library->load_function<mg::DescribeModule>( |
695 | "describe_graphics_module", |
696 | MIR_SERVER_GRAPHICS_PLATFORM_VERSION); |
697 | @@ -105,13 +117,7 @@ |
698 | description->minor_version, |
699 | description->micro_version); |
700 | |
701 | - if (!the_options()->is_set(options::host_socket_opt)) |
702 | - return create_host_platform(the_options(), the_emergency_cleanup(), the_display_report()); |
703 | - else |
704 | - return create_guest_platform( |
705 | - the_display_report(), |
706 | - the_host_connection()); |
707 | - |
708 | + return create_host_platform(the_options(), the_emergency_cleanup(), the_display_report()); |
709 | }); |
710 | } |
711 | |
712 | |
713 | === modified file 'src/server/graphics/nested/host_connection.h' |
714 | --- src/server/graphics/nested/host_connection.h 2015-06-17 05:20:42 +0000 |
715 | +++ src/server/graphics/nested/host_connection.h 2016-01-14 15:13:04 +0000 |
716 | @@ -52,6 +52,7 @@ |
717 | |
718 | virtual void set_cursor_image(CursorImage const& image) = 0; |
719 | virtual void hide_cursor() = 0; |
720 | + virtual auto graphics_platform_library() -> std::string = 0; |
721 | |
722 | protected: |
723 | HostConnection() = default; |
724 | |
725 | === modified file 'src/server/graphics/nested/mir_client_host_connection.cpp' |
726 | --- src/server/graphics/nested/mir_client_host_connection.cpp 2015-10-07 19:22:52 +0000 |
727 | +++ src/server/graphics/nested/mir_client_host_connection.cpp 2016-01-14 15:13:04 +0000 |
728 | @@ -317,3 +317,17 @@ |
729 | surface->hide_cursor(); |
730 | } |
731 | } |
732 | + |
733 | +auto mgn::MirClientHostConnection::graphics_platform_library() -> std::string |
734 | +{ |
735 | + MirModuleProperties properties = { nullptr, 0, 0, 0, nullptr }; |
736 | + |
737 | + mir_connection_get_graphics_module(mir_connection, &properties); |
738 | + |
739 | + if (properties.filename == nullptr) |
740 | + { |
741 | + BOOST_THROW_EXCEPTION(std::runtime_error("Cannot identify host graphics platform")); |
742 | + } |
743 | + |
744 | + return properties.filename; |
745 | +} |
746 | \ No newline at end of file |
747 | |
748 | === modified file 'src/server/graphics/nested/mir_client_host_connection.h' |
749 | --- src/server/graphics/nested/mir_client_host_connection.h 2015-06-17 05:20:42 +0000 |
750 | +++ src/server/graphics/nested/mir_client_host_connection.h 2016-01-14 15:13:04 +0000 |
751 | @@ -53,6 +53,7 @@ |
752 | |
753 | void set_cursor_image(CursorImage const& image) override; |
754 | void hide_cursor() override; |
755 | + auto graphics_platform_library() -> std::string override; |
756 | |
757 | virtual PlatformOperationMessage platform_operation( |
758 | unsigned int op, PlatformOperationMessage const& request) override; |
759 | |
760 | === modified file 'tests/include/mir/test/doubles/stub_host_connection.h' |
761 | --- tests/include/mir/test/doubles/stub_host_connection.h 2015-06-17 05:20:42 +0000 |
762 | +++ tests/include/mir/test/doubles/stub_host_connection.h 2016-01-14 15:13:04 +0000 |
763 | @@ -76,6 +76,8 @@ |
764 | void hide_cursor() |
765 | { |
766 | } |
767 | + |
768 | + auto graphics_platform_library() -> std::string { return {}; } |
769 | }; |
770 | |
771 | |
772 | |
773 | === modified file 'tests/mir_test_framework/platform_graphics_dummy.cpp' |
774 | --- tests/mir_test_framework/platform_graphics_dummy.cpp 2015-11-12 14:21:39 +0000 |
775 | +++ tests/mir_test_framework/platform_graphics_dummy.cpp 2016-01-14 15:13:04 +0000 |
776 | @@ -37,7 +37,8 @@ |
777 | "dummy", |
778 | MIR_VERSION_MAJOR, |
779 | MIR_VERSION_MINOR, |
780 | - MIR_VERSION_MICRO |
781 | + MIR_VERSION_MICRO, |
782 | + "dummy" |
783 | }; |
784 | |
785 | mir::ModuleProperties const* describe_graphics_module() |
786 | |
787 | === modified file 'tests/mir_test_framework/stub_input.cpp' |
788 | --- tests/mir_test_framework/stub_input.cpp 2015-11-25 20:26:59 +0000 |
789 | +++ tests/mir_test_framework/stub_input.cpp 2016-01-14 15:13:04 +0000 |
790 | @@ -20,6 +20,8 @@ |
791 | #include "fake_input_device_impl.h" |
792 | #include "mir/module_properties.h" |
793 | #include "mir/assert_module_entry_point.h" |
794 | +#include "mir/libname.h" |
795 | + |
796 | |
797 | namespace mtf = mir_test_framework; |
798 | namespace mo = mir::options; |
799 | @@ -52,10 +54,11 @@ |
800 | namespace |
801 | { |
802 | mir::ModuleProperties const description = { |
803 | - "stub-input", |
804 | + "mir:stub-input", |
805 | MIR_VERSION_MAJOR, |
806 | MIR_VERSION_MINOR, |
807 | - MIR_VERSION_MICRO |
808 | + MIR_VERSION_MICRO, |
809 | + mir::libname() |
810 | }; |
811 | } |
812 | |
813 | |
814 | === modified file 'tests/mir_test_framework/stubbed_graphics_platform.cpp' |
815 | --- tests/mir_test_framework/stubbed_graphics_platform.cpp 2015-11-12 14:21:39 +0000 |
816 | +++ tests/mir_test_framework/stubbed_graphics_platform.cpp 2016-01-14 15:13:04 +0000 |
817 | @@ -28,6 +28,7 @@ |
818 | #include "mir/fd.h" |
819 | #include "mir/assert_module_entry_point.h" |
820 | #include "mir/test/pipe.h" |
821 | +#include "mir/libname.h" |
822 | |
823 | #ifdef ANDROID |
824 | #include "mir/test/doubles/stub_android_native_buffer.h" |
825 | @@ -50,6 +51,17 @@ |
826 | |
827 | namespace |
828 | { |
829 | +namespace |
830 | +{ |
831 | +mir::ModuleProperties const module_properties = { |
832 | + "mir:stub-graphics", |
833 | + MIR_VERSION_MAJOR, |
834 | + MIR_VERSION_MINOR, |
835 | + MIR_VERSION_MICRO, |
836 | + mir::libname() |
837 | +}; |
838 | +} |
839 | + |
840 | class StubFDBuffer : public mtd::StubBuffer |
841 | { |
842 | public: |
843 | @@ -203,7 +215,7 @@ |
844 | |
845 | std::shared_ptr<mg::PlatformIPCPackage> connection_ipc_package() override |
846 | { |
847 | - auto package = std::make_shared<mg::PlatformIPCPackage>(); |
848 | + auto package = std::make_shared<mg::PlatformIPCPackage>(&module_properties); |
849 | mtf::pack_stub_ipc_package(*package); |
850 | return package; |
851 | } |
FAILED: Continuous integration, rev:3236 jenkins. qa.ubuntu. com/job/ mir-ci/ 5951/ jenkins. qa.ubuntu. com/job/ mir-android- vivid-i386- build/5452/ console jenkins. qa.ubuntu. com/job/ mir-clang- vivid-amd64- build/4359/ console jenkins. qa.ubuntu. com/job/ mir-mediumtests -vivid- touch/5408/ console jenkins. qa.ubuntu. com/job/ mir-xenial- amd64-ci/ 275/console jenkins. qa.ubuntu. com/job/ mir-xenial- i386-ci/ 275/console jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 5405/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- ci/5951/ rebuild
http://