public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Adriaan Schmidt <adriaan.schmidt@siemens.com>
To: <isar-users@googlegroups.com>
Cc: Adriaan Schmidt <adriaan.schmidt@siemens.com>
Subject: [PATCH v2 1/1] imagetypes: update recipe API changelog
Date: Mon, 9 May 2022 12:22:01 +0200	[thread overview]
Message-ID: <20220509102201.3251362-2-adriaan.schmidt@siemens.com> (raw)
In-Reply-To: <20220509102201.3251362-1-adriaan.schmidt@siemens.com>

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
---
 RECIPE-API-CHANGELOG.md | 48 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index 5913dd27..c23d7567 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -349,3 +349,51 @@ For a list of well-known Debian build profiles and common practices, we refer to
 It was replaced by WIC and no more needed.
 Machines that use `rpi-sdimg` image type should be modified to use `wic` type
 with `rpi-sdimg` wks file instead.
+
+### Changes to image types
+
+The way different image types are handled has changed to be closer to the
+implementation in OE.
+
+Changes when using the built-in types:
+  * Image recipes no longer inherit their image type class.
+  * Names of image types, as defined using IMAGE_FSTYPES, no longer have the
+    suffix `-img`, i.e., `wic-img` becomes `wic`, `ext4-img` becomes `ext4`,
+    and so on.
+  * Image types defined in IMAGE_FSTYPES can be suffixed with conversions.
+    To get a compressed image, set IMAGE_FSTYPES to `wic.xz`, `ext4.gz`, etc.
+    That also means that the type of the previous `targz-img` is not `tar.gz`.
+  * Container types (previously CONTAINER_IMAGE_FORMATS) are now
+    first class image types (oci, oci-archive, docker-archive,
+    docker-daemon, containers-storage)
+  * The VM image now has type `ova` (instead of `vm-img`)
+
+Changes when defining custom image classes:
+  * Custom image classes that only add a compression step should be removed
+    and replaced by an image conversion (see below).
+  * Instead of providing a do_image_mytype task, custom image classes should
+    now provide IMAGE_CMD_mytype
+  * Imager dependencies are set as IMAGER_INSTALL_mytype
+  * Required arguments (variables that must be set) are modelled by
+    IMAGE_CMD_REQUIRED_ARGS_mytype = "A B C"
+  * When extending an existing image type, instead of inheriting the base
+    image class, IMAGE_TYPEDEP_mytype can be set to define dependencies
+    between image types.
+  * In the IMAGE_CMD_mytype function:
+    - image_do_mounts is inserted automatically
+    - a final chown is inserted automatically
+    - variables IMAGE_FILE_HOST and IMAGE_FILE_CHROOT are
+      set to reference the image
+    - variable SUDO_CHROOT contains the chroot command needed to run in the
+      build changeroot
+  * Custom image classes need to be added to IMAGE_CLASSES (e.g., in local.conf
+    or machine config) so Isar will include them.
+
+New conversions can be added by defining CONVERSION_CMD_type.
+  * Dependencies that need to be installed are given as CONVERSION_DEP_type.
+  * New conversions must be added to CONVERSION_TYPES before they can be used.
+  * In conversion commands
+    - the input file is named ${IMAGE_FULLNAME}.${type}
+    - the conversions appends its own type, e.g. the output file of a conversion `xz`
+      would be ${IMAGE_FULLNAME}.${type}.xz
+    - a final chown is appended automatically
-- 
2.30.2


  reply	other threads:[~2022-05-09 10:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 10:22 [PATCH v2 0/1] " Adriaan Schmidt
2022-05-09 10:22 ` Adriaan Schmidt [this message]
2022-05-16  9:29 ` Anton Mikanovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220509102201.3251362-2-adriaan.schmidt@siemens.com \
    --to=adriaan.schmidt@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox