Commit Graph

4895 Commits

Author SHA1 Message Date
Dan Bungert a9ac5a5fb2
Merge pull request #1305 from CarlosNihelton/start-site-deeng-246
Enables variants to override site creation and startup
2022-06-02 12:52:41 -06:00
Carlos Nihelton d69c2eee82
Enables variants to override creation and ...
... startup by exposing the method `start_site`.
2022-06-02 13:15:50 -03:00
Michael Hudson-Doyle 05f057a4e7
Merge pull request #1304 from mwhudson/storage-version-kernel-command-line
take storage version from kernel command line
2022-06-02 20:00:50 +12:00
Michael Hudson-Doyle 736efcb11d take default storage-version from kernel command line 2022-06-02 08:56:40 +12:00
Michael Hudson-Doyle 3d1c8fd6cf convert SubiquityServer.kernel_params to an overengineered class 2022-06-02 08:56:32 +12:00
Dan Bungert 3e0c91e34b
Merge pull request #1302 from dbungert/report-size-mins
filesystem: report estimated partition size minimums
2022-05-31 17:00:18 -06:00
Dan Bungert 69b765efd5 storage/v2: report aligned min size value 2022-05-31 16:34:17 -06:00
Dan Bungert 4d2d6455bf test/api: estimated_min 2022-05-31 09:09:33 -06:00
Dan Bungert b999cbc087 test/api: test_resize cleanup 2022-05-31 09:09:33 -06:00
Dan Bungert 498d220314 test/api: add MachineConfig class
Make it easier to edit machine configs on the fly for test.
2022-05-31 09:09:33 -06:00
Dan Bungert 73853e5769 snapcraft: rev probert 2022-05-31 09:09:33 -06:00
Dan Bungert 40b2f3267b storage/v2: report min part size 2022-05-31 09:09:33 -06:00
Dan Bungert b298caf83a examples: add sample with size info 2022-05-31 09:09:33 -06:00
Dan Bungert 021686d7d9 probert: ask for sizing info 2022-05-31 09:09:33 -06:00
Dan Bungert 0b1c87d460 filesystem: fix and futureproof probert unit test 2022-05-31 09:09:33 -06:00
Didier Roche 95bee59dee
Merge pull request #1303 from CarlosNihelton/wsl-locgen-speedup
[system_setup] Allow skipping locale-gen command
2022-05-31 14:08:07 +02:00
Carlos Nihelton 5a8e2f2835
Allow skipping locale-gen command.
lang-packs post-install hook executes locale-gen.
For certain languages a matrix of locales is generated.
Re-running locale-gen regenerates not only the locale we wanted,
but the whole matrix, causing further delays.

We can save up to 40s (tested on my laptop) by skipping locale-gen if
apt succeeded.

Still useful to run it unconditionally i dry-run since apt won't execute
any post-install hook.
2022-05-31 08:22:41 -03:00
Olivier Gayot ade6f828c9
Merge pull request #1301 from CarlosNihelton/wsl-help-messages
TUI Help/About message customisation point for variants
2022-05-31 09:58:35 +02:00
Dan Bungert d6cbbda685
Merge pull request #1299 from dbungert/fs-probe-no-udev-loops
filesystem: fix udev infinite loop
2022-05-27 11:07:49 -06:00
Dan Bungert 27720a4c34 filesystem: fix udev infinite loop
If the probert probe triggers a udev event, we can loop forever.
Fixed by not restarting an active probe, which can lose information if
it appears mid-probe but that's better than an infinite loop.
2022-05-26 10:54:21 -06:00
Carlos Nihelton 87112ebecf
Sets TUI about help message on super init. 2022-05-26 07:37:35 -03:00
Carlos Nihelton c6fedfb8e1
Set the about message on client initialization
Inherently better than being a public field to be set later.
Achieves a more declarative API.
2022-05-26 07:36:12 -03:00
Dan Bungert 77119a8e0b SingleInstanceTask: add cancel_restart
cancel_restart is a mode for SingleInstanceTask that changes the
behavior when starting the task - if the task is already running, do not
cancel it to start another.
2022-05-25 10:25:00 -06:00
Dan Bungert 884f1c87ae pubsub: fix test fragility 2022-05-24 13:36:02 -06:00
Carlos Nihelton 3c27982939
Programmatic manipulation of the lsb fields
For better message composition.
2022-05-24 14:25:34 -03:00
Carlos Nihelton 2adc001693
Customises WSL system_setup Help/About message. 2022-05-24 13:58:13 -03:00
Carlos Nihelton cbb491bb91
Enables customisation of the Help/About message.
Variants can set a new message to customize the TUI to their intent.
2022-05-24 13:57:24 -03:00
Olivier Gayot a97333bebb
Merge pull request #1298 from ogayot/FR-2269
geoip: move from requests to aiohttp again
2022-05-20 08:54:10 +02:00
Olivier Gayot 10af626767 geoip: move from requests to aiohttp again
python3-aiohttp has been fixed and released in focal-updates.
New Subiquity builds should not be affected by LP: #1969393 anymore.

