From 20c7501b50ad53db8bf3769a5f658f3efb714165 Mon Sep 17 00:00:00 2001 From: Richard Acayan <11385160-flamingradian@users.noreply.gitlab.com> Date: Thu, 9 Jun 2022 19:55:27 -0400 Subject: [PATCH] main/postmarketos-mkinitfs: resize_root_partition: resize dm-* devices (MR 3216) Prior to this commit, the initramfs was unable to resize the root partition if it was on a device backed by the device mapper. This commit fixes that now that it is possible for the root partition to lie on a device mapper device. --- main/postmarketos-mkinitfs/APKBUILD | 4 ++-- main/postmarketos-mkinitfs/init_functions.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main/postmarketos-mkinitfs/APKBUILD b/main/postmarketos-mkinitfs/APKBUILD index 23dc5d841..0471d7156 100644 --- a/main/postmarketos-mkinitfs/APKBUILD +++ b/main/postmarketos-mkinitfs/APKBUILD @@ -2,7 +2,7 @@ # Co-Maintainer: Clayton Craft pkgname=postmarketos-mkinitfs pkgver=1.4.1 -pkgrel=8 +pkgrel=9 pkgdesc="Tool to generate initramfs images for postmarketOS" url="https://postmarketos.org" depends=" @@ -72,5 +72,5 @@ sha512sums=" f827acb0a10c0e5c1631f1b712e91fde7eb4ade0f1174eb2ef1754018bf4518ea1ad3229fd335c25fb0c6fe46ae20890f5cf43e58c8143ae17b5ab9bb36f0199 postmarketos-mkinitfs-1.4.1.tar.gz 20f110337113e8de8999cf2a064a93fea36821d5c216bfa4ba46ec1f83825638262b92fd7be29eee0a85a54a108b7315a96cbe30da8ae4419f54c2ed53bb08c7 00-default.modules ccdceaa710d97d6f57d8d66bfcbec448486d08083341712303f62123039f729229b88528308e411a308a2b90b81b60de89fe91143a6facbb11cbc9b4055eeaec init.sh -b6f433aa5a758e58ae4745f2b11f691f4d3ffbef35d9002bc2721ba797b3e7653e9449b6a1b503c47d725f644e0d7c0e5426f8a575f4cc437c21cfc6e2f4cdf3 init_functions.sh +5edd28de09d82fad95d94eedeb37173683db2675390098942f9cb6caddc3669fd423208687aafc2228d74be70aabc672360e19f1ea100771cdf79c1df80c5e02 init_functions.sh " diff --git a/main/postmarketos-mkinitfs/init_functions.sh b/main/postmarketos-mkinitfs/init_functions.sh index 3c6003f96..6535e1a21 100644 --- a/main/postmarketos-mkinitfs/init_functions.sh +++ b/main/postmarketos-mkinitfs/init_functions.sh @@ -318,7 +318,7 @@ resize_root_partition() { # external partition. if [ -z "${partition##"/dev/mapper/"*}" ]; then # Get physical device - partition_dev=$(dmsetup deps -o devname "$partition" | \ + partition_dev=$(dmsetup deps -o blkdevname "$partition" | \ awk -F "[()]" '{print "/dev/"$2}') if has_unallocated_space "$partition_dev"; then echo "Resize root partition ($partition)"