Merge lp:~cyphermox/ubiquity/crypto-not-preseed into lp:ubiquity

Proposed by Mathieu Trudel-Lapierre
Status: Merged
Approved by: Mathieu Trudel-Lapierre
Approved revision: 6264
Merged at revision: 6262
Proposed branch: lp:~cyphermox/ubiquity/crypto-not-preseed
Merge into: lp:ubiquity
Diff against target: 178 lines (+61/-26)
3 files modified
d-i/manifest (+3/-3)
debian/changelog (+10/-0)
ubiquity/plugins/ubi-partman.py (+48/-23)
To merge this branch: bzr merge lp:~cyphermox/ubiquity/crypto-not-preseed
Reviewer Review Type Date Requested Status
Barry Warsaw (community) Approve
Ubuntu Installer Team Pending
Review via email: mp+248609@code.launchpad.net

Description of the change

+ * ubiquity/plugins/ubi-partman.py: allow prompting for a missing passphrase
+ on preseeded installs, if they are requesting to setup crypto.
+ (LP: #1386131)

To post a comment you must log in.
Revision history for this message
Barry Warsaw (barry) wrote :

LGTM, though I admit to not being totally familiar with the code. See my inline comments though.

review: Approve
Revision history for this message
VEG (veg) wrote :

Please remove me from subscribers list of this ticket. I don't know how I got here. I haven't used this account for years, and suddenly I've started to receive many notifications from this ticket.
I can't unsubscribe by myself because there is no edit button http://veg.by/z/2015-02-05-00-59-52.png
Thanks.

Revision history for this message
VEG (veg) wrote :

I've found how to remove myself from subscribers list.
It's strange that I've been subscribed. I've even don't know what is “ubiquity” :)
Sorry to bother you.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'd-i/manifest'
--- d-i/manifest 2015-01-28 19:33:47 +0000
+++ d-i/manifest 2015-02-04 18:50:56 +0000
@@ -6,12 +6,12 @@
6console-setup 1.70ubuntu116console-setup 1.70ubuntu11
7debian-installer-utils 1.109ubuntu17debian-installer-utils 1.109ubuntu1
8flash-kernel 3.0~rc.4ubuntu538flash-kernel 3.0~rc.4ubuntu53
9grub-installer 1.78ubuntu239grub-installer 1.78ubuntu24
10hw-detect 1.95ubuntu410hw-detect 1.95ubuntu4
11localechooser 2.49ubuntu511localechooser 2.49ubuntu5
12netcfg 1.119ubuntu212netcfg 1.119ubuntu2
13partconf 1.4613partconf 1.46
14partman-auto 118ubuntu314partman-auto 118ubuntu5
15partman-auto-crypto 22ubuntu115partman-auto-crypto 22ubuntu1
16partman-auto-loop 0ubuntu2116partman-auto-loop 0ubuntu21
17partman-auto-lvm 56ubuntu117partman-auto-lvm 56ubuntu1
@@ -20,7 +20,7 @@
20partman-basicmethods 5820partman-basicmethods 58
21partman-btrfs 14ubuntu221partman-btrfs 14ubuntu2
22partman-crypto 78ubuntu122partman-crypto 78ubuntu1
23partman-efi 25ubuntu723partman-efi 62ubuntu1
24partman-ext3 84ubuntu124partman-ext3 84ubuntu1
25partman-jfs 4525partman-jfs 45
26partman-lvm 10526partman-lvm 105
2727
=== modified file 'debian/changelog'
--- debian/changelog 2015-02-02 23:50:45 +0000
+++ debian/changelog 2015-02-04 18:50:56 +0000
@@ -1,3 +1,13 @@
1ubiquity (2.21.8) UNRELEASED; urgency=medium
2
3 * Automatic update of included source packages: grub-installer
4 1.78ubuntu24, partman-auto 118ubuntu5, partman-efi 62ubuntu1.
5 * ubiquity/plugins/ubi-partman.py: allow prompting for a missing passphrase
6 on preseeded installs, if they are requesting to setup crypto.
7 (LP: #1386131)
8
9 -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Wed, 04 Feb 2015 10:45:32 -0500
10
1ubiquity (2.21.7) vivid; urgency=medium11ubiquity (2.21.7) vivid; urgency=medium
212
3 * bin/ubiquity-dm: update to use the proper gsettings keys for the MATE13 * bin/ubiquity-dm: update to use the proper gsettings keys for the MATE
414
=== modified file 'ubiquity/plugins/ubi-partman.py'
--- ubiquity/plugins/ubi-partman.py 2015-01-23 12:18:37 +0000
+++ ubiquity/plugins/ubi-partman.py 2015-02-04 18:50:56 +0000
@@ -65,6 +65,9 @@
65 def __init__(self, *args, **kwargs):65 def __init__(self, *args, **kwargs):
66 plugin.PluginUI.__init__(self)66 plugin.PluginUI.__init__(self)
6767
68 def update_branded_strings(self):
69 pass
70
68 def show_page_advanced(self):71 def show_page_advanced(self):
69 pass72 pass
7073
@@ -100,6 +103,9 @@
100 def get_grub_choice(self):103 def get_grub_choice(self):
101 return misc.grub_default()104 return misc.grub_default()
102105
106 def show_crypto_page(self):
107 pass
108
103 def get_crypto_keys(self):109 def get_crypto_keys(self):
104 pass110 pass
105111
@@ -200,6 +206,21 @@
200 # Define a list to save grub imformation206 # Define a list to save grub imformation
201 self.grub_options = []207 self.grub_options = []
202208
209 def update_branded_strings(self):
210 release = misc.get_release()
211
212 crypto_desc_obj = getattr(self, 'crypto_description_2')
213 text = self.controller.get_string(
214 'ubiquity/text/crypto_description_2')
215 text = text.replace('${RELEASE}', release.name)
216 crypto_desc_obj.set_label(text)
217
218 lvm_explanation_obj = getattr(self, 'partition_lvm_explanation')
219 text = self.controller.get_string(
220 'ubiquity/text/partition_lvm_explanation')
221 text = text.replace('${RELEASE}', release.name)
222 lvm_explanation_obj.set_label(text)
223
203 def plugin_get_current_page(self):224 def plugin_get_current_page(self):
204 if self.current_page == self.page_ask:225 if self.current_page == self.page_ask:
205 self.plugin_is_install = self.part_ask_option_is_install()226 self.plugin_is_install = self.part_ask_option_is_install()
@@ -300,15 +321,8 @@
300 # TODO dmitrij.ledkov 2012-07-25 no way to go back and return321 # TODO dmitrij.ledkov 2012-07-25 no way to go back and return
301 # to here? This needs to be addressed in the design document.322 # to here? This needs to be addressed in the design document.
302 if crypto and use_device and self.current_page == self.page_ask:323 if crypto and use_device and self.current_page == self.page_ask:
303 self.set_page_title(324 self.show_crypto_page()
304 self.controller.get_string('ubiquity/text/crypto_label'))
305 self.current_page = self.page_crypto
306 self.move_crypto_widgets()
307 self.show_encryption_passphrase(crypto)
308 self.controller.go_to_page(self.current_page)
309 self.controller.toggle_next_button('install_button')
310 self.plugin_is_install = one_disk325 self.plugin_is_install = one_disk
311 self.info_loop(None)
312 return True326 return True
313327
314 if (self.current_page == self.page_crypto and328 if (self.current_page == self.page_crypto and
@@ -634,18 +648,6 @@
634 desc = self.controller.get_string('ubiquity/text/use_lvm_desc')648 desc = self.controller.get_string('ubiquity/text/use_lvm_desc')
635 options['some_device_lvm'] = PartitioningOption(title, desc)649 options['some_device_lvm'] = PartitioningOption(title, desc)
636650
637 crypto_desc_obj = getattr(self, 'crypto_description_2')
638 text = self.controller.get_string(
639 'ubiquity/text/crypto_description_2')
640 text = text.replace('${RELEASE}', release.name)
641 crypto_desc_obj.set_label(text)
642
643 lvm_explanation_obj = getattr(self, 'partition_lvm_explanation')
644 text = self.controller.get_string(
645 'ubiquity/text/partition_lvm_explanation')
646 text = text.replace('${RELEASE}', release.name)
647 lvm_explanation_obj.set_label(text)
648
649 ticked = False651 ticked = False
650 for option, name in option_to_widget:652 for option, name in option_to_widget:
651 opt_widget = getattr(self, name)653 opt_widget = getattr(self, name)
@@ -1466,6 +1468,16 @@
1466 self.partition_dialog_okbutton.set_sensitive(complete)1468 self.partition_dialog_okbutton.set_sensitive(complete)
1467 return complete1469 return complete
14681470
1471 def show_crypto_page(self):
1472 self.set_page_title(
1473 self.controller.get_string('ubiquity/text/crypto_label'))
1474 self.current_page = self.page_crypto
1475 self.move_crypto_widgets()
1476 self.show_encryption_passphrase(True)
1477 self.controller.go_to_page(self.current_page)
1478 self.controller.toggle_next_button('install_button')
1479 self.info_loop(None)
1480
1469 def get_crypto_keys(self):1481 def get_crypto_keys(self):
1470 if self.info_loop(None):1482 if self.info_loop(None):
1471 return self.password.get_text()1483 return self.password.get_text()
@@ -1621,6 +1633,8 @@
1621 self.local_progress = False1633 self.local_progress = False
1622 self.swap_size = 01634 self.swap_size = 0
16231635
1636 self.ui.update_branded_strings()
1637
1624 self.install_bootloader = False1638 self.install_bootloader = False
1625 if (self.db.get('ubiquity/install_bootloader') == 'true' and1639 if (self.db.get('ubiquity/install_bootloader') == 'true' and
1626 'UBIQUITY_NO_BOOTLOADER' not in os.environ):1640 'UBIQUITY_NO_BOOTLOADER' not in os.environ):
@@ -3122,10 +3136,21 @@
3122 return True3136 return True
31233137
3124 elif question.startswith('partman-crypto/passphrase'):3138 elif question.startswith('partman-crypto/passphrase'):
3139 # Go forward rather than back in response to passphrase and
3140 # passphrase-again questions if the UI is not available but they
3141 # have been preseeded
3142 if not hasattr(self.ui, 'get_crypto_keys'):
3143 return self.db.fget(question, 'seen') == 'true'
3144
3145 do_preseed = True
3125 if not self.ui.get_crypto_keys():3146 if not self.ui.get_crypto_keys():
3126 return self.db.fget(question, 'seen') == 'true'3147 if hasattr(self.ui, 'show_crypto_page'):
3127 self.preseed(question, self.ui.get_crypto_keys())3148 do_preseed = False
3128 return True3149 self.ui.show_crypto_page()
3150
3151 if do_preseed:
3152 self.preseed(question, self.ui.get_crypto_keys())
3153 return True
31293154
3130 elif question == 'partman-crypto/mainmenu':3155 elif question == 'partman-crypto/mainmenu':
3131 if self.activating_crypto:3156 if self.activating_crypto:

Subscribers

People subscribed via source and target branches

to status/vote changes: