Merge lp:~xnox/ubiquity/crypto-done into lp:ubiquity
- crypto-done
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Colin Watson | ||||
Approved revision: | 5588 | ||||
Merged at revision: | 5581 | ||||
Proposed branch: | lp:~xnox/ubiquity/crypto-done | ||||
Merge into: | lp:ubiquity | ||||
Diff against target: |
1348 lines (+765/-188) 12 files modified
bin/ubiquity (+7/-0) d-i/lists/any (+2/-0) debian/changelog (+15/-1) debian/ubiquity.templates (+61/-3) doc/ubi-partman-page-ask-statemachine.dot (+36/-0) gui/gtk/stepPartAsk.ui (+124/-9) gui/gtk/stepPartAuto.ui (+1/-40) gui/gtk/stepPartCrypto.ui (+245/-0) tests/test_gtkui.py (+2/-2) ubiquity/plugins/ubi-partman.py (+214/-100) ubiquity/plugins/ubi-usersetup.py (+10/-33) ubiquity/validation.py (+48/-0) |
||||
To merge this branch: | bzr merge lp:~xnox/ubiquity/crypto-done | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson (community) | Approve | ||
Review via email: mp+117664@code.launchpad.net |
Commit message
Description of the change
This branch adds support for automatic crypt recipe.
Dimitri John Ledkov (xnox) wrote : | # |
Colin Watson (cjwatson) wrote : | # |
This basically looks good, thanks! I confess I haven't gone through all
the state machines in fine detail or anything, but just a few nits and
then I think you should go ahead and merge this so that we can iterate
quickly.
> +Type: Text
Lower-case "text" in all these "Type:" lines.
> + <span foreground=
Capital letter at the start of sentences ("If you need to, ..."). Same
in the .ui file.
> - self.assertLess
> - self.assertLess
> + self.assertLess
> + self.assertLess
page.module.NAME doesn't seem like a helpful message on test failure.
At least include the expected and observed values.
> + if self.current_page == self.page_crypto and \
> + not self.get_
Use grouping with parentheses in preference to backslash-
(similarly elsewhere). So:
if (self.current_page == self.page_crypto and
not self.get_
No doubt we're not entirely consistent about this in existing code, but
let's do this in new code.
> + '^partman-
> + elif question == 'partman-
> + self.preseed_
> + return True
> +
> + elif question.
> + if not self.ui.
> + return False
> + self.preseed(
> + return True
> +
I'd like to see these two sections match to avoid later problems if the
set of questions asked changes, so I think your entries in the question
list should preferably be:
'^partman-
'^partman-
Dimitri John Ledkov (xnox) wrote : | # |
On 01/08/12 15:46, Colin Watson wrote:
> This basically looks good, thanks! I confess I haven't gone through all
> the state machines in fine detail or anything, but just a few nits and
> then I think you should go ahead and merge this so that we can iterate
> quickly.
>
>> +Type: Text
>
> Lower-case "text" in all these "Type:" lines.
>
ok.
>> + <span foreground=
>
> Capital letter at the start of sentences ("If you need to, ..."). Same
> in the .ui file.
>
ok.
>> - self.assertLess
>> - self.assertLess
>> + self.assertLess
>> + self.assertLess
>
> page.module.NAME doesn't seem like a helpful message on test failure.
> At least include the expected and observed values.
>
It already does, by default. So it now looks like this:
=======
FAIL: test_pages_
-------
Traceback (most recent call last):
File "/home/
79, in test_pages_
self.
AssertionError: 593 not less than or equal to 500 : language
-------
Which appears to be a peculiar fill packing bug which is visible when
manually starting ubiquity with a custom build, but not visible in
during the welcome screen. Will look into this more later.
>> + if self.current_page == self.page_crypto and \
>> + not self.get_
>
> Use grouping with parentheses in preference to backslash-
> (similarly elsewhere). So:
>
> if (self.current_page == self.page_crypto and
> not self.get_
>
> No doubt we're not entirely consistent about this in existing code, but
> let's do this in new code.
>
ok.
>> + '^partman-
>
>> + elif question == 'partman-
>> + self.preseed_
>> + return True
>> +
>> + elif question.
>> + if not self.ui.
>> + return False
>> + self.preseed(
>> + return True
>> +
>
> I'd like to see these two sections match to avoid later problems if the
> set of questions asked changes, so I think your entries in the question
> list should preferably be:
>
> '^partman-
> '^partman-
>
ok.
--
Regards,
Dmitrijs.
- 5588. By Dimitri John Ledkov
-
Review comments
Colin Watson (cjwatson) : | # |
Preview Diff
1 | === modified file 'bin/ubiquity' | |||
2 | --- bin/ubiquity 2012-07-16 14:29:13 +0000 | |||
3 | +++ bin/ubiquity 2012-08-01 15:23:23 +0000 | |||
4 | @@ -495,6 +495,10 @@ | |||
5 | 495 | parser.add_option('--enable-partauto-lvm', dest='partauto_lvm', | 495 | parser.add_option('--enable-partauto-lvm', dest='partauto_lvm', |
6 | 496 | action='store_true', | 496 | action='store_true', |
7 | 497 | help='Enable LVM in the automatic partitioner.') | 497 | help='Enable LVM in the automatic partitioner.') |
8 | 498 | parser.add_option('--enable-partauto-crypto', dest='partauto_crypto', | ||
9 | 499 | action='store_true', | ||
10 | 500 | help='Enable Full Disk encryption in the automatic' | ||
11 | 501 | 'partitioner.') | ||
12 | 498 | parser.add_option('--no-webcam', dest='webcam', | 502 | parser.add_option('--no-webcam', dest='webcam', |
13 | 499 | default=True, action='store_false', | 503 | default=True, action='store_false', |
14 | 500 | help='Disable the webcam page.') | 504 | help='Disable the webcam page.') |
15 | @@ -537,6 +541,9 @@ | |||
16 | 537 | if options.partauto_lvm: | 541 | if options.partauto_lvm: |
17 | 538 | os.environ['UBIQUITY_PARTAUTO_LVM'] = '1' | 542 | os.environ['UBIQUITY_PARTAUTO_LVM'] = '1' |
18 | 539 | 543 | ||
19 | 544 | if options.partauto_crypto: | ||
20 | 545 | os.environ['UBIQUITY_PARTAUTO_CRYPTO'] = '1' | ||
21 | 546 | |||
22 | 540 | if not options.webcam: | 547 | if not options.webcam: |
23 | 541 | os.environ['UBIQUITY_NO_WEBCAM'] = '1' | 548 | os.environ['UBIQUITY_NO_WEBCAM'] = '1' |
24 | 542 | 549 | ||
25 | 543 | 550 | ||
26 | === modified file 'd-i/lists/any' | |||
27 | --- d-i/lists/any 2012-07-10 00:16:28 +0000 | |||
28 | +++ d-i/lists/any 2012-08-01 15:23:23 +0000 | |||
29 | @@ -10,12 +10,14 @@ | |||
30 | 10 | netcfg | 10 | netcfg |
31 | 11 | partconf | 11 | partconf |
32 | 12 | partman-auto | 12 | partman-auto |
33 | 13 | partman-auto-crypto | ||
34 | 13 | partman-auto-loop | 14 | partman-auto-loop |
35 | 14 | partman-auto-lvm | 15 | partman-auto-lvm |
36 | 15 | partman-base | 16 | partman-base |
37 | 16 | partman-basicfilesystems | 17 | partman-basicfilesystems |
38 | 17 | partman-basicmethods | 18 | partman-basicmethods |
39 | 18 | partman-btrfs | 19 | partman-btrfs |
40 | 20 | partman-crypto | ||
41 | 19 | partman-ext3 | 21 | partman-ext3 |
42 | 20 | partman-jfs | 22 | partman-jfs |
43 | 21 | partman-lvm | 23 | partman-lvm |
44 | 22 | 24 | ||
45 | === modified file 'debian/changelog' | |||
46 | --- debian/changelog 2012-07-31 12:29:30 +0000 | |||
47 | +++ debian/changelog 2012-08-01 15:23:23 +0000 | |||
48 | @@ -1,9 +1,23 @@ | |||
49 | 1 | ubiquity (2.11.19) UNRELEASED; urgency=low | 1 | ubiquity (2.11.19) UNRELEASED; urgency=low |
50 | 2 | 2 | ||
51 | 3 | [ Colin Watson ] | ||
52 | 3 | * Simplify DebconfFilter.process_line slightly. | 4 | * Simplify DebconfFilter.process_line slightly. |
53 | 4 | * Simplify KeyboardNames._load_file using collections.defaultdict. | 5 | * Simplify KeyboardNames._load_file using collections.defaultdict. |
54 | 5 | 6 | ||
56 | 6 | -- Colin Watson <cjwatson@ubuntu.com> Tue, 31 Jul 2012 13:26:31 +0100 | 7 | [ Dmitrijs Ledkovs ] |
57 | 8 | * Make the UI layout test print the failed page/step name. | ||
58 | 9 | * Add crypt security key setup page and move crypt/lvm checkboxes to the | ||
59 | 10 | ask page. | ||
60 | 11 | * Refactor password validation from ubi-usersetup into a reusable | ||
61 | 12 | component (for ubi-partman). | ||
62 | 13 | * Refactor set_autopartition_options method in ubi-partman.py. | ||
63 | 14 | * Add crypto option to ubi-partman. | ||
64 | 15 | * Add command line flag to enable crypt checkbox on the ask page. | ||
65 | 16 | * Add partman-crypto to the dependencies. | ||
66 | 17 | * Add translation strings for crypto. | ||
67 | 18 | * Add graphviz diagram of available ask page options. | ||
68 | 19 | |||
69 | 20 | -- Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> Wed, 01 Aug 2012 15:02:14 +0100 | ||
70 | 7 | 21 | ||
71 | 8 | ubiquity (2.11.18) quantal; urgency=low | 22 | ubiquity (2.11.18) quantal; urgency=low |
72 | 9 | 23 | ||
73 | 10 | 24 | ||
74 | === modified file 'debian/ubiquity.templates' | |||
75 | --- debian/ubiquity.templates 2012-07-16 10:10:04 +0000 | |||
76 | +++ debian/ubiquity.templates 2012-08-01 15:23:23 +0000 | |||
77 | @@ -1368,6 +1368,64 @@ | |||
78 | 1368 | This computer currently has no detected operating systems. What would you | 1368 | This computer currently has no detected operating systems. What would you |
79 | 1369 | like to do? | 1369 | like to do? |
80 | 1370 | 1370 | ||
84 | 1371 | Template: ubiquity/text/part_auto_use_lvm_checkbox | 1371 | Template: ubiquity/text/use_crypto_title |
85 | 1372 | Type: text | 1372 | Type: text |
86 | 1373 | _Description: Set up LVM | 1373 | _Description: |
87 | 1374 | Encrypt the new Ubuntu installation for security | ||
88 | 1375 | |||
89 | 1376 | Template: ubiquity/text/use_crypto_desc | ||
90 | 1377 | Type: text | ||
91 | 1378 | _Description: | ||
92 | 1379 | You will choose a security key in the next step. | ||
93 | 1380 | |||
94 | 1381 | Template: ubiquity/text/use_lvm_title | ||
95 | 1382 | Type: text | ||
96 | 1383 | _Description: | ||
97 | 1384 | Use LVM with the new Ubuntu installation | ||
98 | 1385 | |||
99 | 1386 | Template: ubiquity/text/use_lvm_desc | ||
100 | 1387 | Type: text | ||
101 | 1388 | _Description: | ||
102 | 1389 | This will set up Logical Volume Management. It allows taking snapshots and easier partition resizing. | ||
103 | 1390 | |||
104 | 1391 | Template: ubiquity/text/verified_crypto_label | ||
105 | 1392 | Type: text | ||
106 | 1393 | _Description: | ||
107 | 1394 | Confirm the security key: | ||
108 | 1395 | |||
109 | 1396 | Template:ubiquity/text/crypto_label | ||
110 | 1397 | Type: text | ||
111 | 1398 | _Description: | ||
112 | 1399 | Choose a security key: | ||
113 | 1400 | |||
114 | 1401 | Template:ubiquity/text/crypto_description | ||
115 | 1402 | Type: text | ||
116 | 1403 | _Description: | ||
117 | 1404 | Disk encryption protects your files in case you lose your computer. It requires you to enter a security key each time the computer starts up. | ||
118 | 1405 | |||
119 | 1406 | Template:ubiquity/text/crypto_description_2 | ||
120 | 1407 | Type: text | ||
121 | 1408 | _Description: | ||
122 | 1409 | Any files outside of Ubuntu will not be encrypted. | ||
123 | 1410 | |||
124 | 1411 | Template:ubiquity/text/crypto_warning | ||
125 | 1412 | Type: text | ||
126 | 1413 | _Description: | ||
127 | 1414 | <span foreground="darkred">Warning:</span> If you lose this security key, all data will be lost. If you need to, write down your key and keep it in a safe place elsewhere. | ||
128 | 1415 | |||
129 | 1416 | Template:ubiquity/text/crypto_exta_label | ||
130 | 1417 | Type: text | ||
131 | 1418 | _Description: | ||
132 | 1419 | For more security: | ||
133 | 1420 | |||
134 | 1421 | Template:ubiquity/text/fill_with_random_data | ||
135 | 1422 | Type: text | ||
136 | 1423 | _Description: | ||
137 | 1424 | Overwrite empty disk space | ||
138 | 1425 | |||
139 | 1426 | Template:ubiquity/text/crypto_extra_time | ||
140 | 1427 | Type: text | ||
141 | 1428 | _Description: | ||
142 | 1429 | The installation may take much longer. | ||
143 | 1430 | |||
144 | 1431 | |||
145 | 1374 | 1432 | ||
146 | === added file 'doc/ubi-partman-page-ask-statemachine.dot' | |||
147 | --- doc/ubi-partman-page-ask-statemachine.dot 1970-01-01 00:00:00 +0000 | |||
148 | +++ doc/ubi-partman-page-ask-statemachine.dot 2012-08-01 15:23:23 +0000 | |||
149 | @@ -0,0 +1,36 @@ | |||
150 | 1 | digraph { | ||
151 | 2 | { rank = same; | ||
152 | 3 | use_device; | ||
153 | 4 | resize; | ||
154 | 5 | custom; | ||
155 | 6 | wubi; | ||
156 | 7 | reuse; | ||
157 | 8 | replace; | ||
158 | 9 | }; | ||
159 | 10 | { rank = same; | ||
160 | 11 | switch_to_install; | ||
161 | 12 | go_to_manual; | ||
162 | 13 | go_to_wubi; | ||
163 | 14 | }; | ||
164 | 15 | { node [shape = diamond]; | ||
165 | 16 | biggest_free; | ||
166 | 17 | one_disk; | ||
167 | 18 | have_crypto; | ||
168 | 19 | }; | ||
169 | 20 | use_device -> one_disk; | ||
170 | 21 | one_disk -> go_to_auto [label="no"]; | ||
171 | 22 | one_disk -> have_crypto [label="yes"]; | ||
172 | 23 | go_to_auto -> have_crypto [label="if use_device"]; | ||
173 | 24 | have_crypto -> switch_to_install [label="no"]; | ||
174 | 25 | have_crypto -> go_to_crypto [label="yes"]; | ||
175 | 26 | go_to_crypto -> switch_to_install; | ||
176 | 27 | resize -> biggest_free; | ||
177 | 28 | biggest_free -> switch_to_install [label="yes"]; | ||
178 | 29 | biggest_free -> go_to_auto [label="no"]; | ||
179 | 30 | go_to_auto -> switch_to_install; | ||
180 | 31 | custom -> go_to_manual; | ||
181 | 32 | reuse -> switch_to_install; | ||
182 | 33 | replace -> switch_to_install; | ||
183 | 34 | wubi -> go_to_wubi; | ||
184 | 35 | go_to_crypto; | ||
185 | 36 | }; | ||
186 | 0 | 37 | ||
187 | === modified file 'gui/gtk/stepPartAsk.ui' | |||
188 | --- gui/gtk/stepPartAsk.ui 2012-06-07 19:38:33 +0000 | |||
189 | +++ gui/gtk/stepPartAsk.ui 2012-08-01 15:23:23 +0000 | |||
190 | @@ -1,7 +1,6 @@ | |||
191 | 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
192 | 2 | <interface> | 2 | <interface> |
195 | 3 | <requires lib="gtk+" version="2.24"/> | 3 | <!-- interface-requires gtk+ 3.0 --> |
194 | 4 | <!-- interface-naming-policy project-wide --> | ||
196 | 5 | <!-- interface-local-resource-path /home/evan/bzr/ubiquity.partitioner-redesign/pixmaps/partitioner --> | 4 | <!-- interface-local-resource-path /home/evan/bzr/ubiquity.partitioner-redesign/pixmaps/partitioner --> |
197 | 6 | <object class="GtkAlignment" id="stepPartAsk"> | 5 | <object class="GtkAlignment" id="stepPartAsk"> |
198 | 7 | <property name="visible">True</property> | 6 | <property name="visible">True</property> |
199 | @@ -39,6 +38,7 @@ | |||
200 | 39 | <property name="spacing">12</property> | 38 | <property name="spacing">12</property> |
201 | 40 | <child> | 39 | <child> |
202 | 41 | <object class="GtkRadioButton" id="resize_use_free"> | 40 | <object class="GtkRadioButton" id="resize_use_free"> |
203 | 41 | <property name="use_action_appearance">False</property> | ||
204 | 42 | <property name="visible">True</property> | 42 | <property name="visible">True</property> |
205 | 43 | <property name="can_focus">True</property> | 43 | <property name="can_focus">True</property> |
206 | 44 | <property name="receives_default">False</property> | 44 | <property name="receives_default">False</property> |
207 | @@ -46,10 +46,10 @@ | |||
208 | 46 | <property name="xalign">0</property> | 46 | <property name="xalign">0</property> |
209 | 47 | <property name="active">True</property> | 47 | <property name="active">True</property> |
210 | 48 | <property name="draw_indicator">True</property> | 48 | <property name="draw_indicator">True</property> |
211 | 49 | <signal name="clicked" handler="part_ask_option_changed" swapped="no"/> | ||
212 | 50 | <accessibility> | 49 | <accessibility> |
213 | 51 | <relation type="labelled-by" target="resize_use_free_title"/> | 50 | <relation type="labelled-by" target="resize_use_free_title"/> |
214 | 52 | </accessibility> | 51 | </accessibility> |
215 | 52 | <signal name="clicked" handler="part_ask_option_changed" swapped="no"/> | ||
216 | 53 | <child> | 53 | <child> |
217 | 54 | <object class="GtkBox" id="hbox1"> | 54 | <object class="GtkBox" id="hbox1"> |
218 | 55 | <property name="visible">True</property> | 55 | <property name="visible">True</property> |
219 | @@ -122,6 +122,7 @@ | |||
220 | 122 | </child> | 122 | </child> |
221 | 123 | <child> | 123 | <child> |
222 | 124 | <object class="GtkRadioButton" id="replace_partition"> | 124 | <object class="GtkRadioButton" id="replace_partition"> |
223 | 125 | <property name="use_action_appearance">False</property> | ||
224 | 125 | <property name="visible">True</property> | 126 | <property name="visible">True</property> |
225 | 126 | <property name="can_focus">True</property> | 127 | <property name="can_focus">True</property> |
226 | 127 | <property name="receives_default">False</property> | 128 | <property name="receives_default">False</property> |
227 | @@ -129,10 +130,10 @@ | |||
228 | 129 | <property name="xalign">0</property> | 130 | <property name="xalign">0</property> |
229 | 130 | <property name="draw_indicator">True</property> | 131 | <property name="draw_indicator">True</property> |
230 | 131 | <property name="group">resize_use_free</property> | 132 | <property name="group">resize_use_free</property> |
231 | 132 | <signal name="clicked" handler="part_ask_option_changed" swapped="no"/> | ||
232 | 133 | <accessibility> | 133 | <accessibility> |
233 | 134 | <relation type="labelled-by" target="replace_partition_title"/> | 134 | <relation type="labelled-by" target="replace_partition_title"/> |
234 | 135 | </accessibility> | 135 | </accessibility> |
235 | 136 | <signal name="clicked" handler="part_ask_option_changed" swapped="no"/> | ||
236 | 136 | <child> | 137 | <child> |
237 | 137 | <object class="GtkBox" id="hbox5"> | 138 | <object class="GtkBox" id="hbox5"> |
238 | 138 | <property name="visible">True</property> | 139 | <property name="visible">True</property> |
239 | @@ -205,16 +206,18 @@ | |||
240 | 205 | </child> | 206 | </child> |
241 | 206 | <child> | 207 | <child> |
242 | 207 | <object class="GtkRadioButton" id="reuse_partition"> | 208 | <object class="GtkRadioButton" id="reuse_partition"> |
243 | 209 | <property name="use_action_appearance">False</property> | ||
244 | 208 | <property name="visible">True</property> | 210 | <property name="visible">True</property> |
245 | 209 | <property name="can_focus">True</property> | 211 | <property name="can_focus">True</property> |
246 | 210 | <property name="receives_default">False</property> | 212 | <property name="receives_default">False</property> |
247 | 211 | <property name="use_action_appearance">False</property> | 213 | <property name="use_action_appearance">False</property> |
248 | 214 | <property name="xalign">0.5</property> | ||
249 | 212 | <property name="draw_indicator">True</property> | 215 | <property name="draw_indicator">True</property> |
250 | 213 | <property name="group">resize_use_free</property> | 216 | <property name="group">resize_use_free</property> |
251 | 214 | <signal name="clicked" handler="part_ask_option_changed" swapped="no"/> | ||
252 | 215 | <accessibility> | 217 | <accessibility> |
253 | 216 | <relation type="labelled-by" target="reuse_partition_title"/> | 218 | <relation type="labelled-by" target="reuse_partition_title"/> |
254 | 217 | </accessibility> | 219 | </accessibility> |
255 | 220 | <signal name="clicked" handler="part_ask_option_changed" swapped="no"/> | ||
256 | 218 | <child> | 221 | <child> |
257 | 219 | <object class="GtkBox" id="hbox2"> | 222 | <object class="GtkBox" id="hbox2"> |
258 | 220 | <property name="visible">True</property> | 223 | <property name="visible">True</property> |
259 | @@ -287,6 +290,7 @@ | |||
260 | 287 | </child> | 290 | </child> |
261 | 288 | <child> | 291 | <child> |
262 | 289 | <object class="GtkRadioButton" id="use_device"> | 292 | <object class="GtkRadioButton" id="use_device"> |
263 | 293 | <property name="use_action_appearance">False</property> | ||
264 | 290 | <property name="visible">True</property> | 294 | <property name="visible">True</property> |
265 | 291 | <property name="can_focus">True</property> | 295 | <property name="can_focus">True</property> |
266 | 292 | <property name="receives_default">False</property> | 296 | <property name="receives_default">False</property> |
267 | @@ -294,10 +298,10 @@ | |||
268 | 294 | <property name="xalign">0</property> | 298 | <property name="xalign">0</property> |
269 | 295 | <property name="draw_indicator">True</property> | 299 | <property name="draw_indicator">True</property> |
270 | 296 | <property name="group">resize_use_free</property> | 300 | <property name="group">resize_use_free</property> |
271 | 297 | <signal name="clicked" handler="part_ask_option_changed" swapped="no"/> | ||
272 | 298 | <accessibility> | 301 | <accessibility> |
273 | 299 | <relation type="labelled-by" target="use_device_title"/> | 302 | <relation type="labelled-by" target="use_device_title"/> |
274 | 300 | </accessibility> | 303 | </accessibility> |
275 | 304 | <signal name="clicked" handler="part_ask_option_changed" swapped="no"/> | ||
276 | 301 | <child> | 305 | <child> |
277 | 302 | <object class="GtkBox" id="hbox3"> | 306 | <object class="GtkBox" id="hbox3"> |
278 | 303 | <property name="visible">True</property> | 307 | <property name="visible">True</property> |
279 | @@ -369,6 +373,116 @@ | |||
280 | 369 | </packing> | 373 | </packing> |
281 | 370 | </child> | 374 | </child> |
282 | 371 | <child> | 375 | <child> |
283 | 376 | <object class="GtkCheckButton" id="use_crypto"> | ||
284 | 377 | <property name="use_action_appearance">False</property> | ||
285 | 378 | <property name="visible">True</property> | ||
286 | 379 | <property name="can_focus">True</property> | ||
287 | 380 | <property name="receives_default">False</property> | ||
288 | 381 | <property name="use_action_appearance">False</property> | ||
289 | 382 | <property name="xalign">0</property> | ||
290 | 383 | <property name="draw_indicator">True</property> | ||
291 | 384 | <child> | ||
292 | 385 | <object class="GtkBox" id="vbox7"> | ||
293 | 386 | <property name="visible">True</property> | ||
294 | 387 | <property name="can_focus">False</property> | ||
295 | 388 | <property name="orientation">vertical</property> | ||
296 | 389 | <property name="spacing">3</property> | ||
297 | 390 | <child> | ||
298 | 391 | <object class="GtkLabel" id="use_crypto_title"> | ||
299 | 392 | <property name="visible">True</property> | ||
300 | 393 | <property name="can_focus">False</property> | ||
301 | 394 | <property name="xalign">0</property> | ||
302 | 395 | <property name="yalign">0</property> | ||
303 | 396 | <property name="label" translatable="yes">Encrypt the new Ubuntu installation for security</property> | ||
304 | 397 | <property name="wrap">True</property> | ||
305 | 398 | </object> | ||
306 | 399 | <packing> | ||
307 | 400 | <property name="expand">False</property> | ||
308 | 401 | <property name="fill">True</property> | ||
309 | 402 | <property name="position">0</property> | ||
310 | 403 | </packing> | ||
311 | 404 | </child> | ||
312 | 405 | <child> | ||
313 | 406 | <object class="GtkLabel" id="use_crypto_desc"> | ||
314 | 407 | <property name="visible">True</property> | ||
315 | 408 | <property name="can_focus">False</property> | ||
316 | 409 | <property name="xalign">0</property> | ||
317 | 410 | <property name="yalign">0</property> | ||
318 | 411 | <property name="label" translatable="yes"><span weight="light" size="small">You’ll choose a security key in the next step.</span></property> | ||
319 | 412 | <property name="use_markup">True</property> | ||
320 | 413 | <property name="wrap">True</property> | ||
321 | 414 | </object> | ||
322 | 415 | <packing> | ||
323 | 416 | <property name="expand">False</property> | ||
324 | 417 | <property name="fill">True</property> | ||
325 | 418 | <property name="position">1</property> | ||
326 | 419 | </packing> | ||
327 | 420 | </child> | ||
328 | 421 | </object> | ||
329 | 422 | </child> | ||
330 | 423 | </object> | ||
331 | 424 | <packing> | ||
332 | 425 | <property name="expand">False</property> | ||
333 | 426 | <property name="fill">True</property> | ||
334 | 427 | <property name="position">4</property> | ||
335 | 428 | </packing> | ||
336 | 429 | </child> | ||
337 | 430 | <child> | ||
338 | 431 | <object class="GtkCheckButton" id="use_lvm"> | ||
339 | 432 | <property name="use_action_appearance">False</property> | ||
340 | 433 | <property name="visible">True</property> | ||
341 | 434 | <property name="can_focus">True</property> | ||
342 | 435 | <property name="receives_default">False</property> | ||
343 | 436 | <property name="use_action_appearance">False</property> | ||
344 | 437 | <property name="xalign">0</property> | ||
345 | 438 | <property name="draw_indicator">True</property> | ||
346 | 439 | <child> | ||
347 | 440 | <object class="GtkBox" id="vbox8"> | ||
348 | 441 | <property name="visible">True</property> | ||
349 | 442 | <property name="can_focus">False</property> | ||
350 | 443 | <property name="orientation">vertical</property> | ||
351 | 444 | <property name="spacing">3</property> | ||
352 | 445 | <child> | ||
353 | 446 | <object class="GtkLabel" id="use_lvm_title"> | ||
354 | 447 | <property name="visible">True</property> | ||
355 | 448 | <property name="can_focus">False</property> | ||
356 | 449 | <property name="xalign">0</property> | ||
357 | 450 | <property name="yalign">0</property> | ||
358 | 451 | <property name="label" translatable="yes">Use LVM with the new Ubuntu installation</property> | ||
359 | 452 | <property name="wrap">True</property> | ||
360 | 453 | </object> | ||
361 | 454 | <packing> | ||
362 | 455 | <property name="expand">False</property> | ||
363 | 456 | <property name="fill">True</property> | ||
364 | 457 | <property name="position">0</property> | ||
365 | 458 | </packing> | ||
366 | 459 | </child> | ||
367 | 460 | <child> | ||
368 | 461 | <object class="GtkLabel" id="use_lvm_desc"> | ||
369 | 462 | <property name="visible">True</property> | ||
370 | 463 | <property name="can_focus">False</property> | ||
371 | 464 | <property name="xalign">0</property> | ||
372 | 465 | <property name="yalign">0</property> | ||
373 | 466 | <property name="label" translatable="yes"><span weight="light" size="small">This will set up Logical Volume Management. It allows taking snapshots and easier partition resizing.</span></property> | ||
374 | 467 | <property name="use_markup">True</property> | ||
375 | 468 | <property name="wrap">True</property> | ||
376 | 469 | </object> | ||
377 | 470 | <packing> | ||
378 | 471 | <property name="expand">False</property> | ||
379 | 472 | <property name="fill">True</property> | ||
380 | 473 | <property name="position">1</property> | ||
381 | 474 | </packing> | ||
382 | 475 | </child> | ||
383 | 476 | </object> | ||
384 | 477 | </child> | ||
385 | 478 | </object> | ||
386 | 479 | <packing> | ||
387 | 480 | <property name="expand">False</property> | ||
388 | 481 | <property name="fill">True</property> | ||
389 | 482 | <property name="position">5</property> | ||
390 | 483 | </packing> | ||
391 | 484 | </child> | ||
392 | 485 | <child> | ||
393 | 372 | <object class="GtkAlignment" id="alignment1"> | 486 | <object class="GtkAlignment" id="alignment1"> |
394 | 373 | <property name="visible">True</property> | 487 | <property name="visible">True</property> |
395 | 374 | <property name="can_focus">False</property> | 488 | <property name="can_focus">False</property> |
396 | @@ -384,11 +498,12 @@ | |||
397 | 384 | <packing> | 498 | <packing> |
398 | 385 | <property name="expand">False</property> | 499 | <property name="expand">False</property> |
399 | 386 | <property name="fill">True</property> | 500 | <property name="fill">True</property> |
401 | 387 | <property name="position">4</property> | 501 | <property name="position">6</property> |
402 | 388 | </packing> | 502 | </packing> |
403 | 389 | </child> | 503 | </child> |
404 | 390 | <child> | 504 | <child> |
405 | 391 | <object class="GtkRadioButton" id="custom_partitioning"> | 505 | <object class="GtkRadioButton" id="custom_partitioning"> |
406 | 506 | <property name="use_action_appearance">False</property> | ||
407 | 392 | <property name="visible">True</property> | 507 | <property name="visible">True</property> |
408 | 393 | <property name="can_focus">True</property> | 508 | <property name="can_focus">True</property> |
409 | 394 | <property name="receives_default">False</property> | 509 | <property name="receives_default">False</property> |
410 | @@ -396,10 +511,10 @@ | |||
411 | 396 | <property name="xalign">0</property> | 511 | <property name="xalign">0</property> |
412 | 397 | <property name="draw_indicator">True</property> | 512 | <property name="draw_indicator">True</property> |
413 | 398 | <property name="group">resize_use_free</property> | 513 | <property name="group">resize_use_free</property> |
414 | 399 | <signal name="clicked" handler="part_ask_option_changed" swapped="no"/> | ||
415 | 400 | <accessibility> | 514 | <accessibility> |
416 | 401 | <relation type="labelled-by" target="custom_partitioning_title"/> | 515 | <relation type="labelled-by" target="custom_partitioning_title"/> |
417 | 402 | </accessibility> | 516 | </accessibility> |
418 | 517 | <signal name="clicked" handler="part_ask_option_changed" swapped="no"/> | ||
419 | 403 | <child> | 518 | <child> |
420 | 404 | <object class="GtkBox" id="hbox4"> | 519 | <object class="GtkBox" id="hbox4"> |
421 | 405 | <property name="visible">True</property> | 520 | <property name="visible">True</property> |
422 | @@ -467,7 +582,7 @@ | |||
423 | 467 | <packing> | 582 | <packing> |
424 | 468 | <property name="expand">False</property> | 583 | <property name="expand">False</property> |
425 | 469 | <property name="fill">True</property> | 584 | <property name="fill">True</property> |
427 | 470 | <property name="position">5</property> | 585 | <property name="position">7</property> |
428 | 471 | </packing> | 586 | </packing> |
429 | 472 | </child> | 587 | </child> |
430 | 473 | </object> | 588 | </object> |
431 | 474 | 589 | ||
432 | === modified file 'gui/gtk/stepPartAuto.ui' | |||
433 | --- gui/gtk/stepPartAuto.ui 2012-07-16 10:10:04 +0000 | |||
434 | +++ gui/gtk/stepPartAuto.ui 2012-08-01 15:23:23 +0000 | |||
435 | @@ -1,8 +1,6 @@ | |||
436 | 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
437 | 2 | <interface> | 2 | <interface> |
441 | 3 | <requires lib="gtk+" version="2.24"/> | 3 | <!-- interface-requires gtk+ 3.0 --> |
439 | 4 | <!-- interface-requires gtkwidgets 0.0 --> | ||
440 | 5 | <!-- interface-naming-policy toplevel-contextual --> | ||
442 | 6 | <object class="GtkListStore" id="liststore1"> | 4 | <object class="GtkListStore" id="liststore1"> |
443 | 7 | <columns> | 5 | <columns> |
444 | 8 | <!-- column-name gchararray1 --> | 6 | <!-- column-name gchararray1 --> |
445 | @@ -156,43 +154,6 @@ | |||
446 | 156 | <property name="position">2</property> | 154 | <property name="position">2</property> |
447 | 157 | </packing> | 155 | </packing> |
448 | 158 | </child> | 156 | </child> |
449 | 159 | <child> | ||
450 | 160 | <object class="GtkAlignment" id="alignment1"> | ||
451 | 161 | <property name="visible">True</property> | ||
452 | 162 | <property name="can_focus">False</property> | ||
453 | 163 | <property name="top_padding">16</property> | ||
454 | 164 | <child> | ||
455 | 165 | <object class="GtkBox" id="vbox_part_auto_recipes"> | ||
456 | 166 | <property name="visible">True</property> | ||
457 | 167 | <property name="can_focus">False</property> | ||
458 | 168 | <property name="orientation">vertical</property> | ||
459 | 169 | <child> | ||
460 | 170 | <object class="GtkCheckButton" id="part_auto_use_lvm_checkbox"> | ||
461 | 171 | <property name="label" translatable="yes">Set up LVM</property> | ||
462 | 172 | <property name="use_action_appearance">False</property> | ||
463 | 173 | <property name="visible">True</property> | ||
464 | 174 | <property name="can_focus">True</property> | ||
465 | 175 | <property name="receives_default">False</property> | ||
466 | 176 | <property name="use_action_appearance">False</property> | ||
467 | 177 | <property name="xalign">0</property> | ||
468 | 178 | <property name="image_position">top</property> | ||
469 | 179 | <property name="draw_indicator">True</property> | ||
470 | 180 | </object> | ||
471 | 181 | <packing> | ||
472 | 182 | <property name="expand">False</property> | ||
473 | 183 | <property name="fill">True</property> | ||
474 | 184 | <property name="position">0</property> | ||
475 | 185 | </packing> | ||
476 | 186 | </child> | ||
477 | 187 | </object> | ||
478 | 188 | </child> | ||
479 | 189 | </object> | ||
480 | 190 | <packing> | ||
481 | 191 | <property name="expand">False</property> | ||
482 | 192 | <property name="fill">True</property> | ||
483 | 193 | <property name="position">3</property> | ||
484 | 194 | </packing> | ||
485 | 195 | </child> | ||
486 | 196 | </object> | 157 | </object> |
487 | 197 | <packing> | 158 | <packing> |
488 | 198 | <property name="expand">False</property> | 159 | <property name="expand">False</property> |
489 | 199 | 160 | ||
490 | === added file 'gui/gtk/stepPartCrypto.ui' | |||
491 | --- gui/gtk/stepPartCrypto.ui 1970-01-01 00:00:00 +0000 | |||
492 | +++ gui/gtk/stepPartCrypto.ui 2012-08-01 15:23:23 +0000 | |||
493 | @@ -0,0 +1,245 @@ | |||
494 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
495 | 2 | <interface> | ||
496 | 3 | <!-- interface-requires gtk+ 3.0 --> | ||
497 | 4 | <object class="GtkEventBox" id="stepPartCrypto"> | ||
498 | 5 | <property name="visible">True</property> | ||
499 | 6 | <property name="can_focus">False</property> | ||
500 | 7 | <child> | ||
501 | 8 | <object class="GtkGrid" id="userinfo_table"> | ||
502 | 9 | <property name="visible">True</property> | ||
503 | 10 | <property name="can_focus">False</property> | ||
504 | 11 | <property name="border_width">20</property> | ||
505 | 12 | <property name="row_spacing">6</property> | ||
506 | 13 | <property name="column_spacing">6</property> | ||
507 | 14 | <child> | ||
508 | 15 | <object class="GtkLabel" id="verified_crypto_label"> | ||
509 | 16 | <property name="visible">True</property> | ||
510 | 17 | <property name="can_focus">False</property> | ||
511 | 18 | <property name="halign">end</property> | ||
512 | 19 | <property name="xalign">0</property> | ||
513 | 20 | <property name="label" translatable="yes">Confirm the security key:</property> | ||
514 | 21 | <property name="justify">right</property> | ||
515 | 22 | <property name="single_line_mode">True</property> | ||
516 | 23 | </object> | ||
517 | 24 | <packing> | ||
518 | 25 | <property name="left_attach">0</property> | ||
519 | 26 | <property name="top_attach">3</property> | ||
520 | 27 | <property name="width">1</property> | ||
521 | 28 | <property name="height">1</property> | ||
522 | 29 | </packing> | ||
523 | 30 | </child> | ||
524 | 31 | <child> | ||
525 | 32 | <object class="GtkLabel" id="crypto_label"> | ||
526 | 33 | <property name="visible">True</property> | ||
527 | 34 | <property name="can_focus">False</property> | ||
528 | 35 | <property name="halign">end</property> | ||
529 | 36 | <property name="xalign">0</property> | ||
530 | 37 | <property name="label" translatable="yes">Choose a security key:</property> | ||
531 | 38 | <property name="justify">right</property> | ||
532 | 39 | <property name="single_line_mode">True</property> | ||
533 | 40 | </object> | ||
534 | 41 | <packing> | ||
535 | 42 | <property name="left_attach">0</property> | ||
536 | 43 | <property name="top_attach">2</property> | ||
537 | 44 | <property name="width">1</property> | ||
538 | 45 | <property name="height">1</property> | ||
539 | 46 | </packing> | ||
540 | 47 | </child> | ||
541 | 48 | <child> | ||
542 | 49 | <object class="GtkLabel" id="crypto_description"> | ||
543 | 50 | <property name="visible">True</property> | ||
544 | 51 | <property name="can_focus">False</property> | ||
545 | 52 | <property name="halign">start</property> | ||
546 | 53 | <property name="xalign">0</property> | ||
547 | 54 | <property name="label" translatable="yes">Disk encryption protects your files in case you lose your computer. It requires you to enter a security key each time the computer starts up.</property> | ||
548 | 55 | <property name="wrap">True</property> | ||
549 | 56 | </object> | ||
550 | 57 | <packing> | ||
551 | 58 | <property name="left_attach">0</property> | ||
552 | 59 | <property name="top_attach">0</property> | ||
553 | 60 | <property name="width">4</property> | ||
554 | 61 | <property name="height">1</property> | ||
555 | 62 | </packing> | ||
556 | 63 | </child> | ||
557 | 64 | <child> | ||
558 | 65 | <object class="GtkLabel" id="crypto_warning"> | ||
559 | 66 | <property name="visible">True</property> | ||
560 | 67 | <property name="can_focus">False</property> | ||
561 | 68 | <property name="halign">start</property> | ||
562 | 69 | <property name="xalign">0</property> | ||
563 | 70 | <property name="label" translatable="yes"><span foreground="darkred">Warning:</span> If you lose this security key, all data will be lost. If you need to, write down your key and keep it in a safe place elsewhere.</property> | ||
564 | 71 | <property name="use_markup">True</property> | ||
565 | 72 | <property name="wrap">True</property> | ||
566 | 73 | </object> | ||
567 | 74 | <packing> | ||
568 | 75 | <property name="left_attach">0</property> | ||
569 | 76 | <property name="top_attach">4</property> | ||
570 | 77 | <property name="width">4</property> | ||
571 | 78 | <property name="height">1</property> | ||
572 | 79 | </packing> | ||
573 | 80 | </child> | ||
574 | 81 | <child> | ||
575 | 82 | <object class="GtkLabel" id="crypto_exta_label"> | ||
576 | 83 | <property name="visible">True</property> | ||
577 | 84 | <property name="can_focus">False</property> | ||
578 | 85 | <property name="halign">end</property> | ||
579 | 86 | <property name="xalign">0</property> | ||
580 | 87 | <property name="label" translatable="yes">For more security:</property> | ||
581 | 88 | <property name="justify">right</property> | ||
582 | 89 | </object> | ||
583 | 90 | <packing> | ||
584 | 91 | <property name="left_attach">0</property> | ||
585 | 92 | <property name="top_attach">5</property> | ||
586 | 93 | <property name="width">1</property> | ||
587 | 94 | <property name="height">1</property> | ||
588 | 95 | </packing> | ||
589 | 96 | </child> | ||
590 | 97 | <child> | ||
591 | 98 | <object class="GtkCheckButton" id="fill_with_random_data"> | ||
592 | 99 | <property name="label" translatable="yes">Overwrite empty disk space</property> | ||
593 | 100 | <property name="use_action_appearance">False</property> | ||
594 | 101 | <property name="visible">True</property> | ||
595 | 102 | <property name="can_focus">True</property> | ||
596 | 103 | <property name="receives_default">False</property> | ||
597 | 104 | <property name="halign">start</property> | ||
598 | 105 | <property name="use_action_appearance">False</property> | ||
599 | 106 | <property name="xalign">0</property> | ||
600 | 107 | <property name="draw_indicator">True</property> | ||
601 | 108 | </object> | ||
602 | 109 | <packing> | ||
603 | 110 | <property name="left_attach">1</property> | ||
604 | 111 | <property name="top_attach">5</property> | ||
605 | 112 | <property name="width">3</property> | ||
606 | 113 | <property name="height">1</property> | ||
607 | 114 | </packing> | ||
608 | 115 | </child> | ||
609 | 116 | <child> | ||
610 | 117 | <object class="GtkLabel" id="password_strength"> | ||
611 | 118 | <property name="can_focus">False</property> | ||
612 | 119 | <property name="halign">start</property> | ||
613 | 120 | <property name="xalign">0</property> | ||
614 | 121 | <property name="label" translatable="yes"><small><span color="darkgreen">Strong password</span></small></property> | ||
615 | 122 | <property name="use_markup">True</property> | ||
616 | 123 | <property name="single_line_mode">True</property> | ||
617 | 124 | </object> | ||
618 | 125 | <packing> | ||
619 | 126 | <property name="left_attach">2</property> | ||
620 | 127 | <property name="top_attach">2</property> | ||
621 | 128 | <property name="width">2</property> | ||
622 | 129 | <property name="height">1</property> | ||
623 | 130 | </packing> | ||
624 | 131 | </child> | ||
625 | 132 | <child> | ||
626 | 133 | <object class="GtkEntry" id="auto_password"> | ||
627 | 134 | <property name="visible">True</property> | ||
628 | 135 | <property name="can_focus">True</property> | ||
629 | 136 | <property name="has_focus">True</property> | ||
630 | 137 | <property name="visibility">False</property> | ||
631 | 138 | <property name="invisible_char">●</property> | ||
632 | 139 | <property name="activates_default">True</property> | ||
633 | 140 | <property name="width_chars">20</property> | ||
634 | 141 | <property name="invisible_char_set">True</property> | ||
635 | 142 | <accessibility> | ||
636 | 143 | <relation type="labelled-by" target="crypto_label"/> | ||
637 | 144 | </accessibility> | ||
638 | 145 | <signal name="changed" handler="info_loop" swapped="no"/> | ||
639 | 146 | </object> | ||
640 | 147 | <packing> | ||
641 | 148 | <property name="left_attach">1</property> | ||
642 | 149 | <property name="top_attach">2</property> | ||
643 | 150 | <property name="width">1</property> | ||
644 | 151 | <property name="height">1</property> | ||
645 | 152 | </packing> | ||
646 | 153 | </child> | ||
647 | 154 | <child> | ||
648 | 155 | <object class="GtkEntry" id="auto_verified_password"> | ||
649 | 156 | <property name="visible">True</property> | ||
650 | 157 | <property name="can_focus">True</property> | ||
651 | 158 | <property name="visibility">False</property> | ||
652 | 159 | <property name="invisible_char">●</property> | ||
653 | 160 | <property name="activates_default">True</property> | ||
654 | 161 | <property name="width_chars">20</property> | ||
655 | 162 | <property name="invisible_char_set">True</property> | ||
656 | 163 | <accessibility> | ||
657 | 164 | <relation type="labelled-by" target="verified_crypto_label"/> | ||
658 | 165 | </accessibility> | ||
659 | 166 | <signal name="changed" handler="info_loop" swapped="no"/> | ||
660 | 167 | </object> | ||
661 | 168 | <packing> | ||
662 | 169 | <property name="left_attach">1</property> | ||
663 | 170 | <property name="top_attach">3</property> | ||
664 | 171 | <property name="width">1</property> | ||
665 | 172 | <property name="height">1</property> | ||
666 | 173 | </packing> | ||
667 | 174 | </child> | ||
668 | 175 | <child> | ||
669 | 176 | <object class="GtkLabel" id="crypto_extra_time"> | ||
670 | 177 | <property name="visible">True</property> | ||
671 | 178 | <property name="can_focus">False</property> | ||
672 | 179 | <property name="halign">start</property> | ||
673 | 180 | <property name="margin_left">24</property> | ||
674 | 181 | <property name="xalign">0</property> | ||
675 | 182 | <property name="label" translatable="yes"><span weight="light" size="small">The installation may take much longer.</span></property> | ||
676 | 183 | <property name="use_markup">True</property> | ||
677 | 184 | <property name="single_line_mode">True</property> | ||
678 | 185 | </object> | ||
679 | 186 | <packing> | ||
680 | 187 | <property name="left_attach">1</property> | ||
681 | 188 | <property name="top_attach">6</property> | ||
682 | 189 | <property name="width">3</property> | ||
683 | 190 | <property name="height">1</property> | ||
684 | 191 | </packing> | ||
685 | 192 | </child> | ||
686 | 193 | <child> | ||
687 | 194 | <object class="GtkLabel" id="crypto_description_2"> | ||
688 | 195 | <property name="visible">True</property> | ||
689 | 196 | <property name="can_focus">False</property> | ||
690 | 197 | <property name="halign">start</property> | ||
691 | 198 | <property name="xalign">0</property> | ||
692 | 199 | <property name="label" translatable="yes">Any files outside of Ubuntu will not be encrypted.</property> | ||
693 | 200 | <property name="wrap">True</property> | ||
694 | 201 | </object> | ||
695 | 202 | <packing> | ||
696 | 203 | <property name="left_attach">0</property> | ||
697 | 204 | <property name="top_attach">1</property> | ||
698 | 205 | <property name="width">4</property> | ||
699 | 206 | <property name="height">1</property> | ||
700 | 207 | </packing> | ||
701 | 208 | </child> | ||
702 | 209 | <child> | ||
703 | 210 | <object class="GtkImage" id="password_ok"> | ||
704 | 211 | <property name="can_focus">False</property> | ||
705 | 212 | <property name="halign">start</property> | ||
706 | 213 | <property name="xalign">0</property> | ||
707 | 214 | <property name="stock">gtk-yes</property> | ||
708 | 215 | </object> | ||
709 | 216 | <packing> | ||
710 | 217 | <property name="left_attach">2</property> | ||
711 | 218 | <property name="top_attach">3</property> | ||
712 | 219 | <property name="width">1</property> | ||
713 | 220 | <property name="height">1</property> | ||
714 | 221 | </packing> | ||
715 | 222 | </child> | ||
716 | 223 | <child> | ||
717 | 224 | <object class="GtkLabel" id="password_error_label"> | ||
718 | 225 | <property name="can_focus">False</property> | ||
719 | 226 | <property name="halign">start</property> | ||
720 | 227 | <property name="xalign">0</property> | ||
721 | 228 | <property name="label" translatable="yes"><small><span color="darkred">Passwords do not match</span></small></property> | ||
722 | 229 | <property name="use_markup">True</property> | ||
723 | 230 | <property name="single_line_mode">True</property> | ||
724 | 231 | </object> | ||
725 | 232 | <packing> | ||
726 | 233 | <property name="left_attach">3</property> | ||
727 | 234 | <property name="top_attach">3</property> | ||
728 | 235 | <property name="width">1</property> | ||
729 | 236 | <property name="height">1</property> | ||
730 | 237 | </packing> | ||
731 | 238 | </child> | ||
732 | 239 | <child> | ||
733 | 240 | <placeholder/> | ||
734 | 241 | </child> | ||
735 | 242 | </object> | ||
736 | 243 | </child> | ||
737 | 244 | </object> | ||
738 | 245 | </interface> | ||
739 | 0 | 246 | ||
740 | === modified file 'tests/test_gtkui.py' | |||
741 | --- tests/test_gtkui.py 2012-07-16 14:29:13 +0000 | |||
742 | +++ tests/test_gtkui.py 2012-08-01 15:23:23 +0000 | |||
743 | @@ -75,8 +75,8 @@ | |||
744 | 75 | import time | 75 | import time |
745 | 76 | time.sleep(3) | 76 | time.sleep(3) |
746 | 77 | alloc = ui.live_installer.get_allocation() | 77 | alloc = ui.live_installer.get_allocation() |
749 | 78 | self.assertLessEqual(alloc.width, 640) | 78 | self.assertLessEqual(alloc.width, 640, page.module.NAME) |
750 | 79 | self.assertLessEqual(alloc.height, 500) | 79 | self.assertLessEqual(alloc.height, 500, page.module.NAME) |
751 | 80 | if page.module.NAME == 'partman': | 80 | if page.module.NAME == 'partman': |
752 | 81 | ui.allow_change_step(False) | 81 | ui.allow_change_step(False) |
753 | 82 | 82 | ||
754 | 83 | 83 | ||
755 | === modified file 'ubiquity/plugins/ubi-partman.py' | |||
756 | --- ubiquity/plugins/ubi-partman.py 2012-07-19 09:49:20 +0000 | |||
757 | +++ ubiquity/plugins/ubi-partman.py 2012-08-01 15:23:23 +0000 | |||
758 | @@ -29,6 +29,7 @@ | |||
759 | 29 | from ubiquity import parted_server | 29 | from ubiquity import parted_server |
760 | 30 | from ubiquity import misc | 30 | from ubiquity import misc |
761 | 31 | from ubiquity import osextras | 31 | from ubiquity import osextras |
762 | 32 | from ubiquity import validation | ||
763 | 32 | from ubiquity.install_misc import archdetect | 33 | from ubiquity.install_misc import archdetect |
764 | 33 | 34 | ||
765 | 34 | NAME = 'partman' | 35 | NAME = 'partman' |
766 | @@ -98,6 +99,9 @@ | |||
767 | 98 | def get_grub_choice(self): | 99 | def get_grub_choice(self): |
768 | 99 | return misc.grub_default() | 100 | return misc.grub_default() |
769 | 100 | 101 | ||
770 | 102 | def get_crypto_keys(self): | ||
771 | 103 | pass | ||
772 | 104 | |||
773 | 101 | 105 | ||
774 | 102 | class PageGtk(PageBase): | 106 | class PageGtk(PageBase): |
775 | 103 | plugin_title = 'ubiquity/text/part_auto_heading_label' | 107 | plugin_title = 'ubiquity/text/part_auto_heading_label' |
776 | @@ -114,11 +118,14 @@ | |||
777 | 114 | os.environ['UBIQUITY_GLADE'], 'stepPartAuto.ui')) | 118 | os.environ['UBIQUITY_GLADE'], 'stepPartAuto.ui')) |
778 | 115 | builder.add_from_file(os.path.join( | 119 | builder.add_from_file(os.path.join( |
779 | 116 | os.environ['UBIQUITY_GLADE'], 'stepPartAdvanced.ui')) | 120 | os.environ['UBIQUITY_GLADE'], 'stepPartAdvanced.ui')) |
780 | 121 | builder.add_from_file(os.path.join( | ||
781 | 122 | os.environ['UBIQUITY_GLADE'], 'stepPartCrypto.ui')) | ||
782 | 117 | builder.connect_signals(self) | 123 | builder.connect_signals(self) |
783 | 118 | 124 | ||
784 | 119 | self.page_ask = builder.get_object('stepPartAsk') | 125 | self.page_ask = builder.get_object('stepPartAsk') |
785 | 120 | self.page_auto = builder.get_object('stepPartAuto') | 126 | self.page_auto = builder.get_object('stepPartAuto') |
786 | 121 | self.page_advanced = builder.get_object('stepPartAdvanced') | 127 | self.page_advanced = builder.get_object('stepPartAdvanced') |
787 | 128 | self.page_crypto = builder.get_object('stepPartCrypto') | ||
788 | 122 | 129 | ||
789 | 123 | # Grub options | 130 | # Grub options |
790 | 124 | self.bootloader_vbox = builder.get_object('bootloader_vbox') | 131 | self.bootloader_vbox = builder.get_object('bootloader_vbox') |
791 | @@ -139,10 +146,8 @@ | |||
792 | 139 | self.part_auto_hidden_label = builder.get_object( | 146 | self.part_auto_hidden_label = builder.get_object( |
793 | 140 | 'part_auto_hidden_label') | 147 | 'part_auto_hidden_label') |
794 | 141 | self.part_advanced_vbox = builder.get_object('part_advanced_vbox') | 148 | self.part_advanced_vbox = builder.get_object('part_advanced_vbox') |
799 | 142 | self.vbox_part_auto_recipes = builder.get_object( | 149 | self.use_lvm = builder.get_object('use_lvm') |
800 | 143 | 'vbox_part_auto_recipes') | 150 | self.use_crypto = builder.get_object('use_crypto') |
797 | 144 | self.part_auto_use_lvm_checkbox = builder.get_object( | ||
798 | 145 | 'part_auto_use_lvm_checkbox') | ||
801 | 146 | 151 | ||
802 | 147 | # Ask page | 152 | # Ask page |
803 | 148 | self.part_ask_heading = builder.get_object('part_ask_heading') | 153 | self.part_ask_heading = builder.get_object('part_ask_heading') |
804 | @@ -163,6 +168,10 @@ | |||
805 | 163 | 'custom_partitioning_title') | 168 | 'custom_partitioning_title') |
806 | 164 | self.custom_partitioning_desc = builder.get_object( | 169 | self.custom_partitioning_desc = builder.get_object( |
807 | 165 | 'custom_partitioning_desc') | 170 | 'custom_partitioning_desc') |
808 | 171 | self.use_lvm_title = builder.get_object('use_lvm_title') | ||
809 | 172 | self.use_lvm_desc = builder.get_object('use_lvm_desc') | ||
810 | 173 | self.use_crypto_title = builder.get_object('use_crypto_title') | ||
811 | 174 | self.use_crypto_desc = builder.get_object('use_crypto_desc') | ||
812 | 166 | 175 | ||
813 | 167 | # Advanced page | 176 | # Advanced page |
814 | 168 | self.partition_create_mount_combo = builder.get_object( | 177 | self.partition_create_mount_combo = builder.get_object( |
815 | @@ -219,6 +228,19 @@ | |||
816 | 219 | self.part_advanced_recalculating_label = builder.get_object( | 228 | self.part_advanced_recalculating_label = builder.get_object( |
817 | 220 | 'part_advanced_recalculating_label') | 229 | 'part_advanced_recalculating_label') |
818 | 221 | 230 | ||
819 | 231 | # Crypto page | ||
820 | 232 | |||
821 | 233 | self.auto_password = builder.get_object( | ||
822 | 234 | 'auto_password') | ||
823 | 235 | self.password_error_label = builder.get_object( | ||
824 | 236 | 'password_error_label') | ||
825 | 237 | self.auto_verified_password = builder.get_object( | ||
826 | 238 | 'auto_verified_password') | ||
827 | 239 | self.password_strength = builder.get_object( | ||
828 | 240 | 'password_strength') | ||
829 | 241 | self.password_ok = builder.get_object( | ||
830 | 242 | 'password_ok') | ||
831 | 243 | |||
832 | 222 | self.partition_bars = {} | 244 | self.partition_bars = {} |
833 | 223 | self.segmented_bar_vbox = None | 245 | self.segmented_bar_vbox = None |
834 | 224 | self.resize_min_size = None | 246 | self.resize_min_size = None |
835 | @@ -232,7 +254,8 @@ | |||
836 | 232 | True) | 254 | True) |
837 | 233 | self.partition_edit_mount_combo.get_child().set_activates_default(True) | 255 | self.partition_edit_mount_combo.get_child().set_activates_default(True) |
838 | 234 | 256 | ||
840 | 235 | self.plugin_optional_widgets = [self.page_auto, self.page_advanced] | 257 | self.plugin_optional_widgets = [self.page_auto, self.page_advanced, |
841 | 258 | self.page_crypto] | ||
842 | 236 | self.current_page = self.page_ask | 259 | self.current_page = self.page_ask |
843 | 237 | 260 | ||
844 | 238 | # Set some parameters that do not change between runs of the plugin | 261 | # Set some parameters that do not change between runs of the plugin |
845 | @@ -284,6 +307,10 @@ | |||
846 | 284 | os.rmdir(mount_path) | 307 | os.rmdir(mount_path) |
847 | 285 | self.controller._wizard.do_reboot() | 308 | self.controller._wizard.do_reboot() |
848 | 286 | 309 | ||
849 | 310 | def set_page_title(self, title): | ||
850 | 311 | self.controller._wizard.page_title.set_markup( | ||
851 | 312 | '<span size="xx-large">%s</span>' % title) | ||
852 | 313 | |||
853 | 287 | def plugin_on_next_clicked(self): | 314 | def plugin_on_next_clicked(self): |
854 | 288 | reuse = self.reuse_partition.get_active() | 315 | reuse = self.reuse_partition.get_active() |
855 | 289 | replace = self.replace_partition.get_active() | 316 | replace = self.replace_partition.get_active() |
856 | @@ -291,29 +318,62 @@ | |||
857 | 291 | custom = self.custom_partitioning.get_active() | 318 | custom = self.custom_partitioning.get_active() |
858 | 292 | use_device = self.use_device.get_active() | 319 | use_device = self.use_device.get_active() |
859 | 293 | biggest_free = 'biggest_free' in self.extra_options | 320 | biggest_free = 'biggest_free' in self.extra_options |
860 | 321 | crypto = self.use_device.get_active() | ||
861 | 322 | one_disk = False | ||
862 | 323 | |||
863 | 324 | if custom: | ||
864 | 325 | self.set_page_title(self.custom_partitioning_title.get_text()) | ||
865 | 326 | self.current_page = self.page_advanced | ||
866 | 327 | self.controller.go_to_page(self.current_page) | ||
867 | 328 | self.controller.toggle_next_button('install_button') | ||
868 | 329 | self.plugin_is_install = True | ||
869 | 330 | return False | ||
870 | 331 | |||
871 | 332 | # Setting the model early on, because if there is only one | ||
872 | 333 | # disk, we switch to install interface staight away and it | ||
873 | 334 | # queries the model to get the disk | ||
874 | 335 | m = self.part_auto_select_drive.get_model() | ||
875 | 336 | m.clear() | ||
876 | 337 | disks = self.extra_options['use_device'][1] | ||
877 | 338 | if len(disks) == 1: | ||
878 | 339 | one_disk = True | ||
879 | 340 | if use_device: | ||
880 | 341 | for disk in disks: | ||
881 | 342 | m.append([disk, '']) | ||
882 | 343 | self.part_auto_select_drive.set_active(0) | ||
883 | 344 | |||
884 | 345 | # Currently we support crypto only in use_disk | ||
885 | 346 | # TODO dmitrij.ledkov 2012-07-25 no way to go back and return | ||
886 | 347 | # to here? This needs to be addressed in the design document. | ||
887 | 348 | if crypto and use_device and self.current_page == self.page_ask: | ||
888 | 349 | self.set_page_title( | ||
889 | 350 | self.controller.get_string('ubiquity/text/crypto_label')) | ||
890 | 351 | self.current_page = self.page_crypto | ||
891 | 352 | self.controller.go_to_page(self.current_page) | ||
892 | 353 | self.controller.toggle_next_button('install_button') | ||
893 | 354 | self.plugin_is_install = True | ||
894 | 355 | self.info_loop(None) | ||
895 | 356 | return True | ||
896 | 357 | |||
897 | 358 | if (self.current_page == self.page_crypto and | ||
898 | 359 | not self.get_crypto_keys()): | ||
899 | 360 | self.controller.allow_go_forward(False) | ||
900 | 361 | return True | ||
901 | 294 | 362 | ||
902 | 295 | # We already have all that we need from the user. | 363 | # We already have all that we need from the user. |
904 | 296 | done_partitioning = (resize and biggest_free) or reuse or replace | 364 | done_partitioning = \ |
905 | 365 | (resize and biggest_free) or \ | ||
906 | 366 | (use_device and one_disk) or \ | ||
907 | 367 | reuse or replace | ||
908 | 297 | 368 | ||
909 | 298 | if self.current_page == self.page_ask and not done_partitioning: | 369 | if self.current_page == self.page_ask and not done_partitioning: |
925 | 299 | if custom: | 370 | if resize: |
926 | 300 | title = self.custom_partitioning_title.get_text() | 371 | self.set_page_title(self.resize_use_free_title.get_text()) |
927 | 301 | elif resize: | 372 | if 'wubi' in self.extra_options: |
928 | 302 | title = self.resize_use_free_title.get_text() | 373 | self.configure_wubi_and_reboot() |
929 | 303 | elif use_device: | 374 | return True |
915 | 304 | title = self.use_device_title.get_text() | ||
916 | 305 | self.controller._wizard.page_title.set_markup( | ||
917 | 306 | '<span size="xx-large">%s</span>' % title) | ||
918 | 307 | |||
919 | 308 | if resize and 'wubi' in self.extra_options: | ||
920 | 309 | self.configure_wubi_and_reboot() | ||
921 | 310 | return True | ||
922 | 311 | elif resize: | ||
923 | 312 | m = self.part_auto_select_drive.get_model() | ||
924 | 313 | m.clear() | ||
930 | 314 | extra_resize = self.extra_options['resize'] | 375 | extra_resize = self.extra_options['resize'] |
931 | 315 | disk_ids = list(extra_resize.keys()) | 376 | disk_ids = list(extra_resize.keys()) |
932 | 316 | disks = self.extra_options['use_device'][1] | ||
933 | 317 | # FIXME: perhaps it makes more sense to store the disk | 377 | # FIXME: perhaps it makes more sense to store the disk |
934 | 318 | # description. | 378 | # description. |
935 | 319 | for disk in disks: | 379 | for disk in disks: |
936 | @@ -325,32 +385,21 @@ | |||
937 | 325 | misc.format_size(part_size - min_size)]) | 385 | misc.format_size(part_size - min_size)]) |
938 | 326 | self.part_auto_select_drive.set_active(0) | 386 | self.part_auto_select_drive.set_active(0) |
939 | 327 | self.initialize_resize_mode() | 387 | self.initialize_resize_mode() |
946 | 328 | elif use_device: | 388 | |
947 | 329 | m = self.part_auto_select_drive.get_model() | 389 | if use_device: |
948 | 330 | m.clear() | 390 | self.set_page_title(self.use_device_title.get_text()) |
943 | 331 | for disk in self.extra_options['use_device'][1]: | ||
944 | 332 | m.append([disk, '']) | ||
945 | 333 | self.part_auto_select_drive.set_active(0) | ||
949 | 334 | self.initialize_use_disk_mode() | 391 | self.initialize_use_disk_mode() |
950 | 335 | 392 | ||
969 | 336 | if not custom: | 393 | self.current_page = self.page_auto |
970 | 337 | self.current_page = self.page_auto | 394 | self.controller.go_to_page(self.current_page) |
971 | 338 | self.controller.go_to_page(self.current_page) | 395 | self.controller.toggle_next_button('install_button') |
972 | 339 | self.controller.toggle_next_button('install_button') | 396 | self.plugin_is_install = True |
973 | 340 | self.plugin_is_install = True | 397 | return True |
974 | 341 | return True | 398 | |
975 | 342 | else: | 399 | # Return control to partman, which will call |
976 | 343 | self.current_page = self.page_advanced | 400 | # get_autopartition_choice and start partitioninging the device. |
977 | 344 | self.controller.go_to_page(self.current_page) | 401 | self.controller.switch_to_install_interface() |
978 | 345 | self.controller.toggle_next_button('install_button') | 402 | return False |
961 | 346 | self.plugin_is_install = True | ||
962 | 347 | return False | ||
963 | 348 | else: | ||
964 | 349 | # Return control to partman, which will call | ||
965 | 350 | # get_autopartition_choice and start partitioninging the device. | ||
966 | 351 | if not custom: | ||
967 | 352 | self.controller.switch_to_install_interface() | ||
968 | 353 | return False | ||
979 | 354 | 403 | ||
980 | 355 | def plugin_on_back_clicked(self): | 404 | def plugin_on_back_clicked(self): |
981 | 356 | if self.current_page == self.page_auto: | 405 | if self.current_page == self.page_auto: |
982 | @@ -405,15 +454,6 @@ | |||
983 | 405 | hidden = self.controller.get_string('part_auto_hidden_label') | 454 | hidden = self.controller.get_string('part_auto_hidden_label') |
984 | 406 | self.part_auto_hidden_label.set_markup(hidden % partition_count) | 455 | self.part_auto_hidden_label.set_markup(hidden % partition_count) |
985 | 407 | 456 | ||
986 | 408 | def set_part_auto_recipes(self): | ||
987 | 409 | '''Shows experimental LVM option. TODO actually | ||
988 | 410 | check the available options from partman. ''' | ||
989 | 411 | |||
990 | 412 | if 'UBIQUITY_PARTAUTO_LVM' in os.environ: | ||
991 | 413 | self.vbox_part_auto_recipes.show_all() | ||
992 | 414 | else: | ||
993 | 415 | self.vbox_part_auto_recipes.hide() | ||
994 | 416 | |||
995 | 417 | def part_ask_option_is_install(self): | 457 | def part_ask_option_is_install(self): |
996 | 418 | if (self.reuse_partition.get_active() or | 458 | if (self.reuse_partition.get_active() or |
997 | 419 | self.replace_partition.get_active()): | 459 | self.replace_partition.get_active()): |
998 | @@ -437,6 +477,11 @@ | |||
999 | 437 | self.controller.toggle_next_button() | 477 | self.controller.toggle_next_button() |
1000 | 438 | self.plugin_is_install = about_to_install | 478 | self.plugin_is_install = about_to_install |
1001 | 439 | 479 | ||
1002 | 480 | # Supporting crypto and lvm in new installs only for now | ||
1003 | 481 | use_device = self.use_device.get_active() | ||
1004 | 482 | self.use_lvm.set_sensitive(use_device) | ||
1005 | 483 | self.use_crypto.set_sensitive(use_device) | ||
1006 | 484 | |||
1007 | 440 | def initialize_resize_mode(self): | 485 | def initialize_resize_mode(self): |
1008 | 441 | disk_id = self.get_current_disk_partman_id() | 486 | disk_id = self.get_current_disk_partman_id() |
1009 | 442 | if not disk_id: | 487 | if not disk_id: |
1010 | @@ -532,7 +577,6 @@ | |||
1011 | 532 | 577 | ||
1012 | 533 | def part_auto_select_drive_changed(self, unused_widget): | 578 | def part_auto_select_drive_changed(self, unused_widget): |
1013 | 534 | self.set_part_auto_hidden_label() | 579 | self.set_part_auto_hidden_label() |
1014 | 535 | self.set_part_auto_recipes() | ||
1015 | 536 | disk_id = self.get_current_disk_partman_id() | 580 | disk_id = self.get_current_disk_partman_id() |
1016 | 537 | if not disk_id: | 581 | if not disk_id: |
1017 | 538 | return | 582 | return |
1018 | @@ -581,46 +625,56 @@ | |||
1019 | 581 | def set_autopartition_options(self, options, extra_options): | 625 | def set_autopartition_options(self, options, extra_options): |
1020 | 582 | # TODO Need to select a radio button when resize isn't around. | 626 | # TODO Need to select a radio button when resize isn't around. |
1021 | 583 | self.extra_options = extra_options | 627 | self.extra_options = extra_options |
1022 | 584 | |||
1023 | 585 | fmt = '<span size="small">%s</span>' | 628 | fmt = '<span size="small">%s</span>' |
1062 | 586 | self.use_device_title.set_label(options['use_device'].title) | 629 | option_to_widget = OrderedDict({ |
1063 | 587 | self.use_device_desc.set_markup(fmt % options['use_device'].desc) | 630 | "resize": "resize_use_free", |
1064 | 588 | # To give a nice text effect. | 631 | "reuse": "reuse_partition", |
1065 | 589 | self.use_device_desc.set_sensitive(False) | 632 | "replace": "replace_partition", |
1066 | 590 | self.custom_partitioning_title.set_label(options['manual'].title) | 633 | "use_device": "use_device", |
1067 | 591 | self.custom_partitioning_desc.set_markup(fmt % options['manual'].desc) | 634 | "manual": "custom_partitioning", |
1068 | 592 | self.custom_partitioning_desc.set_sensitive(False) | 635 | "some_device_crypto": "use_crypto", |
1069 | 593 | 636 | "some_device_lvm": "use_lvm", | |
1070 | 594 | if 'replace' in options: | 637 | }) |
1071 | 595 | self.replace_partition.show() | 638 | |
1072 | 596 | self.replace_partition_title.set_label(options['replace'].title) | 639 | if 'some_device_crypto' in extra_options: |
1073 | 597 | self.replace_partition_desc.set_markup( | 640 | title = self.controller.get_string( |
1074 | 598 | fmt % options['replace'].desc) | 641 | 'ubiquity/text/use_crypto_title') |
1075 | 599 | self.replace_partition_desc.set_sensitive(False) | 642 | desc = self.controller.get_string('ubiquity/text/use_crypto_desc') |
1076 | 600 | else: | 643 | options['some_device_crypto'] = PartitioningOption(title, desc) |
1077 | 601 | self.replace_partition.hide() | 644 | |
1078 | 602 | 645 | if 'some_device_lvm' in extra_options: | |
1079 | 603 | if 'reuse' in options: | 646 | title = self.controller.get_string('ubiquity/text/use_lvm_title') |
1080 | 604 | self.reuse_partition.show() | 647 | desc = self.controller.get_string('ubiquity/text/use_lvm_desc') |
1081 | 605 | self.reuse_partition_title.set_markup(options['reuse'].title) | 648 | options['some_device_lvm'] = PartitioningOption(title, desc) |
1082 | 606 | self.reuse_partition_desc.set_markup(fmt % options['reuse'].desc) | 649 | |
1083 | 607 | self.reuse_partition_desc.set_sensitive(False) | 650 | for option in option_to_widget: |
1084 | 608 | else: | 651 | name = option_to_widget[option] |
1085 | 609 | self.reuse_partition.hide() | 652 | opt_widget = getattr(self, name) |
1086 | 610 | 653 | opt_title = getattr(self, name + '_title') | |
1087 | 611 | if 'resize' in options: | 654 | opt_desc = getattr(self, name + '_desc') |
1088 | 612 | self.resize_use_free.show() | 655 | |
1089 | 613 | self.resize_use_free_title.set_label(options['resize'].title) | 656 | if option in options: |
1090 | 614 | self.resize_use_free_desc.set_markup(fmt % options['resize'].desc) | 657 | opt_widget.show() |
1091 | 615 | self.resize_use_free_desc.set_sensitive(False) | 658 | opt_title.set_label(options[option].title) |
1092 | 616 | else: | 659 | opt_desc.set_markup(fmt % options[option].desc) |
1093 | 617 | self.resize_use_free.hide() | 660 | opt_desc.set_sensitive(False) |
1094 | 618 | 661 | else: | |
1095 | 619 | for opt in (self.resize_use_free, self.reuse_partition, | 662 | opt_widget.hide() |
1096 | 620 | self.replace_partition, self.use_device): | 663 | |
1097 | 621 | if opt.get_property('visible'): | 664 | # dmitrij.ledkov 2012-07-23: Hide LVM from the UI, until |
1098 | 622 | opt.set_active(True) | 665 | # we design user-friendly way of expressing this, or we |
1099 | 623 | break | 666 | # switch to lvm installs by default.... |
1100 | 667 | if option == 'some_device_lvm': | ||
1101 | 668 | if 'UBIQUITY_PARTAUTO_LVM' in os.environ: | ||
1102 | 669 | opt_widget.show() | ||
1103 | 670 | else: | ||
1104 | 671 | opt_widget.hide() | ||
1105 | 672 | |||
1106 | 673 | if option == 'some_device_crypto': | ||
1107 | 674 | if 'UBIQUITY_PARTAUTO_CRYPTO' in os.environ: | ||
1108 | 675 | opt_widget.show() | ||
1109 | 676 | else: | ||
1110 | 677 | opt_widget.hide() | ||
1111 | 624 | 678 | ||
1112 | 625 | # Process the default selection | 679 | # Process the default selection |
1113 | 626 | self.part_ask_option_changed(None) | 680 | self.part_ask_option_changed(None) |
1114 | @@ -649,15 +703,20 @@ | |||
1115 | 649 | 703 | ||
1116 | 650 | elif self.use_device.get_active(): | 704 | elif self.use_device.get_active(): |
1117 | 651 | def choose_recipe(): | 705 | def choose_recipe(): |
1120 | 652 | # TODO dmitrij.ledkov 2012-07-10: To be extended with | 706 | # TODO dmitrij.ledkov 2012-07-23: RAID recipe? |
1119 | 653 | # other complex recipes, e.g. stacking crypt & raid. | ||
1121 | 654 | 707 | ||
1122 | 655 | have_lvm = 'some_device_lvm' in self.extra_options | 708 | have_lvm = 'some_device_lvm' in self.extra_options |
1125 | 656 | 709 | want_lvm = self.use_lvm.get_active() | |
1126 | 657 | if 'UBIQUITY_PARTAUTO_LVM' not in os.environ or not have_lvm: | 710 | |
1127 | 711 | have_crypto = 'some_device_crypto' in self.extra_options | ||
1128 | 712 | want_crypto = self.use_crypto.get_active() | ||
1129 | 713 | |||
1130 | 714 | if not ((want_crypto and have_crypto) or | ||
1131 | 715 | (want_lvm and have_lvm)): | ||
1132 | 658 | return self.extra_options['use_device'][0] | 716 | return self.extra_options['use_device'][0] |
1133 | 659 | 717 | ||
1135 | 660 | want_lvm = self.part_auto_use_lvm_checkbox.get_active() | 718 | if want_crypto: |
1136 | 719 | return self.extra_options['some_device_crypto'] | ||
1137 | 661 | 720 | ||
1138 | 662 | if want_lvm: | 721 | if want_lvm: |
1139 | 663 | return self.extra_options['some_device_lvm'] | 722 | return self.extra_options['some_device_lvm'] |
1140 | @@ -1379,6 +1438,25 @@ | |||
1141 | 1379 | self.part_advanced_warning_message.set_text(message) | 1438 | self.part_advanced_warning_message.set_text(message) |
1142 | 1380 | self.part_advanced_warning_hbox.show_all() | 1439 | self.part_advanced_warning_hbox.show_all() |
1143 | 1381 | 1440 | ||
1144 | 1441 | # Crypto Page | ||
1145 | 1442 | def info_loop(self, unused_widget): | ||
1146 | 1443 | complete = validation.gtk_password_validate( | ||
1147 | 1444 | self.controller, | ||
1148 | 1445 | self.auto_password, | ||
1149 | 1446 | self.auto_verified_password, | ||
1150 | 1447 | self.password_ok, | ||
1151 | 1448 | self.password_error_label, | ||
1152 | 1449 | self.password_strength | ||
1153 | 1450 | ) | ||
1154 | 1451 | self.controller.allow_go_forward(complete) | ||
1155 | 1452 | return complete | ||
1156 | 1453 | |||
1157 | 1454 | def get_crypto_keys(self): | ||
1158 | 1455 | if self.info_loop(None): | ||
1159 | 1456 | return self.auto_password.get_text() | ||
1160 | 1457 | else: | ||
1161 | 1458 | return False | ||
1162 | 1459 | |||
1163 | 1382 | 1460 | ||
1164 | 1383 | class PageKde(PageBase): | 1461 | class PageKde(PageBase): |
1165 | 1384 | plugin_breadcrumb = 'ubiquity/text/breadcrumb_partition' | 1462 | plugin_breadcrumb = 'ubiquity/text/breadcrumb_partition' |
1166 | @@ -1530,7 +1608,10 @@ | |||
1167 | 1530 | '^partman/confirm.*', | 1608 | '^partman/confirm.*', |
1168 | 1531 | '^partman/free_space$', | 1609 | '^partman/free_space$', |
1169 | 1532 | '^partman/active_partition$', | 1610 | '^partman/active_partition$', |
1170 | 1611 | '^partman-crypto/passphrase.*', | ||
1171 | 1612 | '^partman-crypto/weak_passphrase$', | ||
1172 | 1533 | '^partman-lvm/confirm.*', | 1613 | '^partman-lvm/confirm.*', |
1173 | 1614 | '^partman-lvm/device_remove_lvm', | ||
1174 | 1534 | '^partman-partitioning/new_partition_(size|type|place)$', | 1615 | '^partman-partitioning/new_partition_(size|type|place)$', |
1175 | 1535 | '^partman-target/choose_method$', | 1616 | '^partman-target/choose_method$', |
1176 | 1536 | '^partman-basicfilesystems/' | 1617 | '^partman-basicfilesystems/' |
1177 | @@ -1996,6 +2077,7 @@ | |||
1178 | 1996 | resize_option = ('resize' in self.extra_options or | 2077 | resize_option = ('resize' in self.extra_options or |
1179 | 1997 | 'biggest_free' in self.extra_options) | 2078 | 'biggest_free' in self.extra_options) |
1180 | 1998 | 2079 | ||
1181 | 2080 | # Irrespective of os_counts | ||
1182 | 1999 | # We always have the manual partitioner, and it always has the same | 2081 | # We always have the manual partitioner, and it always has the same |
1183 | 2000 | # title and description. | 2082 | # title and description. |
1184 | 2001 | q = 'ubiquity/partitioner/advanced' | 2083 | q = 'ubiquity/partitioner/advanced' |
1185 | @@ -2129,6 +2211,10 @@ | |||
1186 | 2129 | self.description('partman-auto/text/resize_use_free') | 2211 | self.description('partman-auto/text/resize_use_free') |
1187 | 2130 | self.manual_desc = \ | 2212 | self.manual_desc = \ |
1188 | 2131 | self.description('partman-auto/text/custom_partitioning') | 2213 | self.description('partman-auto/text/custom_partitioning') |
1189 | 2214 | self.some_device_lvm_desc = \ | ||
1190 | 2215 | self.description('partman-auto-lvm/text/choice') | ||
1191 | 2216 | self.some_device_crypto_desc = \ | ||
1192 | 2217 | self.description('partman-auto-crypto/text/choice') | ||
1193 | 2132 | self.extra_options = {} | 2218 | self.extra_options = {} |
1194 | 2133 | if choices: | 2219 | if choices: |
1195 | 2134 | self.auto_state = [0, None] | 2220 | self.auto_state = [0, None] |
1196 | @@ -2249,6 +2335,18 @@ | |||
1197 | 2249 | for option in replace: | 2335 | for option in replace: |
1198 | 2250 | self.extra_options['replace'].append(option[2]) | 2336 | self.extra_options['replace'].append(option[2]) |
1199 | 2251 | 2337 | ||
1200 | 2338 | some_device_lvm = self.find_script(menu_options, | ||
1201 | 2339 | 'some_device_lvm') | ||
1202 | 2340 | if some_device_lvm: | ||
1203 | 2341 | self.extra_options['some_device_lvm'] = \ | ||
1204 | 2342 | self.some_device_lvm_desc | ||
1205 | 2343 | |||
1206 | 2344 | some_device_crypto = self.find_script(menu_options, | ||
1207 | 2345 | 'some_device_crypto') | ||
1208 | 2346 | if some_device_crypto: | ||
1209 | 2347 | self.extra_options['some_device_crypto'] = \ | ||
1210 | 2348 | self.some_device_crypto_desc | ||
1211 | 2349 | |||
1212 | 2252 | # We always have the manual option. | 2350 | # We always have the manual option. |
1213 | 2253 | self.extra_options['manual'] = self.manual_desc | 2351 | self.extra_options['manual'] = self.manual_desc |
1214 | 2254 | self.ui.set_disk_layout(layout) | 2352 | self.ui.set_disk_layout(layout) |
1215 | @@ -2910,6 +3008,22 @@ | |||
1216 | 2910 | else: | 3008 | else: |
1217 | 2911 | raise AssertionError("Arrived at %s unexpectedly" % question) | 3009 | raise AssertionError("Arrived at %s unexpectedly" % question) |
1218 | 2912 | 3010 | ||
1219 | 3011 | elif question.startswith('partman-lvm/confirm') or \ | ||
1220 | 3012 | question == 'partman-lvm/device_remove_lvm': | ||
1221 | 3013 | self.preseed_bool(question, True, seen=False) | ||
1222 | 3014 | self.succeeded = True | ||
1223 | 3015 | return True | ||
1224 | 3016 | |||
1225 | 3017 | elif question == 'partman-crypto/weak_passphrase': | ||
1226 | 3018 | self.preseed_bool(question, True, seen=False) | ||
1227 | 3019 | return True | ||
1228 | 3020 | |||
1229 | 3021 | elif question.startswith('partman-crypto/passphrase'): | ||
1230 | 3022 | if not self.ui.get_crypto_keys(): | ||
1231 | 3023 | return False | ||
1232 | 3024 | self.preseed(question, self.ui.get_crypto_keys()) | ||
1233 | 3025 | return True | ||
1234 | 3026 | |||
1235 | 2913 | elif question.startswith('partman/confirm'): | 3027 | elif question.startswith('partman/confirm'): |
1236 | 2914 | self.db.set('ubiquity/partman-confirm', question[8:]) | 3028 | self.db.set('ubiquity/partman-confirm', question[8:]) |
1237 | 2915 | self.preseed(question, 'true', seen=False) | 3029 | self.preseed(question, 'true', seen=False) |
1238 | 2916 | 3030 | ||
1239 | === modified file 'ubiquity/plugins/ubi-usersetup.py' | |||
1240 | --- ubiquity/plugins/ubi-usersetup.py 2012-07-16 14:29:13 +0000 | |||
1241 | +++ ubiquity/plugins/ubi-usersetup.py 2012-08-01 15:23:23 +0000 | |||
1242 | @@ -369,40 +369,17 @@ | |||
1243 | 369 | self.username_error_label.hide() | 369 | self.username_error_label.hide() |
1244 | 370 | complete = False | 370 | complete = False |
1245 | 371 | 371 | ||
1264 | 372 | passw = self.password.get_text() | 372 | password_ok = validation.gtk_password_validate( |
1265 | 373 | vpassw = self.verified_password.get_text() | 373 | self.controller, |
1266 | 374 | allow_empty = self.allow_password_empty | 374 | self.password, |
1267 | 375 | if passw != vpassw: | 375 | self.verified_password, |
1268 | 376 | complete = False | 376 | self.password_ok, |
1269 | 377 | self.password_ok.hide() | 377 | self.password_error_label, |
1270 | 378 | if passw and (len(vpassw) / float(len(passw)) > 0.8): | 378 | self.password_strength, |
1271 | 379 | # TODO Cache, use a custom string. | 379 | self.allow_password_empty, |
1272 | 380 | txt = self.controller.get_string( | 380 | ) |
1255 | 381 | 'ubiquity/text/password_mismatch') | ||
1256 | 382 | txt = ( | ||
1257 | 383 | '<small>' | ||
1258 | 384 | '<span foreground="darkred"><b>%s</b></span>' | ||
1259 | 385 | '</small>' % txt) | ||
1260 | 386 | self.password_error_label.set_markup(txt) | ||
1261 | 387 | self.password_error_label.show() | ||
1262 | 388 | else: | ||
1263 | 389 | self.password_error_label.hide() | ||
1273 | 390 | 381 | ||
1289 | 391 | if allow_empty: | 382 | complete = complete and password_ok |
1275 | 392 | self.password_strength.hide() | ||
1276 | 393 | elif not passw: | ||
1277 | 394 | self.password_strength.hide() | ||
1278 | 395 | complete = False | ||
1279 | 396 | else: | ||
1280 | 397 | (txt, color) = validation.human_password_strength(passw) | ||
1281 | 398 | # TODO Cache | ||
1282 | 399 | txt = self.controller.get_string('ubiquity/text/password/' + txt) | ||
1283 | 400 | txt = '<small><span foreground="%s"><b>%s</b></span></small>' \ | ||
1284 | 401 | % (color, txt) | ||
1285 | 402 | self.password_strength.set_markup(txt) | ||
1286 | 403 | self.password_strength.show() | ||
1287 | 404 | if passw == vpassw: | ||
1288 | 405 | self.password_ok.show() | ||
1290 | 406 | 383 | ||
1291 | 407 | txt = self.hostname.get_text() | 384 | txt = self.hostname.get_text() |
1292 | 408 | self.hostname_ok.show() | 385 | self.hostname_ok.show() |
1293 | 409 | 386 | ||
1294 | === modified file 'ubiquity/validation.py' | |||
1295 | --- ubiquity/validation.py 2012-07-16 14:29:13 +0000 | |||
1296 | +++ ubiquity/validation.py 2012-08-01 15:23:23 +0000 | |||
1297 | @@ -140,3 +140,51 @@ | |||
1298 | 140 | hint = 'strong' | 140 | hint = 'strong' |
1299 | 141 | color = 'darkgreen' | 141 | color = 'darkgreen' |
1300 | 142 | return (hint, color) | 142 | return (hint, color) |
1301 | 143 | |||
1302 | 144 | |||
1303 | 145 | # TODO dmitrij.ledkov 2012-07-23: factor-out further into generic | ||
1304 | 146 | # page/pagegtk/pagekde sub-widget | ||
1305 | 147 | def gtk_password_validate(controller, | ||
1306 | 148 | password, | ||
1307 | 149 | verified_password, | ||
1308 | 150 | password_ok, | ||
1309 | 151 | password_error_label, | ||
1310 | 152 | password_strength, | ||
1311 | 153 | allow_empty=False, | ||
1312 | 154 | ): | ||
1313 | 155 | complete = True | ||
1314 | 156 | passw = password.get_text() | ||
1315 | 157 | vpassw = verified_password.get_text() | ||
1316 | 158 | if passw != vpassw: | ||
1317 | 159 | complete = False | ||
1318 | 160 | password_ok.hide() | ||
1319 | 161 | if passw and (len(vpassw) / float(len(passw)) > 0.8): | ||
1320 | 162 | # TODO Cache, use a custom string. | ||
1321 | 163 | txt = controller.get_string( | ||
1322 | 164 | 'ubiquity/text/password_mismatch') | ||
1323 | 165 | txt = ( | ||
1324 | 166 | '<small>' | ||
1325 | 167 | '<span foreground="darkred"><b>%s</b></span>' | ||
1326 | 168 | '</small>' % txt) | ||
1327 | 169 | password_error_label.set_markup(txt) | ||
1328 | 170 | password_error_label.show() | ||
1329 | 171 | else: | ||
1330 | 172 | password_error_label.hide() | ||
1331 | 173 | |||
1332 | 174 | if allow_empty: | ||
1333 | 175 | password_strength.hide() | ||
1334 | 176 | elif not passw: | ||
1335 | 177 | password_strength.hide() | ||
1336 | 178 | complete = False | ||
1337 | 179 | else: | ||
1338 | 180 | (txt, color) = human_password_strength(passw) | ||
1339 | 181 | # TODO Cache | ||
1340 | 182 | txt = controller.get_string('ubiquity/text/password/' + txt) | ||
1341 | 183 | txt = '<small><span foreground="%s"><b>%s</b></span></small>' \ | ||
1342 | 184 | % (color, txt) | ||
1343 | 185 | password_strength.set_markup(txt) | ||
1344 | 186 | password_strength.show() | ||
1345 | 187 | if passw == vpassw: | ||
1346 | 188 | password_ok.show() | ||
1347 | 189 | |||
1348 | 190 | return complete |
This merge proposal depends on: /code.launchpad .net/~dmitrij. ledkov/ partman- crypto/ finish. d/+merge/ 117657
https:/
The resulting installation:
- boots in KVM using the recovery option
- fails to boot 'normally' in KVM
- untested on bare metal