Merge lp:~larryprice/libertine/lxd into lp:libertine

Proposed by Larry Price
Status: Merged
Approved by: Christopher Townsend
Approved revision: 366
Merged at revision: 351
Proposed branch: lp:~larryprice/libertine/lxd
Merge into: lp:libertine
Diff against target: 862 lines (+520/-88)
16 files modified
.bzrignore (+1/-0)
common/ContainerConfigList.h (+1/-2)
data/CMakeLists.txt (+1/-1)
data/libertine-lxd-sudo (+1/-0)
debian/control (+15/-0)
debian/python3-libertine-lxd.install (+3/-0)
liblibertine/libertine.cpp (+41/-26)
python/libertine/ChrootContainer.py (+1/-2)
python/libertine/HostInfo.py (+5/-0)
python/libertine/Libertine.py (+28/-31)
python/libertine/LxcContainer.py (+4/-20)
python/libertine/LxdContainer.py (+375/-0)
tests/unit/test_libertine_gir.py (+2/-4)
tools/CMakeLists.txt (+1/-1)
tools/libertine-container-manager (+1/-1)
tools/libertine-lxd-setup (+40/-0)
To merge this branch: bzr merge lp:~larryprice/libertine/lxd
Reviewer Review Type Date Requested Status
Christopher Townsend Approve
Libertine CI Bot continuous-integration Approve
Review via email: mp+311980@code.launchpad.net

Commit message

Initial implementation of lxd backend.

Description of the change

Initial implementation of lxd backend.

Known limitations include:

* Writing to the bind-mounted XDG directories (waiting on a new feature in the lxc cli to land)
* Stopping container when no applications or operations are running (evaluating necessity, waiting for verification of d-bus functionality within snappy)

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

FAILED: Continuous integration, rev:333
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/237/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/libertine/job/build/496/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/498
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/478
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/478/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/478/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/478
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/478/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/478
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/478/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/478/console
    FAILURE: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/478/console

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

review: Needs Fixing (continuous-integration)
lp:~larryprice/libertine/lxd updated
334. By Larry Price

use built-in method to get type

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

PASSED: Continuous integration, rev:334
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/239/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/498
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=default/393
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/393
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/393
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=vivid+overlay,testname=default/393
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/393
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/393
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/507
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/491
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/491/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/491
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/491/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/491
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/491/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/491
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/491/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/491
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/491/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/491
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/491/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

debian/python3-libertine-chroot.click-hook should not be under version control. It is created at package build time.

Revision history for this message
Larry Price (larryprice) wrote :

> debian/python3-libertine-chroot.click-hook should not be under version
> control. It is created at package build time.

My bad, I must have done a bzr add debian on accident. I might add that to .bzrignore shortly.

lp:~larryprice/libertine/lxd updated
335. By Larry Price

Devices map update should really be a complete refresh

336. By Larry Price

click-hook should not have been committed

337. By Larry Price

ignore click-hooks

338. By Larry Price

merge

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

PASSED: Continuous integration, rev:337
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/246/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/513
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=default/406
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/406
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/406
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=vivid+overlay,testname=default/406
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/406
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/406
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/523
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/507
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/507/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/507
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/507/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/507
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/507/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/507
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/507/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/507
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/507/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/507
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/507/artifact/output/*zip*/output.zip

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

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

PASSED: Continuous integration, rev:338
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/247/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/515
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=default/408
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/408
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/408
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=vivid+overlay,testname=default/408
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/408
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/408
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/525
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/509
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/509/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/509
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/509/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/509
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/509/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/509
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/509/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/509
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/509/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/509
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/509/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

As discussed on irc, the need to run 'lxc init' and anything else needed to get an LXD container up and running needs to be "automated" so that a user does not have to drop into a terminal and run things. Not only would this make it more user friendly, but if a user is using the Libertine Manager GUI, they would have a very poor user experience.

Perhaps doing something similar to what we do for LXC's would be a good first step, ie, the sudoers file.

Revision history for this message
Larry Price (larryprice) wrote :

> As discussed on irc, the need to run 'lxc init' and anything else needed to
> get an LXD container up and running needs to be "automated" so that a user
> does not have to drop into a terminal and run things. Not only would this
> make it more user friendly, but if a user is using the Libertine Manager GUI,
> they would have a very poor user experience.
>
> Perhaps doing something similar to what we do for LXC's would be a good first
> step, ie, the sudoers file.

Agreed - I plan on looking into that later today or tomorrow. I'll also be merging in some necessary changes I discovered while snapping.

lp:~larryprice/libertine/lxd updated
339. By Larry Price

merge

340. By Larry Price

Changes from snap development

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

PASSED: Continuous integration, rev:340
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/251/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/520
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=default/412
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/412
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/412
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=vivid+overlay,testname=default/412
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/412
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/412
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/530
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/513
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/513/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/513
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/513/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/513
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/513/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/513
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/513/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/513
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/513/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/513
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/513/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~larryprice/libertine/lxd updated
341. By Larry Price

setup for lxd

342. By Larry Price

second draft of init script

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

PASSED: Continuous integration, rev:342
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/255/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/525
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=default/417
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/417
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/417
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=vivid+overlay,testname=default/417
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/417
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/417
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/535
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/518
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/518/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/518
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/518/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/518
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/518/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/518
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/518/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/518
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/518/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/518
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/518/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~larryprice/libertine/lxd updated
343. By Larry Price

Use pexpect to run through defaults of lxd

344. By Larry Price

Merge

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

PASSED: Continuous integration, rev:344
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/258/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/557
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/448
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/448
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/448
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/448
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/567
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/549
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/549/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/549
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/549/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/549
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/549/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/549
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/549/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~larryprice/libertine/lxd updated
345. By Larry Price

add newline back in

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

PASSED: Continuous integration, rev:345
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/259/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/558
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/449
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/449
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/449
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/449
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/568
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/550
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/550/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/550
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/550/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/550
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/550/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/550
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/550/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~larryprice/libertine/lxd updated
346. By Larry Price

idmap updates for writing to user home directory

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

PASSED: Continuous integration, rev:346
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/263/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/562
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/452
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/452
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/452
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/452
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/572
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/554
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/554/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/554
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/554/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/554
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/554/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/554
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/554/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~larryprice/libertine/lxd updated
347. By Larry Price

did not need the usermod

348. By Larry Price

Many updates found to help fix initialization and work on xenial

349. By Larry Price

Create .config/lxc and make sure it has the right permissions

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

PASSED: Continuous integration, rev:349
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/264/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/563
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/453
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/453
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/453
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/453
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/573
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/555
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/555/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/555
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/555/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/555
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/555/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/555
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/555/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~larryprice/libertine/lxd updated
350. By Larry Price

Check that a username argument is given at the top of the setup file

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

PASSED: Continuous integration, rev:350
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/265/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/564
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/454
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/454
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/454
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/454
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/574
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/556
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/556/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/556
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/556/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/556
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/556/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/556
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/556/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~larryprice/libertine/lxd updated
351. By Larry Price

modifying groups and info instead of debug

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

PASSED: Continuous integration, rev:351
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/266/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/565
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/455
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/455
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/455
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/455
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/575
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/557
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/557/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/557
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/557/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/557
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/557/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/557
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/557/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~larryprice/libertine/lxd updated
352. By Larry Price

fix terminal getting eaten

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

PASSED: Continuous integration, rev:352
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/270/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/569
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/458
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/458
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/458
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/458
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/579
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/561
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/561/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/561
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/561/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/561
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/561/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/561
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/561/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~larryprice/libertine/lxd updated
353. By Larry Price

need exception var

354. By Larry Price

app wait works just as well...

355. By Larry Price

wait for window manager to die before opening app

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

PASSED: Continuous integration, rev:355
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/272/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/572
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/461
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/461
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/461
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/461
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/582
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/564
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/564/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/564
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/564/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/564
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/564/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/564
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/564/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~larryprice/libertine/lxd updated
356. By Larry Price

chown home dir

357. By Larry Price

ugly bind-mount fixer-upper

358. By Larry Price

merge

359. By Larry Price

accidentally changed useradd command

360. By Larry Price

fix service based on real life

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

PASSED: Continuous integration, rev:360
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/273/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/573
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/462
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/462
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/462
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/462
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/583
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/565
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/565/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/565
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/565/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/565
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/565/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/565
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/565/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~larryprice/libertine/lxd updated
361. By Larry Price

up sleep time slightly

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

PASSED: Continuous integration, rev:361
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/274/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/574
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/463
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/463
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/463
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/463
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/584
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/566
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/566/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/566
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/566/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/566
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/566/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/566
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/566/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~larryprice/libertine/lxd updated
362. By Larry Price

merge

363. By Larry Price

User needs the audio and video groups, and mounts need to have correct group permissions

364. By Larry Price

forget about PULSE?

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

PASSED: Continuous integration, rev:364
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/276/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/576
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/464
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/464
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/464
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/464
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/586
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/568
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/568/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/568
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/568/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/568
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/568/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/568
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/568/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~larryprice/libertine/lxd updated
365. By Larry Price

fixes for matchbox not closing in xenial

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

PASSED: Continuous integration, rev:365
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/277/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/577
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/465
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/465
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/465
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/465
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/587
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/569
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/569/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/569
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/569/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/569
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/569/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/569
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/569/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
lp:~larryprice/libertine/lxd updated
366. By Larry Price

ensure correct PATH and add slight time delay for matchbox

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

PASSED: Continuous integration, rev:366
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/278/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/578
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/466
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=zesty,testname=default/466
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/466
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=zesty,testname=default/466
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/588
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/570
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/570/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/570
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=zesty/570/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/570
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/570/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/570
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=zesty/570/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

Ok, I think this is in good enough shape to merge into devel. Let's flesh it out a bit more in devel before releasing in lp:libertine/trunk.

