public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] initramfs: Align custom built image name to standard one
@ 2025-12-12 19:58 'Jan Kiszka' via isar-users
  2025-12-15 12:14 ` Anton Mikanovich
  2025-12-16  9:07 ` Anton Mikanovich
  0 siblings, 2 replies; 4+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-12-12 19:58 UTC (permalink / raw)
  To: isar-users

From: Jan Kiszka <jan.kiszka@siemens.com>

As now both standard initramfs as well as custom ones define their
deployment name via INITRD_DEPLOY_FILE, they also need to use the same
naming pattern, or things are falling apart, e.g. in downstream layers
that actually use INITRAMFS_IMAGE_NAME as image name source.

Update the testsuite as well, even in places where the image name is
self-defined, just to avoid confusion.

Fixes: c3c4e72cbfc4 ("image: introduce IMAGE_INITRD, deprecate INITRD_IMAGE")
Fixes: 8dbffe075b15 ("RECIPE-API-CHANGELOG: Fix entry for IMAGE_INITRD")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

This obsoletes https://patchwork.isar-build.org/project/isar/patch/3a14d171-f4b9-40c3-929f-0e34e99d2d16@siemens.com/

 RECIPE-API-CHANGELOG.md                              | 10 +++++++++-
 meta-isar/recipes-initramfs/images/isar-dracut.bb    |  2 +-
 meta-isar/recipes-initramfs/images/isar-initramfs.bb |  2 +-
 meta/classes-recipe/image.bbclass                    |  2 +-
 meta/classes-recipe/initramfs.bbclass                |  2 +-
 testsuite/citest.py                                  |  6 +++---
 6 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index 6d7c56b9..caeeb6e3 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -843,7 +843,7 @@ ROOTFS_FEATURE += "no-generate-initrd"
 
 INITRD_IMAGE could be set to the full name of an initrd image to be found in
 DEPLOY_DIR_IMAGE. Downstream layers had to assume how Isar names its image
-artifacts (presently adding a ${DISTRO}-${IMAGE}.initrd.img suffix to initrd
+artifacts (presently adding a ${DISTRO}-${IMAGE}-initrd.img suffix to initrd
 images) and insert the build of their initramfs recipe into the image build
 pipeline.
 
@@ -919,3 +919,11 @@ The following includes were considered internal and are no longer available:
 The other original includes still exist and inherit the corresponding new
 class. However, they issue a warning to perform the recommended conversion
 because these transitional includes will eventually be dropped.
+
+### Align custom initramfs deployment name to standard initramfs
+
+While `INITRAMFS_IMAGE_NAME` ended on `.initrd.img`, standard initramfs where
+deployed as `-initrd.img`. This caused confusion and is now even breaking at
+several points as `INITRD_DEPLOY_FILE` is supposed to be used as canonical
+source of the filename. Therefore, switch `INITRAMFS_IMAGE_NAME` to the
+`-initrd.img` suffix as well.
diff --git a/meta-isar/recipes-initramfs/images/isar-dracut.bb b/meta-isar/recipes-initramfs/images/isar-dracut.bb
index aa55e360..cafffc47 100644
--- a/meta-isar/recipes-initramfs/images/isar-dracut.bb
+++ b/meta-isar/recipes-initramfs/images/isar-dracut.bb
@@ -1,6 +1,6 @@
 # Example of a custom initramfs image recipe.  The image will be deployed to
 #
-#   build/tmp/deploy/images/${MACHINE}/isar-initramfs-${DISTRO}-${MACHINE}.initrd.img
+#   build/tmp/deploy/images/${MACHINE}/isar-initramfs-${DISTRO}-${MACHINE}-initrd.img
 #
 # This software is a part of ISAR.
 
diff --git a/meta-isar/recipes-initramfs/images/isar-initramfs.bb b/meta-isar/recipes-initramfs/images/isar-initramfs.bb
index d2a946f7..3d7aa203 100644
--- a/meta-isar/recipes-initramfs/images/isar-initramfs.bb
+++ b/meta-isar/recipes-initramfs/images/isar-initramfs.bb
@@ -1,6 +1,6 @@
 # Example of a custom initramfs image recipe.  The image will be deployed to
 #
-#   build/tmp/deploy/images/${MACHINE}/isar-initramfs-${DISTRO}-${MACHINE}.initrd.img
+#   build/tmp/deploy/images/${MACHINE}/isar-initramfs-${DISTRO}-${MACHINE}-initrd.img
 #
 # This software is a part of ISAR.
 
diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass
index 34e40465..e605bc80 100644
--- a/meta/classes-recipe/image.bbclass
+++ b/meta/classes-recipe/image.bbclass
@@ -21,7 +21,7 @@ IMAGE_INSTALL += "${KERNEL_IMAGE_PKG}"
 # Name of the image including distro&machine names
 IMAGE_FULLNAME = "${PN}-${DISTRO}-${MACHINE}"
 
-# Deprecated; this would be set to e.g. "${INITRAMFS_RECIPE}-${DISTRO}-${MACHINE}.initrd.img"
+# Deprecated; this would be set to e.g. "${INITRAMFS_RECIPE}-${DISTRO}-${MACHINE}-initrd.img"
 INITRD_IMAGE ?= ""
 
 # IMAGE_INITRD should be used instead (variables consumed by this image class should
diff --git a/meta/classes-recipe/initramfs.bbclass b/meta/classes-recipe/initramfs.bbclass
index cd32899d..04a18d0c 100644
--- a/meta/classes-recipe/initramfs.bbclass
+++ b/meta/classes-recipe/initramfs.bbclass
@@ -9,7 +9,7 @@ STAMPCLEAN = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}-${MACHINE}/*-*"
 INITRAMFS_INSTALL ?= ""
 INITRAMFS_PREINSTALL ?= ""
 INITRAMFS_ROOTFS ?= "${WORKDIR}/rootfs"
-INITRAMFS_IMAGE_NAME = "${INITRAMFS_FULLNAME}.initrd.img"
+INITRAMFS_IMAGE_NAME = "${INITRAMFS_FULLNAME}-initrd.img"
 INITRAMFS_GENERATOR_PKG ??= "initramfs-tools"
 INITRD_DEPLOY_FILE = "${INITRAMFS_IMAGE_NAME}"
 
diff --git a/testsuite/citest.py b/testsuite/citest.py
index 27cc9ff6..76a3df69 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -332,7 +332,7 @@ class InitRdBaseTest(CIBaseTest):
                                           lines='',
                                           bb_should_fail=False):
         mc = f'mc:{machine}-{distro.removeprefix("debian-")}'
-        initrd_image = f'{initrd}-{distro}-{machine}.initrd.img'
+        initrd_image = f'{initrd}-{distro}-{machine}-initrd.img'
         initrd_path = os.path.join(self.deploy_dir_image(machine), initrd_image)
 
         # cleansstate if the initrd image was already built/deployed to verify
@@ -387,7 +387,7 @@ class InitRdTest(InitRdBaseTest):
         machine = 'qemuamd64'
 
         lines = [
-            f"INITRD_IMAGE = '{initrd}-{distro}-{machine}.initrd.img'",
+            f"INITRD_IMAGE = '{initrd}-{distro}-{machine}-initrd.img'",
             f"do_image[depends] += '{initrd}:do_build'"
         ]
 
@@ -413,7 +413,7 @@ class InitRdTest(InitRdBaseTest):
         # by specifying an invalid recipe name: bitbake should fail.
         lines = [
             "IMAGE_INITRD = 'not-a-valid-initrd-recipe'",
-            f"INITRD_IMAGE = '{initrd}-debian-bookworm-qemuamd64.initrd.img'"
+            f"INITRD_IMAGE = '{initrd}-debian-bookworm-qemuamd64-initrd.img'"
         ]
         self.build_image_with_dependent_initrd('isar-image-ci', initrd, lines=lines,
                                                bb_should_fail=True)
-- 
2.51.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 visit https://groups.google.com/d/msgid/isar-users/0f4b40c6-ee79-4209-9150-59b902670510%40siemens.com.

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

* Re: [PATCH] initramfs: Align custom built image name to standard one
  2025-12-12 19:58 [PATCH] initramfs: Align custom built image name to standard one 'Jan Kiszka' via isar-users
@ 2025-12-15 12:14 ` Anton Mikanovich
  2025-12-15 12:23   ` 'Jan Kiszka' via isar-users
  2025-12-16  9:07 ` Anton Mikanovich
  1 sibling, 1 reply; 4+ messages in thread
From: Anton Mikanovich @ 2025-12-15 12:14 UTC (permalink / raw)
  To: Jan Kiszka, isar-users

12/12/2025 21:58, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> As now both standard initramfs as well as custom ones define their
> deployment name via INITRD_DEPLOY_FILE, they also need to use the same
> naming pattern, or things are falling apart, e.g. in downstream layers
> that actually use INITRAMFS_IMAGE_NAME as image name source.
>
> Update the testsuite as well, even in places where the image name is
> self-defined, just to avoid confusion.
>
> Fixes: c3c4e72cbfc4 ("image: introduce IMAGE_INITRD, deprecate INITRD_IMAGE")
> Fixes: 8dbffe075b15 ("RECIPE-API-CHANGELOG: Fix entry for IMAGE_INITRD")
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

Hello Jan,

Thanks for the fix, we've just introduced new "Priority Review" state in
Patchwork, so anyone can check the state of hotfix patches anytime.

See: 
https://patchwork.isar-build.org/project/isar/patch/0f4b40c6-ee79-4209-9150-59b902670510@siemens.com/

To all: As this marking is doing manually, feel free to inform if any commit
should be also marked.

-- 
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 visit https://groups.google.com/d/msgid/isar-users/e0d1e3d5-3152-4dec-a302-9c98c4bd1c48%40ilbers.de.

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

* Re: [PATCH] initramfs: Align custom built image name to standard one
  2025-12-15 12:14 ` Anton Mikanovich
@ 2025-12-15 12:23   ` 'Jan Kiszka' via isar-users
  0 siblings, 0 replies; 4+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2025-12-15 12:23 UTC (permalink / raw)
  To: Anton Mikanovich, isar-users

On 15.12.25 13:14, Anton Mikanovich wrote:
> 12/12/2025 21:58, 'Jan Kiszka' via isar-users wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> As now both standard initramfs as well as custom ones define their
>> deployment name via INITRD_DEPLOY_FILE, they also need to use the same
>> naming pattern, or things are falling apart, e.g. in downstream layers
>> that actually use INITRAMFS_IMAGE_NAME as image name source.
>>
>> Update the testsuite as well, even in places where the image name is
>> self-defined, just to avoid confusion.
>>
>> Fixes: c3c4e72cbfc4 ("image: introduce IMAGE_INITRD, deprecate
>> INITRD_IMAGE")
>> Fixes: 8dbffe075b15 ("RECIPE-API-CHANGELOG: Fix entry for IMAGE_INITRD")
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Hello Jan,
> 
> Thanks for the fix, we've just introduced new "Priority Review" state in
> Patchwork, so anyone can check the state of hotfix patches anytime.
> 
> See: https://patchwork.isar-build.org/project/isar/patch/0f4b40c6-
> ee79-4209-9150-59b902670510@siemens.com/
> 
> To all: As this marking is doing manually, feel free to inform if any
> commit
> should be also marked.
> 

Ah, that's nice!

Do you happen to know if patchwork also supports some kind of
notifications? My account on patchwork.kernel.org talks about that in
the profile settings, but that may only apply to maintainers, and it
likely also needs an account on the platform.

Jan

-- 
Siemens AG, Foundational Technologies
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 visit https://groups.google.com/d/msgid/isar-users/fa4d20df-2206-43be-810e-ef9663405460%40siemens.com.

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

* Re: [PATCH] initramfs: Align custom built image name to standard one
  2025-12-12 19:58 [PATCH] initramfs: Align custom built image name to standard one 'Jan Kiszka' via isar-users
  2025-12-15 12:14 ` Anton Mikanovich
@ 2025-12-16  9:07 ` Anton Mikanovich
  1 sibling, 0 replies; 4+ messages in thread
From: Anton Mikanovich @ 2025-12-16  9:07 UTC (permalink / raw)
  To: isar-users, Kiszka, Jan

12/12/2025 21:58, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> As now both standard initramfs as well as custom ones define their
> deployment name via INITRD_DEPLOY_FILE, they also need to use the same
> naming pattern, or things are falling apart, e.g. in downstream layers
> that actually use INITRAMFS_IMAGE_NAME as image name source.
>
> Update the testsuite as well, even in places where the image name is
> self-defined, just to avoid confusion.
>
> Fixes: c3c4e72cbfc4 ("image: introduce IMAGE_INITRD, deprecate INITRD_IMAGE")
> Fixes: 8dbffe075b15 ("RECIPE-API-CHANGELOG: Fix entry for IMAGE_INITRD")
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Applied to next, thanks.

-- 
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 visit https://groups.google.com/d/msgid/isar-users/bedb5b45-555f-49d4-9c3f-3cf8a5f60ddb%40ilbers.de.

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

end of thread, other threads:[~2025-12-16  9:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-12 19:58 [PATCH] initramfs: Align custom built image name to standard one 'Jan Kiszka' via isar-users
2025-12-15 12:14 ` Anton Mikanovich
2025-12-15 12:23   ` 'Jan Kiszka' via isar-users
2025-12-16  9:07 ` Anton Mikanovich

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