If the storage configuration contains the key "recovery_keyfile", call
cryptsetup luksAddKey after cryptsetup luksFormat so that the key
specified is added as a recovery key (i.e., a normal key in the second
key slot).
apt-config: add logic for migration to deb822 sources
When processing sources for sources.list or drop-ins in
/etc/apt/sources.list.d, if the target wants deb822 sources by default,
then do the conversion to deb822 on the fly.
The core of this is convert_sources_to_deb822(), which takes existing
source entries and consolidates them into equivalent deb822 entries.
apt-config: add support for deb822 source generation
Provide the existing functionality of generate_sources_list using deb822
sources. This does not yet include logic for migrating from sources.list
to deb822 sources.
Add a mock_want_deb822() decorator, and explicitly mark which test
functions should use deb822 or not. Define stubs for deb822 versions of
test functions that interact with sources.list.
Add a helper function that indicates whether or not we want deb822
sources on the target. This is determined by checking if we are running
Ubuntu 23.10 or later, because this is the release where deb822 sources
are used by default.