* [PATCH] classes/imagetypes: Fix image tarball by removing first level directory
@ 2023-09-26 16:21 Quirin Gylstorff
2023-09-29 6:45 ` Uladzimir Bely
0 siblings, 1 reply; 2+ messages in thread
From: Quirin Gylstorff @ 2023-09-26 16:21 UTC (permalink / raw)
To: jan.kiszka, srinuvasan_a, isar-users, amikan, adriaan.schmidt,
florian.bezdeka
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
Commit be7f0f('meta/classes/sdk.bbclass: add --transform in TAR_OPTIONS')
broke the usage of rootfs tarballs directly, e.g. as NFS root in LAVA,
by adding rootfs as the first level directory.
The patch adds the variable TAR_TRANSFORM to adjust the tarball structure
as necessary. The default replaces `rootfs` with `.` which restores the old
layout in the tarball.
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
meta/classes/imagetypes.bbclass | 4 ++--
meta/classes/sdk.bbclass | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/classes/imagetypes.bbclass b/meta/classes/imagetypes.bbclass
index 6b612386..a3be0a1d 100644
--- a/meta/classes/imagetypes.bbclass
+++ b/meta/classes/imagetypes.bbclass
@@ -5,8 +5,8 @@
#image type: tar
IMAGER_INSTALL:tar = "tar"
-TAR_OPTIONS ?= ""
-
+TAR_TRANSFORM = "--transform='s|rootfs|.|'"
+TAR_OPTIONS:append = " ${TAR_TRANSFORM}"
IMAGE_CMD:tar() {
${SUDO_CHROOT} tar ${TAR_OPTIONS} -cvSf \
${IMAGE_FILE_CHROOT} --one-file-system -C ${PP} rootfs
diff --git a/meta/classes/sdk.bbclass b/meta/classes/sdk.bbclass
index 3d650a18..216213ac 100644
--- a/meta/classes/sdk.bbclass
+++ b/meta/classes/sdk.bbclass
@@ -53,7 +53,7 @@ ROOTFS_MANIFEST_DEPLOY_DIR:class-sdk = "${DEPLOY_DIR_SDKCHROOT}"
ROOTFS_DPKGSTATUS_DEPLOY_DIR:class-sdk = "${DEPLOY_DIR_SDKCHROOT}"
IMAGE_FSTYPES:class-sdk = "${SDK_FORMATS}"
-TAR_OPTIONS:append:class-sdk = " --transform="s|rootfs|${IMAGE_FULLNAME}|""
+TAR_TRANSFORM:class-sdk = " --transform='s|rootfs|${IMAGE_FULLNAME}|'"
# bitbake dependencies
SDKDEPENDS += "sdk-files ${SDK_INSTALL}"
--
2.40.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] classes/imagetypes: Fix image tarball by removing first level directory
2023-09-26 16:21 [PATCH] classes/imagetypes: Fix image tarball by removing first level directory Quirin Gylstorff
@ 2023-09-29 6:45 ` Uladzimir Bely
0 siblings, 0 replies; 2+ messages in thread
From: Uladzimir Bely @ 2023-09-29 6:45 UTC (permalink / raw)
To: Quirin Gylstorff, isar-users
On Tue, 2023-09-26 at 18:21 +0200, 'Quirin Gylstorff' via isar-users
wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>
> Commit be7f0f('meta/classes/sdk.bbclass: add --transform in
> TAR_OPTIONS')
> broke the usage of rootfs tarballs directly, e.g. as NFS root in
> LAVA,
> by adding rootfs as the first level directory.
>
> The patch adds the variable TAR_TRANSFORM to adjust the tarball
> structure
> as necessary. The default replaces `rootfs` with `.` which restores
> the old
> layout in the tarball.
>
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
> meta/classes/imagetypes.bbclass | 4 ++--
> meta/classes/sdk.bbclass | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
Applied to next, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-29 6:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-26 16:21 [PATCH] classes/imagetypes: Fix image tarball by removing first level directory Quirin Gylstorff
2023-09-29 6:45 ` Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox