Merge lp:~townsend/libertine/mount-dconf into lp:libertine

Proposed by Christopher Townsend
Status: Merged
Approved by: Stephen M. Webb
Approved revision: 170
Merged at revision: 170
Proposed branch: lp:~townsend/libertine/mount-dconf
Merge into: lp:libertine
Diff against target: 34 lines (+13/-0)
2 files modified
python/libertine/ChrootContainer.py (+5/-0)
python/libertine/LxcContainer.py (+8/-0)
To merge this branch: bzr merge lp:~townsend/libertine/mount-dconf
Reviewer Review Type Date Requested Status
Stephen M. Webb (community) Approve
Libertine CI Bot continuous-integration Approve
Review via email: mp+284795@code.launchpad.net

Commit message

Bind mount ~/.config/dconf/ so apps that use it can read the correct gsettings data.

To post a comment you must log in.
Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Stephen M. Webb (bregma) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'python/libertine/ChrootContainer.py'
2--- python/libertine/ChrootContainer.py 2016-01-27 21:54:55 +0000
3+++ python/libertine/ChrootContainer.py 2016-02-02 21:16:57 +0000
4@@ -191,6 +191,11 @@
5 bind_mounts += " -b %s:%s" % (user_dir_path, user_dir_path)
6
7 proot_cmd += bind_mounts
8+
9+ user_dconf_path = os.path.join(home_path, '.config', 'dconf')
10+ if os.path.exists(user_dconf_path):
11+ proot_cmd += " -b %s" % user_donf_path
12+
13 return proot_cmd
14
15 def launch_application(self, app_exec_line):
16
17=== modified file 'python/libertine/LxcContainer.py'
18--- python/libertine/LxcContainer.py 2015-12-22 17:28:10 +0000
19+++ python/libertine/LxcContainer.py 2016-02-02 21:16:57 +0000
20@@ -185,6 +185,14 @@
21 )
22 self.container.append_config_item("lxc.mount.entry", xdg_user_dir_entry)
23
24+ # Bind mount the user's dconf back end
25+ user_dconf_path = os.path.join(home_path, '.config', 'dconf')
26+ user_dconf_entry = (
27+ "%s %s none bind,create=dir,optional"
28+ % (user_dconf_path, user_dconf_path.strip('/'))
29+ )
30+ self.container.append_config_item("lxc.mount.entry", user_dconf_entry)
31+
32 # Setup the mounts for /run/user/$user_id
33 run_user_entry = "/run/user/%s run/user/%s none rbind,create=dir" % (user_id, user_id)
34 self.container.append_config_item("lxc.mount.entry", "tmpfs run tmpfs rw,nodev,noexec,nosuid,size=5242880")

Subscribers

People subscribed via source and target branches