All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denis@denix.org>
To: Ryan Eatmon <reatmon@ti.com>
Cc: Praneeth Bajjuri <praneeth@ti.com>,
	Denys Dmytriyenko <denys@konsulko.com>,
	meta-arago@lists.yoctoproject.org
Subject: Re: [meta-arago][master/kirkstone][PATCH 1/2] tisdk-sw-manifest: Add code to not fail on tar error
Date: Tue, 31 Oct 2023 15:03:10 -0400	[thread overview]
Message-ID: <20231031190310.GI2408@denix.org> (raw)
In-Reply-To: <938c557e-e04b-43ed-9668-63620ce6851a@ti.com>

On Tue, Oct 31, 2023 at 10:59:43AM -0500, Ryan Eatmon wrote:
> 
> 
> On 10/31/2023 10:44 AM, Denys Dmytriyenko wrote:
> >On Tue, Oct 31, 2023 at 09:04:32AM -0500, Ryan Eatmon via lists.yoctoproject.org wrote:
> >>We want to add an image into the core bundle, but that image does not
> >>have any opkg .control files.  tar apparently errors out if you ask it
> >>to extract out files but the files are not in the archive, and the
> >>recipes are setup that if any of the commands in the shell error out,
> >>then the entire recipe fails.
> >>
> >>Simple fix, add an || (or) condition to the tar command to print a
> >>message that there were not any control files instead of erroring out.
> >
> >So, simply bypassing tar error due to missing *.control files still won't
> >enable you to properly generate the SW manifest. As those *.control files
> >from individual packages are parsed to extract the license information.
> >And they are missing because tiny image specifically disables "package
> >management" to save on space. Therefore tiny image was not included in
> >the bundle, since it doesn't generate the SW manifest.
> 
> And this is why I sent the patch in rather than just taking it.
> This patch was a response to Chirag running in the above error when
> trying to add the tiny image into the core bundle in the processor
> sdk.
> 
> So, why do we want to add tiny to the bundle?  Since tiny should be
> a subset of the other images, is there anything not covered in the
> software manifest that should prevent this patch?

That is the risk, yes.

Right now it is just core-boot packagegroup with efi-grub and kernel removed.
But I see someone is trying to submit a patch to add extra packages to that 
packagegroup, so the licensing can eventually change and easily go unnoticed.


> >>Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> >>---
> >>  meta-arago-distro/classes/tisdk-sw-manifest.bbclass | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >>diff --git a/meta-arago-distro/classes/tisdk-sw-manifest.bbclass b/meta-arago-distro/classes/tisdk-sw-manifest.bbclass
> >>index 14d14f08..b9c63610 100644
> >>--- a/meta-arago-distro/classes/tisdk-sw-manifest.bbclass
> >>+++ b/meta-arago-distro/classes/tisdk-sw-manifest.bbclass
> >>@@ -405,10 +405,10 @@ sw_manifest_target() {
> >>          # Only extract tar.gz or tar.bz2 types

You might want to update the comment from tar.bz2 to tar.xz


> >>          if [ -e ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.xz ]
> >>          then
> >>-            tar xJf ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.xz -C ${IMAGE_ROOTFS}/filesystem --wildcards *.control
> >>+            tar xJf ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.xz -C ${IMAGE_ROOTFS}/filesystem --wildcards *.control || echo "No control files found in ${image}"
> >>          elif [ -e ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.gz ]
> >>          then
> >>-            tar xzf ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.gz -C ${IMAGE_ROOTFS}/filesystem --wildcards *.control
> >>+            tar xzf ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.gz -C ${IMAGE_ROOTFS}/filesystem --wildcards *.control || echo "No control files found in ${image}"
> >>          fi
> >>      done
> >>-- 
> >>2.17.1


  reply	other threads:[~2023-10-31 19:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31 14:04 [meta-arago][master/kirkstone][PATCH 1/2] tisdk-sw-manifest: Add code to not fail on tar error Ryan Eatmon
2023-10-31 14:04 ` [meta-arago][master/kirkstone][PATCH 2/2] tisdk-core-bundle: Add the tiny image into the core bundle Ryan Eatmon
2023-10-31 15:44 ` [meta-arago][master/kirkstone][PATCH 1/2] tisdk-sw-manifest: Add code to not fail on tar error Denys Dmytriyenko
2023-10-31 15:59   ` Ryan Eatmon
2023-10-31 19:03     ` Denys Dmytriyenko [this message]
2023-11-02 11:48     ` [EXTERNAL] " Chirag Shilwant
2023-11-02 20:37       ` Bin Liu
2023-11-03 13:54         ` Bin Liu
2023-11-03 14:25         ` [EXTERNAL] " Bin Liu
2023-11-03 16:18         ` Ryan Eatmon
2023-11-03 21:17           ` Denys Dmytriyenko
2023-11-07 22:19             ` Bin Liu
2023-11-08 14:12               ` Ryan Eatmon
2023-11-08 14:21                 ` Bin Liu

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=20231031190310.GI2408@denix.org \
    --to=denis@denix.org \
    --cc=denys@konsulko.com \
    --cc=meta-arago@lists.yoctoproject.org \
    --cc=praneeth@ti.com \
    --cc=reatmon@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.