~raharper/curtin:fix/centos-grub

Last commit made on 2021-03-02
Get this branch:
git clone -b fix/centos-grub https://git.launchpad.net/~raharper/curtin
Only Ryan Harper can upload to this branch. If you are Ryan Harper please log in for upload directions.

Branch merges

Branch information

Name:
fix/centos-grub
Repository:
lp:~raharper/curtin

Recent commits

a011d9d... by Ryan Harper

vmtest/centos: fix path to grub config file

Centos images used to always have grub installed at:

/boot/grub/grub.conf

The most recent build of centos70:
  centos/centos70/amd64/20210210_01/root-tgz

Now has grub conf here:

/boot/grub2/grub.cfg

This patch checks for either path before running the sed fixup
command.

d3a86fe... by Michael Hudson-Doyle

Release 21.2

Bump the version in curtin/__init__.py to 21.2.

LP: #1913357

818db25... by Michael Hudson-Doyle

Revert "apt_config: stop using the deprecated apt-key command"

This reverts commit e099e32c5757b7aa0bc4fc2aeddb91d195a6df2b.

Unfortunately the gpg keys are not being added to the right place on
disk.

LP: #1912801

45877d0... by Michael Hudson-Doyle

partition_handler: fix NameError when reusing a vtoc partition

56cc9cc... by Dimitri John Ledkov

install_grub: convert in-target EFI loader path to ESP path.

When calling efibootmgr convert esp-mount/efi-loader to efi-loader path,
as efibootmgr variable needs to be relative to the ESP mount point root,
rather than the in-target root.

LP: #1906379

53ac301... by Michael Hudson-Doyle

block: fixes for verifying existing multipath partitions

Verifying a partition on a multipath disk currently fails for two
reasons:

 1. get_blockdev_for_partition does not know how to go from a multipath
    partition to a multipath disk, so sfdisk_info ends up calling sfdisk
    on the partition, which fails.
 2. sfdisk --json /dev/dm-X prints /dev/mapper paths for the partition
    paths but compares them against the fully deferenced /dev/dm-Y path
    for the partition.

2 is easily fixed by resolving symlinks before comparing nodes. 1
can be fixed with a little udev poking but then sys_block_path
returns paths like /sys/class/block/dm-1/dm-2 for a partition of
a multipath disk, which doesn't exist. Luckily, nodes for
partitions exist directly in /sys/class/block and have done since
/sys/class/block was added in 2008 (see kernel commit
edfaa7c36574f1bf09c65ad602412db9da5f96bf) so we can just remove
the call to get_blockdev_for_partition from sys_block_read.

ea15dfa... by Michael Hudson-Doyle

multipath: use udev DM_NAME for find_mpath_id, fix 4k sector calc

1) find_mpath_id asked multipathd to list all maps and read out the name
   (or wwid if no name) of the device from that and sometimes timed out,
   but this information is already present in udev as DM_NAME. And
   DM_NAME is the wwid if user_friendly_names is disabled, so there's no
   need to be conditional about that either.

2) fix calculating start and offset of partition on multipathed 4k disk

   calc_dm_partition_info returns start and offset in 512-byte sectors
   but calc_partition_info only adjusted the sectors in the
   non-multipath case.

   I also did some code tidying, including moving the responsibility for
   raising an exception if dmsetup produces no output to
   calc_dm_partition_info.

LP: #1878041

2bd333b... by Michael Hudson-Doyle

Release 21.1

Bump the version in curtin/__init__.py to 21.1.

LP: #1911841

756d3d8... by Mark Klein

This adds arm64 compatibility for RH installations

The current behaviour for Redhat based installs assumes x86_64
arch for grub. This change queries the target arch and makes
decisions on packages based on that.

b1312b5... by Ryan Harper

vmtest: add Hirsute release classes, tool to add vmtest class

Add a tool to generate new release classes based on a previous
release, for example:

  ./tools/vmtest-add-release -p tests/vmtests \
    --previous-release=focal --distro-release=hirsute

User still needs to create the release class in tests/vmtests/releases.py