~mwhudson/curtin:partition-verify-refactor

Last commit made on 2021-11-29
Get this branch:
git clone -b partition-verify-refactor https://git.launchpad.net/~mwhudson/curtin
Only Michael Hudson-Doyle can upload to this branch. If you are Michael Hudson-Doyle please log in for upload directions.

Branch merges

Branch information

Name:
partition-verify-refactor
Repository:
lp:~mwhudson/curtin

Recent commits

99470e3... 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.

345d17f... by Michael Hudson-Doyle

curthooks: always install shim-signed if available (when UEFI booted)

Rather than just on amd64. It's been available on arm64 since at least
20.04 (and is in bionic-updates).

fd6b2a0... by Dan Bungert

tox,control: fix jenkins CI jobs

Restore noproxy to support the CI jobs.
Adding sitepackages means that lookup of commands gets weird, but using
{envpython} -m foo solves that.
So we need two {envpythons}, one for noproxy, one for nose.
We could stuff that into the noproxy script but that would be unexpected
for a script that only adjusts the environment then execs the real
command.

Also include python3-apt in the control file.