[v2] expand-on-first-boot: Make supported filesystems configurable

Message ID 5d1aaad5-2e5f-472d-868a-832dd81d14c1@siemens.com
State Accepted, archived
Headers show
Series [v2] expand-on-first-boot: Make supported filesystems configurable | expand

Commit Message

Jan Kiszka Nov. 13, 2024, 6:45 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

To allow configuring the support script down to the target filesystems
that shall be expanded, add a variable that specifies those filesystem
types. Default remains both ext4 and btrfs.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Changes in v2:
 - fix broken wording in commit message

 .../expand-on-first-boot/expand-on-first-boot_1.6.bb        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Uladzimir Bely Nov. 18, 2024, 6:10 a.m. UTC | #1
On Wed, 2024-11-13 at 07:45 +0100, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> To allow configuring the support script down to the target
> filesystems
> that shall be expanded, add a variable that specifies those
> filesystem
> types. Default remains both ext4 and btrfs.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
> Changes in v2:
>  - fix broken wording in commit message
> 
>  .../expand-on-first-boot/expand-on-first-boot_1.6.bb        | 6
> ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-support/expand-on-first-boot/expand-on-
> first-boot_1.6.bb b/meta/recipes-support/expand-on-first-boot/expand-
> on-first-boot_1.6.bb
> index 071bed24..f873bd29 100644
> --- a/meta/recipes-support/expand-on-first-boot/expand-on-first-
> boot_1.6.bb
> +++ b/meta/recipes-support/expand-on-first-boot/expand-on-first-
> boot_1.6.bb
> @@ -10,14 +10,16 @@ inherit dpkg-raw
>  DESCRIPTION = "This service grows the last partition to the full
> medium during first boot"
>  MAINTAINER = "isar-users <isar-users@googlegroups.com>"
>  
> +EXPAND_FSTYPES ?= "ext4 btrfs"
> +
>  DEBIAN_DEPENDS = " \
>      systemd, \
>      sed, \
>      grep, \
>      coreutils, \
>      mount, \
> -    btrfs-progs, \
> -    e2fsprogs, \
> +    ${@'e2fsprogs' if 'ext4' in d.getVar('EXPAND_FSTYPES').split()
> else ''}, \
> +    ${@'btrfs-progs' if 'btrfs' in
> d.getVar('EXPAND_FSTYPES').split() else ''}, \
>      fdisk (>=2.29.2-3) | util-linux (<2.29.2-3), \
>      util-linux"
>  

Applied to next, thanks.

Patch

diff --git a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.6.bb b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.6.bb
index 071bed24..f873bd29 100644
--- a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.6.bb
+++ b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.6.bb
@@ -10,14 +10,16 @@  inherit dpkg-raw
 DESCRIPTION = "This service grows the last partition to the full medium during first boot"
 MAINTAINER = "isar-users <isar-users@googlegroups.com>"
 
+EXPAND_FSTYPES ?= "ext4 btrfs"
+
 DEBIAN_DEPENDS = " \
     systemd, \
     sed, \
     grep, \
     coreutils, \
     mount, \
-    btrfs-progs, \
-    e2fsprogs, \
+    ${@'e2fsprogs' if 'ext4' in d.getVar('EXPAND_FSTYPES').split() else ''}, \
+    ${@'btrfs-progs' if 'btrfs' in d.getVar('EXPAND_FSTYPES').split() else ''}, \
     fdisk (>=2.29.2-3) | util-linux (<2.29.2-3), \
     util-linux"