Merge lp:~seb128/ubiquity/remove-ecryptfs-option into lp:ubiquity
- remove-ecryptfs-option
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 6589 |
Proposed branch: | lp:~seb128/ubiquity/remove-ecryptfs-option |
Merge into: | lp:ubiquity |
Diff against target: |
311 lines (+18/-151) 10 files modified
autopilot/ubiquity-autopilot-runner/jenkins/config/ubuntu.cfg (+0/-1) autopilot/ubiquity_autopilot_tests/configs/english_label_conf.py (+0/-1) autopilot/ubiquity_autopilot_tests/emulators/gtkcontainers.py (+0/-27) autopilot/ubiquity_autopilot_tests/tests/__init__.py (+1/-5) autopilot/ubiquity_autopilot_tests/tests/test_english_encrypt_home.py (+0/-65) debian/changelog (+8/-0) debian/control (+1/-1) gui/gtk/stepUserInfo.ui (+0/-24) tests/test_usersetup.py (+0/-11) ubiquity/plugins/ubi-usersetup.py (+8/-16) |
To merge this branch: | bzr merge lp:~seb128/ubiquity/remove-ecryptfs-option |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jean-Baptiste Lallement | Approve | ||
Review via email: mp+340026@code.launchpad.net |
Commit message
Remove the encrypted userdir option from the gtk installer since
ecryptfs is going to move to universe. The keep the base code in case
the option is added back later using another technology.
Description of the change
Remove the encrypted userdir option from the gtk installer since
ecryptfs is going to move to universe. The keep the base code in case
the option is added back later using another technology.
- 6590. By Sebastien Bacher
-
Don't use the deleted object and remove the corresponding callback
- 6591. By Sebastien Bacher
-
Remove the corresponding autopilot reference
Sebastien Bacher (seb128) wrote : | # |
Thanks for catching that, I remove that callback/widget and the corresponding autopilot reference
Jean-Baptiste Lallement (jibel) wrote : | # |
pep8 tests are failing:
ubiquity/
autopilot/
Unit tests are failing:
test_interface_
Traceback (most recent call last):
File "/usr/lib/
handler, args = _extract_
File "/usr/lib/
raise AttributeError(
AttributeError: Handler on_authenticati
Traceback (most recent call last):
File "/usr/lib/
handler, args = _extract_
File "/usr/lib/
raise AttributeError(
AttributeError: Handler on_authenticati
Jean-Baptiste Lallement (jibel) wrote : | # |
This diff fixes the build:
=== modified file 'autopilot/
--- autopilot/
+++ autopilot/
@@ -270,6 +270,7 @@
else:
return False
+
class GtkAlignment(
""" Emulator class for a GtkAlignment instance """
def __init__(self, *args):
=== modified file 'gui/gtk/
--- gui/gtk/
+++ gui/gtk/
@@ -88,7 +88,6 @@
- <signal name="clicked" handler=
=== modified file 'ubiquity/
--- ubiquity/
+++ ubiquity/
@@ -429,6 +429,7 @@
else:
+
class PageKde(PageBase):
plugin_
Jean-Baptiste Lallement (jibel) wrote : | # |
with the changes above applied, it builds successfully and manual verification shows that the "encrypt home directory" option is gone and installation is successful.
Approved.
Preview Diff
1 | === modified file 'autopilot/ubiquity-autopilot-runner/jenkins/config/ubuntu.cfg' |
2 | --- autopilot/ubiquity-autopilot-runner/jenkins/config/ubuntu.cfg 2015-02-17 11:28:23 +0000 |
3 | +++ autopilot/ubiquity-autopilot-runner/jenkins/config/ubuntu.cfg 2018-02-28 11:46:13 +0000 |
4 | @@ -7,7 +7,6 @@ |
5 | - test_english_default |
6 | - test_english_lvm |
7 | - test_english_encrypt_lvm |
8 | - - test_english_encrypt_home |
9 | - test_nonenglish_default |
10 | - test_nonenglish_lvm |
11 | - test_nonenglish_encrypt_lvm |
12 | |
13 | === modified file 'autopilot/ubiquity_autopilot_tests/configs/english_label_conf.py' |
14 | --- autopilot/ubiquity_autopilot_tests/configs/english_label_conf.py 2018-01-29 11:02:41 +0000 |
15 | +++ autopilot/ubiquity_autopilot_tests/configs/english_label_conf.py 2018-02-28 11:46:13 +0000 |
16 | @@ -136,7 +136,6 @@ |
17 | stepUserInfo["verified_password_label"] = 'Confirm your password:' |
18 | stepUserInfo["hostname_extra_label"] = \ |
19 | 'The name it uses when it talks to other computers.' |
20 | - stepUserInfo["login_encrypt"] = 'Require my password to log in' |
21 | |
22 | # write config to tmp file |
23 | with open('/tmp/english_config.ini', 'w') as configfile: |
24 | |
25 | === modified file 'autopilot/ubiquity_autopilot_tests/emulators/gtkcontainers.py' |
26 | --- autopilot/ubiquity_autopilot_tests/emulators/gtkcontainers.py 2017-06-02 14:01:43 +0000 |
27 | +++ autopilot/ubiquity_autopilot_tests/emulators/gtkcontainers.py 2018-02-28 11:46:13 +0000 |
28 | @@ -270,33 +270,6 @@ |
29 | else: |
30 | return False |
31 | |
32 | - def encrypt_home_dir(self, encrypt=None): |
33 | - """ Check the login_encrypt box """ |
34 | - chk_encrypt = self.select_single(BuilderName='login_encrypt') |
35 | - active = chk_encrypt.active |
36 | - |
37 | - if encrypt is None: |
38 | - # Switch checkbox and ensure it switched |
39 | - self.pointing_device.click_object(chk_encrypt) |
40 | - expectThat(chk_encrypt.active).equals( |
41 | - not active, |
42 | - msg='encrypt home checkbox state did not change. Current ' |
43 | - 'state: {0}'.format(chk_encrypt.active)) |
44 | - elif encrypt and not active: |
45 | - self.pointing_device.click_object(chk_encrypt) |
46 | - expectThat(chk_encrypt.active).equals( |
47 | - True, |
48 | - msg='encrypt home checkbox not active and should be.') |
49 | - elif not encrypt and active: |
50 | - self.pointing_device.click_object(chk_encrypt) |
51 | - expectThat(chk_encrypt.active).equals( |
52 | - False, |
53 | - msg='encrypt home checkbox active and should not be.') |
54 | - else: |
55 | - raise ValueError("Invalid value for 'encrypt' parameter: {}" |
56 | - .format(encrypt)) |
57 | - |
58 | - |
59 | class GtkAlignment(GtkContainers): |
60 | """ Emulator class for a GtkAlignment instance """ |
61 | def __init__(self, *args): |
62 | |
63 | === modified file 'autopilot/ubiquity_autopilot_tests/tests/__init__.py' |
64 | --- autopilot/ubiquity_autopilot_tests/tests/__init__.py 2018-02-05 15:08:56 +0000 |
65 | +++ autopilot/ubiquity_autopilot_tests/tests/__init__.py 2018-02-28 11:46:13 +0000 |
66 | @@ -577,15 +577,13 @@ |
67 | quit_button=True, skip_button=False) |
68 | |
69 | def user_info_page_tests(self, username, pwd, |
70 | - encrypted=False, autologin=False): |
71 | + autologin=False): |
72 | """ Runs tests for the User Info Page |
73 | |
74 | :param username:*String*, name of user |
75 | |
76 | :param pwd: *String*, password for user |
77 | |
78 | - :param encrypted: *Bool* if true encypts the home directory |
79 | - |
80 | :param autologin: *Bool* if true sets the user account to login |
81 | automagically |
82 | |
83 | @@ -607,8 +605,6 @@ |
84 | |
85 | user_info_page.create_user(username, pwd) |
86 | # TODO: get these working |
87 | - if encrypted: |
88 | - user_info_page.encrypt_home_dir(encrypt=True) |
89 | if autologin: |
90 | user_info_page.set_auto_login() |
91 | |
92 | |
93 | === removed file 'autopilot/ubiquity_autopilot_tests/tests/test_english_encrypt_home.py' |
94 | --- autopilot/ubiquity_autopilot_tests/tests/test_english_encrypt_home.py 2018-02-05 15:08:56 +0000 |
95 | +++ autopilot/ubiquity_autopilot_tests/tests/test_english_encrypt_home.py 1970-01-01 00:00:00 +0000 |
96 | @@ -1,65 +0,0 @@ |
97 | -# Testing Default Install for the Ubiquity Installer |
98 | -# Author: |
99 | -# Dan Chapman <daniel@chapman-mail.com> |
100 | -# Jean-Baptiste Lallement <jean-baptiste.lallement@ubuntu.com> |
101 | -# |
102 | -# Copyright (C) 2013-2014 |
103 | -# |
104 | -# This program is free software: you can redistribute it and/or modify |
105 | -# it under the terms of the GNU General Public License version 3 as |
106 | -# published by the Free Software Foundation. |
107 | -# |
108 | -# This program is distributed in the hope that it will be useful, |
109 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
110 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
111 | -# GNU General Public License for more details. |
112 | -# |
113 | -# You should have received a copy of the GNU General Public License |
114 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
115 | -from ubiquity_autopilot_tests.tests import UbiquityAutopilotTestCase |
116 | -from testtools.matchers import Equals |
117 | -from autopilot.matchers import Eventually |
118 | -from ubiquity_autopilot_tests.emulators import gtktoplevel |
119 | - |
120 | - |
121 | -class EnglishEncryptHomeTestCase(UbiquityAutopilotTestCase): |
122 | - """ |
123 | - A default install testcase just generally clicks through the installer |
124 | - using all the default values |
125 | - """ |
126 | - |
127 | - def test_encrypthome_install(self, ): |
128 | - # first check we have an emulator instance |
129 | - flavor = self.get_distribution() |
130 | - self.assertIsInstance(self.main_window, gtktoplevel.GtkWindow) |
131 | - self.assertThat(self.main_window.visible, Eventually(Equals(True))) |
132 | - self.welcome_page_tests(lang='English') |
133 | - self.go_to_next_page() |
134 | - self.keyboard_layout_page_tests() |
135 | - self.go_to_next_page() |
136 | - self.preparing_page_tests() |
137 | - self.go_to_next_page() |
138 | - if flavor == 'Edubuntu': |
139 | - self.edubuntu_addon_window_tests(gnome=True) |
140 | - self.go_to_next_page() |
141 | - self.edubuntu_packages_window_tests() |
142 | - self.go_to_next_page() |
143 | - self.installation_type_page_tests(default=True) |
144 | - self.go_to_next_page(wait=True) |
145 | - self.location_page_tests() |
146 | - self.go_to_next_page() |
147 | - self.user_info_page_tests('Autopilot', 'password', encrypted=True) |
148 | - self.go_to_progress_page() |
149 | - |
150 | - self.progress_page_tests() |
151 | - self.assertThat(lambda: self.app.select_single( |
152 | - 'GtkDialog', |
153 | - name='finished_dialog').visible, |
154 | - Eventually(Equals(True), timeout=180)) |
155 | - # XXX: Uncomment if you want to restart after install complete |
156 | - # we need to sleep here to wait for dialog to fully load. It appears |
157 | - # in dbus before its actually visible. As the test has already passed |
158 | - # this doesn't affect outcome |
159 | - # time.sleep(5) |
160 | - # |
161 | - # self.keyboard.press_and_release('Enter') |
162 | |
163 | === modified file 'debian/changelog' |
164 | --- debian/changelog 2018-02-26 15:17:13 +0000 |
165 | +++ debian/changelog 2018-02-28 11:46:13 +0000 |
166 | @@ -1,3 +1,11 @@ |
167 | +ubiquity (18.04.3) UNRELEASED; urgency=medium |
168 | + |
169 | + * Remove the encrypted userdir option from the gtk installer since |
170 | + ecryptfs is going to move to universe. The keep the base code in case |
171 | + the option is added back later using another technology. |
172 | + |
173 | + -- Sebastien Bacher <seb128@ubuntu.com> Tue, 27 Feb 2018 15:06:34 +0100 |
174 | + |
175 | ubiquity (18.04.2) bionic; urgency=medium |
176 | |
177 | [ Didier Roche ] |
178 | |
179 | === modified file 'debian/control' |
180 | --- debian/control 2018-02-06 11:37:06 +0000 |
181 | +++ debian/control 2018-02-28 11:46:13 +0000 |
182 | @@ -11,7 +11,7 @@ |
183 | |
184 | Package: ubiquity |
185 | Architecture: any |
186 | -Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, python3-debconf, ubiquity-frontend-${mangled-version}, ubiquity-artwork-${mangled-version}, laptop-detect, lsb-release, ubiquity-casper, python3-apt (>= 0.7.100.3~), ${console-setup-depends}, iso-codes, passwd, adduser, os-prober, rdate, ntfs-3g (>= 1:2011.1.15AR.4+2011.4.12-1) [any-alpha any-amd64 any-i386], ecryptfs-utils, cryptsetup, policykit-1, python3-icu (>= 1.0), python3-pam, language-selector-common (>= 0.4.16), archdetect-deb, dpkg-repack, apt-clone, wget, grub-common [any-amd64 any-i386], dbus-x11, sbsigntool [amd64] |
187 | +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, python3-debconf, ubiquity-frontend-${mangled-version}, ubiquity-artwork-${mangled-version}, laptop-detect, lsb-release, ubiquity-casper, python3-apt (>= 0.7.100.3~), ${console-setup-depends}, iso-codes, passwd, adduser, os-prober, rdate, ntfs-3g (>= 1:2011.1.15AR.4+2011.4.12-1) [any-alpha any-amd64 any-i386], cryptsetup, policykit-1, python3-icu (>= 1.0), python3-pam, language-selector-common (>= 0.4.16), archdetect-deb, dpkg-repack, apt-clone, wget, grub-common [any-amd64 any-i386], dbus-x11, sbsigntool [amd64] |
188 | Recommends: grub-pc [any-amd64 any-i386] | grub [any-amd64 any-i386] | grub-efi [any-amd64 any-i386], flash-kernel [armel armhf], u-boot-tools [armel armhf], yaboot [powerpc], hfsutils [powerpc], dmraid, btrfs-tools, ubuntu-drivers-common, lvm2 |
189 | Conflicts: ubuntu-express, espresso, espresso-utils, espresso-locale, espresso-keyboard-setup, espresso-kbd-chooser, espresso-timezone, user-setup (<< 0.05ubuntu6), partman, espresso-grub, espresso-yaboot |
190 | Replaces: ubuntu-express, espresso, espresso-utils, espresso-locale, espresso-keyboard-setup, espresso-kbd-chooser, espresso-timezone, user-setup (<< 0.05ubuntu6), partman, espresso-grub, espresso-yaboot, ubiquity-frontend-gtk (<< 2.3.8) |
191 | |
192 | === modified file 'gui/gtk/stepUserInfo.ui' |
193 | --- gui/gtk/stepUserInfo.ui 2014-02-21 13:46:40 +0000 |
194 | +++ gui/gtk/stepUserInfo.ui 2018-02-28 11:46:13 +0000 |
195 | @@ -113,30 +113,6 @@ |
196 | <property name="position">1</property> |
197 | </packing> |
198 | </child> |
199 | - <child> |
200 | - <object class="GtkAlignment" id="alignment1"> |
201 | - <property name="visible">True</property> |
202 | - <property name="can_focus">False</property> |
203 | - <property name="left_padding">20</property> |
204 | - <child> |
205 | - <object class="GtkCheckButton" id="login_encrypt"> |
206 | - <property name="label" translatable="yes">Encrypt my home folder</property> |
207 | - <property name="visible">True</property> |
208 | - <property name="can_focus">True</property> |
209 | - <property name="receives_default">False</property> |
210 | - <property name="use_action_appearance">False</property> |
211 | - <property name="xalign">0</property> |
212 | - <property name="draw_indicator">True</property> |
213 | - <signal name="clicked" handler="on_authentication_toggled" swapped="no"/> |
214 | - </object> |
215 | - </child> |
216 | - </object> |
217 | - <packing> |
218 | - <property name="expand">False</property> |
219 | - <property name="fill">False</property> |
220 | - <property name="position">2</property> |
221 | - </packing> |
222 | - </child> |
223 | </object> |
224 | <packing> |
225 | <property name="left_attach">1</property> |
226 | |
227 | === modified file 'tests/test_usersetup.py' |
228 | --- tests/test_usersetup.py 2016-06-30 14:33:17 +0000 |
229 | +++ tests/test_usersetup.py 2018-02-28 11:46:13 +0000 |
230 | @@ -106,17 +106,6 @@ |
231 | self.gtk.info_loop(self.gtk.fullname) |
232 | self.gtk.info_loop(self.gtk.username) |
233 | |
234 | - def test_on_authentication_toggled(self): |
235 | - self.gtk.login_encrypt.set_active(True) |
236 | - self.gtk.login_auto.set_active(True) |
237 | - self.gtk.on_authentication_toggled(self.gtk.login_auto) |
238 | - self.assertFalse(self.gtk.login_encrypt.get_active()) |
239 | - |
240 | - self.gtk.login_auto.set_active(True) |
241 | - self.gtk.login_encrypt.set_active(True) |
242 | - self.gtk.on_authentication_toggled(self.gtk.login_encrypt) |
243 | - self.assertTrue(self.gtk.login_pass.get_active()) |
244 | - |
245 | def test_default_username(self): |
246 | self.gtk.controller.get_string = mock_get_string |
247 | self.gtk.set_fullname('Example Person') |
248 | |
249 | === modified file 'ubiquity/plugins/ubi-usersetup.py' |
250 | --- ubiquity/plugins/ubi-usersetup.py 2018-02-06 11:05:22 +0000 |
251 | +++ ubiquity/plugins/ubi-usersetup.py 2018-02-28 11:46:13 +0000 |
252 | @@ -186,7 +186,6 @@ |
253 | self.password = builder.get_object('password') |
254 | self.verified_password = builder.get_object('verified_password') |
255 | self.login_auto = builder.get_object('login_auto') |
256 | - self.login_encrypt = builder.get_object('login_encrypt') |
257 | self.login_pass = builder.get_object('login_pass') |
258 | self.username_error_label = builder.get_object('username_error_label') |
259 | self.hostname_error_label = builder.get_object('hostname_error_label') |
260 | @@ -262,13 +261,14 @@ |
261 | return self.login_auto.get_active() |
262 | |
263 | def set_encrypt_home(self, value): |
264 | - self.login_encrypt.set_active(value) |
265 | + print('Ecryptfs is deprecated') |
266 | |
267 | def set_force_encrypt_home(self, value): |
268 | - self.login_vbox.set_sensitive(not value) |
269 | + print('Ecryptfs is deprecated') |
270 | |
271 | + # Ecryptfs is deprecated |
272 | def get_encrypt_home(self): |
273 | - return self.login_encrypt.get_active() |
274 | + return False |
275 | |
276 | def username_error(self, msg): |
277 | self.username_ok.hide() |
278 | @@ -429,15 +429,6 @@ |
279 | else: |
280 | self.resolver_ok = False |
281 | |
282 | - def on_authentication_toggled(self, w): |
283 | - if w == self.login_auto and w.get_active(): |
284 | - self.login_encrypt.set_active(False) |
285 | - elif w == self.login_encrypt and w.get_active(): |
286 | - # TODO why is this so slow to activate the login_pass radio button |
287 | - # when checking encrypted home? |
288 | - self.login_pass.set_active(True) |
289 | - |
290 | - |
291 | class PageKde(PageBase): |
292 | plugin_breadcrumb = 'ubiquity/text/breadcrumb_user' |
293 | |
294 | @@ -652,13 +643,14 @@ |
295 | return self.auto_login |
296 | |
297 | def set_encrypt_home(self, value): |
298 | - self.encrypt_home = value |
299 | + print('Ecryptfs is deprecated') |
300 | |
301 | def set_force_encrypt_home(self, value): |
302 | - self.set_encrypt_home(value) |
303 | + print('Ecryptfs is deprecated') |
304 | |
305 | + # Ecrypts is deprecated |
306 | def get_encrypt_home(self): |
307 | - return self.encrypt_home |
308 | + return False |
309 | |
310 | def username_error(self, msg): |
311 | """The selected username was bad.""" |
Thanks for this update.
The object login_encrypt has been removed from the page of the GTK frontend (and initialized to None in the page's constructor) but is still used in ubi-usersetup in on_authenticati on_toggled( ). Ubiquity crashes when the user selects auto-login.