Mir

Merge lp:~alan-griffiths/mir/fix-1716353 into lp:mir

Proposed by Alan Griffiths on 2017-09-11
Status: Merged
Merged at revision: 4251
Proposed branch: lp:~alan-griffiths/mir/fix-1716353
Merge into: lp:mir
Prerequisite: lp:~alan-griffiths/mir/tidy-code
Diff against target: 91 lines (+20/-5)
4 files modified
examples/miral-shell/miral-desktop.sh (+1/-1)
src/server/frontend/wayland/wayland_connector.cpp (+12/-2)
src/server/frontend/wayland/wayland_connector.h (+2/-1)
src/server/frontend/wayland/wayland_default_configuration.cpp (+5/-1)
To merge this branch: bzr merge lp:~alan-griffiths/mir/fix-1716353
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Needs Fixing on 2017-09-15
Gerry Boland Approve on 2017-09-15
Brandon Schaefer (community) 2017-09-11 Approve on 2017-09-15
Review via email: mp+330517@code.launchpad.net

Commit message

Provide XDB_RUNTIME_DIR to wayland in the miral-desktop script and apply --arw-file in WaylandConnector. (LP: #1716353)

To post a comment you must log in.
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4248
https://mir-jenkins.ubuntu.com/job/mir-ci/3652/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4995/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5223/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5211/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5211/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5211/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5034/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5034/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5034/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5034/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5034/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5034/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5034/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5034/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3652/rebuild

review: Needs Fixing (continuous-integration)
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4248
https://mir-jenkins.ubuntu.com/job/mir-ci/3653/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4997/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5225
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5214
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5214
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5214
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5037/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5037/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5037/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5037/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5037/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5037/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5037/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5037/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3653/rebuild

review: Needs Fixing (continuous-integration)
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4248
https://mir-jenkins.ubuntu.com/job/mir-ci/3654/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5000/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5228
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5216
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5216
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5216
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5039/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5039/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5039/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5039/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5039/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5039/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5039/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5039/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3654/rebuild

review: Needs Fixing (continuous-integration)
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4250
https://mir-jenkins.ubuntu.com/job/mir-ci/3659/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5008/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5236
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5224
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5224
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5224
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5047/console
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5047/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5047
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5047/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5047
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5047/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5047/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5047
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5047/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5047
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5047/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5047
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5047/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3659/rebuild

review: Needs Fixing (continuous-integration)
Brandon Schaefer (brandontschaefer) wrote :

lgtm

review: Approve
Gerry Boland (gerboland) wrote :

Yep!

review: Approve
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://mir-jenkins.ubuntu.com/job/mir-autolanding/1422/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5014/console
    None: https://mir-jenkins.ubuntu.com/job/generic-land-mp/1552/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5246
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5234
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5234
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5234
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5057/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5057
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5057/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5057
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5057/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5057
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5057/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5057
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5057/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5057
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5057/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5057
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5057/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5057/console

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/miral-shell/miral-desktop.sh'
2--- examples/miral-shell/miral-desktop.sh 2017-09-06 16:44:12 +0000
3+++ examples/miral-shell/miral-desktop.sh 2017-09-14 11:08:36 +0000
4@@ -35,7 +35,7 @@
5
6 sudo ls >> /dev/null
7 oldvt=$(sudo fgconsole)
8-sudo sh -c "LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ${bindir}${miral_server} --vt ${vt} --arw-file --file ${socket} $*; chvt ${oldvt}"&
9+sudo sh -c "LD_LIBRARY_PATH=${LD_LIBRARY_PATH} XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR} ${bindir}${miral_server} --vt ${vt} --arw-file --file ${socket} $*; chvt ${oldvt}"&
10
11 while [ ! -e "${socket}" ]; do echo "waiting for ${socket}"; sleep 1 ;done
12
13
14=== modified file 'src/server/frontend/wayland/wayland_connector.cpp'
15--- src/server/frontend/wayland/wayland_connector.cpp 2017-09-07 01:27:49 +0000
16+++ src/server/frontend/wayland/wayland_connector.cpp 2017-09-14 11:08:36 +0000
17@@ -61,6 +61,8 @@
18 #include "mir/fd.h"
19 #include "../../../platforms/common/server/shm_buffer.h"
20
21+#include <sys/stat.h>
22+
23 namespace mf = mir::frontend;
24 namespace mg = mir::graphics;
25 namespace mc = mir::compositor;
26@@ -1680,7 +1682,8 @@
27 mf::WaylandConnector::WaylandConnector(
28 std::shared_ptr<mf::Shell> const& shell,
29 DisplayChanger& display_config,
30- std::shared_ptr<mg::GraphicBufferAllocator> const& allocator)
31+ std::shared_ptr<mg::GraphicBufferAllocator> const& allocator,
32+ bool arw_socket)
33 : display{wl_display_create(), &cleanup_display},
34 pause_signal{eventfd(0, EFD_CLOEXEC | EFD_SEMAPHORE)},
35 allocator{std::dynamic_pointer_cast<mg::WaylandAllocator>(allocator)}
36@@ -1730,7 +1733,14 @@
37 mir::log_warning("No WaylandAllocator EGL support!");
38 }
39
40- wl_display_add_socket_auto(display.get());
41+ if (auto const wayland_display = wl_display_add_socket_auto(display.get()))
42+ {
43+ if (arw_socket)
44+ {
45+ chmod((std::string{getenv("XDG_RUNTIME_DIR")} + "/" + wayland_display).c_str(),
46+ S_IRUSR|S_IWUSR| S_IRGRP|S_IWGRP | S_IROTH|S_IWOTH);
47+ };
48+ }
49
50 auto wayland_loop = wl_display_get_event_loop(display.get());
51
52
53=== modified file 'src/server/frontend/wayland/wayland_connector.h'
54--- src/server/frontend/wayland/wayland_connector.h 2017-09-03 23:01:07 +0000
55+++ src/server/frontend/wayland/wayland_connector.h 2017-09-14 11:08:36 +0000
56@@ -52,7 +52,8 @@
57 WaylandConnector(
58 std::shared_ptr<Shell> const& shell,
59 DisplayChanger& display_config,
60- std::shared_ptr<graphics::GraphicBufferAllocator> const& allocator);
61+ std::shared_ptr<graphics::GraphicBufferAllocator> const& allocator,
62+ bool arw_socket);
63
64 ~WaylandConnector() override;
65
66
67=== modified file 'src/server/frontend/wayland/wayland_default_configuration.cpp'
68--- src/server/frontend/wayland/wayland_default_configuration.cpp 2017-09-07 16:40:01 +0000
69+++ src/server/frontend/wayland/wayland_default_configuration.cpp 2017-09-14 11:08:36 +0000
70@@ -21,6 +21,7 @@
71
72 #include "mir/frontend/display_changer.h"
73 #include "mir/graphics/platform.h"
74+#include "mir/options/default_configuration.h"
75
76 namespace mf = mir::frontend;
77
78@@ -30,10 +31,13 @@
79 return wayland_connector(
80 [this]() -> std::shared_ptr<mf::Connector>
81 {
82+ bool const arw_socket = the_options()->is_set(options::arw_server_socket_opt);
83+
84 return std::make_shared<mf::WaylandConnector>(
85 the_frontend_shell(),
86 *the_frontend_display_changer(),
87- the_buffer_allocator());
88+ the_buffer_allocator(),
89+ arw_socket);
90 });
91 }
92

Subscribers

People subscribed via source and target branches