public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Felix Moessbauer <felix.moessbauer@siemens.com>
Cc: isar-users@googlegroups.com, adriaan.schmidt@siemens.com,
	jan.kiszka@siemens.com, ibr@ilbers.de, amikan@ilbers.de
Subject: Re: [PATCH v5 3/5] add option to control deploy of raw wic partitions
Date: Tue, 20 Sep 2022 12:49:04 +0200	[thread overview]
Message-ID: <20220920124904.50e5aa71@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20220920095543.70da83ab@md1za8fc.ad001.siemens.net>

Am Tue, 20 Sep 2022 09:55:43 +0200
schrieb Henning Schild <henning.schild@siemens.com>:

> Am Mon, 19 Sep 2022 13:20:33 +0200
> schrieb Felix Moessbauer <felix.moessbauer@siemens.com>:
> 
> > This patch adds the WIC_DEPLOY_PARTITIONS option to control
> > if the raw partition files are deployed by wic.
> > 
> > We also set the default to not deploy to be closer to OE and to
> > optimize for the average case.
> > In addition, this significantly reduces the disk size required to
> > run the CI.
> > 
> > An API changelog entry is added.  
> 
> I think the deployment of the partitions was an accident and never
> intended. Cause might be
> 
> https://github.com/ilbers/isar/commit/edc10d9361e79f36c8ea5488b1dab4c468213a8d

I think this patch should simply be reverted, which would bring us in
line with OE. Where also only the ".direct" is taken into deploydir.
While wic does have internal compressor support, people seem to rely on
the external one.

So i suggest you simply revert this one.

Keep reading for a changelog suggestion.

> which wanted to deal only with compressed images when wic itself is
> used for compression.
> 
> We should maybe just sharpen that to not include partitions, instead
> of inventing a new interface to remove them again.
> 
> Henning
> 
> > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
> > ---
> >  RECIPE-API-CHANGELOG.md             | 6 ++++++
> >  meta-isar/conf/local.conf.sample    | 3 +++
> >  meta/classes/imagetypes_wic.bbclass | 5 +++++
> >  3 files changed, 14 insertions(+)
> > 
> > diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
> > index 621d110e..0c34d9be 100644
> > --- a/RECIPE-API-CHANGELOG.md
> > +++ b/RECIPE-API-CHANGELOG.md
> > @@ -419,3 +419,9 @@ packages and will be lost after a given build
> > session finishes. 
> >  Any package build requirements for the rootfs should be satisfied
> > in the Debian way via package dependencies.
> > +
> > +### Individual WIC partitions are no longer automatically deployed

We used to copy all temporary WIC files, like the partitions, into the
deploy directory. That was intended actually only for compressed wic
images where wic itself would do the compression.
It was never intended to also deploy those partitions, so that will
also not be done anymore. For compressed wic images IMAGE_FSTYPES
should simply be extended with a compressed wic format, like "wic.xz".

Henning

> > +
> > +The individual wic partitions (e.g. *.wic.p1) are no longer
> > automatically +copied into the `DEPLOY_DIR_IMAGE`.
> > +To explicitly deploy these files (e.g. for swupdate), set
> > `WIC_DEPLOY_PARTITIONS = "1"`. diff --git
> > a/meta-isar/conf/local.conf.sample
> > b/meta-isar/conf/local.conf.sample index ce7b58ee..57d06202 100644
> > --- a/meta-isar/conf/local.conf.sample +++
> > b/meta-isar/conf/local.conf.sample @@ -246,6 +246,9 @@
> > USER_isar[flags] += "clear-text-password" # Uncomment the below
> > line to debug WIC. # WIC_CREATE_EXTRA_ARGS += "-D"
> >  
> > +# Uncomment this to also deploy each wic partition as separate file
> > (e.g. for swupdate) +#WIC_DEPLOY_PARTITIONS = "1"
> > +
> >  # Uncomment this to use ccache for custom packages
> >  #USE_CCACHE = "1"
> >  # Uncomment and set own top level ccache directory to share between
> > builds diff --git a/meta/classes/imagetypes_wic.bbclass
> > b/meta/classes/imagetypes_wic.bbclass index 61a74d4a..ba8aa15c
> > 100644 --- a/meta/classes/imagetypes_wic.bbclass
> > +++ b/meta/classes/imagetypes_wic.bbclass
> > @@ -98,6 +98,7 @@ RECIPE_SYSROOT_NATIVE ?= "/"
> >  BUILDCHROOT_DIR = "${BUILDCHROOT_TARGET_DIR}"
> >  
> >  WIC_CREATE_EXTRA_ARGS ?= ""
> > +WIC_DEPLOY_PARTITIONS ?= "0"
> >  
> >  # taken from OE, do not touch directly
> >  WICVARS += "\
> > @@ -205,6 +206,10 @@ generate_wic_image() {
> >  
> >      sudo chown -R $(stat -c "%U" ${LAYERDIR_core}) ${LAYERDIR_core}
> > ${LAYERDIR_isar} ${SCRIPTSDIR} || true sudo chown -R $(id -u):$(id
> > -g) ${BUILDCHROOT_DIR}/${WICTMP}
> > +    # only keep partitions if requested (ending with .p<x>)
> > +    if [ "${WIC_DEPLOY_PARTITIONS}" -eq "0" ]; then
> > +        find ${BUILDCHROOT_DIR}/${WICTMP} -type f -regextype sed
> > -regex ".*\.direct.*\.p[0-9]\{1,\}" -delete
> > +    fi
> >      find ${BUILDCHROOT_DIR}/${WICTMP} -type f -name "*.direct*" |
> > while read f; do suffix=$(basename $f | sed
> > 's/\(.*\)\(\.direct\)\(.*\)/\3/') mv -f ${f}
> > "${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.wic${suffix}"  
> 


  parent reply	other threads:[~2022-09-20 10:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19 11:20 [PATCH v5 0/5] use xz and gzip on host (outside chroot) Felix Moessbauer
2022-09-19 11:20 ` [PATCH v5 1/5] do not crossbuild SDK for host-arch eq dist-arch Felix Moessbauer
2022-09-19 11:20 ` [PATCH v5 2/5] run imager in buildchroot-host on cross Felix Moessbauer
2022-09-19 11:20 ` [PATCH v5 3/5] add option to control deploy of raw wic partitions Felix Moessbauer
2022-09-19 12:03   ` Henning Schild
2022-09-19 12:22     ` Moessbauer, Felix
2022-09-20  7:55   ` Henning Schild
2022-09-20  8:39     ` Jan Kiszka
2022-09-20 12:23       ` Henning Schild
2022-09-20 10:49     ` Henning Schild [this message]
2022-09-19 11:20 ` [PATCH v5 4/5] add test for wic partition deploy logic Felix Moessbauer
2022-09-19 11:20 ` [PATCH v5 5/5] add wic.xz image to qemuarm64-bookworm Felix Moessbauer

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=20220920124904.50e5aa71@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=adriaan.schmidt@siemens.com \
    --cc=amikan@ilbers.de \
    --cc=felix.moessbauer@siemens.com \
    --cc=ibr@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.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