Skip to contentSkip to conversation

nativesdk-sloci-image: add recipe

PATCH In review Chen Qi 2 participants 8 messages May 18, 2021 – May 26, 2021

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/1 nativesdk-sloci-image: add recipe

Add nativesdk-sloci-image recipe which is basically from the sloci-image-native recipe.

---
 .../sloci-image/nativesdk-sloci-image_git.bb  | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 recipes-containers/sloci-image/nativesdk-sloci-image_git.bb
recipes-containers/sloci-image/nativesdk-sloci-image_git.bb new file +27 -0
new file mode 100644
index 0000000..3c2b539
@@ -0,0 +1,27 @@
+SUMMARY = "A simple CLI tool for packing rootfs into a single-layer OCI image"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=948cd8e59069fad992b0469af9ad7966"
+SRC_URI = "git://github.com/jirutka/sloci-image.git \
+           file://0001-sloci-image-fix-variant-quoting.patch \
+          "
+
+
+DEPENDS = ""
+
+SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650"
+PV = "v0.1.0+git${SRCPV}"
+
+inherit nativesdk
+
+S = "${WORKDIR}/git"
+
+do_compile() { 
+	:
+}
+
+do_install() {
+	cd ${S}
+        make PREFIX="${exec_prefix}" DESTDIR=${D} install
+}
+
+CLEANBROKEN = "1"
Signature · 1 line
2.30.2
#1 lore raw
Quoted 4 lines · Chen Qi

Add nativesdk-sloci-image recipe which is basically from the sloci-image-native recipe.

Copying the recipe is a bad idea.

What's wrong with just adding the inherit nativesdk in the existing sloci recipe ?

Bruce

Quoted 45 lines
---
 .../sloci-image/nativesdk-sloci-image_git.bb  | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 recipes-containers/sloci-image/nativesdk-sloci-image_git.bb
recipes-containers/sloci-image/nativesdk-sloci-image_git.bb new file +27 -1
new file mode 100644
index 0000000..3c2b539
@@ -0,0 +1,27 @@
+SUMMARY = "A simple CLI tool for packing rootfs into a single-layer OCI image"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=948cd8e59069fad992b0469af9ad7966"
+SRC_URI = "git://github.com/jirutka/sloci-image.git \
+           file://0001-sloci-image-fix-variant-quoting.patch \
+          "
+
+
+DEPENDS = ""
+
+SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650"
+PV = "v0.1.0+git${SRCPV}"
+
+inherit nativesdk
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+       :
+}
+
+do_install() {
+       cd ${S}
+        make PREFIX="${exec_prefix}" DESTDIR=${D} install
+}
+
+CLEANBROKEN = "1"
--

2.30.2

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
author
#2 lore raw
Quoted 10 lines · Bruce Ashfield
Quoted 3 lines · Chen Qi

Add nativesdk-sloci-image recipe which is basically from the sloci-image-native recipe.

Copying the recipe is a bad idea.

What's wrong with just adding the inherit nativesdk in the existing sloci recipe ?

Bruce

Hi Bruce,

This is because a recipe cannot inherit native and nativesdk at the same time.
Hongxu once sent a patch to rename the native recipe to sloci-image_git.bb and use BBCLASSEXTEND = "native nativesdk", but that patch was rejected. So I figured that adding a nativesdk-sloci-image recipe is only remaining way to enable nativesdk support.

Maybe I should extract the common part to sloci-image.inc, and the native/nativesdk recipe only contains two lines like below:
require sloci-image.inc
inherit native (or inherit nativesdk)

What do you think?

Best Regards,
Chen Qi

Quoted 46 lines
Quoted 45 lines
---
  .../sloci-image/nativesdk-sloci-image_git.bb  | 27 +++++++++++++++++++
  1 file changed, 27 insertions(+)

create mode 100644 recipes-containers/sloci-image/nativesdk-sloci-image_git.bb

recipes-containers/sloci-image/nativesdk-sloci-image_git.bb new file +27 -1
new file mode 100644
index 0000000..3c2b539
@@ -0,0 +1,27 @@
+SUMMARY = "A simple CLI tool for packing rootfs into a single-layer OCI image"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=948cd8e59069fad992b0469af9ad7966"
+SRC_URI = "git://github.com/jirutka/sloci-image.git \
+           file://0001-sloci-image-fix-variant-quoting.patch \
+          "
+
+
+DEPENDS = ""
+
+SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650"
+PV = "v0.1.0+git${SRCPV}"
+
+inherit nativesdk
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+       :
+}
+
+do_install() {
+       cd ${S}
+        make PREFIX="${exec_prefix}" DESTDIR=${D} install
+}
+
+CLEANBROKEN = "1"
--

2.30.2

#3 lore raw
Quoted 13 lines · ChenQi
Quoted 10 lines · Bruce Ashfield
Quoted 3 lines · Chen Qi

Add nativesdk-sloci-image recipe which is basically from the sloci-image-native recipe.

Copying the recipe is a bad idea.

What's wrong with just adding the inherit nativesdk in the existing sloci recipe ?

Bruce

Quoted 7 lines

Hi Bruce,

This is because a recipe cannot inherit native and nativesdk at the same time.
Hongxu once sent a patch to rename the native recipe to sloci-image_git.bb and use BBCLASSEXTEND = "native nativesdk", but that patch was rejected.

It wasn't rejected .. I gave feedback that it shouldn't drop the -native from the name, but that it could be both nativesdk and native.

At the time, the recipe needed to be clear that it wasn't for on-target use, and was build side only. Having -native in the name was the clarity I was looking for (as was the inherit native).

Last I checked, the recipe name could still be -native (it's just a name after all),
but have the BBCLASSEXTEND instead of the include line.

And a quick test with the following change, allowed me to build sloci-image-native
and nativesdk-sloci-image-native:

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
(quoted diff) +0 -0

b/recipes-containers/sloci-image/sloci-image-native_git.bb index a68c6d9..fc3c329 100644

recipes-containers/sloci-image/sloci-image-native_git.bb +2 -2
@@ -11,8 +11,6 @@ DEPENDS = ""
 SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650"
 PV = "v0.1.0+git${SRCPV}"
 
-inherit native
-
 S = "${WORKDIR}/git"
 
 do_compile() {
@@ -25,3 +23,5 @@ do_install() {
 }
 
 CLEANBROKEN = "1"
+
+BBCLASSEXTEND = "native nativesdk"
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

I'm actually just finishing up some work on OCI image backend switching and have some reworking of the sloci-image recipe ... and there are some use cases where it can be used on-target (whereas that wasn't the case before).

So the rename to _git is possible, as are the BBCLASSEXTEND changes to the newly named sloci-image_git.bb

Luckily we still have sloci-image-native as an available build target, so nothing
breaks with that rename.

I can take care of that change right now, if that sounds like it meets what you are looking for (that change being the BBCLASSEXTEND in a renamed sloci recipe).

Bruce

Quoted 8 lines

So I figured that adding a nativesdk-sloci-image recipe is only remaining way to enable nativesdk support.

Maybe I should extract the common part to sloci-image.inc, and the native/nativesdk recipe only contains two lines like below:
require sloci-image.inc
inherit native (or inherit nativesdk)

Quoted 53 lines

What do you think?

Best Regards,
Chen Qi

Quoted 46 lines
Quoted 45 lines
---
  .../sloci-image/nativesdk-sloci-image_git.bb  | 27 +++++++++++++++++++
  1 file changed, 27 insertions(+)

create mode 100644 recipes-containers/sloci-image/nativesdk-sloci-image_git.bb

recipes-containers/sloci-image/nativesdk-sloci-image_git.bb new file +27 -1
new file mode 100644
index 0000000..3c2b539
@@ -0,0 +1,27 @@
+SUMMARY = "A simple CLI tool for packing rootfs into a single-layer OCI image"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=948cd8e59069fad992b0469af9ad7966"
+SRC_URI = "git://github.com/jirutka/sloci-image.git \
+           file://0001-sloci-image-fix-variant-quoting.patch \
+          "
+
+
+DEPENDS = ""
+
+SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650"
+PV = "v0.1.0+git${SRCPV}"
+
+inherit nativesdk
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+       :
+}
+
+do_install() {
+       cd ${S}
+        make PREFIX="${exec_prefix}" DESTDIR=${D} install
+}
+
+CLEANBROKEN = "1"
--

