From c0c8c5875ca159a81d017082c472126b0f020523 Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Wed, 28 Dec 2016 14:54:42 +0100 Subject: Add aglwgt class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change adds a aglwgt.bbclass which does: - simplify the application (wrapper) recipes within AGL - enforces that 'make package' is present to guarantee the SDK workflow works - places the wgt in the standard location of the AGL reference distro /usr/AGL/apps/ Later the following features will be added to the class: - automatic generation of a wrapper for smoke-test of install/uninstall operations (ptest script) - build-time format checks Change-Id: Ie4f8281061febf3495d33bb1483f8c64b54ed8e9 Signed-off-by: Jan-Simon Möller Signed-off-by: Stephane Desneux --- meta-app-framework/classes/aglwgt.bbclass | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 meta-app-framework/classes/aglwgt.bbclass (limited to 'meta-app-framework/classes') diff --git a/meta-app-framework/classes/aglwgt.bbclass b/meta-app-framework/classes/aglwgt.bbclass new file mode 100644 index 000000000..f7da1e401 --- /dev/null +++ b/meta-app-framework/classes/aglwgt.bbclass @@ -0,0 +1,37 @@ +# +# aglwgt bbclass +# +# Jan-Simon Moeller, jsmoeller@linuxfoundation.org +# +# This class expects a "make package" target in the makefile +# which creates the wgt files in the package/ subfolder. +# The makefile needs to use wgtpkg-pack. +# + + +# 'wgtpkg-pack' in af-main-native is required. +DEPENDS_append = " af-main-native" + +# for bindings af-binder is required. +DEPENDS_append = " af-binder" + +do_aglwgt_package() { + cd ${B} + make package || ( \ + bbwarn "Your makefile must support the 'make package' target" ; \ + bbwarn "and generate a .wgt file using wgtpack in the"; \ + bbwarn "subfolder ./package/ !" ; \ + bbwarn "Fix your package as it will not work within the SDK" ; \ + bbwarn "See: https://wiki.automotivelinux.org/troubleshooting/app-recipes" \ + ) +} + +do_aglwgt_deploy() { + install -d ${D}/usr/AGL/apps + install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/ +} + +FILES_${PN} += " /usr/AGL/apps/*.wgt " + +addtask aglwgt_package before do_build after do_compile +addtask aglwgt_deploy before do_build after do_install \ No newline at end of file -- cgit 1.2.3-korg From 2a3bbd117220b55682f95dd527f9971f3efdcd82 Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Wed, 28 Dec 2016 19:15:54 +0100 Subject: Fix whitespace in aglwgt bbclass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change fixes an issue in the aglwgt bbclass use of FILES_${PN} that lead to a missing inclusion of the *.wgt file. Change-Id: I4ec8485e9f375f3e9278310381b270b0d3647f62 Signed-off-by: Jan-Simon Möller Signed-off-by: Stephane Desneux --- meta-app-framework/classes/aglwgt.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta-app-framework/classes') diff --git a/meta-app-framework/classes/aglwgt.bbclass b/meta-app-framework/classes/aglwgt.bbclass index f7da1e401..734e979c5 100644 --- a/meta-app-framework/classes/aglwgt.bbclass +++ b/meta-app-framework/classes/aglwgt.bbclass @@ -31,7 +31,7 @@ do_aglwgt_deploy() { install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/ } -FILES_${PN} += " /usr/AGL/apps/*.wgt " +FILES_${PN} += "/usr/AGL/apps/*.wgt" addtask aglwgt_package before do_build after do_compile addtask aglwgt_deploy before do_build after do_install \ No newline at end of file -- cgit 1.2.3-korg From 115ecf63ed97c79b1b1055d76dee835135277030 Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Wed, 28 Dec 2016 20:45:11 +0100 Subject: Be more precise in addtask MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This changeset fixes a timing issue on parallel builds when using the aglwgt bbclass. It turns out that we need to make sure our steps finish before do_package is being called. Change-Id: Ib3bc0d39562c6a0d9ba4c55352c61ce1b57d5409 Signed-off-by: Jan-Simon Möller Signed-off-by: Stephane Desneux --- meta-app-framework/classes/aglwgt.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta-app-framework/classes') diff --git a/meta-app-framework/classes/aglwgt.bbclass b/meta-app-framework/classes/aglwgt.bbclass index 734e979c5..97fb6ff8d 100644 --- a/meta-app-framework/classes/aglwgt.bbclass +++ b/meta-app-framework/classes/aglwgt.bbclass @@ -33,5 +33,5 @@ do_aglwgt_deploy() { FILES_${PN} += "/usr/AGL/apps/*.wgt" -addtask aglwgt_package before do_build after do_compile -addtask aglwgt_deploy before do_build after do_install \ No newline at end of file +addtask aglwgt_deploy before do_package after do_install +addtask aglwgt_package before do_aglwgt_deploy after do_compile -- cgit 1.2.3-korg From dfd78e0100e23391b1a3d74e639940a1efee7474 Mon Sep 17 00:00:00 2001 From: Ronan Date: Mon, 2 Jan 2017 17:10:24 +0100 Subject: add fakeroot to aglwgt_deploy task * we need to have pseudo env when we deploy agl app, if not developer id is use instead of pseudo id (root), and a QA issue is rise "host contamination". BB-must-fix Change-Id: I65c61cf1f5318b9cb9afe942da662863389f28b9 Signed-off-by: Ronan Signed-off-by: Stephane Desneux --- meta-app-framework/classes/aglwgt.bbclass | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'meta-app-framework/classes') diff --git a/meta-app-framework/classes/aglwgt.bbclass b/meta-app-framework/classes/aglwgt.bbclass index 97fb6ff8d..94f75f2a7 100644 --- a/meta-app-framework/classes/aglwgt.bbclass +++ b/meta-app-framework/classes/aglwgt.bbclass @@ -26,6 +26,10 @@ do_aglwgt_package() { ) } +python () { + d.setVarFlag('do_aglwgt_deploy', 'fakeroot', '1') +} + do_aglwgt_deploy() { install -d ${D}/usr/AGL/apps install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/ -- cgit 1.2.3-korg From 3051f4733706d78b31356cd8c3464f25613996eb Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Wed, 15 Feb 2017 17:02:52 +0100 Subject: Allowed wgt app to auto-install at the first boot * link to gerrit review 8467 (meta-agl) Change-Id: I87832b52dde60134908d29261ca8f8049338e815 Signed-off-by: Ronan Le Martret Signed-off-by: Stephane Desneux --- meta-app-framework/classes/aglwgt.bbclass | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'meta-app-framework/classes') diff --git a/meta-app-framework/classes/aglwgt.bbclass b/meta-app-framework/classes/aglwgt.bbclass index 94f75f2a7..14f00a74c 100644 --- a/meta-app-framework/classes/aglwgt.bbclass +++ b/meta-app-framework/classes/aglwgt.bbclass @@ -30,12 +30,32 @@ python () { d.setVarFlag('do_aglwgt_deploy', 'fakeroot', '1') } + +POST_INSTALL_LEVEL ?= "10" +POST_INSTALL_SCRIPT ?= "${POST_INSTALL_LEVEL}-${PN}.sh" + +EXTRA_WGT_POSTINSTALL ?= "" + do_aglwgt_deploy() { - install -d ${D}/usr/AGL/apps - install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/ + install -d ${D}/usr/AGL/apps + install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/ + APP_FILES="" + for file in ${D}/usr/AGL/apps/*.wgt;do + APP_FILES+=" "$(basename $file); + done + install -d ${D}/${sysconfdir}/agl-postinsts + cat > ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} < Date: Fri, 17 Feb 2017 14:35:31 +0100 Subject: aglwgt.bbclass: fix bashism Depending on the host shell, the class may fail due to specific bash syntax. Change-Id: I59938b009b27e8fbdc533e8b58c80a36864723bb Signed-off-by: Stephane Desneux --- meta-app-framework/classes/aglwgt.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta-app-framework/classes') diff --git a/meta-app-framework/classes/aglwgt.bbclass b/meta-app-framework/classes/aglwgt.bbclass index 14f00a74c..afe9a5516 100644 --- a/meta-app-framework/classes/aglwgt.bbclass +++ b/meta-app-framework/classes/aglwgt.bbclass @@ -41,7 +41,7 @@ do_aglwgt_deploy() { install -m 0644 ${B}/package/*.wgt ${D}/usr/AGL/apps/ APP_FILES="" for file in ${D}/usr/AGL/apps/*.wgt;do - APP_FILES+=" "$(basename $file); + APP_FILES="${APP_FILES} $(basename $file)"; done install -d ${D}/${sysconfdir}/agl-postinsts cat > ${D}/${sysconfdir}/agl-postinsts/${POST_INSTALL_SCRIPT} <