Good work!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2016-11-29 20:38:41 +0000
+++ .bzrignore 2016-12-15 21:01:30 +0000
@@ -2,6 +2,7 @@
2po/Makefile.in.in2po/Makefile.in.in
3__pycache__3__pycache__
4tests/unit/.cache4tests/unit/.cache
5*.click-hook
56
6prime/7prime/
7stage/8stage/
89
=== modified file 'common/ContainerConfigList.h'
--- common/ContainerConfigList.h 2016-09-26 18:17:07 +0000
+++ common/ContainerConfigList.h 2016-12-15 21:01:30 +0000
@@ -55,11 +55,10 @@
55 * Display roles for a container config.55 * Display roles for a container config.
56 */56 */
57 enum class DataRole57 enum class DataRole
58 : int
59 {58 {
60 ContainerId = Qt::UserRole + 1, /**< The container ID */59 ContainerId = Qt::UserRole + 1, /**< The container ID */
61 ContainerName, /**< The container name */60 ContainerName, /**< The container name */
62 ContainerType, /**< The type of container - lxc or chroot */61 ContainerType, /**< The type of container */
63 DistroSeries, /**< The distro from which the container was built */62 DistroSeries, /**< The distro from which the container was built */
64 InstallStatus, /**< Current container install status */63 InstallStatus, /**< Current container install status */
65 Error /**< last role (error) */64 Error /**< last role (error) */
6665
=== modified file 'data/CMakeLists.txt'
--- data/CMakeLists.txt 2016-12-06 20:52:55 +0000
+++ data/CMakeLists.txt 2016-12-15 21:01:30 +0000
@@ -6,7 +6,7 @@
6 DESTINATION ${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME})6 DESTINATION ${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME})
7install(FILES libertine-xmir.conf7install(FILES libertine-xmir.conf
8 DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions)8 DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions)
9install(FILES libertine-lxc-sudo9install(FILES libertine-lxc-sudo libertine-lxd-sudo
10 DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/sudoers.d)10 DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/sudoers.d)
11install(FILES com.canonical.libertine.LxcManager.service com.canonical.libertine.ContainerManager.service11install(FILES com.canonical.libertine.LxcManager.service com.canonical.libertine.ContainerManager.service
12 DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/services)12 DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/services)
1313
=== added file 'data/libertine-lxd-sudo'
--- data/libertine-lxd-sudo 1970-01-01 00:00:00 +0000
+++ data/libertine-lxd-sudo 2016-12-15 21:01:30 +0000
@@ -0,0 +1,1 @@
1ALL ALL=(ALL) NOPASSWD:/usr/bin/libertine-lxd-setup
02
=== modified file 'debian/control'
--- debian/control 2016-12-06 21:55:36 +0000
+++ debian/control 2016-12-15 21:01:30 +0000
@@ -182,6 +182,21 @@
182 Libertine sandbox. It requires support for unprivileged LXC containers in the182 Libertine sandbox. It requires support for unprivileged LXC containers in the
183 Linux kernel.183 Linux kernel.
184184
185Package: python3-libertine-lxd
186Architecture: any
187Section: python
188Multi-Arch: allowed
189Depends: lxd,
190 python3-libertine,
191 python3-pexpect,
192 python3-pylxd,
193 ${misc:Depends},
194 ${python3:Depends}
195Description: Python3 scripts for the Libertine application sandbox
196 This package provides the LXD-based container back end module for the
197 Libertine sandbox. It requires support for unprivileged LXD containers in the
198 Linux kernel.
199
185Package: python3-libertine-chroot200Package: python3-libertine-chroot
186Architecture: any201Architecture: any
187Section: python202Section: python
188203
=== added file 'debian/python3-libertine-lxd.install'
--- debian/python3-libertine-lxd.install 1970-01-01 00:00:00 +0000
+++ debian/python3-libertine-lxd.install 2016-12-15 21:01:30 +0000
@@ -0,0 +1,3 @@
1etc/sudoers.d/libertine-lxd-sudo
2usr/lib/python*/*/libertine/LxdContainer.py
3usr/bin/libertine-lxd-setup
04
=== modified file 'liblibertine/libertine.cpp'
--- liblibertine/libertine.cpp 2016-10-26 13:58:19 +0000
+++ liblibertine/libertine.cpp 2016-12-15 21:01:30 +0000
@@ -67,8 +67,16 @@
67 g_dir_close(dir);67 g_dir_close(dir);
68 return nullptr;68 return nullptr;
69}69}
70}70
7171
72gchar*
73id_from_list_index(const ContainerConfigList& container_list, guint index)
74{
75 return (gchar*)container_list.data(container_list.index(index, 0),
76 (int)ContainerConfigList::DataRole::ContainerId)
77 .toString().toStdString().c_str();
78}
79}
7280
73gchar**81gchar**
74libertine_list_apps_for_container(const gchar* container_id)82libertine_list_apps_for_container(const gchar* container_id)
@@ -137,61 +145,68 @@
137gchar *145gchar *
138libertine_container_path(const gchar * container_id)146libertine_container_path(const gchar * container_id)
139{147{
148 g_return_val_if_fail(container_id != nullptr, nullptr);
149 LibertineConfig config;
150 ContainerConfigList container_list(&config);
140 gchar * path = nullptr;151 gchar * path = nullptr;
141 g_return_val_if_fail(container_id != nullptr, nullptr);
142152
143 path = g_build_filename(g_get_user_cache_dir(), "libertine-container", container_id, "rootfs", nullptr);153 if (g_strcmp0((gchar*)container_list.getContainerType(container_id).toStdString().c_str(), "lxd") == 0)
154 {
155 path = g_build_filename("/", "var", "lib", "lxd", "containers", container_id, "rootfs", nullptr);
156 }
157 else
158 {
159 path = g_build_filename(g_get_user_cache_dir(), "libertine-container", container_id, "rootfs", nullptr);
160 }
144161
145 if (g_file_test(path, G_FILE_TEST_EXISTS))162 if (g_file_test(path, G_FILE_TEST_EXISTS))
146 {163 {
147 return path;164 return path;
148 }165 }
149 else166
150 {167 g_free(path);
151 g_free(path);168 return nullptr;
152 return nullptr;
153 }
154}169}
155170
156171
157gchar *172gchar *
158libertine_container_home_path(const gchar * container_id)173libertine_container_home_path(const gchar * container_id)
159{174{
175 g_return_val_if_fail(container_id != nullptr, nullptr);
176 LibertineConfig config;
177 ContainerConfigList container_list(&config);
160 gchar * path = nullptr;178 gchar * path = nullptr;
161 g_return_val_if_fail(container_id != nullptr, nullptr);
162179
163 path = g_build_filename(g_get_user_data_dir(), "libertine-container", "user-data", container_id, nullptr);180 if (g_strcmp0((gchar*)container_list.getContainerType(container_id).toStdString().c_str(), "lxd") == 0)
181 {
182 path = g_build_filename("/", "var", "lib", "lxd", "containers", container_id, "rootfs", "home", g_get_user_name(), nullptr);
183 }
184 else
185 {
186 path = g_build_filename(g_get_user_data_dir(), "libertine-container", "user-data", container_id, nullptr);
187 }
164188
165 if (g_file_test(path, G_FILE_TEST_EXISTS))189 if (g_file_test(path, G_FILE_TEST_EXISTS))
166 {190 {
167 return path;191 return path;
168 }192 }
169 else
170 {
171 g_free(path);
172 return nullptr;
173 }
174193
194 g_free(path);
195 return nullptr;
175}196}
176197
177198
178gchar *199gchar *
179libertine_container_name(const gchar * container_id)200libertine_container_name(const gchar * container_id)
180{201{
181 guint container_count;
182 guint i;
183 gchar * container_name = nullptr;202 gchar * container_name = nullptr;
184 LibertineConfig config;203 LibertineConfig config;
185 ContainerConfigList container_list(&config);204 ContainerConfigList container_list(&config);
186 QVariant id;205 guint container_count = (guint)container_list.size();
187206
188 container_count = (guint)container_list.size();207 for (guint i = 0; i < container_count; ++i)
189
190 for (i = 0; i < container_count; ++i)
191 {208 {
192 id = container_list.data(container_list.index(i, 0), (int)ContainerConfigList::DataRole::ContainerId);209 if (g_strcmp0(id_from_list_index(container_list, i), container_id) == 0)
193
194 if (g_strcmp0((gchar *)id.toString().toStdString().c_str(), container_id) == 0)
195 {210 {
196 QVariant name = container_list.data(container_list.index(i, 0), (int)ContainerConfigList::DataRole::ContainerName);211 QVariant name = container_list.data(container_list.index(i, 0), (int)ContainerConfigList::DataRole::ContainerName);
197 container_name = g_strdup(name.toString().toStdString().c_str());212 container_name = g_strdup(name.toString().toStdString().c_str());
198213
=== modified file 'python/libertine/ChrootContainer.py'
--- python/libertine/ChrootContainer.py 2016-12-02 17:46:47 +0000
+++ python/libertine/ChrootContainer.py 2016-12-15 21:01:30 +0000
@@ -233,8 +233,7 @@
233233
234 args = shlex.split(proot_cmd)234 args = shlex.split(proot_cmd)
235 args.extend(app_exec_line)235 args.extend(app_exec_line)
236 app = psutil.Popen(args, env=environ)236 return psutil.Popen(args, env=environ)
237 return app
238237
239 def finish_application(self, app):238 def finish_application(self, app):
240 utils.terminate_window_manager(self._window_manager)239 utils.terminate_window_manager(self._window_manager)
241240
=== modified file 'python/libertine/HostInfo.py'
--- python/libertine/HostInfo.py 2016-10-28 18:11:12 +0000
+++ python/libertine/HostInfo.py 2016-12-15 21:01:30 +0000
@@ -13,6 +13,7 @@
13# with this program. If not, see <http://www.gnu.org/licenses/>.13# with this program. If not, see <http://www.gnu.org/licenses/>.
1414
15import lsb_release15import lsb_release
16import os
16import platform17import platform
17import subprocess18import subprocess
1819
@@ -69,3 +70,7 @@
69 parser.error("Failed to determine the local architecture.")70 parser.error("Failed to determine the local architecture.")
7071
71 return dpkg.stdout.read().strip()72 return dpkg.stdout.read().strip()
73
74 def get_host_timezone(self):
75 with open(os.path.join('/', 'etc', 'timezone'), 'r') as fd:
76 return fd.read().strip('\n')
7277
=== modified file 'python/libertine/Libertine.py'
--- python/libertine/Libertine.py 2016-11-16 17:58:38 +0000
+++ python/libertine/Libertine.py 2016-12-15 21:01:30 +0000
@@ -1,4 +1,4 @@
1# Copyright 2015-2106 Canonical Ltd.1# Copyright 2015-2016 Canonical Ltd.
2#2#
3# This program is free software: you can redistribute it and/or modify it3# This program is free software: you can redistribute it and/or modify it
4# under the terms of the GNU General Public License version 3, as published4# under the terms of the GNU General Public License version 3, as published
@@ -98,35 +98,27 @@
98 def destroy_libertine_container(self, verbosity=1):98 def destroy_libertine_container(self, verbosity=1):
99 pass99 pass
100100
101 def copy_package_to_container(self, package_path):101 def copy_file_to_container(self, source, dest):
102 """102 """
103 Copies a Debian package from the host to a pre-determined place103 Copies a file from the host to the given path in the container.
104 in a container.
105104
106 :param package_path: The full path to the Debian package located105 :param source: The full path to the file on the host.
107 on the host.106 :param dest: The relative path to the file in the container without
107 the root path.
108 """108 """
109 if os.path.exists(os.path.join(self.root_path, 'tmp', package_path.split('/')[-1])):109 if os.path.exists(os.path.join(self.root_path, dest)):
110 return False110 return False
111111
112 shutil.copy2(package_path, os.path.join(self.root_path, 'tmp'))112 shutil.copy2(source, os.path.join(self.root_path, dest.lstrip('/')))
113 return True113 return True
114114
115 def delete_package_in_container(self, package_path):115 def delete_file_in_container(self, path):
116 """116 """
117 Deletes a previously copied in Debian package in a container.117 Deletes a file within the container.
118118
119 :param package_path: The full path to the Debian package located119 :param path: The path to the file without the container root path.
120 on the host.120 """
121 """121 os.remove(os.path.join(self.root_path, path.lstrip('/')))
122 os.remove(os.path.join(self.root_path, 'tmp', package_path.split('/')[-1]))
123
124 def is_running(self):
125 """
126 Indicates if the container is 'running'. The definition of 'running'
127 depends on the type of the container.
128 """
129 return False
130122
131 def start_container(self):123 def start_container(self):
132 """124 """
@@ -180,16 +172,18 @@
180 self.update_apt_cache(verbosity)172 self.update_apt_cache(verbosity)
181173
182 if package_name.endswith('.deb'):174 if package_name.endswith('.deb'):
183 delete_package = self.copy_package_to_container(package_name)175 if not os.path.exists(package_name):
184176 utils.get_logger().error("File {} does not exist.".format(package_name))
185 self.run_in_container('ls -la ' + os.environ['HOME'])177 return False
186 self.run_in_container('dpkg -i ' +178
187 os.path.join('/', 'tmp', package_name.split('/')[-1]))179 dest = os.path.join('/', 'tmp', package_name.split('/')[-1])
188180 file_created = self.copy_file_to_container(package_name, dest)
181
182 self.run_in_container('dpkg -i {}'.format(dest))
189 ret = self.run_in_container(apt_command_prefix(verbosity) + " install -f") == 0183 ret = self.run_in_container(apt_command_prefix(verbosity) + " install -f") == 0
190184
191 if delete_package:185 if file_created:
192 self.delete_package_in_container(package_name)186 self.delete_file_in_container(dest)
193187
194 return ret188 return ret
195 else:189 else:
@@ -335,6 +329,9 @@
335 if container_type == "lxc":329 if container_type == "lxc":
336 from libertine.LxcContainer import LibertineLXC330 from libertine.LxcContainer import LibertineLXC
337 self.container = LibertineLXC(container_id)331 self.container = LibertineLXC(container_id)
332 elif container_type == "lxd":
333 from libertine.LxdContainer import LibertineLXD
334 self.container = LibertineLXD(container_id, self.containers_config)
338 elif container_type == "chroot":335 elif container_type == "chroot":
339 from libertine.ChrootContainer import LibertineChroot336 from libertine.ChrootContainer import LibertineChroot
340 self.container = LibertineChroot(container_id)337 self.container = LibertineChroot(container_id)
341338
=== modified file 'python/libertine/LxcContainer.py'
--- python/libertine/LxcContainer.py 2016-11-16 17:33:42 +0000
+++ python/libertine/LxcContainer.py 2016-12-15 21:01:30 +0000
@@ -24,7 +24,7 @@
24import tempfile24import tempfile
2525
26from .Libertine import BaseContainer26from .Libertine import BaseContainer
27from . import utils27from . import utils, HostInfo
2828
2929
30home_path = os.environ['HOME']30home_path = os.environ['HOME']
@@ -96,13 +96,6 @@
96 container.stop()96 container.stop()
9797
9898
99def get_host_timezone():
100 with open(os.path.join('/', 'etc', 'timezone'), 'r') as fd:
101 host_timezone = fd.read().strip('\n')
102
103 return host_timezone
104
105
106class EnvLxcSettings(contextlib.ExitStack):99class EnvLxcSettings(contextlib.ExitStack):
107 """100 """
108 Helper object providing a way to set the proxies for testing101 Helper object providing a way to set the proxies for testing
@@ -140,6 +133,7 @@
140 self._set_lxc_log()133 self._set_lxc_log()
141 self.lxc_manager_interface = None134 self.lxc_manager_interface = None
142 self.window_manager = None135 self.window_manager = None
136 self.host_info = HostInfo.HostInfo()
143137
144 utils.set_session_dbus_env_var()138 utils.set_session_dbus_env_var()
145139
@@ -150,19 +144,9 @@
150 except dbus.exceptions.DBusException:144 except dbus.exceptions.DBusException:
151 pass145 pass
152146
153 def is_running(self):
154 return self.container.running
155
156 def timezone_needs_update(self):147 def timezone_needs_update(self):
157 host_timezone = get_host_timezone()
158
159 with open(os.path.join(self.root_path, 'etc', 'timezone'), 'r') as fd:148 with open(os.path.join(self.root_path, 'etc', 'timezone'), 'r') as fd:
160 container_timezone = fd.read().strip('\n')149 return fd.read().strip('\n') != self.host_info.get_host_timezone()
161
162 if host_timezone == container_timezone:
163 return False
164 else:
165 return True
166150
167 def start_container(self):151 def start_container(self):
168 if self.lxc_manager_interface:152 if self.lxc_manager_interface:
@@ -192,7 +176,7 @@
192 def update_packages(self, verbosity=1):176 def update_packages(self, verbosity=1):
193 if self.timezone_needs_update():177 if self.timezone_needs_update():
194 self.run_in_container("bash -c \'echo \"{}\" >/etc/timezone\'".format(178 self.run_in_container("bash -c \'echo \"{}\" >/etc/timezone\'".format(
195 get_host_timezone()))179 self.host_info.get_host_timezone()))
196 self.run_in_container("rm -f /etc/localtime")180 self.run_in_container("rm -f /etc/localtime")
197 self.run_in_container("dpkg-reconfigure -f noninteractive tzdata")181 self.run_in_container("dpkg-reconfigure -f noninteractive tzdata")
198182
199183
=== added file 'python/libertine/LxdContainer.py'
--- python/libertine/LxdContainer.py 1970-01-01 00:00:00 +0000
+++ python/libertine/LxdContainer.py 2016-12-15 21:01:30 +0000
@@ -0,0 +1,375 @@
1# Copyright 2016 Canonical Ltd.
2#
3# This program is free software: you can redistribute it and/or modify it
4# under the terms of the GNU General Public License version 3, as published
5# by the Free Software Foundation.
6#
7# This program is distributed in the hope that it will be useful, but
8# WITHOUT ANY WARRANTY; without even the implied warranties of
9# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
10# PURPOSE. See the GNU General Public License for more details.
11#
12# You should have received a copy of the GNU General Public License along
13# with this program. If not, see <http://www.gnu.org/licenses/>.
14
15import crypt
16import os
17import psutil
18import pylxd
19import shlex
20import subprocess
21import time
22from libertine import Libertine, utils, HostInfo
23
24
25def _get_devices_map():
26 devices = {
27 '/dev/tty0': {'path': '/dev/tty0', 'type': 'unix-char'},
28 '/dev/tty7': {'path': '/dev/tty7', 'type': 'unix-char'},
29 '/dev/tty8': {'path': '/dev/tty8', 'type': 'unix-char'},
30 '/dev/fb0': {'path': '/dev/fb0', 'type': 'unix-char'},
31 'x11-socket': {'source': '/tmp/.X11-unix', 'path': '/tmp/.X11-unix', 'type': 'disk', 'optional': 'true'},
32 }
33
34 if os.path.exists('/dev/video0'):
35 devices['/dev/video0'] = {'path': '/dev/video0', 'type': 'unix-char'}
36
37 # every regular file in /dev/snd
38 for f in ['/dev/snd/{}'.format(f) for f in os.listdir('/dev/snd') if not os.path.isdir('/dev/snd/{}'.format(f))]:
39 devices[f] = {'path': f, 'type': 'unix-char'}
40
41 # every regular file in /dev/dri
42 for f in ['/dev/dri/{}'.format(f) for f in os.listdir('/dev/dri') if not os.path.isdir('/dev/dri/{}'.format(f))]:
43 devices[f] = {'path': f, 'type': 'unix-char'}
44
45 # Some devices require special mappings for snap
46 if utils.is_snap_environment():
47 devices['x11-socket']['source'] = '/var/lib/snapd/hostfs/tmp/.X11-unix'
48
49 return devices
50
51def _readlink(source):
52 while os.path.islink(source):
53 new_source = os.readlink(source)
54 if not os.path.isabs(new_source):
55 new_source = os.path.join(os.path.dirname(source), new_source)
56 source = new_source
57
58 return source
59
60def _setup_lxd():
61 import pexpect
62 child = pexpect.spawnu('sudo libertine-lxd-setup {}'.format(os.environ['USER']), env={'TERM': 'dumb'})
63
64 while True:
65 index = child.expect(['.+\[default=.+\].*', pexpect.EOF, pexpect.TIMEOUT,
66 # The following are required for lxd=2.0.x
67 '.+\[yes/no\].*',
68 '.+\(e.g. (?P<example>[a-z0-9\.:]+)\).+'])
69 if index == 0:
70 child.sendline()
71 elif index == 1:
72 return True
73 elif index == 2:
74 return False
75 elif index == 3:
76 child.sendline('yes')
77 elif index == 4:
78 child.sendline(child.match.group('example'))
79
80 if child.exitstatus is not None:
81 return child.exitstatus == 0
82
83
84def _setup_bind_mount_service(container, uid, username):
85 utils.get_logger().info("Creating systemd mount override service")
86 service = '''
87[Unit]
88Description=Fix system mounts for libertine
89
90[Service]
91ExecStart=/usr/bin/libertine-lxd-mount-update
92
93[Install]
94WantedBy=multi-user.target
95'''[1:-1]
96 container.files.put('/etc/systemd/system/libertine-lxd-mount-update.service', service.encode('utf-8'))
97
98 utils.get_logger().info("Creating mount update shell script")
99 script = '''
100#!/bin/sh
101
102mkdir -p /run/user/{uid}
103chown {username}:{username} /run/user/{uid}
104mount -o bind /var/tmp/run/user/{uid} /run/user/{uid}
105
106chgrp audio /dev/snd/*
107chgrp video /dev/dri/*
108[ -n /dev/video0 ] && chgrp video /dev/video0
109'''[1:-1]
110 container.files.put('/usr/bin/libertine-lxd-mount-update', script.format(uid=uid, username=username).encode('utf-8'))
111 container.execute(shlex.split('chmod +x /usr/bin/libertine-lxd-mount-update'))
112
113 utils.get_logger().info("Enabling systemd mount update service")
114 container.execute(shlex.split('systemctl enable libertine-lxd-mount-update.service'))
115
116
117class LibertineLXD(Libertine.BaseContainer):
118 def __init__(self, name, config):
119 super().__init__(name)
120 self._id = name
121 self._config = config
122 self._host_info = HostInfo.HostInfo()
123 self._container = None
124 self._matchbox_pid = None
125
126 if not _setup_lxd():
127 raise Exception("Failed to setup lxd.")
128
129 self._client = pylxd.Client()
130 self._window_manager = None
131 self.root_path = '{}/containers/{}/rootfs'.format(os.getenv('LXD_DIR', '/var/lib/lxd'), name)
132
133 def _update_libertine_profile(self):
134 try:
135 profile = self._client.profiles.get('libertine')
136
137 utils.get_logger().info('Updating existing lxd profile.')
138 profile.devices = _get_devices_map()
139 profile.config['raw.idmap'] = 'both 1000 1000'
140
141 try:
142 profile.save()
143 except pylxd.exceptions.LXDAPIException as e:
144 utils.get_logger().warning('Saving libertine lxd profile raised: {}'.format(str(e)))
145 # This is most likely the result of an older container currently
146 # running and/or containing a conflicting device entry
147 except pylxd.exceptions.LXDAPIException:
148 utils.get_logger().info('Creating libertine lxd profile.')
149 self._client.profiles.create('libertine', config={'raw.idmap': 'both 1000 1000'}, devices=_get_devices_map())
150
151 def create_libertine_container(self, password=None, multiarch=False, verbosity=1):
152 if self._try_get_container():
153 utils.get_logger().error("Container already exists")
154 return False
155
156 self._update_libertine_profile()
157
158 utils.get_logger().info("Creating container '%s' with distro '%s'" % (self._id, self.installed_release))
159 self._container = self._client.containers.create({'name': self._id,
160 'profiles': ['default', 'libertine'],
161 'source': {"type": "image",
162 "protocol": "simplestreams",
163 "server": "https://cloud-images.ubuntu.com/daily",
164 "alias": self.installed_release}},
165 wait=True)
166
167 if not self.start_container():
168 utils.get_logger().error("Failed to start container '{}'".format(self._id))
169 self.destroy_libertine_container()
170 return False
171
172 username = os.environ['USER']
173 uid = str(os.getuid())
174 self.run_in_container("userdel -r ubuntu")
175 self.run_in_container("useradd -u {} -U -p {} -G sudo,audio,video {}".format(
176 uid, crypt.crypt(''), username))
177 self.run_in_container("mkdir -p /home/{}".format(username))
178 self.run_in_container("chown {0}:{0} /home/{0}".format(username))
179
180 _setup_bind_mount_service(self._container, uid, username)
181
182 if multiarch and self.architecture == 'amd64':
183 utils.get_logger().info("Adding i386 multiarch support to container '{}'".format(self._id))
184 self.run_in_container("dpkg --add-architecture i386")
185
186 self.update_packages()
187
188 for package in self.default_packages:
189 utils.get_logger().info("Installing package '%s' in container '%s'" % (package, self._id))
190 if not self.install_package(package, verbosity=1, no_dialog=True, update_cache=False):
191 utils.get_logger().error("Failure installing '%s' during container creation" % package)
192 self.destroy_libertine_container()
193 return False
194
195 return True
196
197 def _wait_for_network(self):
198 for retries in range(0, 10):
199 out, err = self._container.execute(shlex.split('ping -c 1 ubuntu.com'))
200 if out:
201 utils.get_logger().info("Network connection active")
202 return True
203 time.sleep(1)
204 return False
205
206 def update_packages(self, verbosity=1):
207 if not self._timezone_in_sync():
208 utils.get_logger().info("Re-syncing timezones")
209 self.run_in_container("bash -c 'echo \"%s\" > /etc/timezone'" % self._host_info.get_host_timezone())
210 self.run_in_container("rm -f /etc/localtime")
211 self.run_in_container("dpkg-reconfigure -f noninteractive tzdata")
212
213 return super().update_packages()
214
215 def destroy_libertine_container(self):
216 if not self._try_get_container():
217 utils.get_logger().error("No such container '%s'" % self._id)
218 return False
219
220 self.stop_container(wait=True)
221 self._container.delete()
222 return True
223
224 def _timezone_in_sync(self):
225 proc = subprocess.Popen(self._lxc_args('cat /etc/timezone'), stdout=subprocess.PIPE)
226 out, err = proc.communicate()
227 return out.decode('UTF-8').strip('\n') == self._host_info.get_host_timezone()
228
229 def _lxc_args(self, command, environ={}):
230 env_as_args = ' '
231 for k, v in environ.items():
232 env_as_args += '--env {}="{}" '.format(k, v)
233
234 return shlex.split('lxc exec {}{}-- {}'.format(self._id,
235 env_as_args,
236 command))
237
238 def run_in_container(self, command):
239 proc = subprocess.Popen(self._lxc_args(command))
240 return proc.wait()
241
242 def start_container(self):
243 if not self._try_get_container():
244 return False
245
246 if self._container.status == 'Running':
247 return True
248
249 self._container.start(wait=True)
250
251 # Connect to network
252 if not self._wait_for_network():
253 utils.get_logger().error("Network unavailable in container '{}'".format(self._id))
254 return False
255
256 self._container.sync(rollback=True) # required for pylxd=2.0.x
257
258 return self._container.status == 'Running'
259
260 def stop_container(self, wait=False):
261 if not self._try_get_container():
262 return False
263
264 if self._container.status == 'Stopped':
265 return True
266
267 self._container.stop(wait=wait)
268
269 return not wait or self._container.status == 'Stopped'
270
271 def _update_bind_mounts(self):
272 home_path = os.environ['HOME']
273
274 self._container.devices.clear()
275 self._container.devices['root'] = {'type': 'disk', 'path': '/'}
276
277 if os.path.exists(os.path.join(home_path, '.config', 'dconf')):
278 self._container.devices['dconf'] = {
279 'type': 'disk',
280 'source': os.path.join(home_path, '.config', 'dconf'),
281 'path': os.path.join(home_path, '.config', 'dconf')
282 }
283
284 run_user = '/run/user/{}'.format(os.getuid())
285 self._container.devices[run_user] = {'source': run_user, 'path': '/var/tmp{}'.format(run_user), 'type': 'disk'}
286
287 mounts = utils.get_common_xdg_user_directories() + \
288 self._config.get_container_bind_mounts(self._id)
289 for user_dir in utils.generate_binding_directories(mounts, home_path):
290 if not os.path.exists(user_dir[0]):
291 utils.get_logger().warning('Bind-mount path \'{}\' does not exist.'.format(user_dir[0]))
292 continue
293
294 self._container.devices[user_dir[1]] = {
295 'source': _readlink(user_dir[0]),
296 'path': os.path.join(home_path, user_dir[1]),
297 'type': 'disk'
298 }
299
300 try:
301 self._container.save(wait=True)
302 except pylxd.exceptions.LXDAPIException as e:
303 utils.get_logger().warning('Saving bind mounts for container \'{}\' raised: {}'.format(self._id, str(e)))
304 # This is most likely the result of the container currently running
305
306 def _get_matchbox_pids(self):
307 p = subprocess.Popen(self._lxc_args('pgrep matchbox'), stdout=subprocess.PIPE)
308 out, err = p.communicate()
309 return out.decode('utf-8').split('\n')
310
311 # FIXME: Remove once window management logic has been moved to the host
312 def _start_window_manager(self, args):
313 args.extend(utils.setup_window_manager(self._id))
314
315 if 'matchbox-window-manager' in args:
316 pids = self._get_matchbox_pids()
317
318 self._window_manager = psutil.Popen(args)
319
320 time.sleep(.25) # Give matchbox a moment to start in the container
321 if self._window_manager.poll() is not None:
322 utils.get_logger().warning("Window manager terminated prematurely with exit code '{}'".format(
323 self._window_manager.returncode))
324 self._window_manager = None
325 elif 'matchbox-window-manager' in args:
326 after_pids = self._get_matchbox_pids()
327 if len(after_pids) > len(pids):
328 self._matchbox_pid = (set(after_pids) - set(pids)).pop()
329
330 def start_application(self, app_exec_line, environ):
331 if not self._try_get_container():
332 utils.get_logger().error("Could not get container '{}'".format(self._id))
333 return None
334
335 self._update_libertine_profile()
336 self._update_bind_mounts()
337 self.start_container()
338
339 args = self._lxc_args("sudo -E -u {} env PATH={}".format(os.environ['USER'], environ['PATH']), environ)
340
341 self._start_window_manager(args.copy())
342
343 args.extend(app_exec_line)
344 return psutil.Popen(args)
345
346 def finish_application(self, app):
347 if self._window_manager is not None:
348 utils.terminate_window_manager(self._window_manager)
349 self._window_manager = None
350
351 # This is a workaround for an issue on xenial where the process
352 # running the window manager is not killed with the application
353 if self._matchbox_pid is not None:
354 utils.get_logger().debug("Manually killing matchbox-window-manager")
355 self.run_in_container("kill -9 {}".format(self._matchbox_pid))
356 self._matchbox_pid = None
357
358 app.wait()
359
360 def copy_file_to_container(self, source, dest):
361 with open(source, 'rb') as f:
362 return self._container.files.put(dest, f.read())
363
364 def delete_file_in_container(self, path):
365 return self.run_in_container('rm {}'.format(path))
366
367 def _try_get_container(self):
368 if self._container is None:
369 try:
370 self._container = self._client.containers.get(self._id)
371 except pylxd.exceptions.LXDAPIException:
372 self._container = None
373 return False
374
375 return True
0376
=== modified file 'tests/unit/test_libertine_gir.py'
--- tests/unit/test_libertine_gir.py 2016-08-28 00:17:54 +0000
+++ tests/unit/test_libertine_gir.py 2016-12-15 21:01:30 +0000
@@ -49,14 +49,12 @@
49 self.assertThat(container_home_path, Equals(self.cmake_source_dir + '/libertine-home/libertine-container/user-data/wily'))49 self.assertThat(container_home_path, Equals(self.cmake_source_dir + '/libertine-home/libertine-container/user-data/wily'))
5050
51 def test_container_name(self):51 def test_container_name(self):
52 container_id = 'wily'
53 with patch.dict('os.environ', {'XDG_DATA_HOME': self.cmake_source_dir + '/libertine-config'}):52 with patch.dict('os.environ', {'XDG_DATA_HOME': self.cmake_source_dir + '/libertine-config'}):
54 container_name = Libertine.container_name(container_id)53 container_name = Libertine.container_name('wily')
5554
56 self.assertThat(container_name, Equals("Ubuntu 'Wily Werewolf'"))55 self.assertThat(container_name, Equals("Ubuntu 'Wily Werewolf'"))
5756
58 container_id = 'wily-2'57 container_name = Libertine.container_name('wily-2')
59 container_name = Libertine.container_name(container_id)
6058
61 self.assertThat(container_name, Equals("Ubuntu 'Wily Werewolf' (2)"))59 self.assertThat(container_name, Equals("Ubuntu 'Wily Werewolf' (2)"))
6260
6361
=== modified file 'tools/CMakeLists.txt'
--- tools/CMakeLists.txt 2016-12-06 20:52:55 +0000
+++ tools/CMakeLists.txt 2016-12-15 21:01:30 +0000
@@ -1,4 +1,4 @@
1install(PROGRAMS libertine-container-manager libertine-launch libertine-lxc-manager libertine-xmir libertine-lxc-setup libertined1install(PROGRAMS libertine-container-manager libertine-launch libertine-lxc-manager libertine-xmir libertine-lxc-setup libertine-lxd-setup libertined
2 DESTINATION ${CMAKE_INSTALL_BINDIR})2 DESTINATION ${CMAKE_INSTALL_BINDIR})
3install(FILES libertine-launch.1 libertine-container-manager.1 libertine-lxc-manager.1 libertine-xmir.13install(FILES libertine-launch.1 libertine-container-manager.1 libertine-lxc-manager.1 libertine-xmir.1
4 DESTINATION ${CMAKE_INSTALL_MANDIR}/man14 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
55
=== modified file 'tools/libertine-container-manager'
--- tools/libertine-container-manager 2016-12-12 15:54:41 +0000
+++ tools/libertine-container-manager 2016-12-15 21:01:30 +0000
@@ -52,7 +52,7 @@
52 if not args.type:52 if not args.type:
53 container_type = self.host_info.select_container_type_by_kernel()53 container_type = self.host_info.select_container_type_by_kernel()
54 else:54 else:
55 if args.type == 'lxc' and not self.host_info.has_lxc_support():55 if (args.type == 'lxc' or args.type == 'lxd') and not self.host_info.has_lxc_support():
56 print("System kernel does not support lxc type containers. "56 print("System kernel does not support lxc type containers. "
57 "Please either use chroot or omit the -t option.")57 "Please either use chroot or omit the -t option.")
58 sys.exit(1)58 sys.exit(1)
5959
=== added file 'tools/libertine-lxd-setup'
--- tools/libertine-lxd-setup 1970-01-01 00:00:00 +0000
+++ tools/libertine-lxd-setup 2016-12-15 21:01:30 +0000
@@ -0,0 +1,40 @@
1#!/bin/sh
2
3if [ -z $1 ]; then
4 echo "Usage: $0 username"
5 exit 1
6fi
7
8USERNAME=$1
9
10# Create the lxd group and add given user
11if [ -z "`groups ${USERNAME} | grep lxd`" ]; then
12 groupadd --force --system lxd
13 usermod -G lxd -a $USERNAME
14fi
15
16# Map the given user to the container root user
17uid=`id --user ${USERNAME}`
18idmap="root:$uid:1"
19if [ -z "`grep ${idmap} /etc/subuid`" ]; then
20 echo ${idmap} | tee -a /etc/subuid /etc/subgid
21fi
22
23# find the right lxc command
24lxc=`which lxc`
25if [ -z "${lxc}" ]; then
26 if [ -n `which lxd.lxc` ]; then
27 lxc=`which lxd.lxc`
28 else
29 echo "No lxc command found on this system."
30 exit 1
31 fi
32fi
33
34# Run lxd init if there are no containers already on the system
35if [ 3 -ge `${lxc} list | wc -l` ]; then
36 lxd init
37fi
38
39mkdir -p /home/$USERNAME/.config/lxc
40chown -R $USERNAME:$USERNAME /home/$USERNAME/.config/lxc

Subscribers

People subscribed via source and target branches