~dbungert/curtin:lp-2035034-sectors

Last commit made on 2023-09-13
Get this branch:
git clone -b lp-2035034-sectors 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:
lp-2035034-sectors
Repository:
lp:~dbungert/curtin

Recent commits

e39f987... by Dan Bungert

storage_config: handle partitions on 4k disk

In LP: #2035034, a user reported that the layout of existing
partitions was showing as 1/8th the correct size. Update storage_config
to no longer hard-code a 512 byte sector and read the value instead.

7158923... by Dan Bungert

tests/data: 4k sector disk

d5f5dde... by Olivier Gayot

apt_source: do not produce a deb822 source stanza with zero suite

When no suite is set for a given repository, we end up with a
deb822 styled source such as:

 Type: deb
 Suites:
 URIs: http://archive.ubuntu.com/ubuntu

This is invalid and apt/apt-get will raise the following error:

E: Malformed entry 2 in sources file
 /etc/apt/sources.list.d/ubuntu.sources (Suite)

Signed-off-by: Olivier Gayot <email address hidden>

307b32f... by Dan Bungert

docs: link to sources.list manpage for apt deb822

2d3fe30... by Dan Bungert

swap: add logging

The suggested swap size code just sort of returns 0 sometimes and
figuring out why is a complicated analysis of several variables.

Provide diagnostic info on those values, and the reason for the
decision.

9ef3bcb... by Michael Hudson-Doyle

distro: remove even more code from apt_update

The existing code tries to avoid redundant calls to 'apt update' but it
has flaws and redundant calls to 'apt update' should be fairly quick
anyway.

197bdbd... by Michael Hudson-Doyle

distro: remove disabling of deb-src lines in apt_update

The current code has the side-effect of ignoring deb822 .sources files
which is a problem that could be fixed but really it's hard to see why
this code is still useful (we do not expect to deploy images with
deb-src enabled!) so just deleting it makes more sense.

bdd9069... by Michael Hudson-Doyle

ensure grub-pc is installed on non-UEFI amd64 installs

I was sure curtin did this already but LP: #2033496 says not.

5128d5d... by Olivier Gayot

block_meta: add luks recovery key if requested

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).

Signed-off-by: Olivier Gayot <email address hidden>

7ed8b10... by Nick Rosbrook

apt-config: use debian.deb822 to simplify deb822 source parsing

The Deb822 provides an iter_paragraphs() function that can do the
parsing for us, so use that instead.