public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] meta: Add option to specify additional dependencies for package expand-on-first-boot in case an encrypted disk has to be resized
@ 2024-09-04 17:16 alexander.heinisch via isar-users
  2024-09-05  4:51 ` 'Jan Kiszka' via isar-users
  0 siblings, 1 reply; 5+ messages in thread
From: alexander.heinisch via isar-users @ 2024-09-04 17:16 UTC (permalink / raw)
  To: isar-users; +Cc: quirin.gylstorff, jan.kiszka, Alexander Heinisch

From: Alexander Heinisch <alexander.heinisch@siemens.com>

Although, disk encryption itself is not handled in isar (as of now), downstream projects
using disk encryption break this package. To mitigate this, we added an additional variable
to specify debian packages to be installed, when disk encryption is used. Depending on the
specific implementation (tpm, password prompt, ...) downstream projects can set the dependencies
needed for their strategy to handle the resize.

Note: We decided against fixing this by bbappending in downstream packages, because we believe
this approach scales better and is also easier to maintain.

Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>
---
 .../expand-on-first-boot/expand-on-first-boot_1.5.bb          | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb
index 1b5b066b..ea52ae9e 100644
--- a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb
+++ b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb
@@ -10,7 +10,9 @@ inherit dpkg-raw
 DESCRIPTION = "This service grows the last partition to the full medium during first boot"
 MAINTAINER = "isar-users <isar-users@googlegroups.com>"
 
-DEBIAN_DEPENDS = "systemd, sed, grep, coreutils, mount, e2fsprogs, fdisk (>=2.29.2-3) | util-linux (<2.29.2-3), util-linux"
+# Additional packages that are needed to resize the disk if it is encrypted.
+ADDITIONAL_DISK_ENCRYPTION_PACKAGES ?= ""
+DEBIAN_DEPENDS = "systemd, sed, grep, coreutils, mount, e2fsprogs, fdisk (>=2.29.2-3) | util-linux (<2.29.2-3), util-linux, ${ADDITIONAL_DISK_ENCRYPTION_PACKAGES}"
 
 SRC_URI = " \
     file://expand-on-first-boot.service \
-- 
2.43.0

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20240904171614.138923-1-alexander.heinisch%40siemens.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] meta: Add option to specify additional dependencies for package expand-on-first-boot in case an encrypted disk has to be resized
  2024-09-04 17:16 [PATCH] meta: Add option to specify additional dependencies for package expand-on-first-boot in case an encrypted disk has to be resized alexander.heinisch via isar-users
@ 2024-09-05  4:51 ` 'Jan Kiszka' via isar-users
  0 siblings, 0 replies; 5+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2024-09-05  4:51 UTC (permalink / raw)
  To: alexander.heinisch, isar-users; +Cc: quirin.gylstorff

On 04.09.24 19:16, alexander.heinisch@siemens.com wrote:
> From: Alexander Heinisch <alexander.heinisch@siemens.com>
> 
> Although, disk encryption itself is not handled in isar (as of now), downstream projects
> using disk encryption break this package. To mitigate this, we added an additional variable
> to specify debian packages to be installed, when disk encryption is used. Depending on the
> specific implementation (tpm, password prompt, ...) downstream projects can set the dependencies
> needed for their strategy to handle the resize.
> 
> Note: We decided against fixing this by bbappending in downstream packages, because we believe
> this approach scales better and is also easier to maintain.
> 
> Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>
> ---
>  .../expand-on-first-boot/expand-on-first-boot_1.5.bb          | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb
> index 1b5b066b..ea52ae9e 100644
> --- a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb
> +++ b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb
> @@ -10,7 +10,9 @@ inherit dpkg-raw
>  DESCRIPTION = "This service grows the last partition to the full medium during first boot"
>  MAINTAINER = "isar-users <isar-users@googlegroups.com>"
>  
> -DEBIAN_DEPENDS = "systemd, sed, grep, coreutils, mount, e2fsprogs, fdisk (>=2.29.2-3) | util-linux (<2.29.2-3), util-linux"
> +# Additional packages that are needed to resize the disk if it is encrypted.
> +ADDITIONAL_DISK_ENCRYPTION_PACKAGES ?= ""
> +DEBIAN_DEPENDS = "systemd, sed, grep, coreutils, mount, e2fsprogs, fdisk (>=2.29.2-3) | util-linux (<2.29.2-3), util-linux, ${ADDITIONAL_DISK_ENCRYPTION_PACKAGES}"

