Commit Graph

36 Commits

Author SHA1 Message Date
Michael Hudson-Doyle 34afb5b40c update license headers outside of subiquity package 2024-04-29 09:28:40 +12:00
Chris Peterson d520382f72 apport: update names and write traceback information to disk 2023-10-21 00:50:21 -07:00
Dan Bungert c08fdab2f8 one-off format of long lines with black 2023-07-25 15:27:49 -06:00
Dan Bungert 34d40643ad format with black + isort 2023-07-25 15:27:42 -06:00
Olivier Gayot 638e2cbfbf loop: fix setuptools entry-points not using asyncio.run
setuptools declares a certain number of entry points that use the main
function of the associated component. That said, now that main is an
async function, it does not work. There seems to be no way to tell
setuptools to wrap the call to the entry point with asyncio.run so we
need to revert to a synchronous main function.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-28 17:05:54 +02:00
Olivier Gayot a62a0b6002 loop: start running the event loop before doing anything else
This allows us to use asyncio.run() and to avoid many pitfalls.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-28 17:05:54 +02:00
Carlos Nihelton 347e6e640e
Better help message for system setup 2022-06-16 16:15:16 -03:00
Carlos Nihelton eff558c8ad
Enables TCPSite for WSL
It listens on 127.0.0.1 only.
2022-06-06 17:42:49 -03:00
Michael Hudson-Doyle 3d1c8fd6cf convert SubiquityServer.kernel_params to an overengineered class 2022-06-02 08:56:32 +12:00
Carlos Nihelton c2b6be3cd3
Enables passing the autoinstall CLI to the server.
The server was prepared to receive this CLI option.
TUI was not. When not in dry-run that option had no effect.
2022-04-05 18:12:47 -03:00
Dan Bungert e59078c74e system-setup: inform server proc of output_base 2022-03-21 10:50:59 -06:00
Olivier Gayot 9856b79f36 Redirect stdout and stderr from server into two distinct files
Instead of having interleaved stdout and stderr in server-output, we now
have respectively:

* stdout redirected to server-stdout
* stderr redirected to server-stderr

This will allow us to monitor for warnings / errors more efficiently.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-03-08 12:12:07 +01:00
Dan Bungert 0f9c9eef3f options: add output_base for dryrun use
To enable parallel API testing, add an output_base argument to replace
the default '.subiquity' that is sprinkled everywhere.
2022-01-26 10:39:23 -07:00
Carlos Nihelton a264fdafbc Prefill was not working outside of dry-run 2021-11-04 12:01:00 -03:00
Didier Roche 244aa7de81 Fix reruning in production system_setup on WSL
On system_setup, we always run the subiquity server. On WSL, ensure we
wipe the server-state file (no systemd fallback) before starting the
server.

Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2021-11-03 12:48:53 +01:00
Didier Roche 7cd65267e9 Fix server socket path in dry-run mode
Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
2021-11-03 10:32:11 +01:00
Carlos Nihelton 1a0c3a1ef0 Prefill file checks summarized by os.path.isfile. 2021-11-01 16:20:24 -03:00
Carlos Nihelton 4c0ad44738 Moving logic form SystemSetupModel to controllers.
- In order to stay confined into system_setup,
WSLLocaleController had to be recriated.
2021-10-29 12:53:06 -03:00
Carlos Nihelton 10f209ad81 Linting issues fixed. 2021-10-28 15:54:07 -03:00
Carlos Nihelton 41a2a554ef Server CLI option '--prefill' added.
- TUI logs the args in consistency to what's been done to Flutter UI.
- Server starting code checks if prefill file exists.
2021-10-28 15:51:41 -03:00
Patrick Wu 2490befbd0 system_setup: remove unnecessary params in tui.py 2021-10-05 09:33:21 +08:00
Jean-Baptiste Lallement b81447c988 Added schema for system setup autoinstall
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-28 09:26:29 +02:00
Michael Hudson-Doyle 3b6436434c remove server-state file when starting up dry-run system_setup 2021-09-27 22:10:07 +13:00
Michael Hudson-Doyle 2f9c22961e
Merge pull request #1042 from canonical/wsl_oobe_auto_reconf_mode
DE-98/DE-99 - system_setup: Wsl oobe auto reconf mode
2021-09-24 14:26:23 +12:00
Jean-Baptiste Lallement eee1e9de6d Start server if not socket activated
On systems without socket activation enabled, the client starts the
server manually.

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-20 19:29:10 +02:00
Patrick Wu 78221ebf25 system setup: auto reconf mode general completion
Mostly complete the second task except the API for GUI:
Implement an API in the server to know if we are in reconfigure or setup mode based on existing UID user >= 1000. Fetch that API from the client and set the variant to wsl_setup or wsl_configuration.
2021-09-20 19:39:20 +08:00
Jean-Baptiste Lallement 3cdaf76153 Mark as TODO adding a helper for future refactoring
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-09-03 09:44:51 +02:00
Jean-Baptiste Lallement 9b67591335 More linting fixes
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-08-31 15:56:08 +02:00
Jean-Baptiste Lallement dcab9c2e6e Removal of --reconfigure for server
Load all the server controller independently whether it is in first
configuration or reconfiguration mode.

Co-authored-by: Didier Roche <didrocks@ubuntu.com>
2021-08-31 15:52:03 +02:00
Jean-Baptiste Lallement 57a2212c7b List of TODOs
This is the list of identified TODOs for the OOBE.
2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick 3536f0517a system_setup: attempt to fix the bug 2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick a97cc28ae6 Reconfigure mode: WIP 2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick 6cbe3e8a36 Generic Fixes 2021-08-31 15:52:03 +02:00
Didier Roche f00d1d659e Add missing copyrights 2021-08-31 15:52:03 +02:00
Didier Roche 87002bddeb SystemSetupClient to control system setup tui
This class declares the controllers we want to use and consequently,
which views in which orders we present to the user.
Reuse the Welcome controller from subiquity by reimporting it in
system_setup.client.controllers.
Redefine the restart functionality to not depends on snap.
2021-08-31 15:52:03 +02:00
Jinming Wu, Patrick 339e66a2c3 system_setup: initial setup 2021-08-31 15:52:03 +02:00