~dbungert/curtin:system-upgrade

Last commit made on 2021-12-04
Get this branch:
git clone -b system-upgrade https://git.launchpad.net/~dbungert/curtin
Only Dan Bungert can upload to this branch. If you are Dan Bungert please log in for upload directions.

Branch merges

Branch information

Name:
system-upgrade
Repository:
lp:~dbungert/curtin

Recent commits

3ed943d... by Dan Bungert

system-upgrade: lookup os family

`curtin system-upgrade` needs an osfamily lookup, as the command itself
neither takes an argument of the osfamily nor attempts to provide it.

94e27a3... by Michael Hudson-Doyle

block_meta: pass handlers dict to all handlers

when we have different handlers for v2 and v1 we will need the
invocation of e.g. disk_handler from raid_handler to go to the right
version.

a516df9... by Michael Hudson-Doyle

block_meta: refactor partition verification slightly

I want to call these functions from the new partitioning code and this
tweaking makes this easier.

447609a... by Alexsander de Souza

block-meta: support using a raw image containing LVM volumes

udevadm_trigger() and activate_volgroups() ares needed to allow
the system to detect LVM volumes from a raw image recently
written to the disk.

Also add integration test for this case

ce811db... by Dan Bungert

lsblk: adjust output to match old format

The version of lsblk in Jammy, utils-linux 2.37.2,
has a modified output format from what curtin is expecting.
Normalize that format to the older style.
This appears to be the root cause for install failures of u-d-i
as reported in
https://github.com/canonical/ubuntu-desktop-installer/issues/513

f13edc1... by Michael Hudson-Doyle

curtin.commands.extract: Factor preparing sources for copying into a class

I want to use this in subiquity. I couldn't help refactoring this a bit
while I was there!

b45782b... by Michael Hudson-Doyle

apt_config: tweaks to allow some functionality in partial tree as non-root

Subiquity is going to start doing apt configuration outside of curtin
soon and I want to emulate this in dry-run mode by copying only the apt
config to a temporary directory and configuring that as indicated in the
UI. It's (probably?) too much to ask to be able to run the full
apt-config command but the stuff around generating the sources.list file
doesn't really need to do anything special -- it only depends on non-apt
stuff in target to determine the architecture, which can be passed as a
parameter.

d18248c... by Michael Hudson-Doyle

Add integration tests for some partitioning operations

This adds a new test directory, tests/integration, which sits
between the unittests and the vmtests in some sense. I've added a
way for curtin storage operations to operate on a file-backed
loop device rather than a real block device and written some
tests to cover the behaviour of partition_handler by actually
running block meta and then inspecting the resulting disk image
to check the results match expectations.

This is all motivated by the changes I want to make to support
editing partition tables.

Nothing runs these tests automatically yet, need to think about
that. Currently you can run them by hand with:

  sudo python3 -m pytest tests/integration/test_block_meta.py

0203718... by Dan Bungert

command/apt: disable_components

Add the ability to disable components in source.list.
Intentionally refuses to disable the main component.

9c5acef... by Dan Bungert

commands/apt: use python-apt for sources.list

Start using python{,3}-apt for sources.list handling.
generate_sources_list now operates in a pipeline-like model, where each
stage performs one specific transformation on the list of entries.