This reverts commit 413cc87337.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-05-18 16:27:12 +02:00
Olivier Gayot 8d64d4d3ef
Merge pull request #1296 from CarlosNihelton/username-server-validation
Server-side username validation
2022-05-18 13:50:39 +02:00
Carlos Nihelton 6b3609ae3a
Fix typo "pytest-a(s)yncio" 2022-05-18 07:50:00 -03:00
Carlos Nihelton 13a23a4b46
Fix async test.
Test class inherits form IsolatedAsyncioTestCase to enable coroutines.
Event loop policy is reset on module teardown to avoid conflicting with
next tests.
2022-05-17 12:46:53 -03:00
Carlos Nihelton e6a6f7a92b
Moved the aync validation logic into a mixin class
Intended to be combined with Editor widgets
Able to call async validation functions on focus leave.
2022-05-16 18:15:02 -03:00
Carlos Nihelton df8b157ae8
Validation on focus leave.
Reduces the amount of async calls.
Challenging revalidation scheme.
2022-05-16 17:07:27 -03:00
Dan Bungert d77112b387
Merge pull request #1297 from dbungert/partition-show-path
storage/v2: show partition paths
2022-05-13 08:42:19 -06:00
Dan Bungert 112b24e6bc storage/v2: show partition paths 2022-05-12 19:09:42 -06:00
Carlos Nihelton dbe131fb59
Initializes `existing_usernames` for system_setup.
Since in WSL the target system is already mounted when Subiquity runs
its safe to Initialize that field with the target existing passwd
database.
2022-05-12 17:04:19 -03:00
Carlos Nihelton 7a4356c29f
Let `existing_usernames` be a customisation point.
Initializes it with just 'root' by default.
Server variants may find appropriate ways to initialize it.
Reading the passwd database of the target is not a reliable thing to do.
Need to find a stronger way before placing that in the main server.
2022-05-12 17:01:23 -03:00
Carlos Nihelton a0f82f0b5b
Removes the unnecessary todo
That comment was a leftover from the experimentation phase
which survived across rebases.
2022-05-12 16:09:51 -03:00
Carlos Nihelton ad3734f2b6
Removes leftover class variable in ...
the client identity controller
2022-05-12 15:40:56 -03:00
Carlos Nihelton aea54f961e
Moves model.add_user call to the right place
After the conditional
2022-05-12 11:59:45 -03:00
Carlos Nihelton f576c6fc85
Won't store validation results in the controller.
Instead the form itself keeps track of the active async task.
The validation state is returned from the task object itself.
2022-05-11 16:52:14 -03:00
Carlos Nihelton 888eb344a2
Strengths invalid characters detection in username
By doing re.fullmatch per ogayot's recommendation.
Added a test case to validate it.
The added test would fail without the fullmatch.
2022-05-11 13:00:01 -03:00
Carlos Nihelton 79205ed3ea
Reads the passwd file instead of pwd module.
Can be mocked. In dry-run reads it from resource_path.
In live run, reads it from self.app.base_model.target.
The returning set of usernames may be empty without a problem.
2022-05-11 13:00:01 -03:00
Carlos Nihelton f80880ca59
Added a passwd file copied from a livecd filesystem
To be used in dry-run.

One test case updated due the fact that the name 'lxd' will not be in use.
But 'gdm' will.
2022-05-11 12:58:58 -03:00
Carlos Nihelton b5e6506852
Exception on POST if invalid username 2022-05-11 09:14:56 -03:00
Carlos Nihelton 0798f46a33
Exception instead of checking if the file exists.
reserved-usernames
2022-05-11 09:14:42 -03:00
Olivier Gayot 73250b0c95
Merge pull request #1292 from ogayot/FR-2153
Add visual indication for starred snap developers
2022-05-11 10:33:01 +02:00
Dan Bungert b97b09341d
Merge pull request #1284 from dbungert/workflow-kinetic
workflows: +kinetic
2022-05-10 09:10:54 -06:00
Dan Bungert d750126e7f
Merge pull request #1295 from dbungert/dual-boot-win
curtin: merge 2 fixes for dual-boot support
2022-05-10 07:43:35 -06:00