2.30.2

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

author
#4 lore raw
Quoted 65 lines · Bruce Ashfield
Quoted 10 lines · ChenQi
Quoted 9 lines · Bruce Ashfield
Quoted 3 lines · Chen Qi

Add nativesdk-sloci-image recipe which is basically from the sloci-image-native recipe.

Copying the recipe is a bad idea.

What's wrong with just adding the inherit nativesdk in the existing sloci recipe ?

Quoted 8 lines
Quoted 1 line

Bruce

Hi Bruce,

This is because a recipe cannot inherit native and nativesdk at the same time.
Hongxu once sent a patch to rename the native recipe to

https://urldefense.com/v3/__http://sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D21g_xdpSg$  and use BBCLASSEXTEND = "native nativesdk", but that
patch was rejected.

It wasn't rejected .. I gave feedback that it shouldn't drop the -native from the name, but that it could be both nativesdk and native.

At the time, the recipe needed to be clear that it wasn't for on-target use, and was build side only. Having -native in the name was the clarity I was looking for (as was the inherit native).

Last I checked, the recipe name could still be -native (it's just a name after all),
but have the BBCLASSEXTEND instead of the include line.

And a quick test with the following change, allowed me to build sloci-image-native
and nativesdk-sloci-image-native:

recipes-containers/sloci-image/https://urldefense.com/v3/__http://sloci-image-native_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D20oXeUINQ$ +2 -2
index a68c6d9..fc3c329 100644
@@ -11,8 +11,6 @@ DEPENDS = ""
  SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650"
  PV = "v0.1.0+git${SRCPV}"
 
-inherit native
-
  S = "${WORKDIR}/git"
 
  do_compile() {
@@ -25,3 +23,5 @@ do_install() {
  }
 
  CLEANBROKEN = "1"
+
+BBCLASSEXTEND = "native nativesdk"

I'm actually just finishing up some work on OCI image backend switching and have some reworking of the sloci-image recipe ... and there are some use cases where it can be used on-target (whereas that wasn't the case before).

So the rename to _git is possible, as are the BBCLASSEXTEND changes to
the newly named https://urldefense.com/v3/__http://sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D21g_xdpSg$

Luckily we still have sloci-image-native as an available build target, so nothing
breaks with that rename.

Quoted 5 lines

I can take care of that change right now, if that sounds like it meets what you are looking for (that change being the BBCLASSEXTEND in a renamed sloci recipe).

Bruce

Yes. Definitely! What I need is native and nativesdk support of sloci-image. That would be great! Many thanks!

Best Regards,
Chen Qi

Quoted 65 lines
Quoted 51 lines

So I figured that adding a nativesdk-sloci-image recipe is only remaining way to enable nativesdk support.

Maybe I should extract the common part to sloci-image.inc, and the native/nativesdk recipe only contains two lines like below:
require sloci-image.inc
inherit native (or inherit nativesdk)

What do you think?

Best Regards,
Chen Qi

Quoted 37 lines
Quoted 37 lines
---
   .../sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$   | 27 +++++++++++++++++++
   1 file changed, 27 insertions(+)

create mode 100644 recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$

recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$ new file +25 -0
new file mode 100644
index 0000000..3c2b539
@@ -0,0 +1,27 @@
+SUMMARY = "A simple CLI tool for packing rootfs into a single-layer OCI image"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=948cd8e59069fad992b0469af9ad7966"
+SRC_URI = "git://github.com/jirutka/sloci-image.git \
+           file://0001-sloci-image-fix-variant-quoting.patch \
+          "
+
+
+DEPENDS = ""
+
+SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650"
+PV = "v0.1.0+git${SRCPV}"
+
+inherit nativesdk
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+       :
+}
+
+do_install() {
+       cd ${S}
+        make PREFIX="${exec_prefix}" DESTDIR=${D} install
+}
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$ new file +2 -1
+
+CLEANBROKEN = "1"
--

2.30.2

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

#5 lore raw
Quoted 67 lines · ChenQi
Quoted 65 lines · Bruce Ashfield
Quoted 10 lines · ChenQi
Quoted 9 lines · Bruce Ashfield
Quoted 3 lines · Chen Qi

