~dbungert/curtin:udi-513

Last commit made on 2021-11-17
Get this branch:
git clone -b udi-513 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:
udi-513
Repository:
lp:~dbungert/curtin

Recent commits

37945f5... 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.

7d84996... by Dan Bungert

tests: update to demonstrate python-apt functional

Prior to pulling in python{,3}-apt functionality, show a simple set of
tests that demonstrate that it is functional in the test environments.

The noproxy script has been removed from tox.ini because we need to
set sitepackages=True to get python-apt, but doing so means we need to
find nose with 'python -m'. Also, it's safe to remove 'noproxy'
becuase the operation it was doing was a no-op for tox anyhow (those
proxy variables are not getting passed thru unless we set them
manually in tox.ini)

With noproxy unused by tox, it had no users, so remove it entirely.

809817f... by Lukas Märdian

block:lvm: search encrypted volumes for LVM

This reverts my optimistic fix for bug 1895192 and replaces it
with Lukas' more cautious fix.

We should debug why things are failing with my fix but not with
20.04.3 imminent.

LP: #1940687