Merge lp:~libertine-team/libertine/merge-devel into lp:libertine/trunk
- merge-devel
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Stephen M. Webb |
Approved revision: | no longer in the source branch. |
Merged at revision: | 100 |
Proposed branch: | lp:~libertine-team/libertine/merge-devel |
Merge into: | lp:libertine/trunk |
Diff against target: |
1136 lines (+486/-99) 27 files modified
data/CMakeLists.txt (+4/-1) data/demo/CMakeLists.txt (+4/-0) data/demo/desktop_files/CMakeLists.txt (+24/-0) data/demo/desktop_files/puritine_firefox_0.0.desktop.in (+11/-0) data/demo/desktop_files/puritine_gedit_0.0.desktop.in (+11/-0) data/demo/desktop_files/puritine_gimp_0.0.desktop.in (+11/-0) data/demo/desktop_files/puritine_libreoffice-startcenter_0.0.desktop.in (+11/-0) data/demo/desktop_files/puritine_xchat-gnome_0.0.desktop.in (+11/-0) data/demo/icons/accessories-text-editor.svg (+119/-0) data/puritine-click.conf (+34/-0) debian/changelog (+23/-0) debian/control (+13/-2) debian/libertine-demo.install (+4/-0) debian/libertine-demo.lintian-overrides (+5/-0) libertine/ContainerConfig.cpp (+12/-12) libertine/ContainerConfig.h (+4/-4) libertine/ContainerConfigList.cpp (+19/-12) libertine/ContainerConfigList.h (+2/-2) libertine/libertine_container_manager_cli.cpp (+28/-16) libertine/qml/image_sources.js (+2/-2) python/libertine/Libertine.py (+110/-19) tests/unit/ContainerConfigListTests.cpp (+2/-2) tests/unit/ContainerConfigTests.cpp (+6/-6) tools/CMakeLists.txt (+1/-1) tools/create_bespoke_container (+2/-5) tools/libertine-launch (+12/-9) tools/libertine-session-bridge (+1/-6) |
To merge this branch: | bzr merge lp:~libertine-team/libertine/merge-devel |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stephen M. Webb (community) | Approve | ||
Review via email: mp+271675@code.launchpad.net |
Commit message
Merge in lp:libertine. Fixes include:
* Rename desktop files to match the Puritine container name.
* Add an upstart job to link to the Puritine container data.
* Add a function to determine the architecture used to create the container and set the container's sources.list entries appropriately.
* Add support for explicitly naming a container when creating one and various variable naming cleanup.
* Add a policy-rc.d script to the chroot to keep certain services from starting during package installation.
* Add runtime depends for fakechroot and fakeroot.
* Install Compiz by default inside the container.
* Install the create_
* Add a libertine-demo package that installs desktop files and icons for the supported X apps.
Description of the change
- 100. By Christopher Townsend
-
Merge in lp:libertine. Fixes include:
* Rename desktop files to match the Puritine container name.
* Add an upstart job to link to the Puritine container data.
* Add a function to determine the architecture used to create the container and set the container's sources.list entries appropriately.
* Add support for explicitly naming a container when creating one and various variable naming cleanup.
* Add a policy-rc.d script to the chroot to keep certain services from starting during package installation.
* Add runtime depends for fakechroot and fakeroot.
* Install Compiz by default inside the container.
* Install the create_bespoke_ container script. This script will be moved to lp:puritine in the future.
* Add a libertine-demo package that installs desktop files and icons for the supported X apps.
Approved by: Stephen M. Webb
Preview Diff
1 | === modified file 'data/CMakeLists.txt' |
2 | --- data/CMakeLists.txt 2015-07-24 01:37:08 +0000 |
3 | +++ data/CMakeLists.txt 2015-09-18 17:06:14 +0000 |
4 | @@ -1,5 +1,8 @@ |
5 | +add_subdirectory(demo) |
6 | + |
7 | install(FILES libertine.desktop |
8 | DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) |
9 | install(FILES libertine_64.png |
10 | DESTINATION ${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}) |
11 | - |
12 | +install(FILES puritine-click.conf |
13 | + DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions) |
14 | |
15 | === added directory 'data/demo' |
16 | === added file 'data/demo/CMakeLists.txt' |
17 | --- data/demo/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
18 | +++ data/demo/CMakeLists.txt 2015-09-18 17:06:14 +0000 |
19 | @@ -0,0 +1,4 @@ |
20 | +add_subdirectory(desktop_files) |
21 | + |
22 | +install(DIRECTORY icons/ |
23 | + DESTINATION ${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}/demo/icons) |
24 | |
25 | === added directory 'data/demo/desktop_files' |
26 | === added file 'data/demo/desktop_files/CMakeLists.txt' |
27 | --- data/demo/desktop_files/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
28 | +++ data/demo/desktop_files/CMakeLists.txt 2015-09-18 17:06:14 +0000 |
29 | @@ -0,0 +1,24 @@ |
30 | +execute_process(COMMAND dpkg-architecture -qDEB_BUILD_ARCH |
31 | + OUTPUT_VARIABLE BUILD_ARCH |
32 | + OUTPUT_STRIP_TRAILING_WHITESPACE |
33 | +) |
34 | + |
35 | +configure_file("puritine_firefox_0.0.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/puritine_firefox_0.0.desktop" @ONLY) |
36 | +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/puritine_firefox_0.0.desktop" |
37 | + DESTINATION "${CMAKE_INSTALL_DATADIR}/applications/demo") |
38 | + |
39 | +configure_file("puritine_gedit_0.0.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/puritine_gedit_0.0.desktop" @ONLY) |
40 | +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/puritine_gedit_0.0.desktop" |
41 | + DESTINATION "${CMAKE_INSTALL_DATADIR}/applications/demo") |
42 | + |
43 | +configure_file("puritine_gimp_0.0.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/puritine_gimp_0.0.desktop" @ONLY) |
44 | +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/puritine_gimp_0.0.desktop" |
45 | + DESTINATION "${CMAKE_INSTALL_DATADIR}/applications/demo") |
46 | + |
47 | +configure_file("puritine_libreoffice-startcenter_0.0.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/puritine_libreoffice-startcenter_0.0.desktop" @ONLY) |
48 | +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/puritine_libreoffice-startcenter_0.0.desktop" |
49 | + DESTINATION "${CMAKE_INSTALL_DATADIR}/applications/demo") |
50 | + |
51 | +configure_file("puritine_xchat-gnome_0.0.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/puritine_xchat-gnome_0.0.desktop" @ONLY) |
52 | +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/puritine_xchat-gnome_0.0.desktop" |
53 | + DESTINATION "${CMAKE_INSTALL_DATADIR}/applications/demo") |
54 | |
55 | === added file 'data/demo/desktop_files/puritine_firefox_0.0.desktop.in' |
56 | --- data/demo/desktop_files/puritine_firefox_0.0.desktop.in 1970-01-01 00:00:00 +0000 |
57 | +++ data/demo/desktop_files/puritine_firefox_0.0.desktop.in 2015-09-18 17:06:14 +0000 |
58 | @@ -0,0 +1,11 @@ |
59 | +[Desktop Entry] |
60 | +Version=1.0 |
61 | +Name=Firefox |
62 | +Exec=/bin/true |
63 | +Type=Application |
64 | +StartupNotify=true |
65 | +Icon=/usr/share/libertine/demo/icons/firefox.png |
66 | +Keywords=Libertine |
67 | +NotShowIn=Unity; |
68 | +X-Ubuntu-Touch=true |
69 | +X-Ubuntu-XMir-Enable=true |
70 | |
71 | === added file 'data/demo/desktop_files/puritine_gedit_0.0.desktop.in' |
72 | --- data/demo/desktop_files/puritine_gedit_0.0.desktop.in 1970-01-01 00:00:00 +0000 |
73 | +++ data/demo/desktop_files/puritine_gedit_0.0.desktop.in 2015-09-18 17:06:14 +0000 |
74 | @@ -0,0 +1,11 @@ |
75 | +[Desktop Entry] |
76 | +Version=1.0 |
77 | +Name=Gedit |
78 | +Exec=/bin/true |
79 | +Type=Application |
80 | +StartupNotify=true |
81 | +Icon=/usr/share/libertine/demo/icons/accessories-text-editor.svg |
82 | +Keywords=Libertine |
83 | +NotShowIn=Unity; |
84 | +X-Ubuntu-Touch=true |
85 | +X-Ubuntu-XMir-Enable=true |
86 | |
87 | === added file 'data/demo/desktop_files/puritine_gimp_0.0.desktop.in' |
88 | --- data/demo/desktop_files/puritine_gimp_0.0.desktop.in 1970-01-01 00:00:00 +0000 |
89 | +++ data/demo/desktop_files/puritine_gimp_0.0.desktop.in 2015-09-18 17:06:14 +0000 |
90 | @@ -0,0 +1,11 @@ |
91 | +[Desktop Entry] |
92 | +Version=1.0 |
93 | +Name=GIMP Image Editor |
94 | +Exec=/bin/true |
95 | +Type=Application |
96 | +StartupNotify=true |
97 | +Icon=/usr/share/libertine/demo/icons/gimp.png |
98 | +Keywords=Libertine |
99 | +NotShowIn=Unity; |
100 | +X-Ubuntu-Touch=true |
101 | +X-Ubuntu-XMir-Enable=true |
102 | |
103 | === added file 'data/demo/desktop_files/puritine_libreoffice-startcenter_0.0.desktop.in' |
104 | --- data/demo/desktop_files/puritine_libreoffice-startcenter_0.0.desktop.in 1970-01-01 00:00:00 +0000 |
105 | +++ data/demo/desktop_files/puritine_libreoffice-startcenter_0.0.desktop.in 2015-09-18 17:06:14 +0000 |
106 | @@ -0,0 +1,11 @@ |
107 | +[Desktop Entry] |
108 | +Version=1.0 |
109 | +Name=LibreOffice |
110 | +Exec=/bin/true |
111 | +Type=Application |
112 | +StartupNotify=true |
113 | +Icon=/usr/share/libertine/demo/icons/libreoffice-startcenter.png |
114 | +Keywords=Libertine |
115 | +NotShowIn=Unity; |
116 | +X-Ubuntu-Touch=true |
117 | +X-Ubuntu-XMir-Enable=true |
118 | |
119 | === added file 'data/demo/desktop_files/puritine_xchat-gnome_0.0.desktop.in' |
120 | --- data/demo/desktop_files/puritine_xchat-gnome_0.0.desktop.in 1970-01-01 00:00:00 +0000 |
121 | +++ data/demo/desktop_files/puritine_xchat-gnome_0.0.desktop.in 2015-09-18 17:06:14 +0000 |
122 | @@ -0,0 +1,11 @@ |
123 | +[Desktop Entry] |
124 | +Version=1.0 |
125 | +Name=XChat-GNOME |
126 | +Exec=/bin/true |
127 | +Type=Application |
128 | +StartupNotify=true |
129 | +Icon=/usr/share/libertine/demo/icons/xchat-gnome.png |
130 | +Keywords=Libertine |
131 | +NotShowIn=Unity; |
132 | +X-Ubuntu-Touch=true |
133 | +X-Ubuntu-XMir-Enable=true |
134 | |
135 | === added directory 'data/demo/icons' |
136 | === added file 'data/demo/icons/accessories-text-editor.svg' |
137 | --- data/demo/icons/accessories-text-editor.svg 1970-01-01 00:00:00 +0000 |
138 | +++ data/demo/icons/accessories-text-editor.svg 2015-09-18 17:06:14 +0000 |
139 | @@ -0,0 +1,119 @@ |
140 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
141 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
142 | +<svg id="svg2820" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="48" width="48" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/"> |
143 | + <metadata id="metadata290"> |
144 | + <rdf:RDF> |
145 | + <cc:Work rdf:about=""> |
146 | + <dc:format>image/svg+xml</dc:format> |
147 | + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> |
148 | + </cc:Work> |
149 | + </rdf:RDF> |
150 | + </metadata> |
151 | + <defs id="defs2822"> |
152 | + <linearGradient id="linearGradient5060"> |
153 | + <stop id="stop5062" offset="0"/> |
154 | + <stop id="stop5064" style="stop-opacity:0" offset="1"/> |
155 | + </linearGradient> |
156 | + <linearGradient id="linearGradient3104"> |
157 | + <stop id="stop3106" style="stop-color:#a0a0a0" offset="0"/> |
158 | + <stop id="stop3108" style="stop-color:#c8c8c8" offset="1"/> |
159 | + </linearGradient> |
160 | + <linearGradient id="linearGradient2670" y2="26.03" gradientUnits="userSpaceOnUse" x2="9" gradientTransform="matrix(.63801 -.64114 .85963 .85535 -3.6613 16.731)" y1="29.057" x1="9"> |
161 | + <stop id="stop2607" style="stop-color:#ece5a5" offset="0"/> |
162 | + <stop id="stop2609" style="stop-color:#fcfbf2" offset="1"/> |
163 | + </linearGradient> |
164 | + <linearGradient id="linearGradient2673" y2="41.392" gradientUnits="userSpaceOnUse" x2="9.5221" gradientTransform="matrix(.56036 .024186 .024156 .55967 19.547 13.104)" y1="37.372" x1="5.5179"> |
165 | + <stop id="stop2613" style="stop-color:#dbce48" offset="0"/> |
166 | + <stop id="stop2615" style="stop-color:#c5b625" offset="1"/> |
167 | + </linearGradient> |
168 | + <linearGradient id="linearGradient2676" y2="30" gradientUnits="userSpaceOnUse" x2="30.038" gradientTransform="matrix(.63801 -.64114 .85963 .85535 -2.3288 15.392)" y1="24.99" x1="30.038"> |
169 | + <stop id="stop2599" style="stop-color:#b1b1b1" offset="0"/> |
170 | + <stop id="stop2601" style="stop-color:#fff" offset=".5"/> |
171 | + <stop id="stop2603" style="stop-color:#8f8f8f" offset="1"/> |
172 | + </linearGradient> |
173 | + <linearGradient id="linearGradient2679" y2="30" gradientUnits="userSpaceOnUse" x2="30.038" gradientTransform="matrix(.63801 -.64114 .85963 .85535 -2.1461 15.208)" y1="24.99" x1="30.038"> |
174 | + <stop id="stop2591" style="stop-color:#565656" offset="0"/> |
175 | + <stop id="stop2593" style="stop-color:#9a9a9a" offset=".5"/> |
176 | + <stop id="stop2595" style="stop-color:#545454" offset="1"/> |
177 | + </linearGradient> |
178 | + <linearGradient id="linearGradient2682" y2="30" gradientUnits="userSpaceOnUse" x2="30.038" gradientTransform="matrix(.63801 -.64114 .85963 .85535 -2.9668 16.033)" y1="24.99" x1="30.038"> |
179 | + <stop id="stop2583" style="stop-color:#b1b1b1" offset="0"/> |
180 | + <stop id="stop2585" style="stop-color:#fff" offset=".5"/> |
181 | + <stop id="stop2587" style="stop-color:#8f8f8f" offset="1"/> |
182 | + </linearGradient> |
183 | + <linearGradient id="linearGradient2685" y2="30" gradientUnits="userSpaceOnUse" x2="30.038" gradientTransform="matrix(.63801 -.64114 .85963 .85535 -2.7841 15.849)" y1="24.99" x1="30.038"> |
184 | + <stop id="stop2575" style="stop-color:#565656" offset="0"/> |
185 | + <stop id="stop2577" style="stop-color:#9a9a9a" offset=".5"/> |
186 | + <stop id="stop2579" style="stop-color:#545454" offset="1"/> |
187 | + </linearGradient> |
188 | + <linearGradient id="linearGradient2688" y2="30" gradientUnits="userSpaceOnUse" x2="30.038" gradientTransform="matrix(.63801 -.64114 .85963 .85535 -3.6017 16.671)" y1="24.99" x1="30.038"> |
189 | + <stop id="stop2567" style="stop-color:#b1b1b1" offset="0"/> |
190 | + <stop id="stop2569" style="stop-color:#fff" offset=".5"/> |
191 | + <stop id="stop2571" style="stop-color:#8f8f8f" offset="1"/> |
192 | + </linearGradient> |
193 | + <linearGradient id="linearGradient2691" y2="30" gradientUnits="userSpaceOnUse" x2="30.038" gradientTransform="matrix(.63801 -.64114 .85963 .85535 -3.419 16.487)" y1="24.99" x1="30.038"> |
194 | + <stop id="stop2559" style="stop-color:#565656" offset="0"/> |
195 | + <stop id="stop2561" style="stop-color:#9a9a9a" offset=".5"/> |
196 | + <stop id="stop2563" style="stop-color:#545454" offset="1"/> |
197 | + </linearGradient> |
198 | + <linearGradient id="linearGradient2697" y2="31.211" gradientUnits="userSpaceOnUse" x2="23.576" gradientTransform="matrix(.65657 -.65979 .73452 .73087 -1.013 19.863)" y1="25.357" x1="23.576"> |
199 | + <stop id="stop2541" style="stop-color:#181818" offset="0"/> |
200 | + <stop id="stop2543" style="stop-color:#dbdbdb" offset=".13483"/> |
201 | + <stop id="stop2545" style="stop-color:#a4a4a4" offset=".20224"/> |
202 | + <stop id="stop2547" style="stop-color:#fff" offset=".26966"/> |
203 | + <stop id="stop2549" style="stop-color:#8d8d8d" offset=".44650"/> |
204 | + <stop id="stop2551" style="stop-color:#959595" offset=".57114"/> |
205 | + <stop id="stop2553" style="stop-color:#cecece" offset=".72038"/> |
206 | + <stop id="stop2555" style="stop-color:#181818" offset="1"/> |
207 | + </linearGradient> |
208 | + <linearGradient id="linearGradient2973" y2="114.54" gradientUnits="userSpaceOnUse" x2="-60.908" gradientTransform="matrix(.45037 .00027173 -.00027421 .44630 46.808 -6.9909)" y1="13.668" x1="-60.97"> |
209 | + <stop id="stop3828" style="stop-color:#f4f4f4" offset="0"/> |
210 | + <stop id="stop3604" style="stop-color:#dbdbdb" offset="1"/> |
211 | + </linearGradient> |
212 | + <linearGradient id="linearGradient2975" y2="-1.0041" xlink:href="#linearGradient3104" gradientUnits="userSpaceOnUse" x2="11.536" gradientTransform="translate(5e-7 .047615)" y1="44.952" x1="11.536"/> |
213 | + <radialGradient id="radialGradient2978" xlink:href="#linearGradient5060" gradientUnits="userSpaceOnUse" cy="486.65" cx="605.71" gradientTransform="matrix(.022892 0 0 .012353 26.354 38.471)" r="117.14"/> |
214 | + <radialGradient id="radialGradient2981" xlink:href="#linearGradient5060" gradientUnits="userSpaceOnUse" cy="486.65" cx="605.71" gradientTransform="matrix(-.022892 0 0 .012353 21.646 38.471)" r="117.14"/> |
215 | + <linearGradient id="linearGradient2984" y2="609.51" gradientUnits="userSpaceOnUse" x2="302.86" gradientTransform="matrix(.066893 0 0 .012353 -.17722 38.471)" y1="366.65" x1="302.86"> |
216 | + <stop id="stop5050" style="stop-opacity:0" offset="0"/> |
217 | + <stop id="stop5056" offset=".5"/> |
218 | + <stop id="stop5052" style="stop-opacity:0" offset="1"/> |
219 | + </linearGradient> |
220 | + <linearGradient id="linearGradient3781" y2="3.0719" xlink:href="#linearGradient3104" gradientUnits="userSpaceOnUse" x2="22.004" y1="44.854" x1="22.004"/> |
221 | + </defs> |
222 | + <rect id="rect3706" style="opacity:.40206;fill:url(#linearGradient2984)" height="3" width="32.3" y="43" x="7.85"/> |
223 | + <path id="path3708" style="opacity:.40206;fill:url(#radialGradient2981)" d="m7.85 43v3c-1.1789 0.006-2.85-0.672-2.85-1.5s1.3156-1.5 2.85-1.5z"/> |
224 | + <path id="path3710" style="opacity:.40206;fill:url(#radialGradient2978)" d="m40.15 43v3c1.179 0.006 2.85-0.672 2.85-1.5s-1.316-1.5-2.85-1.5z"/> |
225 | + <path id="path2855" style="stroke-linejoin:round;stroke:url(#linearGradient2975);stroke-linecap:round;fill:url(#linearGradient2973)" d="m7.5 3.5c8.522 0.0051 24.478-0.0051 33 0 0.075 1.6058 0.924 38.198 0.999 41-11.666-0.007-23.333-0.014-34.999-0.021 0.0918-3.147 0.9082-39.567 1-40.979z"/> |
226 | + <path id="path5685" style="opacity:.59070;stroke-linejoin:round;fill-rule:evenodd;stroke:#f6abab;stroke-linecap:round;stroke-width:0.5;fill:#80b3ff" d="m12.688 4.2499l-0.438 39.5"/> |
227 | + <path id="path6656" style="opacity:.43721;stroke-linejoin:round;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;stroke-width:0.25;fill:#80b3ff" d="m40.057 9.875l-32.18-0.1845"/> |
228 | + <path id="path6658" style="opacity:.43721;stroke-linejoin:round;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;stroke-width:0.25;fill:#80b3ff" d="m40.131 11.875l-32.262-0.185"/> |
229 | + <path id="path6660" style="opacity:.43721;stroke-linejoin:round;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;stroke-width:0.25;fill:#80b3ff" d="m40.214 13.875l-32.428-0.185"/> |
230 | + <path id="path6662" style="opacity:.43721;stroke-linejoin:round;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;stroke-width:0.25;fill:#80b3ff" d="m40.297 15.875l-32.594-0.185"/> |
231 | + <path id="path6664" style="opacity:.43721;stroke-linejoin:round;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;stroke-width:0.25;fill:#80b3ff" d="m40.297 17.875l-32.594-0.185"/> |
232 | + <path id="path6666" style="opacity:.43721;stroke-linejoin:round;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;stroke-width:0.25;fill:#80b3ff" d="m40.379 19.875l-32.758-0.185"/> |
233 | + <path id="path7637" style="opacity:.43721;stroke-linejoin:round;stroke-width:0.25;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;fill:#80b3ff" d="m40.379 21.875l-32.758-0.185"/> |
234 | + <path id="path7639" style="opacity:.43721;stroke-linejoin:round;stroke-width:0.25;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;fill:#80b3ff" d="m40.462 23.875l-32.924-0.185"/> |
235 | + <path id="path7641" style="opacity:.43721;stroke-linejoin:round;stroke-width:0.25;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;fill:#80b3ff" d="m40.462 25.875l-32.924-0.185"/> |
236 | + <path id="path7645" style="opacity:.43721;stroke-linejoin:round;stroke-width:0.25;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;fill:#80b3ff" d="m40.627 27.875l-33.254-0.185"/> |
237 | + <path id="path7647" style="opacity:.43721;stroke-linejoin:round;stroke-width:0.25;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;fill:#80b3ff" d="m40.627 29.864l-33.254-0.184"/> |
238 | + <path id="path7649" style="opacity:.43721;stroke-linejoin:round;stroke-width:0.25;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;fill:#80b3ff" d="m40.875 31.875l-33.75-0.185"/> |
239 | + <path id="path7651" style="opacity:.43721;stroke-linejoin:round;stroke-width:0.25;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;fill:#80b3ff" d="m40.875 33.83l-33.75-0.184"/> |
240 | + <path id="path7653" style="opacity:.43721;stroke-linejoin:round;stroke-width:0.25;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;fill:#80b3ff" d="m40.875 35.814l-33.75-0.185"/> |
241 | + <path id="path7655" style="opacity:.43721;stroke-linejoin:round;stroke-width:0.25;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;fill:#80b3ff" d="m40.875 37.797l-33.75-0.185"/> |
242 | + <path id="path7657" style="opacity:.43721;stroke-linejoin:round;stroke-width:0.25;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;fill:#80b3ff" d="m40.875 39.78l-33.75-0.185"/> |
243 | + <path id="path7659" style="opacity:.43721;stroke-linejoin:round;stroke-width:0.25;fill-rule:evenodd;stroke:#80b3ff;stroke-linecap:round;fill:#80b3ff" d="m40.875 41.875l-33.75-0.185"/> |
244 | + <path id="path7671" style="opacity:.59070;stroke-linejoin:round;stroke:#b9d5ff;stroke-linecap:round;stroke-width:0.5;fill:none" d="m35.25 4.1673l1.05 39.5"/> |
245 | + <path id="path3715" style="stroke:url(#linearGradient3781);stroke-width:1px;fill:none" d="m12.999 11.546h2.348m0.335 0h2.181m0.351 0h1.945m0.32 0h0.838m0.336 0h1.878m0.369 0h4.931m0.335 0h3.757m0.336 0h1.14m-21.4 1.954h3.641m0.423 0h1.74m0.321 0h0.859m0.349 0h1.602m0.336 0h1.643m0.31 0h2.581m0.335 0h3.404m-17.544 1.98h3.081m0.324 0h5.075m0.311 0h2.461m0.316 0h2.302m0.33 0h1.961m0.316 0l3.085 0.02m-19.562 2h4.284m0.337 0h4.63m0.32 0h1.82m0.335 0h4.331m0.292 0h2.968m0.336 0h1.175m0.335 0h0.65m-21.813 2h1.599m0.492 0h5.921m-8.012 10h3.641m0.423 0h1.74m0.321 0h0.859m0.349 0h1.602m0.336 0h1.643m0.31 0h2.581m-13.805 3.98h3.081m0.324 0h5.075m0.311 0h2.461m8.697 0.061h5.027m-24.976-6.041h4.284m0.337 0h4.63m0.32 0h1.82m0.335 0h4.331m-16.057-4h2.348m0.335 0h2.181m0.351 0h1.945m0.32 0h0.838m0.336 0h1.878m0.369 0h4.931m0.335 0h3.757m-19.924 2h3.954m0.311 0h4.199m0.32 0h1.642m0.31 0h3.95m0.317 0h4.314m-19.317 10h3.695m0.397 0h1.629m0.381 0h0.813m0.259 0h1.604m0.213 0h8.492m0.399 0h2.267m0.305 0h0.572m-16.816 2h1.205m-5.415 0h3.857m1.866 0h2.805m0.297 0h4.116m0.32 0h2.793m0.281 0h0.576m0.315 0h3.546m0.363 0h1.856m-18.781 2h1.702m-5.912 0h3.857m2.423 0h2.393"/> |
246 | + <path id="path2422" style="opacity:.15;fill:#0c0c0c;fill-rule:evenodd" d="m38.469 23.944c-0.173-0.101-0.307-0.075-0.396-0.018l-11.796 7.511-2.171 1.387-0.067 0.028-2.57 5.792 6.37 0.192 0.053-0.036 2.185-1.379 11.793-7.576c0.354-0.227-0.206-1.731-1.257-3.381-0.788-1.237-1.624-2.214-2.144-2.52z"/> |
247 | + <path id="rect2383" style="stroke-linejoin:round;stroke:#0c0c0c;stroke-width:.5;fill:url(#linearGradient2697)" d="m24.934 31.028c0.446-0.334 1.697 0.294 2.847 1.438 1.147 1.141 1.751 2.362 1.424 2.812-0.001 0.002 0.029 0.026 0.027 0.027l16.01-16.088c0.407-0.409-0.225-1.7-1.411-2.88s-2.48-1.806-2.887-1.397l-16.01 16.088z"/> |
248 | + <path id="rect3175" style="opacity:.8;stroke-linejoin:round;stroke:#e28ccd;stroke-width:.5;fill:#ffb6ed" d="m38.99 16.903c0.446-0.334 1.697 0.293 2.847 1.438 1.147 1.141 1.752 2.362 1.425 2.812-0.002 0.002 0.028 0.025 0.026 0.027l1.954-1.963 0.04-0.04c0.001-0.002-0.028-0.025-0.027-0.027 0.327-0.45-0.277-1.672-1.424-2.813-1.15-1.144-2.401-1.772-2.847-1.437l-0.04 0.04-1.954 1.963z"/> |
249 | + <path id="path3208" style="opacity:.6;fill:#0c0c0c" d="m24.934 31.028c0.446-0.334 1.697 0.294 2.847 1.438 1.147 1.141 1.751 2.362 1.424 2.812-0.001 0.002 0.029 0.026 0.027 0.027l11.026-11.079 0.04-0.041c0.001-0.001-0.028-0.025-0.027-0.026 0.327-0.451-0.278-1.672-1.425-2.813-1.149-1.144-2.401-1.772-2.846-1.437l-0.04 0.04-11.026 11.079z"/> |
250 | + <path id="path3233" style="fill:url(#linearGradient2691)" d="m36.8 19.104c0.446-0.334 1.697 0.293 2.847 1.437 1.147 1.142 1.751 2.363 1.424 2.813-0.001 0.002 0.029 0.025 0.027 0.027l0.2-0.2c0.001-0.002-0.028-0.025-0.027-0.027 0.327-0.45-0.278-1.672-1.425-2.813-1.149-1.144-2.401-1.772-2.846-1.437l-0.2 0.2z"/> |
251 | + <path id="path3216" style="fill:url(#linearGradient2688)" d="m36.617 19.288c0.446-0.335 1.698 0.293 2.847 1.437 1.147 1.141 1.752 2.363 1.425 2.813-0.002 0.002 0.028 0.025 0.027 0.027l0.199-0.201c0.001-0.001-0.028-0.025-0.027-0.026 0.327-0.451-0.277-1.672-1.424-2.813-1.15-1.144-2.401-1.772-2.847-1.438l-0.2 0.201z"/> |
252 | + <path id="path3248" style="fill:url(#linearGradient2685)" d="m37.435 18.466c0.446-0.334 1.697 0.293 2.847 1.437 1.147 1.142 1.751 2.363 1.424 2.813-0.001 0.002 0.028 0.025 0.027 0.027l0.2-0.2c0.001-0.002-0.029-0.025-0.027-0.027 0.327-0.45-0.278-1.672-1.425-2.813-1.149-1.144-2.401-1.772-2.847-1.437l-0.199 0.2z"/> |
253 | + <path id="path3250" style="fill:url(#linearGradient2682)" d="m37.252 18.65c0.446-0.335 1.697 0.293 2.847 1.437 1.147 1.141 1.752 2.363 1.425 2.813-0.002 0.002 0.028 0.025 0.026 0.027l0.2-0.201c0.001-0.002-0.028-0.025-0.027-0.027 0.327-0.45-0.277-1.671-1.424-2.812-1.15-1.144-2.401-1.772-2.847-1.438l-0.2 0.201z"/> |
254 | + <path id="path3256" style="fill:url(#linearGradient2679)" d="m38.073 17.825c0.446-0.335 1.697 0.293 2.847 1.437 1.147 1.142 1.751 2.363 1.424 2.813-0.001 0.002 0.028 0.025 0.027 0.027l0.2-0.201c0.001-0.001-0.029-0.025-0.027-0.026 0.327-0.451-0.278-1.672-1.425-2.813-1.149-1.144-2.401-1.772-2.847-1.437l-0.199 0.2z"/> |
255 | + <path id="path3258" style="fill:url(#linearGradient2676)" d="m37.89 18.009c0.446-0.335 1.697 0.293 2.847 1.437 1.147 1.141 1.752 2.362 1.425 2.813-0.002 0.001 0.028 0.025 0.027 0.026l0.199-0.2c0.001-0.002-0.028-0.025-0.027-0.027 0.327-0.45-0.277-1.671-1.424-2.813-1.15-1.144-2.401-1.771-2.847-1.437l-0.2 0.201z"/> |
256 | + <path id="path3270" style="fill-rule:evenodd;stroke:url(#linearGradient2673);stroke-width:.5;fill:url(#linearGradient2670)" d="m21.866 38.31l7.284-2.97 0.062-0.063c0.327-0.45-0.285-1.671-1.432-2.813-1.15-1.144-2.4-1.768-2.846-1.433l-3.068 7.279z"/> |
257 | + <path id="path3281" style="fill-rule:evenodd;stroke:#0c0c0c;stroke-width:.5;fill:#0c0c0c" d="m22.697 36.339l-0.831 1.964 1.986-0.815c-0.159-0.191-0.306-0.384-0.497-0.575-0.22-0.219-0.437-0.396-0.658-0.574z"/> |
258 | +</svg> |
259 | |
260 | === added file 'data/demo/icons/firefox.png' |
261 | Binary files data/demo/icons/firefox.png 1970-01-01 00:00:00 +0000 and data/demo/icons/firefox.png 2015-09-18 17:06:14 +0000 differ |
262 | === added file 'data/demo/icons/gimp.png' |
263 | Binary files data/demo/icons/gimp.png 1970-01-01 00:00:00 +0000 and data/demo/icons/gimp.png 2015-09-18 17:06:14 +0000 differ |
264 | === added file 'data/demo/icons/libreoffice-startcenter.png' |
265 | Binary files data/demo/icons/libreoffice-startcenter.png 1970-01-01 00:00:00 +0000 and data/demo/icons/libreoffice-startcenter.png 2015-09-18 17:06:14 +0000 differ |
266 | === added file 'data/demo/icons/xchat-gnome.png' |
267 | Binary files data/demo/icons/xchat-gnome.png 1970-01-01 00:00:00 +0000 and data/demo/icons/xchat-gnome.png 2015-09-18 17:06:14 +0000 differ |
268 | === added file 'data/puritine-click.conf' |
269 | --- data/puritine-click.conf 1970-01-01 00:00:00 +0000 |
270 | +++ data/puritine-click.conf 2015-09-18 17:06:14 +0000 |
271 | @@ -0,0 +1,34 @@ |
272 | +description "Puritine Click chroot linking" |
273 | + |
274 | +start on started unity8 |
275 | + |
276 | +script |
277 | +PACKAGE_PATH=`click pkgdir com.ubuntu.puritine` |
278 | +CONTAINER_NAME=puritine |
279 | +CHROOT_PATH=$PACKAGE_PATH/libertine-data/libertine-container/$CONTAINER_NAME |
280 | + |
281 | +if [ -x $CHROOT_PATH/rootfs ] ; then |
282 | + # Link the chroot |
283 | + if [ ! -f $HOME/.cache/libertine-container/$CONTAINER_NAME/rootfs ] ; then |
284 | + mkdir -p $HOME/.cache/libertine-container/$CONTAINER_NAME/ |
285 | + ln -s $CHROOT_PATH/rootfs $HOME/.cache/libertine-container/$CONTAINER_NAME/rootfs |
286 | + fi |
287 | + |
288 | + # Link the container config |
289 | + if [ ! -f $HOME/.local/share/libertine/ContainersConfig.json ] ; then |
290 | + mkdir -p $HOME/.local/share/libertine/ |
291 | + ln -s $PACKAGE_PATH/libertine-config/libertine/ContainersConfig.json $HOME/.local/share/libertine/ContainersConfig.json |
292 | + fi |
293 | + |
294 | + # Link the Compiz configs |
295 | + if [ ! -d $HOME/.local/share/libertine-container/user-data/$CONTAINER_NAME/.config/compiz-1/compizconfig ] ; then |
296 | + mkdir -p $HOME/.local/share/libertine-container/user-data/$CONTAINER_NAME/.config/compiz-1/compizconfig/ |
297 | + ln -s $PACKAGE_PATH/libertine-config/libertine-container/user-data/$CONTAINER_NAME/.config/compiz-1/compizconfig/config $HOME/.local/share/libertine-container/user-data/$CONTAINER_NAME/.config/compiz-1/compizconfig/config |
298 | + ln -s $PACKAGE_PATH/libertine-config/libertine-container/user-data/$CONTAINER_NAME/.config/compiz-1/compizconfig/Default.ini $HOME/.local/share/libertine-container/user-data/$CONTAINER_NAME/.config/compiz-1/compizconfig/Default.ini |
299 | + fi |
300 | +else |
301 | + rm -rf $HOME/.cache/libertine-container/$CONTAINER_NAME |
302 | + rm -rf $HOME/.local/share/libertine |
303 | + rm -rf $HOME/.local/share/libertine-container/user-data/$CONTAINER_NAME/.config/ |
304 | +fi |
305 | +end script |
306 | |
307 | === modified file 'debian/changelog' |
308 | --- debian/changelog 2015-09-10 14:36:22 +0000 |
309 | +++ debian/changelog 2015-09-18 17:06:14 +0000 |
310 | @@ -1,3 +1,26 @@ |
311 | +libertine (0.99.2-0ubuntu1) UNRELEASED; urgency=medium |
312 | + |
313 | + [ Chris Townsend ] |
314 | + * Rename desktop files to match the Puritine container name. |
315 | + * Add an upstart job to link to the Puritine container data. |
316 | + * Add a function to determine the architecture used to create the |
317 | + container and set the container's sources.list entries appropriately. |
318 | + * Add support for explicitly naming a container when creating one and |
319 | + various variable naming cleanup. |
320 | + * Add a policy-rc.d script to the chroot to keep certain services from |
321 | + starting during package installation. |
322 | + * Add runtime depends for fakechroot and fakeroot. |
323 | + * Install Compiz by default inside the container. |
324 | + * Install the create_bespoke_container script. This script will be moved |
325 | + to lp:puritine in the future. |
326 | + * Add a libertine-demo package that installs desktop files and icons for |
327 | + the supported X apps. |
328 | + |
329 | + [ Ted Gould ] |
330 | + * Add an upstart job to link to the Puritine container data. |
331 | + |
332 | + -- Chris Townsend <christopher.townsend@canonical.com> Fri, 18 Sep 2015 12:58:32 -0400 |
333 | + |
334 | libertine (0.99+15.10.20150910.2-0ubuntu1) wily; urgency=medium |
335 | |
336 | [ CI Train Bot ] |
337 | |
338 | === modified file 'debian/control' |
339 | --- debian/control 2015-09-10 13:45:10 +0000 |
340 | +++ debian/control 2015-09-18 17:06:14 +0000 |
341 | @@ -30,8 +30,8 @@ |
342 | |
343 | Package: libertine-tools |
344 | Architecture: any |
345 | -Depends: python3-daemonize, |
346 | - python3-libertine, |
347 | +Depends: python3-libertine, |
348 | + python3-psutil, |
349 | ${misc:Depends}, |
350 | ${python3:Depends}, |
351 | ${shlibs:Depends} |
352 | @@ -77,6 +77,8 @@ |
353 | Section: python |
354 | Multi-Arch: allowed |
355 | Depends: debootstrap, |
356 | + fakechroot, |
357 | + fakeroot, |
358 | gir1.2-libertine, |
359 | lsb-release, |
360 | lxc-templates, |
361 | @@ -88,3 +90,12 @@ |
362 | ${python3:Depends} |
363 | Description: Python3 scripts for the Libertine application sandbox |
364 | Python3 modules for the Libertine application sandbox tools. |
365 | + |
366 | +Package: libertine-demo |
367 | +Architecture: any |
368 | +Multi-Arch: allowed |
369 | +Depends: libertine-tools, |
370 | + ${misc:Depends} |
371 | +Description: Adds desktop files and icon for Unity 8 desktop support |
372 | + Add desktop files and icons for the targeted applications needed for legacy |
373 | + X application support on Unity 8. |
374 | |
375 | === added file 'debian/libertine-demo.install' |
376 | --- debian/libertine-demo.install 1970-01-01 00:00:00 +0000 |
377 | +++ debian/libertine-demo.install 2015-09-18 17:06:14 +0000 |
378 | @@ -0,0 +1,4 @@ |
379 | +data/demo/icons/* usr/share/libertine/demo/icons/ |
380 | +usr/bin/create_bespoke_container |
381 | +usr/share/applications/demo/* usr/share/applications/ |
382 | +usr/share/upstart/sessions/puritine-click.conf |
383 | |
384 | === added file 'debian/libertine-demo.lintian-overrides' |
385 | --- debian/libertine-demo.lintian-overrides 1970-01-01 00:00:00 +0000 |
386 | +++ debian/libertine-demo.lintian-overrides 2015-09-18 17:06:14 +0000 |
387 | @@ -0,0 +1,5 @@ |
388 | +libertine-demo: desktop-command-not-in-package usr/share/applications/trusty_firefox_0.0.desktop bin/true |
389 | +libertine-demo: desktop-command-not-in-package usr/share/applications/trusty_gedit_0.0.desktop bin/true |
390 | +libertine-demo: desktop-command-not-in-package usr/share/applications/trusty_gimp_0.0.desktop bin/true |
391 | +libertine-demo: desktop-command-not-in-package usr/share/applications/trusty_libreoffice-startcenter_0.0.desktop bin/true |
392 | +libertine-demo: desktop-command-not-in-package usr/share/applications/trusty_xchat-gnome_0.0.desktop bin/true |
393 | |
394 | === modified file 'libertine/ContainerConfig.cpp' |
395 | --- libertine/ContainerConfig.cpp 2015-07-30 15:16:08 +0000 |
396 | +++ libertine/ContainerConfig.cpp 2015-09-18 17:06:14 +0000 |
397 | @@ -100,11 +100,11 @@ |
398 | } |
399 | |
400 | QString |
401 | - extract_image_id_from_json(QJsonObject const& json_object, |
402 | - QString const& container_id) |
403 | + extract_distro_series_from_json(QJsonObject const& json_object, |
404 | + QString const& container_id) |
405 | { |
406 | - QString image = container_id; |
407 | - QJsonValue value = json_object["image"]; |
408 | + QString distro_series = container_id; |
409 | + QJsonValue value = json_object["distro"]; |
410 | if (value != QJsonValue::Undefined) |
411 | { |
412 | QJsonValue::Type value_type = value.type(); |
413 | @@ -113,12 +113,12 @@ |
414 | QString s = value.toString(); |
415 | if (s.length() > 0) |
416 | { |
417 | - image = s; |
418 | + distro_series = s; |
419 | } |
420 | } |
421 | } |
422 | |
423 | - return image; |
424 | + return distro_series; |
425 | } |
426 | |
427 | const static struct { QString string; ContainerConfig::InstallStatus enumeration; } install_status_names[] = |
428 | @@ -268,13 +268,13 @@ |
429 | ContainerConfig(QString const& container_id, |
430 | QString const& container_name, |
431 | QString const& container_type, |
432 | - QString const& image_id, |
433 | + QString const& distro_series, |
434 | QObject* parent) |
435 | : QObject(parent) |
436 | , container_id_(container_id) |
437 | , container_name_(container_name) |
438 | , container_type_(container_type) |
439 | -, image_id_(image_id) |
440 | +, distro_series_(distro_series) |
441 | , install_status_(InstallStatus::New) |
442 | { } |
443 | |
444 | @@ -287,7 +287,7 @@ |
445 | , container_id_(extract_container_id_from_json(json_object)) |
446 | , container_name_(extract_container_name_from_json(json_object, container_id_)) |
447 | , container_type_(extract_container_type_from_json(json_object, container_id_)) |
448 | -, image_id_(extract_image_id_from_json(json_object, container_id_)) |
449 | +, distro_series_(extract_distro_series_from_json(json_object, container_id_)) |
450 | , install_status_(extract_install_status_from_json(json_object)) |
451 | , container_apps_(extract_container_apps_from_json(json_object)) |
452 | { } |
453 | @@ -322,8 +322,8 @@ |
454 | |
455 | |
456 | QString const& ContainerConfig:: |
457 | -image_id() const |
458 | -{ return image_id_; } |
459 | +distro_series() const |
460 | +{ return distro_series_; } |
461 | |
462 | |
463 | ContainerConfig::InstallStatus ContainerConfig:: |
464 | @@ -354,7 +354,7 @@ |
465 | json_object["id"] = container_id_; |
466 | json_object["name"] = container_name_; |
467 | json_object["type"] = container_type_; |
468 | - json_object["image"] = image_id_; |
469 | + json_object["distro"] = distro_series_; |
470 | for (auto const& name: install_status_names) |
471 | { |
472 | if (install_status_ == name.enumeration) |
473 | |
474 | === modified file 'libertine/ContainerConfig.h' |
475 | --- libertine/ContainerConfig.h 2015-07-30 15:16:08 +0000 |
476 | +++ libertine/ContainerConfig.h 2015-09-18 17:06:14 +0000 |
477 | @@ -63,7 +63,7 @@ |
478 | Q_ENUMS(InstallStatus) |
479 | Q_PROPERTY(QString containerId READ container_id) |
480 | Q_PROPERTY(QString name READ name WRITE name NOTIFY nameChanged) |
481 | - Q_PROPERTY(QString imageId READ image_id) |
482 | + Q_PROPERTY(QString distroSeries READ distro_series) |
483 | Q_PROPERTY(InstallStatus installStatus READ install_status WRITE install_status NOTIFY installStatusChanged) |
484 | |
485 | public: |
486 | @@ -76,7 +76,7 @@ |
487 | ContainerConfig(QString const& container_id, |
488 | QString const& container_name, |
489 | QString const& container_type, |
490 | - QString const& image_id, |
491 | + QString const& distro_series, |
492 | QObject* parent = nullptr); |
493 | ContainerConfig(QJsonObject const& json_object, |
494 | QObject* parent = nullptr); |
495 | @@ -95,7 +95,7 @@ |
496 | container_type() const; |
497 | |
498 | QString const& |
499 | - image_id() const; |
500 | + distro_series() const; |
501 | |
502 | InstallStatus |
503 | install_status() const; |
504 | @@ -117,7 +117,7 @@ |
505 | QString container_id_; |
506 | QString container_name_; |
507 | QString container_type_; |
508 | - QString image_id_; |
509 | + QString distro_series_; |
510 | InstallStatus install_status_; |
511 | QList<ContainerApps*> container_apps_; |
512 | }; |
513 | |
514 | === modified file 'libertine/ContainerConfigList.cpp' |
515 | --- libertine/ContainerConfigList.cpp 2015-07-30 15:16:08 +0000 |
516 | +++ libertine/ContainerConfigList.cpp 2015-09-18 17:06:14 +0000 |
517 | @@ -108,25 +108,32 @@ |
518 | QString ContainerConfigList:: |
519 | addNewContainer(QVariantMap const& image, QString const& type) |
520 | { |
521 | - QString image_id = image["id"].toString(); |
522 | - QString id = image_id; |
523 | + QString distro_series = image["distro_series"].toString(); |
524 | + QString container_id = image["container_id"].toString(); |
525 | QString name = image["name"].toString(); |
526 | - int bis = generate_bis(image_id); |
527 | + |
528 | + // Work around for now until we implement host distro discovery |
529 | + if (distro_series.isEmpty()) |
530 | + { |
531 | + distro_series = container_id; |
532 | + } |
533 | + |
534 | + int bis = generate_bis(container_id); |
535 | if (bis > 0) |
536 | { |
537 | - id = QString("%1-%2").arg(id).arg(bis); |
538 | + container_id = QString("%1-%2").arg(container_id).arg(bis); |
539 | name = QString("%1 (%2)").arg(name).arg(bis); |
540 | } |
541 | |
542 | beginInsertRows(QModelIndex(), rowCount(), rowCount()); |
543 | - configs_.append(new ContainerConfig(id, name, type, image_id, this)); |
544 | + configs_.append(new ContainerConfig(container_id, name, type, distro_series, this)); |
545 | if (this->size() == 1) |
546 | - default_container_id_ = id; |
547 | + default_container_id_ = container_id; |
548 | |
549 | save_container_config_list(); |
550 | endInsertRows(); |
551 | |
552 | - return id; |
553 | + return container_id; |
554 | } |
555 | |
556 | |
557 | @@ -325,7 +332,7 @@ |
558 | roles[static_cast<int>(DataRole::ContainerId)] = "containerId"; |
559 | roles[static_cast<int>(DataRole::ContainerName)] = "name"; |
560 | roles[static_cast<int>(DataRole::ContainerType)] = "type"; |
561 | - roles[static_cast<int>(DataRole::ImageId)] = "imageId"; |
562 | + roles[static_cast<int>(DataRole::DistroSeries)] = "distroSeries"; |
563 | roles[static_cast<int>(DataRole::InstallStatus)] = "installStatus"; |
564 | return roles; |
565 | } |
566 | @@ -349,8 +356,8 @@ |
567 | case DataRole::ContainerType: |
568 | result = configs_[index.row()]->container_type(); |
569 | break; |
570 | - case DataRole::ImageId: |
571 | - result = configs_[index.row()]->image_id(); |
572 | + case DataRole::DistroSeries: |
573 | + result = configs_[index.row()]->distro_series(); |
574 | break; |
575 | case DataRole::InstallStatus: |
576 | result = static_cast<int>(configs_[index.row()]->install_status()); |
577 | @@ -381,7 +388,7 @@ |
578 | |
579 | |
580 | int ContainerConfigList:: |
581 | -generate_bis(QString const& image_id) |
582 | +generate_bis(QString const& id) |
583 | { |
584 | int bis = 0; |
585 | int max = 0; |
586 | @@ -389,7 +396,7 @@ |
587 | for (auto const& config: configs_) |
588 | { |
589 | int found = re.indexIn(config->container_id()); |
590 | - if (found >= 0 && re.cap(1) == image_id) |
591 | + if (found >= 0 && re.cap(1) == id) |
592 | { |
593 | ++bis; |
594 | bool ok; |
595 | |
596 | === modified file 'libertine/ContainerConfigList.h' |
597 | --- libertine/ContainerConfigList.h 2015-08-07 12:39:26 +0000 |
598 | +++ libertine/ContainerConfigList.h 2015-09-18 17:06:14 +0000 |
599 | @@ -61,7 +61,7 @@ |
600 | ContainerId = Qt::UserRole + 1, /**< The container ID */ |
601 | ContainerName, /**< The container name */ |
602 | ContainerType, /**< The type of container - lxc or chroot */ |
603 | - ImageId, /**< The image from which the container was built */ |
604 | + DistroSeries, /**< The distro from which the container was built */ |
605 | InstallStatus, /**< Current container install status */ |
606 | Error /**< last role (error) */ |
607 | }; |
608 | @@ -179,7 +179,7 @@ |
609 | * identical container ids and names. |
610 | */ |
611 | int |
612 | - generate_bis(QString const& image_id); |
613 | + generate_bis(QString const& distro_series); |
614 | |
615 | void |
616 | save_container_config_list(); |
617 | |
618 | === modified file 'libertine/libertine_container_manager_cli.cpp' |
619 | --- libertine/libertine_container_manager_cli.cpp 2015-08-26 08:22:14 +0000 |
620 | +++ libertine/libertine_container_manager_cli.cpp 2015-09-18 17:06:14 +0000 |
621 | @@ -60,12 +60,23 @@ |
622 | commandlineParser.clearPositionalArguments(); |
623 | commandlineParser.addPositionalArgument("create", QCoreApplication::translate("main", "Create a new Libertine container.")); |
624 | commandlineParser.addOption({{"t", "type"}, QCoreApplication::translate("main", "Type of container. Either 'lxc' or 'chroot'."), "container_type"}); |
625 | - commandlineParser.addOption({{"s", "series"}, QCoreApplication::translate("main", "Ubuntu distro series to create."), "distro_series"}); |
626 | + commandlineParser.addOption({{"d", "distro"}, QCoreApplication::translate("main", "Ubuntu distro series to create."), "distro_series"}); |
627 | + commandlineParser.addOption({{"i", "id"}, QCoreApplication::translate("main", "Container identifier."), "container_id"}); |
628 | commandlineParser.process(app); |
629 | |
630 | QString password; |
631 | const QString container_type = commandlineParser.value("type"); |
632 | - const QString distro_series = commandlineParser.value("series"); |
633 | + const QString distro_series = commandlineParser.value("distro"); |
634 | + |
635 | + QString container_id; |
636 | + if (commandlineParser.isSet("id")) |
637 | + { |
638 | + container_id = commandlineParser.value("id"); |
639 | + } |
640 | + else |
641 | + { |
642 | + container_id = distro_series; |
643 | + } |
644 | |
645 | if (container_type == "lxc") |
646 | { |
647 | @@ -99,26 +110,27 @@ |
648 | |
649 | QVariantMap image; |
650 | |
651 | + image.insert("distro_series", distro_series); |
652 | if (distro_series == "trusty") |
653 | { |
654 | - image.insert("id", "trusty"); |
655 | + image.insert("container_id", container_id); |
656 | image.insert("name", "Ubuntu 'Trusty Tahr'"); |
657 | } |
658 | else if (distro_series == "vivid") |
659 | { |
660 | - image.insert("id", "vivid"); |
661 | + image.insert("container_id", container_id); |
662 | image.insert("name", "Ubuntu 'Vivid Vervet'"); |
663 | } |
664 | else |
665 | { |
666 | - image.insert("id", "wily"); |
667 | + image.insert("container_id", container_id); |
668 | image.insert("name", "Ubuntu 'Wily Werewolf'"); |
669 | } |
670 | |
671 | - QString container_id = containers->addNewContainer(image, container_type); |
672 | + QString unique_container_id = containers->addNewContainer(image, container_type); |
673 | |
674 | ContainerManagerWorker *worker = new ContainerManagerWorker(ContainerManagerWorker::ContainerAction::Create, |
675 | - container_id, |
676 | + unique_container_id, |
677 | container_type, |
678 | password); |
679 | QObject::connect(worker, SIGNAL(finished()), &app, SLOT(quit())); |
680 | @@ -128,14 +140,14 @@ |
681 | { |
682 | commandlineParser.clearPositionalArguments(); |
683 | commandlineParser.addPositionalArgument("destroy", QCoreApplication::translate("main", "Destroy an existing Libertine container.")); |
684 | - commandlineParser.addOption({{"n", "name"}, QCoreApplication::translate("main", "Name of container"), "container_name"}); |
685 | + commandlineParser.addOption({{"i", "id"}, QCoreApplication::translate("main", "Container identifier."), "container_id"}); |
686 | |
687 | commandlineParser.process(app); |
688 | |
689 | QString container_id; |
690 | - if (commandlineParser.isSet("name")) |
691 | + if (commandlineParser.isSet("id")) |
692 | { |
693 | - container_id = commandlineParser.value("name"); |
694 | + container_id = commandlineParser.value("id"); |
695 | } |
696 | else |
697 | { |
698 | @@ -161,15 +173,15 @@ |
699 | commandlineParser.clearPositionalArguments(); |
700 | commandlineParser.addPositionalArgument("install-package", QCoreApplication::translate("main", "Install a package in an existing Libertine container.")); |
701 | |
702 | - commandlineParser.addOption({{"n", "name"}, QCoreApplication::translate("main", "Name of container"), "container_name"}); |
703 | + commandlineParser.addOption({{"i", "id"}, QCoreApplication::translate("main", "Container identifier."), "container_id"}); |
704 | commandlineParser.addOption({{"p", "package"}, QCoreApplication::translate("main", "Name of package to install"), "package_name"}); |
705 | |
706 | commandlineParser.process(app); |
707 | |
708 | QString container_id; |
709 | - if (commandlineParser.isSet("name")) |
710 | + if (commandlineParser.isSet("id")) |
711 | { |
712 | - container_id = commandlineParser.value("name"); |
713 | + container_id = commandlineParser.value("id"); |
714 | } |
715 | else |
716 | { |
717 | @@ -200,14 +212,14 @@ |
718 | commandlineParser.clearPositionalArguments(); |
719 | commandlineParser.addPositionalArgument("update", QCoreApplication::translate("main", "Update packages in an existing Libertine container.")); |
720 | |
721 | - commandlineParser.addOption({{"n", "name"}, QCoreApplication::translate("main", "Name of container"), "container_name"}); |
722 | + commandlineParser.addOption({{"i", "id"}, QCoreApplication::translate("main", "Container identifier."), "container_id"}); |
723 | |
724 | commandlineParser.process(app); |
725 | |
726 | QString container_id; |
727 | - if (commandlineParser.isSet("name")) |
728 | + if (commandlineParser.isSet("id")) |
729 | { |
730 | - container_id = commandlineParser.value("name"); |
731 | + container_id = commandlineParser.value("id"); |
732 | } |
733 | else |
734 | { |
735 | |
736 | === modified file 'libertine/qml/image_sources.js' |
737 | --- libertine/qml/image_sources.js 2015-06-03 19:03:52 +0000 |
738 | +++ libertine/qml/image_sources.js 2015-09-18 17:06:14 +0000 |
739 | @@ -1,4 +1,4 @@ |
740 | var availableSources = [ |
741 | - { id: "wily", name: "Ubuntu 'Wily Werewolf'" }, |
742 | - { id: "sid", name: "Debian 'Unstable'" } |
743 | + { container_id: "wily", name: "Ubuntu 'Wily Werewolf'" }, |
744 | + { container_id: "sid", name: "Debian 'Unstable'" } |
745 | ] |
746 | |
747 | === modified file 'python/libertine/Libertine.py' |
748 | --- python/libertine/Libertine.py 2015-09-10 13:45:10 +0000 |
749 | +++ python/libertine/Libertine.py 2015-09-18 17:06:14 +0000 |
750 | @@ -12,17 +12,18 @@ |
751 | # You should have received a copy of the GNU General Public License along |
752 | # with this program. If not, see <http://www.gnu.org/licenses/>. |
753 | |
754 | -import lxc |
755 | -import subprocess |
756 | -import os |
757 | -import lsb_release |
758 | import crypt |
759 | import ctypes |
760 | -import tempfile |
761 | import io |
762 | -import sys |
763 | +import json |
764 | +import lsb_release |
765 | +import lxc |
766 | +import os |
767 | import shlex |
768 | import shutil |
769 | +import subprocess |
770 | +import sys |
771 | +import tempfile |
772 | import xdg.BaseDirectory as basedir |
773 | |
774 | from contextlib import contextmanager |
775 | @@ -125,12 +126,72 @@ |
776 | def get_libertine_user_data_dir(name): |
777 | return os.path.join(basedir.xdg_data_home, 'libertine-container', 'user-data', name) |
778 | |
779 | +def get_libertine_json_file_path(): |
780 | + return os.path.join(basedir.xdg_data_home, 'libertine', 'ContainersConfig.json') |
781 | + |
782 | +def get_container_distro(container_id): |
783 | + container_distro = "" |
784 | + |
785 | + with open(get_libertine_json_file_path()) as fd: |
786 | + container_list = json.load(fd) |
787 | + fd.close() |
788 | + |
789 | + for container in container_list["containerList"]: |
790 | + if container["id"] == container_id: |
791 | + return container["distro"] |
792 | + |
793 | + return "" |
794 | + |
795 | +def get_host_architecture(): |
796 | + dpkg = subprocess.Popen(['dpkg', '--print-architecture'], |
797 | + stdout=subprocess.PIPE, |
798 | + universal_newlines=True) |
799 | + if dpkg.wait() != 0: |
800 | + parser.error("Failed to determine the local architecture.") |
801 | + |
802 | + return dpkg.stdout.read().strip() |
803 | + |
804 | +def chown_recursive_dirs(path): |
805 | + uid = int(os.environ['SUDO_UID']) |
806 | + gid = int(os.environ['SUDO_GID']) |
807 | + |
808 | + if uid is not None and gid is not None: |
809 | + for root, dirs, files in os.walk(path): |
810 | + for d in dirs: |
811 | + os.chown(os.path.join(root, d), uid, gid) |
812 | + for f in files: |
813 | + os.chown(os.path.join(root, f), uid, gid) |
814 | + |
815 | + os.chown(path, uid, gid) |
816 | + |
817 | def create_libertine_user_data_dir(name): |
818 | user_data = get_libertine_user_data_dir(name) |
819 | |
820 | if not os.path.exists(user_data): |
821 | os.makedirs(user_data) |
822 | |
823 | +def create_compiz_config(name): |
824 | + user_data = get_libertine_user_data_dir(name) |
825 | + |
826 | + compiz_config_dir = os.path.join(user_data, '.config', 'compiz-1', 'compizconfig') |
827 | + |
828 | + os.makedirs(compiz_config_dir) |
829 | + |
830 | + # Create the general Compiz config file |
831 | + with open(os.path.join(compiz_config_dir, 'config'), 'w+') as fd: |
832 | + fd.write("[general]\n") |
833 | + fd.write("profile = Default\n") |
834 | + fd.write("integration = true\n") |
835 | + fd.close() |
836 | + |
837 | + # Create the default profile file |
838 | + with open(os.path.join(compiz_config_dir, 'Default.ini'), 'w+') as fd: |
839 | + fd.write("[core]\n") |
840 | + fd.write("s0_active_plugins = core;place;\n\n") |
841 | + fd.write("[place]\n") |
842 | + fd.write("s0_mode = 3") |
843 | + fd.close() |
844 | + |
845 | def start_container_for_update(container): |
846 | if not container.running: |
847 | print("Starting the container...") |
848 | @@ -167,7 +228,7 @@ |
849 | class LibertineLXC(object): |
850 | def __init__(self, name): |
851 | self.container = lxc_container(name) |
852 | - self.series = name.split("-")[0] |
853 | + self.series = get_container_distro(name) |
854 | |
855 | def destroy_libertine_container(self): |
856 | if self.container.defined: |
857 | @@ -211,13 +272,7 @@ |
858 | installed_release = get_host_distro_release() |
859 | |
860 | ## Figure out the host architecture |
861 | - dpkg = subprocess.Popen(['dpkg', '--print-architecture'], |
862 | - stdout=subprocess.PIPE, |
863 | - universal_newlines=True) |
864 | - if dpkg.wait() != 0: |
865 | - parser.error("Failed to determine the local architecture.") |
866 | - |
867 | - architecture = dpkg.stdout.read().strip() |
868 | + architecture = get_host_architecture() |
869 | |
870 | self.container.create("download", 0, |
871 | {"dist": "ubuntu", |
872 | @@ -238,6 +293,13 @@ |
873 | else: |
874 | print("Container failed to start.") |
875 | |
876 | + print("Updating the contents of the container after creation...") |
877 | + self.update_libertine_container() |
878 | + |
879 | + print("Installing Compiz as the Xmir window manager...") |
880 | + self.install_package('compiz') |
881 | + create_compiz_config(self.container.name) |
882 | + |
883 | def create_libertine_config(self): |
884 | user_id = os.getuid() |
885 | home_entry = "%s %s none bind,create=dir" % (get_libertine_user_data_dir(self.container.name), home_path.strip('/')) |
886 | @@ -324,9 +386,10 @@ |
887 | class LibertineChroot(object): |
888 | def __init__(self, name): |
889 | self.name = name |
890 | - self.series = name.split("-")[0] |
891 | + self.series = get_container_distro(name) |
892 | self.chroot_path = os.path.join(get_libertine_container_path(), name, "rootfs") |
893 | os.environ['FAKECHROOT_CMD_SUBST'] = '$FAKECHROOT_CMD_SUBST:/usr/bin/chfn=/bin/true' |
894 | + os.environ['DEBIAN_FRONTEND'] = 'noninteractive' |
895 | |
896 | def destroy_libertine_container(self): |
897 | shutil.rmtree(self.chroot_path) |
898 | @@ -348,14 +411,32 @@ |
899 | os.remove(os.path.join(self.chroot_path, 'dev')) |
900 | os.remove(os.path.join(self.chroot_path, 'proc')) |
901 | |
902 | + with open(os.path.join(self.chroot_path, 'usr', 'sbin', 'policy-rc.d'), 'w+') as fd: |
903 | + fd.write("#!/bin/sh\n\n") |
904 | + fd.write("while true; do\n") |
905 | + fd.write("case \"$1\" in\n") |
906 | + fd.write(" -*) shift ;;\n") |
907 | + fd.write(" makedev) exit 0;;\n") |
908 | + fd.write(" *) exit 101;;\n") |
909 | + fd.write("esac\n") |
910 | + fd.write("done\n") |
911 | + fd.close() |
912 | + |
913 | + os.chmod(os.path.join(self.chroot_path, 'usr', 'sbin', 'policy-rc.d'), 0o755) |
914 | + |
915 | # Add universe and -updates to the chroot's sources.list |
916 | + if (get_host_architecture() == 'armhf'): |
917 | + archive = "deb http://ports.ubuntu.com/ubuntu-ports " |
918 | + else: |
919 | + archive = "deb http://archive.ubuntu.com/ubuntu " |
920 | + |
921 | print("Updating chroot's sources.list entries...") |
922 | with open(os.path.join(self.chroot_path, 'etc', 'apt', 'sources.list'), 'a') as fd: |
923 | - fd.write("deb http://archive.ubuntu.com/ubuntu " + installed_release + " universe\n") |
924 | - fd.write("deb http://archive.ubuntu.com/ubuntu " + installed_release + "-updates main\n") |
925 | - fd.write("deb http://archive.ubuntu.com/ubuntu " + installed_release + "-updates universe\n") |
926 | + fd.write(archive + installed_release + " universe\n") |
927 | + fd.write(archive + installed_release + "-updates main\n") |
928 | + fd.write(archive + installed_release + "-updates universe\n") |
929 | |
930 | - fd.close() |
931 | + fd.close() |
932 | |
933 | create_libertine_user_data_dir(self.name) |
934 | |
935 | @@ -399,6 +480,16 @@ |
936 | args = shlex.split(command_line) |
937 | cmd = subprocess.Popen(args).wait() |
938 | |
939 | + print("Updating the contents of the container after creation...") |
940 | + self.update_libertine_container() |
941 | + |
942 | + print("Installing Compiz as the Xmir window manager...") |
943 | + self.install_package("compiz") |
944 | + create_compiz_config(self.name) |
945 | + |
946 | + # Check if the container was created as root and chown the user directories as necessary |
947 | + chown_recursive_dirs(get_libertine_user_data_dir(self.name)) |
948 | + |
949 | def update_libertine_container(self): |
950 | if self.series == "trusty": |
951 | proot_cmd = '/usr/bin/proot' |
952 | |
953 | === modified file 'tests/unit/ContainerConfigListTests.cpp' |
954 | --- tests/unit/ContainerConfigListTests.cpp 2015-07-09 15:22:37 +0000 |
955 | +++ tests/unit/ContainerConfigListTests.cpp 2015-09-18 17:06:14 +0000 |
956 | @@ -43,7 +43,7 @@ |
957 | "{" |
958 | "\"id\": \"wily\"," |
959 | "\"name\": \"Wily Werewolf\"," |
960 | - "\"image\": \"wily\"," |
961 | + "\"distro\": \"wily\"," |
962 | "\"installedApps\": [" |
963 | "]," |
964 | "\"installStatus\": \"ready\"" |
965 | @@ -51,7 +51,7 @@ |
966 | "{" |
967 | "\"id\": \"wily1\"," |
968 | "\"name\": \"Wily Werewolf\"," |
969 | - "\"image\": \"wily\"," |
970 | + "\"distro\": \"wily\"," |
971 | "\"installedApps\": [" |
972 | "]," |
973 | "\"installStatus\": \"new\"" |
974 | |
975 | === modified file 'tests/unit/ContainerConfigTests.cpp' |
976 | --- tests/unit/ContainerConfigTests.cpp 2015-07-30 15:16:08 +0000 |
977 | +++ tests/unit/ContainerConfigTests.cpp 2015-09-18 17:06:14 +0000 |
978 | @@ -28,12 +28,12 @@ |
979 | /** Verify constructing a New containerConfig DTRT. */ |
980 | TEST(LibertineContainerConfig, constructFromScalars) |
981 | { |
982 | - ContainerConfig container_config("id", "name", "type", "image"); |
983 | + ContainerConfig container_config("id", "name", "type", "distro"); |
984 | |
985 | EXPECT_EQ(container_config.container_id(), "id"); |
986 | EXPECT_EQ(container_config.name(), "name"); |
987 | EXPECT_EQ(container_config.container_type(), "type"); |
988 | - EXPECT_EQ(container_config.image_id(), "image"); |
989 | + EXPECT_EQ(container_config.distro_series(), "distro"); |
990 | EXPECT_EQ(container_config.install_status(), ContainerConfig::InstallStatus::New); |
991 | } |
992 | |
993 | @@ -45,7 +45,7 @@ |
994 | "\"id\": \"wily3\"," |
995 | "\"name\": \"Wily Werewolf\"," |
996 | "\"type\": \"lxc\"," |
997 | - "\"image\": \"wily\"," |
998 | + "\"distro\": \"wily\"," |
999 | "\"installedApps\": [" |
1000 | "]," |
1001 | "\"installStatus\": \"ready\"" |
1002 | @@ -59,7 +59,7 @@ |
1003 | |
1004 | EXPECT_EQ(container_config.container_id().toStdString(), "wily3"); |
1005 | EXPECT_EQ(container_config.name().toStdString(), "Wily Werewolf"); |
1006 | - EXPECT_EQ(container_config.image_id().toStdString(), "wily"); |
1007 | + EXPECT_EQ(container_config.distro_series().toStdString(), "wily"); |
1008 | EXPECT_EQ(container_config.install_status(), ContainerConfig::InstallStatus::Ready); |
1009 | EXPECT_EQ(container_config.container_apps().empty(), true); |
1010 | } |
1011 | @@ -71,7 +71,7 @@ |
1012 | "\"id\": \"wily3\"," |
1013 | "\"name\": \"Wily Werewolf\"," |
1014 | "\"type\": \"lxc\"," |
1015 | - "\"image\": \"wily\"," |
1016 | + "\"distro\": \"wily\"," |
1017 | "\"installedApps\": [" |
1018 | "{" |
1019 | "\"packageName\": \"firefox\"," |
1020 | @@ -99,7 +99,7 @@ |
1021 | "\"id\": \"wily3\"," |
1022 | "\"name\": \"Wily Werewolf\"," |
1023 | "\"type\": \"lxc\"," |
1024 | - "\"image\": \"wily\"," |
1025 | + "\"distro\": \"wily\"," |
1026 | "\"installedApps\": [" |
1027 | "{" |
1028 | "\"packageName\": \"firefox\"," |
1029 | |
1030 | === modified file 'tools/CMakeLists.txt' |
1031 | --- tools/CMakeLists.txt 2015-09-02 18:58:33 +0000 |
1032 | +++ tools/CMakeLists.txt 2015-09-18 17:06:14 +0000 |
1033 | @@ -1,1 +1,1 @@ |
1034 | -install(PROGRAMS libertine-launch libertine-session-bridge DESTINATION ${CMAKE_INSTALL_BINDIR}) |
1035 | +install(PROGRAMS libertine-launch libertine-session-bridge create_bespoke_container DESTINATION ${CMAKE_INSTALL_BINDIR}) |
1036 | |
1037 | === renamed file 'tools/create_bespoke_container.sh' => 'tools/create_bespoke_container' |
1038 | --- tools/create_bespoke_container.sh 2015-08-27 06:52:57 +0000 |
1039 | +++ tools/create_bespoke_container 2015-09-18 17:06:14 +0000 |
1040 | @@ -2,14 +2,11 @@ |
1041 | |
1042 | echo "Creating the base container… " |
1043 | |
1044 | -libertine_container_manager create -t chroot -s trusty |
1045 | - |
1046 | -echo "Updating the container… " |
1047 | -libertine_container_manager update |
1048 | +libertine_container_manager create -t chroot -d trusty |
1049 | |
1050 | echo "Installing packages in the container… " |
1051 | libertine_container_manager install-package -p gedit |
1052 | libertine_container_manager install-package -p libreoffice |
1053 | -libertine_container_manager install-package -p chromium-browser |
1054 | +libertine_container_manager install-package -p firefox |
1055 | libertine_container_manager install-package -p xchat-gnome |
1056 | libertine_container_manager install-package -p gimp |
1057 | |
1058 | === modified file 'tools/libertine-launch' |
1059 | --- tools/libertine-launch 2015-09-10 13:45:10 +0000 |
1060 | +++ tools/libertine-launch 2015-09-18 17:06:14 +0000 |
1061 | @@ -20,12 +20,10 @@ |
1062 | import sys |
1063 | import json |
1064 | import lxc |
1065 | -import subprocess |
1066 | +import psutil |
1067 | import shlex |
1068 | import xdg.BaseDirectory as basedir |
1069 | |
1070 | -from Xlib import display |
1071 | - |
1072 | home_path = os.environ['HOME'] |
1073 | |
1074 | libertine_json_file_path = os.path.join(basedir.xdg_data_home, 'libertine', 'ContainersConfig.json') |
1075 | @@ -65,7 +63,7 @@ |
1076 | libertine_session_bridge_cmd = "libertine-session-bridge " + set_dbus_session_socket_path() |
1077 | |
1078 | args = shlex.split(libertine_session_bridge_cmd) |
1079 | - subprocess.Popen(args).wait() |
1080 | + return psutil.Popen(args) |
1081 | |
1082 | def build_proot_command(container_id): |
1083 | proot_cmd = '/usr/bin/proot' |
1084 | @@ -108,21 +106,26 @@ |
1085 | proot_cmd = build_proot_command(container_id) |
1086 | |
1087 | args = shlex.split(proot_cmd) |
1088 | + args.extend(['compiz']) |
1089 | + compiz = psutil.Popen(args) |
1090 | + |
1091 | + args = shlex.split(proot_cmd) |
1092 | args.extend(app_exec_line) |
1093 | + psutil.Popen(args).wait() |
1094 | |
1095 | - subprocess.Popen(args).wait() |
1096 | + for child in compiz.children(): |
1097 | + child.terminate() |
1098 | |
1099 | if __name__ == '__main__': |
1100 | container_id = sys.argv[1] |
1101 | app_exec_line = sys.argv[2:] |
1102 | container_type = get_container_type(container_id) |
1103 | |
1104 | - launch_libertine_session_bridge() |
1105 | - |
1106 | - # Work around the issue where starting some apps will close Xmir when they close the display |
1107 | - display.Display() |
1108 | + session_bridge = launch_libertine_session_bridge() |
1109 | |
1110 | if container_type == "lxc": |
1111 | launch_lxc_application(container_id, app_exec_line) |
1112 | elif container_type == "chroot": |
1113 | launch_chroot_application(container_id, app_exec_line) |
1114 | + |
1115 | + session_bridge.terminate() |
1116 | |
1117 | === modified file 'tools/libertine-session-bridge' |
1118 | --- tools/libertine-session-bridge 2015-09-02 19:04:50 +0000 |
1119 | +++ tools/libertine-session-bridge 2015-09-18 17:06:14 +0000 |
1120 | @@ -1,6 +1,5 @@ |
1121 | #!/usr/bin/python3 |
1122 | |
1123 | -import daemonize |
1124 | import os |
1125 | import select |
1126 | import signal |
1127 | @@ -114,8 +113,4 @@ |
1128 | descriptors = [container_dbus_session_sock] |
1129 | socket_pairs = [] |
1130 | |
1131 | -unique_id = os.environ['DISPLAY'].strip(':') |
1132 | -pid = "/tmp/libertine_session_bridge" + unique_id + ".pid" |
1133 | - |
1134 | -daemon = daemonize.Daemonize(app="libertine_session_bridge", pid=pid, action=main_loop, auto_close_fds=False) |
1135 | -daemon.start() |
1136 | +main_loop() |
I removed the changelog messages for changes already landed in /trunk.