Add nativesdk-sloci-image recipe which is basically from the sloci-image-native recipe.

Copying the recipe is a bad idea.

What's wrong with just adding the inherit nativesdk in the existing sloci recipe ?

Quoted 8 lines
Quoted 1 line

Bruce

Hi Bruce,

This is because a recipe cannot inherit native and nativesdk at the same time.
Hongxu once sent a patch to rename the native recipe to

https://urldefense.com/v3/__http://sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D21g_xdpSg$  and use BBCLASSEXTEND = "native nativesdk", but that
patch was rejected.

It wasn't rejected .. I gave feedback that it shouldn't drop the -native from the name, but that it could be both nativesdk and native.

At the time, the recipe needed to be clear that it wasn't for on-target use, and was build side only. Having -native in the name was the clarity I was looking for (as was the inherit native).

Last I checked, the recipe name could still be -native (it's just a name after all),
but have the BBCLASSEXTEND instead of the include line.

And a quick test with the following change, allowed me to build sloci-image-native
and nativesdk-sloci-image-native:

recipes-containers/sloci-image/https://urldefense.com/v3/__http://sloci-image-native_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D20oXeUINQ$ +2 -2
index a68c6d9..fc3c329 100644
@@ -11,8 +11,6 @@ DEPENDS = ""
  SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650"
  PV = "v0.1.0+git${SRCPV}"
 
-inherit native
-
  S = "${WORKDIR}/git"
 
  do_compile() {
@@ -25,3 +23,5 @@ do_install() {
  }
 
  CLEANBROKEN = "1"
+
+BBCLASSEXTEND = "native nativesdk"

I'm actually just finishing up some work on OCI image backend switching and have some reworking of the sloci-image recipe ... and there are some use cases where it can be used on-target (whereas that wasn't the case before).

So the rename to _git is possible, as are the BBCLASSEXTEND changes to
the newly named https://urldefense.com/v3/__http://sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D21g_xdpSg$

Luckily we still have sloci-image-native as an available build target, so nothing
breaks with that rename.

Quoted 8 lines
Quoted 5 lines

I can take care of that change right now, if that sounds like it meets what you are looking for (that change being the BBCLASSEXTEND in a renamed sloci recipe).

Bruce

Yes. Definitely! What I need is native and nativesdk support of sloci-image. That would be great! Many thanks!

The change is pushed. Let me know if it causes any issues.

Bruce

Quoted 70 lines

Best Regards,
Chen Qi

Quoted 65 lines
Quoted 51 lines

So I figured that adding a nativesdk-sloci-image recipe is only remaining way to enable nativesdk support.

Maybe I should extract the common part to sloci-image.inc, and the native/nativesdk recipe only contains two lines like below:
require sloci-image.inc
inherit native (or inherit nativesdk)

What do you think?

Best Regards,
Chen Qi

Quoted 37 lines
Quoted 37 lines
---
   .../sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$   | 27 +++++++++++++++++++
   1 file changed, 27 insertions(+)

create mode 100644 recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$

recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$ new file +25 -0
new file mode 100644
index 0000000..3c2b539
@@ -0,0 +1,27 @@
+SUMMARY = "A simple CLI tool for packing rootfs into a single-layer OCI image"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=948cd8e59069fad992b0469af9ad7966"
+SRC_URI = "git://github.com/jirutka/sloci-image.git \
+           file://0001-sloci-image-fix-variant-quoting.patch \
+          "
+
+
+DEPENDS = ""
+
+SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650"
+PV = "v0.1.0+git${SRCPV}"
+
+inherit nativesdk
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+       :
+}
+
+do_install() {
+       cd ${S}
+        make PREFIX="${exec_prefix}" DESTDIR=${D} install
+}
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$ new file +2 -1
+
+CLEANBROKEN = "1"
--

2.30.2

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
author
#6 lore raw

Hi Bruce,

Sorry for the late reply.
I've tested nativesdk and native. It's working well.

Best Regards,
Chen Qi

Quoted 146 lines · Bruce Ashfield
Quoted 66 lines · ChenQi
Quoted 65 lines · Bruce Ashfield
Quoted 10 lines · ChenQi
Quoted 9 lines · Bruce Ashfield
Quoted 3 lines · Chen Qi

Add nativesdk-sloci-image recipe which is basically from the sloci-image-native recipe.

Copying the recipe is a bad idea.

What's wrong with just adding the inherit nativesdk in the existing sloci recipe ?

Quoted 8 lines
Quoted 1 line

Bruce

Hi Bruce,

This is because a recipe cannot inherit native and nativesdk at the same time.
Hongxu once sent a patch to rename the native recipe to

https://urldefense.com/v3/__http://sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D21g_xdpSg$  and use BBCLASSEXTEND = "native nativesdk", but that
patch was rejected.

It wasn't rejected .. I gave feedback that it shouldn't drop the -native from the name, but that it could be both nativesdk and native.

At the time, the recipe needed to be clear that it wasn't for on-target use, and was build side only. Having -native in the name was the clarity I was looking for (as was the inherit native).

Last I checked, the recipe name could still be -native (it's just a name after all),
but have the BBCLASSEXTEND instead of the include line.

And a quick test with the following change, allowed me to build sloci-image-native
and nativesdk-sloci-image-native:

recipes-containers/sloci-image/https://urldefense.com/v3/__http://sloci-image-native_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D20oXeUINQ$ +2 -2
index a68c6d9..fc3c329 100644
@@ -11,8 +11,6 @@ DEPENDS = ""
   SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650"
   PV = "v0.1.0+git${SRCPV}"
 
-inherit native
-
   S = "${WORKDIR}/git"
 
   do_compile() {
@@ -25,3 +23,5 @@ do_install() {
   }
 
   CLEANBROKEN = "1"
+
+BBCLASSEXTEND = "native nativesdk"

I'm actually just finishing up some work on OCI image backend switching and have some reworking of the sloci-image recipe ... and there are some use cases where it can be used on-target (whereas that wasn't the case before).

So the rename to _git is possible, as are the BBCLASSEXTEND changes to
the newly named https://urldefense.com/v3/__http://sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D21g_xdpSg$

Luckily we still have sloci-image-native as an available build target, so nothing
breaks with that rename.

Quoted 7 lines
Quoted 5 lines

I can take care of that change right now, if that sounds like it meets what you are looking for (that change being the BBCLASSEXTEND in a renamed sloci recipe).

Bruce

Yes. Definitely! What I need is native and nativesdk support of sloci-image. That would be great! Many thanks!

The change is pushed. Let me know if it causes any issues.

Bruce

Quoted 67 lines

Best Regards,
Chen Qi

Quoted 64 lines
Quoted 51 lines

So I figured that adding a nativesdk-sloci-image recipe is only remaining way to enable nativesdk support.

Maybe I should extract the common part to sloci-image.inc, and the native/nativesdk recipe only contains two lines like below:
require sloci-image.inc
inherit native (or inherit nativesdk)

What do you think?

Best Regards,
Chen Qi

Quoted 37 lines
Quoted 37 lines
---
    .../sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$   | 27 +++++++++++++++++++
    1 file changed, 27 insertions(+)
    create mode 100644 recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$
recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$ new file +25 -0
new file mode 100644
index 0000000..3c2b539
@@ -0,0 +1,27 @@
+SUMMARY = "A simple CLI tool for packing rootfs into a single-layer OCI image"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=948cd8e59069fad992b0469af9ad7966"
+SRC_URI = "git://github.com/jirutka/sloci-image.git \
+           file://0001-sloci-image-fix-variant-quoting.patch \
+          "
+
+
+DEPENDS = ""
+
+SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650"
+PV = "v0.1.0+git${SRCPV}"
+
+inherit nativesdk
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+       :
+}
+
+do_install() {
+       cd ${S}
+        make PREFIX="${exec_prefix}" DESTDIR=${D} install
+}
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$ new file +2 -1
+
+CLEANBROKEN = "1"
--

2.30.2

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

#7 lore raw
Quoted 6 lines · ChenQi

Hi Bruce,

Sorry for the late reply.
I've tested nativesdk and native. It's working well.

Thanks for the follow up!

Bruce

Quoted 151 lines

Best Regards,
Chen Qi

Quoted 146 lines · Bruce Ashfield
Quoted 66 lines · ChenQi
Quoted 65 lines · Bruce Ashfield
Quoted 10 lines · ChenQi
Quoted 9 lines · Bruce Ashfield
Quoted 3 lines · Chen Qi

Add nativesdk-sloci-image recipe which is basically from the sloci-image-native recipe.

Copying the recipe is a bad idea.

What's wrong with just adding the inherit nativesdk in the existing sloci recipe ?

Quoted 8 lines
Quoted 1 line

Bruce

Hi Bruce,

This is because a recipe cannot inherit native and nativesdk at the same time.
Hongxu once sent a patch to rename the native recipe to

https://urldefense.com/v3/__http://sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D21g_xdpSg$  and use BBCLASSEXTEND = "native nativesdk", but that
patch was rejected.

It wasn't rejected .. I gave feedback that it shouldn't drop the -native from the name, but that it could be both nativesdk and native.

At the time, the recipe needed to be clear that it wasn't for on-target use, and was build side only. Having -native in the name was the clarity I was looking for (as was the inherit native).

Last I checked, the recipe name could still be -native (it's just a name after all),
but have the BBCLASSEXTEND instead of the include line.

And a quick test with the following change, allowed me to build sloci-image-native
and nativesdk-sloci-image-native:

recipes-containers/sloci-image/https://urldefense.com/v3/__http://sloci-image-native_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D20oXeUINQ$ +2 -2
index a68c6d9..fc3c329 100644
@@ -11,8 +11,6 @@ DEPENDS = ""
   SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650"
   PV = "v0.1.0+git${SRCPV}"
 
-inherit native
-
   S = "${WORKDIR}/git"
 
   do_compile() {
@@ -25,3 +23,5 @@ do_install() {
   }
 
   CLEANBROKEN = "1"
+
+BBCLASSEXTEND = "native nativesdk"

I'm actually just finishing up some work on OCI image backend switching and have some reworking of the sloci-image recipe ... and there are some use cases where it can be used on-target (whereas that wasn't the case before).

So the rename to _git is possible, as are the BBCLASSEXTEND changes to
the newly named https://urldefense.com/v3/__http://sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D21g_xdpSg$

Luckily we still have sloci-image-native as an available build target, so nothing
breaks with that rename.

Quoted 7 lines
Quoted 5 lines

I can take care of that change right now, if that sounds like it meets what you are looking for (that change being the BBCLASSEXTEND in a renamed sloci recipe).

Bruce

Yes. Definitely! What I need is native and nativesdk support of sloci-image. That would be great! Many thanks!

The change is pushed. Let me know if it causes any issues.

Bruce

Quoted 67 lines

Best Regards,
Chen Qi

Quoted 64 lines
Quoted 51 lines

So I figured that adding a nativesdk-sloci-image recipe is only remaining way to enable nativesdk support.

Maybe I should extract the common part to sloci-image.inc, and the native/nativesdk recipe only contains two lines like below:
require sloci-image.inc
inherit native (or inherit nativesdk)

What do you think?

Best Regards,
Chen Qi

Quoted 37 lines
Quoted 37 lines
---
    .../sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$   | 27 +++++++++++++++++++
    1 file changed, 27 insertions(+)
    create mode 100644 recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$
recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$ new file +25 -0
new file mode 100644
index 0000000..3c2b539
@@ -0,0 +1,27 @@
+SUMMARY = "A simple CLI tool for packing rootfs into a single-layer OCI image"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=948cd8e59069fad992b0469af9ad7966"
+SRC_URI = "git://github.com/jirutka/sloci-image.git \
+           file://0001-sloci-image-fix-variant-quoting.patch \
+          "
+
+
+DEPENDS = ""
+
+SRCREV = "4015e49763e5a738026a5bbfcf32b38b5a4fa650"
+PV = "v0.1.0+git${SRCPV}"
+
+inherit nativesdk
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+       :
+}
+
+do_install() {
+       cd ${S}
+        make PREFIX="${exec_prefix}" DESTDIR=${D} install
+}
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$ new file +2 -1
+
+CLEANBROKEN = "1"
--

2.30.2

--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II