Merge lp:~brandontschaefer/libertine/fix-dbus-host-socket-path-finding into lp:libertine

Proposed by Brandon Schaefer
Status: Merged
Approved by: Christopher Townsend
Approved revision: 278
Merged at revision: 278
Proposed branch: lp:~brandontschaefer/libertine/fix-dbus-host-socket-path-finding
Merge into: lp:libertine
Diff against target: 26 lines (+7/-4)
1 file modified
tools/libertine-session-bridge (+7/-4)
To merge this branch: bzr merge lp:~brandontschaefer/libertine/fix-dbus-host-socket-path-finding
Reviewer Review Type Date Requested Status
Libertine CI Bot continuous-integration Approve
Larry Price Approve
Review via email: mp+301957@code.launchpad.net

Commit message

Update our dbus session socket path to allow for the new session bus address. While still supporting the older way.

Description of the change

With a new update (somewhere in dbus) it has made it so the session path is:
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus

We had the assumption that it would be an abstract path such as:
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-CxmUcGN4O3

This assumption failed with the new way (since we looked for the abstract keyword). This branch adds support for both ways of the path as we need to support this in vivid/yakkety.

To post a comment you must log in.
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

PASSED: Continuous integration, rev:278
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/68/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/237
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=default/194
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/194
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=default/194
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=vivid+overlay,testname=default/194
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/194
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=yakkety,testname=default/194
    None: https://jenkins.canonical.com/libertine/job/lp-generic-update-mp/180/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/240
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=vivid+overlay/225
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=xenial+overlay/225
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=yakkety/225
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/218
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/218/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/218
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/218/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=yakkety/218
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=yakkety/218/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/218
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/218/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/218
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/218/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=yakkety/218
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=yakkety/218/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/68/rebuild

review: Approve (continuous-integration)
Revision history for this message
Larry Price (larryprice) wrote :

lgtm!

review: Approve
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://jenkins.canonical.com/libertine/job/lp-libertine-autoland/29/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/243
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=default/198
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/198
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=default/198
    FAILURE: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=vivid+overlay,testname=default/198/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/198
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=yakkety,testname=default/198
    None: https://jenkins.canonical.com/libertine/job/lp-generic-land-mp/53/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/246
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=vivid+overlay/231
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=xenial+overlay/231
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=yakkety/231
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/224
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/224/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/224
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/224/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=yakkety/224
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=yakkety/224/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/224
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/224/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/224
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/224/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=yakkety/224
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=yakkety/224/artifact/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Revision history for this message
Libertine CI Bot (libertine-ci-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tools/libertine-session-bridge'
2--- tools/libertine-session-bridge 2016-07-08 00:11:51 +0000
3+++ tools/libertine-session-bridge 2016-08-03 20:14:27 +0000
4@@ -79,16 +79,19 @@
5
6
7 def get_host_dbus_socket():
8- socket_key = "DBUS_SESSION_BUS_ADDRESS=unix:abstract="
9+ host_dbus_socket = ''
10
11 with open(os.path.join(libertine.utils.get_user_runtime_dir(), 'dbus-session'), 'r') as fd:
12 dbus_session_str = fd.read()
13
14 fd.close()
15
16- host_dbus_socket = dbus_session_str.partition(socket_key)[2]
17- host_dbus_socket = host_dbus_socket.rstrip('\n')
18- host_dbus_socket = "\0%s" % host_dbus_socket
19+ dbus_session_split = dbus_session_str.rsplit('=', 1)
20+ if len(dbus_session_split) > 1:
21+ host_dbus_socket = dbus_session_split[1].rstrip('\n')
22+ # We need to add a \0 to the start of an abstract socket path to connect to it
23+ if dbus_session_str.find('abstract') >= 0:
24+ host_dbus_socket = "\0%s" % host_dbus_socket
25
26 return host_dbus_socket
27

Subscribers

People subscribed via source and target branches