Skip the inclusion of the parent directory in the tar file.
Most tools expect a tar file without it. An example of this
use case is skopeo, where the skopeo copy oci-archive command
will not work with the generate tar file.

Signed-off-by: Vasileios Anagnostopoulos <[email protected]>
---
 classes/image-oci-umoci.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/classes/image-oci-umoci.inc b/classes/image-oci-umoci.inc
index f941795..771f288 100644
--- a/classes/image-oci-umoci.inc
+++ b/classes/image-oci-umoci.inc
@@ -107,7 +107,7 @@ IMAGE_CMD:oci() {
 
     # make a tar version of the image direcotry
     if [ -n "${OCI_IMAGE_TAR_OUTPUT}" ]; then
-       tar -cf "$image_name.tar" "$image_name"
+       tar -cf "$image_name.tar" -C "$image_name" .
     fi
 
     # We could make this optional, since the bundle is directly runnable via 
runc
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7443): 
https://lists.yoctoproject.org/g/meta-virtualization/message/7443
Mute This Topic: https://lists.yoctoproject.org/mt/92331697/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to