On Tue, May 25, 2021 at 10:12 PM ChenQi <[email protected]> wrote: > > Hi Bruce, > > Sorry for the late reply. > I've tested nativesdk and native. It's working well. >
Thanks for the follow up! Bruce > Best Regards, > Chen Qi > > On 05/19/2021 11:09 AM, Bruce Ashfield wrote: > > On Tue, May 18, 2021 at 11:02 PM ChenQi <[email protected]> wrote: > >> On 05/19/2021 10:38 AM, Bruce Ashfield wrote: > >>> On Tue, May 18, 2021 at 9:23 PM ChenQi <[email protected]> wrote: > >>>> On 05/18/2021 08:03 PM, Bruce Ashfield wrote: > >>>>> On Tue, May 18, 2021 at 12:55 AM Chen Qi <[email protected]> wrote: > >>>>>> 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 > >>>> 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: > >>> > >>> diff --git > >>> a/recipes-containers/sloci-image/https://urldefense.com/v3/__http://sloci-image-native_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D20oXeUINQ$ > >>> b/recipes-containers/sloci-image/https://urldefense.com/v3/__http://sloci-image-native_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D20oXeUINQ$ > >>> index a68c6d9..fc3c329 100644 > >>> --- > >>> a/recipes-containers/sloci-image/https://urldefense.com/v3/__http://sloci-image-native_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D20oXeUINQ$ > >>> +++ > >>> b/recipes-containers/sloci-image/https://urldefense.com/v3/__http://sloci-image-native_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D20oXeUINQ$ > >>> @@ -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. > >>> > >>> 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 > > > >> Best Regards, > >> Chen Qi > >> > >>>> 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 > >>>> > >>>> > >>>>>> Signed-off-by: Chen Qi <[email protected]> > >>>>>> --- > >>>>>> > >>>>>> .../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$ > >>>>>> > >>>>>> diff --git > >>>>>> a/recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$ > >>>>>> > >>>>>> b/recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$ > >>>>>> new file mode 100644 > >>>>>> index 0000000..3c2b539 > >>>>>> --- /dev/null > >>>>>> +++ > >>>>>> b/recipes-containers/sloci-image/https://urldefense.com/v3/__http://nativesdk-sloci-image_git.bb__;!!AjveYdw8EvQ!IKbzht5nzzta0IFVO03JT5jvB1r_KWMX8Zmv-RxCOLxOY5eE1caxW8R3D22nEkW98w$ > >>>>>> @@ -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 > >>> > > > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#6546): https://lists.yoctoproject.org/g/meta-virtualization/message/6546 Mute This Topic: https://lists.yoctoproject.org/mt/82905144/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