Maybe time to start wrapping this long line around (I explained around
how ;)).

Jan

>  
>  SRC_URI = " \
>      file://expand-on-first-boot.service \

-- 
Siemens AG, Technology
Linux Expert Center

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/3e2f8af4-8ed0-4d21-ad36-891e0b12aea4%40siemens.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] meta: Add option to specify additional dependencies for package expand-on-first-boot in case an encrypted disk has to be resized
  2024-09-05  7:21 alexander.heinisch via isar-users
  2024-09-05  7:22 ` 'Jan Kiszka' via isar-users
@ 2024-09-09 14:38 ` Uladzimir Bely
  1 sibling, 0 replies; 5+ messages in thread
From: Uladzimir Bely @ 2024-09-09 14:38 UTC (permalink / raw)
  To: alexander.heinisch, isar-users

On Thu, 2024-09-05 at 09:21 +0200, alexander.heinisch via isar-users
wrote:
> From: Alexander Heinisch <alexander.heinisch@siemens.com>
> 
> Although, disk encryption itself is not handled in isar (as of now),
> downstream projects
> using disk encryption break this package. To mitigate this, we added
> an additional variable
> to specify debian packages to be installed, when disk encryption is
> used. Depending on the
> specific implementation (tpm, password prompt, ...) downstream
> projects can set the dependencies
> needed for their strategy to handle the resize.
> 
> Note: We decided against fixing this by bbappending in downstream
> packages, because we believe
> this approach scales better and is also easier to maintain.
> 
> Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>
> ---
>  .../expand-on-first-boot_1.5.bb                    | 14
> +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-support/expand-on-first-boot/expand-on-
> first-boot_1.5.bb b/meta/recipes-support/expand-on-first-boot/expand-
> on-first-boot_1.5.bb
> index 1b5b066b..ebb22c84 100644
> --- a/meta/recipes-support/expand-on-first-boot/expand-on-first-
> boot_1.5.bb
> +++ b/meta/recipes-support/expand-on-first-boot/expand-on-first-
> boot_1.5.bb
> @@ -10,7 +10,19 @@ inherit dpkg-raw
>  DESCRIPTION = "This service grows the last partition to the full
> medium during first boot"
>  MAINTAINER = "isar-users <isar-users@googlegroups.com>"
>  
> -DEBIAN_DEPENDS = "systemd, sed, grep, coreutils, mount, e2fsprogs,
> fdisk (>=2.29.2-3) | util-linux (<2.29.2-3), util-linux"
> +# Additional packages that are needed to resize the disk if it is
> encrypted.
> +ADDITIONAL_DISK_ENCRYPTION_PACKAGES ?= ""
> +DEBIAN_DEPENDS = " \
> +    systemd, \
> +    sed, \
> +    grep, \
> +    coreutils, \
> +    mount, \
> +    e2fsprogs, \
> +    fdisk (>=2.29.2-3) | util-linux (<2.29.2-3), \
> +    util-linux, \
> +    ${ADDITIONAL_DISK_ENCRYPTION_PACKAGES} \
> +    "
>  
>  SRC_URI = " \
>      file://expand-on-first-boot.service \
> -- 
> 2.43.0
> 

Applied to next, thanks.

-- 
Best regards,
Uladzimir.

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/d73ddf9f0ff45623d9cfb8564b371297a4f289e3.camel%40ilbers.de.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] meta: Add option to specify additional dependencies for package expand-on-first-boot in case an encrypted disk has to be resized
  2024-09-05  7:21 alexander.heinisch via isar-users
@ 2024-09-05  7:22 ` 'Jan Kiszka' via isar-users
  2024-09-09 14:38 ` Uladzimir Bely
  1 sibling, 0 replies; 5+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2024-09-05  7:22 UTC (permalink / raw)
  To: alexander.heinisch, isar-users; +Cc: quirin.gylstorff

