With "pass_filenames: True" (the default) the spell check entry
will be invoked as "make -C doc spelling <file1> <file2> ..."
which will cause the default Make target to be run for the specified
files, leading to errors like:
. .sphinx/venv/bin/activate; sphinx-build -M doc/some_file "." "_build"
Running Sphinx v7.3.7
Sphinx error:
Builder name doc/some_file not registered or available through entry point
Since the spelling target will check all files, we can suppress sending
any filenames.
Previously, when we called spinner.start(), we would automatically call
.stop() first to reset it.
Unfortunately, after calling stop(), the spinner mutates its visual
representation to become invisible using .set_text("").
This is a problem because after disappearing, the spinner does not
reappear instantly, which causes visual glitches depending on how often
we redraw the screen.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Every time a spinner "spins", it changes its visual representation. In
order for the user to see a smooth animation, we need to redraw the
spinner after each iteration. Hopefully this is not too much when
multiple spinners are visible at the same time.
For that, we give the option to pass the application to the spinner, so
that we can request a screen redraw after each iteration.
Alternatively, the user can decide not to pass the application to the
spinner, and to manage the animation themselves using calls to .spin()
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Spinners run very quickly and generate a lot of events. If we forget to
stop() a spinner, it will continue running forever until the event loop
is closed.
We now add an optional debug parameter that will cause spinner events to
be logged. It is very useful to find out if we forgot to stop spinners.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
well it's not enough because closing the overlay only gets closed if the
user clicks on cancel
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Views that are dynamically updated using asynchronous events that are
handled by urwid need to be redrawn.
Ensure that such events trigger a redraw.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Views can now redraw themselves using the request_redraw_if_visible()
method. Behind the scenes, it will look if the view is the currently
visible view and skip the redraw otherwise.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Under some plymouth configs, cryptsetup shows warnings on boot for
underspecified cryptoswap options. This makes the warnings go away, but
we've hardcoded some options that may change in the future.
LP: #2063252
The current implementation attempts to compare two datetime objects
by comparing the value returned by .timestamp().
However, one of the objects is an /aware/ datetime and the other is a
/naive/ datetime.
When calling .timestamp() on a naive datetime object, the function
expects the datetime object to represent local time. However, in our
scenario, it was UTC time.
Therefore, the comparison is slightly inaccurate and can end up
rejecting a token that is not yet expired ; or accepting one that is
about to expire.
In practice, this should rarely be a problem (a few hours is not a big
deal). But we now compare two /aware/ datetime objects to make the
comparison more correct.
Also, datetime.datetime.utcnow() (which returns a naive datetime object)
is deprecated in favor of datetime.datetime.now() (which can return an
aware datetime object if timezone information is passed).
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
If block probing times out, we rerun it with the restricted set of
probes. Sadly, the restricted set does not include "nvme" so we do not
enumerate NVMe controllers. This leads to the following error if NVMe
storage devices are present:
File "subiquity/models/filesystem.py", line 1492, in reset
self.process_probe_data()
File "subiquity/models/filesystem.py", line 1512, in process_probe_data
self._orig_config = storage_config.extract_storage_config(self._probe_data)[
File "/site-packages/curtin/storage_config.py", line 1420, in extract_storage_config
tree = get_config_tree(cfg.get('id'), final_config)
File "/site-packages/curtin/storage_config.py", line 313, in get_config_tree
for dep in find_item_dependencies(item, sconfig):
File "/site-packages/curtin/storage_config.py", line 283, in find_item_dependencies
_validate_dep_type(item_id, dep_key, dep, config)
File "/site-packages/curtin/storage_config.py", line 230, in _validate_dep_type
raise ValueError(
ValueError: Invalid dep_id (nvme-controller-nvme0) not in storage config
Fixed by also enumerating NVMe controllers as part of the restricted
probe operation.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
In the mirror screen, if the test fails and the user decides to ignore
the failure, we used to continue the installation normally ; which in
most scenarios resulted in an error at a later stage of the
installation.
Instead, we now revert to an installation without network (i.e., only
packages from the pool are considered for installation) if the user
decides to ignore the failure.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
When the request to v2/systems/enhanced-secureboot-desktop (or
equivalent) fails, Subiquity did not capture the reason. This makes
it difficult to understand why this call sometimes fails. We now log the
response text to understand better what's going on.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Grub provides "quiet splash" for GRUB_CMDLINE_LINUX_DEFAULT out of the
box, but curtin rewrites that value and drops both "quiet" and "splash".
On desktop, retain "quiet splash".
This should be configurable via autoinstall if this change is undesired.
Automated installations and desktop installations will now switch to an
offline installation by default. In this mode, only packages from the
pool will be fetched.
This should allow the installation to proceed when installing from a
private network without external access to the internet.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
On first boot, there appear to be cases where the cc_dpkg_grub module in
cloud-init is not doing the right thing, which are to be sorted out.
But for first boot to happen we have a working boot config, so let's not
perturb that.
LP: #2060695
Partial implementation of LP: #2057837. To create a specific dataset
for /home/$user, this requires moving where and when users are created,
which is not in plan for 24.04.