Commit Graph

20 Commits

Author SHA1 Message Date
Olivier Gayot 3e9d9762fb storage: log snapd response text when v2/systems/{system} fails
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>
2024-04-16 14:03:01 +02:00
Olivier Gayot a42ea0a685 ubuntu-pro: return number of packages and EOL ESM in /ubuntu_pro/info
We now rely on distro-info to find out the EOL ESM date on LTS releases.
This information is meant to be shown on the Ubuntu Pro screens ;
instead of hardcoded values.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2024-02-13 13:02:25 +01:00
icnahom 87fc8a6111 Added python3-debian in apt-deps.txt 2023-10-26 17:58:28 +03:00
Michael Hudson-Doyle acbc26bb36 configure a UEFI boot entry to boot into a reset partition if present 2023-07-17 13:58:55 +12:00
Olivier Gayot 6424c3c52b oem: ensure a single kernel gets installed
Before running curthooks, we now look in the target if there is an
installed kernel. If there is, we instruct curtin _not_ to install
another one.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-07-03 09:59:45 +02:00
Olivier Gayot e56053f2bb ubuntu-drivers: add support for umockdev in dry-run
When running subiquity in dry-run mode with SUBIQUITY_DEBUG=run-drivers,
we now support using a YAML file describing the hardware in a
umockdev-compatible way. This allows to give some control on what
ubuntu-drivers list will reply.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-15 09:37:02 +02:00
Olivier Gayot 364e718c60 apt-deps: add ubuntu-drivers-common needed for dry-run
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-15 09:18:29 +02:00
Olivier Gayot 3d1ea39e20 scripts: add script to run mypy and compare with output in another revision
The script can be invoked in different ways:

Run mypy in the current working directory and display the output:

 $ scripts/run-mypy.py

Run mypy in a clean copy of the HEAD revision:

 $ scripts/run-mypy.py --checkout-head

Run mypy in the current working directory and compare the result with
another revision (here main):

 $ scripts/run-mypy.py --diff-against main

Run mypy in a clean copy of the HEAD revision and compare with another
revision (here main):

 $ scripts/run-mypy.py --diff-against main --checkout-head

The produced result might be slightly different from what the CI does
because it also clones checks out curtin and probert (at the right
revision). This is something we might want to do in the CI as well.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-06-01 09:24:05 +02:00
Olivier Gayot e1863d9fb6 apt-deps: drop pep8 which is unused and does not exist anymore in mantic
The pep8 binary package was a transitional package. It would install a
symlink /usr/bin/pep8 -> pycodestyle

pep8 does not exist anymore in mantic.

pycodestyle would be the right binary package going forward. That said,
we stopped using the pep8 command back in 2018 with this commit:

  af9427561 Make tox and Makefile more similar.

Let's drop the dependency instead.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-05-24 11:03:06 +02:00
Dan Bungert e095d5040f network: use pyroute2 to manage default routes
The existing event based method of watching for has_network has a flaw.

The incoming route_change events from probert do not distinguish routes
on the same interface but a different metric, so if 2 routes on one
interface appear, we only get one event.  Then if one of those routes is
removed, we will inappropriately remove this route from the
default_routes list.

Aside from the code watching the event stream, the set of default routes
is an elaborate boolean value.

Simplify the code by passing around a boolean, and when we get a
route_change event, use that to go looking again at the list of default
routes.

LP: #2004659
2023-02-21 13:30:05 -07:00
Dan Bungert c62b72923f aptdeps: +gettext 2022-12-14 09:19:13 -07:00
Olivier Gayot d41c3b9ec0
Merge pull request #1445 from ogayot/LP1991413-LP1991929
Multiple fixes for size: -1 partitions
2022-11-02 09:39:30 +01:00
Olivier Gayot 85e1a858a8 doc: build with pandoc
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-20 09:50:09 +02:00
Olivier Gayot d27fec6480 filesystem: split logical and primary using more_itertools.partition
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-10-07 09:57:32 +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
Michael Hudson-Doyle 2bd8a7281b add python3-parameterized to apt-deps.txt 2022-04-21 16:38:06 +12:00
Olivier Gayot 413cc87337 Revert "Move to aiohttp for GeoIP requests"
This reverts commit ebdf1db636.
2022-04-20 20:53:27 +02:00
Heinrich Schuchardt d823568197 atp-deps.txt: add os-prober
The build instruction contain a step

    PYTHONPATH=probert ./probert/bin/probert --all > mymachine.json

This requires package os-prober.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-03-14 10:27:05 +01:00
Olivier Gayot 1fefa5615a Add python3-systemd as an explicit dependency
Running `make install_depends` does not (always) pull python3-systemd
which is a dependency of Subiquity.

In environments having Install-Recommends enabled, python3-systemd is
pulled by apport which is itself pulled by python3-apport.

Fixed by adding it to the list of dependencies in apt-deps.txt

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-03-11 17:18:48 +01:00
Dan Bungert c3a8285300 aptdeps: move to external file
This info is redundant, and contained depends in one spot that were not
in the other.  Centralize.
2022-03-04 10:49:23 -07:00