On 05.09.24 09:21, alexander.heinisch@siemens.com wrote:
> From: Alexander Heinisch <alexander.heinisch@siemens.com>
> 
> Although, disk encryption itself is not handled in isar (as of now), downstream projects
> using disk encryption break this package. To mitigate this, we added an additional variable
> to specify debian packages to be installed, when disk encryption is used. Depending on the
> specific implementation (tpm, password prompt, ...) downstream projects can set the dependencies
> needed for their strategy to handle the resize.
> 
> Note: We decided against fixing this by bbappending in downstream packages, because we believe
> this approach scales better and is also easier to maintain.
> 
> Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>
> ---
>  .../expand-on-first-boot_1.5.bb                    | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb
> index 1b5b066b..ebb22c84 100644
> --- a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb
> +++ b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb
> @@ -10,7 +10,19 @@ inherit dpkg-raw
>  DESCRIPTION = "This service grows the last partition to the full medium during first boot"
>  MAINTAINER = "isar-users <isar-users@googlegroups.com>"
>  
> -DEBIAN_DEPENDS = "systemd, sed, grep, coreutils, mount, e2fsprogs, fdisk (>=2.29.2-3) | util-linux (<2.29.2-3), util-linux"
> +# Additional packages that are needed to resize the disk if it is encrypted.
> +ADDITIONAL_DISK_ENCRYPTION_PACKAGES ?= ""
> +DEBIAN_DEPENDS = " \
> +    systemd, \
> +    sed, \
> +    grep, \
> +    coreutils, \
> +    mount, \
> +    e2fsprogs, \
> +    fdisk (>=2.29.2-3) | util-linux (<2.29.2-3), \
> +    util-linux, \
> +    ${ADDITIONAL_DISK_ENCRYPTION_PACKAGES} \
> +    "
>  
>  SRC_URI = " \
>      file://expand-on-first-boot.service \

Reviewed-by: Jan Kiszka <jan.kiszka@siemes.com>

Thanks,
Jan

-- 
Siemens AG, Technology
Linux Expert Center

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/1f7e2dbd-27dc-462e-b02f-700459235cee%40siemens.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] meta: Add option to specify additional dependencies for package expand-on-first-boot in case an encrypted disk has to be resized
@ 2024-09-05  7:21 alexander.heinisch via isar-users
  2024-09-05  7:22 ` 'Jan Kiszka' via isar-users
  2024-09-09 14:38 ` Uladzimir Bely
  0 siblings, 2 replies; 5+ messages in thread
From: alexander.heinisch via isar-users @ 2024-09-05  7:21 UTC (permalink / raw)
  To: isar-users; +Cc: quirin.gylstorff, jan.kiszka, Alexander Heinisch

From: Alexander Heinisch <alexander.heinisch@siemens.com>

Although, disk encryption itself is not handled in isar (as of now), downstream projects
using disk encryption break this package. To mitigate this, we added an additional variable
to specify debian packages to be installed, when disk encryption is used. Depending on the
specific implementation (tpm, password prompt, ...) downstream projects can set the dependencies
needed for their strategy to handle the resize.

Note: We decided against fixing this by bbappending in downstream packages, because we believe
this approach scales better and is also easier to maintain.

Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>
---
 .../expand-on-first-boot_1.5.bb                    | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb
index 1b5b066b..ebb22c84 100644
--- a/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb
+++ b/meta/recipes-support/expand-on-first-boot/expand-on-first-boot_1.5.bb
@@ -10,7 +10,19 @@ inherit dpkg-raw
 DESCRIPTION = "This service grows the last partition to the full medium during first boot"
 MAINTAINER = "isar-users <isar-users@googlegroups.com>"
 
-DEBIAN_DEPENDS = "systemd, sed, grep, coreutils, mount, e2fsprogs, fdisk (>=2.29.2-3) | util-linux (<2.29.2-3), util-linux"
+# Additional packages that are needed to resize the disk if it is encrypted.
+ADDITIONAL_DISK_ENCRYPTION_PACKAGES ?= ""
+DEBIAN_DEPENDS = " \
+    systemd, \
+    sed, \
+    grep, \
+    coreutils, \
+    mount, \
+    e2fsprogs, \
+    fdisk (>=2.29.2-3) | util-linux (<2.29.2-3), \
+    util-linux, \
+    ${ADDITIONAL_DISK_ENCRYPTION_PACKAGES} \
+    "
 
 SRC_URI = " \
     file://expand-on-first-boot.service \
-- 
2.43.0

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20240905072114.4838-1-alexander.heinisch%40siemens.com.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-09 14:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-04 17:16 [PATCH] meta: Add option to specify additional dependencies for package expand-on-first-boot in case an encrypted disk has to be resized alexander.heinisch via isar-users
2024-09-05  4:51 ` 'Jan Kiszka' via isar-users
2024-09-05  7:21 alexander.heinisch via isar-users
2024-09-05  7:22 ` 'Jan Kiszka' via isar-users
2024-09-09 14:38 ` Uladzimir Bely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox