ilbers / isar

Integration System for Automated Root filesystem generation
Other
177 stars 72 forks source link

Add new application to isar project #77

Closed MickaelDelanoe closed 2 years ago

MickaelDelanoe commented 2 years ago

Hello,

As worked with Yocto, I would like to add a new Layer (and recipes) to an existing project (https://github.com/siemens/meta-iot2050). I would like add meta-iot-cloud layer (https://layers.openembedded.org/layerindex/branch/krogoth/layer/meta-iot-cloud/) and a personnel recipes python-aws-iot-devices-sdk_%.bbappend

When I ask it to meta-iot2050 project (https://github.com/siemens/meta-iot2050/issues/215) we told me :

Note that meta-iot2050 is not Yocto/OE layer.

I'm not aware of prebuilt debian packages for the AWS IoT Device SDK, so you likely have to remodel the required Yocto recipes into Debian package rules and/or Isar recipes. That can be simple for simple builds (demo/example: https://github.com/ilbers/isar/blob/master/meta-isar/recipes-app/samefile/samefile_2.14.bb).


So, I would like to add a new "application" aws-iot-device-sdk-python (https://github.com/aws/aws-iot-device-sdk-python) to the existing project meta-iot2050 (https://github.com/siemens/meta-iot2050).

But I do not understand how to do that. And the example (demo/example: https://github.com/ilbers/isar/blob/master/meta-isar/recipes-app/samefile/samefile_2.14.bb) do not help me for this.

I do not understand how adapt this example and instructions from User Manual (https://github.com/ilbers/isar/blob/master/doc/user_manual.md#add-a-custom-application) to add aws-iot-device-sdk-python (https://github.com/aws/aws-iot-device-sdk-python) to meta-iot2050 project

Do you know, how can I add aws-iot-device-sdk-python ? Do you have example with a git repo application added ?

Best Regards,

ismagulb commented 2 years ago

Hello Mickael,

you want to build aws-iot-device-sdk-python with Isar.

Isar builds Debian packages. I see that aws-iot-device-sdk-python doesn't provide Debian packaging. Therefore I suggest to debianize aws-iot-device-sdk-python first (manually, outside of Isar). You may want to check debhelper tutorials (e.g., https://www.debian.org/doc/manuals/packaging-tutorial/packaging-tutorial.en.pdf).

Here is an example of a debianized Python application: https://salsa.debian.org/amikan/avocado/-/tree/debian-unstable/debian

After you can dpkg-buildpackage -uc -us manually, integration with Isar will be done. That is the easier part :) .

With kind regards, Baurzhan

MickaelDelanoe commented 2 years ago

Hi,

Thanks for your reply.

According previous exemples, I tried the simple following recipe who seem works...

SRC_URI = " \
    git://github.com/aws/aws-iot-device-sdk-python.git;protocol=https \
    "

SRCREV = "c92908a125bf3ed3b28b33b80c9b10b65fa6d34c"

S = "${WORKDIR}/git"

DEBIAN_BUILD_DEPENDS += "python-dev, python-distutils-extra, openssl"
DEBIAN_DEPENDS = "python3"

inherit dpkg

do_prepare_build[cleandirs] += "${S}/debian"

do_prepare_build() {
    deb_debianize
}

AWSIoTPythonSDK seem well installed on the image after build, burn, boot and import in a debug script on the IOT2050 ... I do not know if it look good for you ?

Best Regards,

ismagulb commented 2 years ago

Glad to hear it worked out of the box!

Your recipe looks fine for me.

If that works, can we close the issue?

MickaelDelanoe commented 2 years ago

yes. Thanks for your help.