From 8a4a59f9cbab1d43f07f1ff1c2c965202e36dc08 Mon Sep 17 00:00:00 2001 From: Jose Bollo Date: Mon, 10 Sep 2018 14:13:41 +0200 Subject: af-main & af-binder: Set version from AGLVERSION Change-Id: Ie1ff83f007d9d8d819829540d51e576f088c97eb Signed-off-by: Jose Bollo --- .../af-binder/af-binder-devtools-native_1.0.bb | 8 -- .../af-binder/af-binder-devtools-native_git.bb | 8 ++ .../recipes-core/af-binder/af-binder_1.0.bb | 92 -------------- .../recipes-core/af-binder/af-binder_1.0.inc | 17 --- .../recipes-core/af-binder/af-binder_git.bb | 92 ++++++++++++++ .../recipes-core/af-binder/af-binder_git.inc | 22 ++++ .../af-binder/nativesdk-af-binder-devtools_1.0.bb | 8 -- .../af-binder/nativesdk-af-binder-devtools_git.bb | 8 ++ .../recipes-core/af-main/af-main_1.0.bb | 130 -------------------- .../recipes-core/af-main/af-main_1.0.inc | 25 ---- .../recipes-core/af-main/af-main_git.bb | 132 +++++++++++++++++++++ .../recipes-core/af-main/af-main_git.inc | 25 ++++ .../recipes-core/af-main/nativesdk-af-main_1.0.bb | 26 ---- .../recipes-core/af-main/nativesdk-af-main_git.bb | 27 +++++ 14 files changed, 314 insertions(+), 306 deletions(-) delete mode 100644 meta-app-framework/recipes-core/af-binder/af-binder-devtools-native_1.0.bb create mode 100644 meta-app-framework/recipes-core/af-binder/af-binder-devtools-native_git.bb delete mode 100644 meta-app-framework/recipes-core/af-binder/af-binder_1.0.bb delete mode 100644 meta-app-framework/recipes-core/af-binder/af-binder_1.0.inc create mode 100644 meta-app-framework/recipes-core/af-binder/af-binder_git.bb create mode 100644 meta-app-framework/recipes-core/af-binder/af-binder_git.inc delete mode 100644 meta-app-framework/recipes-core/af-binder/nativesdk-af-binder-devtools_1.0.bb create mode 100644 meta-app-framework/recipes-core/af-binder/nativesdk-af-binder-devtools_git.bb delete mode 100644 meta-app-framework/recipes-core/af-main/af-main_1.0.bb delete mode 100644 meta-app-framework/recipes-core/af-main/af-main_1.0.inc create mode 100644 meta-app-framework/recipes-core/af-main/af-main_git.bb create mode 100644 meta-app-framework/recipes-core/af-main/af-main_git.inc delete mode 100644 meta-app-framework/recipes-core/af-main/nativesdk-af-main_1.0.bb create mode 100644 meta-app-framework/recipes-core/af-main/nativesdk-af-main_git.bb (limited to 'meta-app-framework/recipes-core') diff --git a/meta-app-framework/recipes-core/af-binder/af-binder-devtools-native_1.0.bb b/meta-app-framework/recipes-core/af-binder/af-binder-devtools-native_1.0.bb deleted file mode 100644 index 70dafb38c..000000000 --- a/meta-app-framework/recipes-core/af-binder/af-binder-devtools-native_1.0.bb +++ /dev/null @@ -1,8 +0,0 @@ -require af-binder_${PV}.inc - -DEPENDS = "json-c-native" - -inherit cmake pkgconfig native - -EXTRA_OECMAKE_append = " -DONLY_DEVTOOLS=TRUE" - diff --git a/meta-app-framework/recipes-core/af-binder/af-binder-devtools-native_git.bb b/meta-app-framework/recipes-core/af-binder/af-binder-devtools-native_git.bb new file mode 100644 index 000000000..70dafb38c --- /dev/null +++ b/meta-app-framework/recipes-core/af-binder/af-binder-devtools-native_git.bb @@ -0,0 +1,8 @@ +require af-binder_${PV}.inc + +DEPENDS = "json-c-native" + +inherit cmake pkgconfig native + +EXTRA_OECMAKE_append = " -DONLY_DEVTOOLS=TRUE" + diff --git a/meta-app-framework/recipes-core/af-binder/af-binder_1.0.bb b/meta-app-framework/recipes-core/af-binder/af-binder_1.0.bb deleted file mode 100644 index 91f26b894..000000000 --- a/meta-app-framework/recipes-core/af-binder/af-binder_1.0.bb +++ /dev/null @@ -1,92 +0,0 @@ -require af-binder_${PV}.inc - -DEPENDS = "file json-c libmicrohttpd systemd util-linux openssl cynara" - -inherit cmake pkgconfig - -EXTRA_OECMAKE_append_class-target = "\ - -DUNITDIR_SYSTEM=${systemd_system_unitdir} \ -" - -EXTRA_OECMAKE_append_agl-devel = " \ - -DAGL_DEVEL=ON \ - -DINCLUDE_MONITORING=ON \ - -DINCLUDE_SUPERVISOR=ON -DAFS_SURPERVISION_SOCKET=/run/platform/supervisor \ -" - -pkg_postinst_${PN}() { - mkdir -p "$D${libdir}/afb" -} - -do_install_append_agl-devel_class-target() { - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d -m 0755 ${D}${systemd_system_unitdir}/multi-user.target.wants - ln -s ../afs-supervisor.service ${D}${systemd_system_unitdir}/multi-user.target.wants/afs-supervisor.service - fi -} - -############################################# -# setup package -############################################# -PACKAGES =+ "${PN}-tools ${PN}-devtools ${PN}-meta" - -FILES_${PN} += "${datadir}" - -FILES_${PN}_append_agl-devel = " ${libdir}/afb/monitoring ${systemd_system_unitdir}" - -ALLOW_EMPTY_${PN}-meta = "1" - -FILES_${PN}-tools = "\ - ${bindir}/afb-client-demo \ -" - -FILES_${PN}-devtools = "\ - ${bindir}/afb-exprefs \ - ${bindir}/afb-json2c \ - ${bindir}/afb-genskel \ -" - -RDEPENDS_${PN}-dev += "libafbwsc-dev" - -############################################# -# setup sample binding packages -############################################# -PACKAGES_DYNAMIC = "${PN}-binding-*" - -python populate_packages_prepend () { - afb_libdir = d.expand('${libdir}/afb') - postinst = d.getVar('binding_postinst', True) - pkgs = [] - pkgs_dbg = [] - - pkgs += do_split_packages(d, afb_libdir, '(.*)-api\.so$', d.expand('${PN}-binding-%s'), 'AFB binding for %s', postinst=postinst, extra_depends=d.expand('${PN}')) - pkgs += do_split_packages(d, afb_libdir, '(.*(?!-api))\.so$', d.expand('${PN}-binding-%s'), 'AFB binding for %s', postinst=postinst, extra_depends=d.expand('${PN}')) - - pkgs_dbg += do_split_packages(d, oe.path.join(afb_libdir, ".debug"), '(.*)-api\.so$', d.expand('${PN}-binding-%s-dbg'), 'AFB binding for %s, debug info', postinst=postinst, extra_depends=d.expand('${PN}')) - pkgs_dbg += do_split_packages(d, oe.path.join(afb_libdir, ".debug"), '(.*(?!-api))\.so$', d.expand('${PN}-binding-%s-dbg'), 'AFB binding for %s, debug info', postinst=postinst, extra_depends=d.expand('${PN}')) - - metapkg = d.getVar('PN', True) + '-meta' - d.setVar('RDEPENDS_' + metapkg, ' '.join(pkgs)) -} - -############################################# -# setup libafbwsc package -############################################# -PACKAGES =+ "libafbwsc libafbwsc-dev libafbwsc-dbg" - -FILES_libafbwsc = "\ - ${libdir}/libafbwsc.so.* \ -" -FILES_libafbwsc-dev = "\ - ${includedir}/afb/afb-wsj1.h \ - ${includedir}/afb/afb-ws-client.h \ - ${libdir}/libafbwsc.so \ - ${libdir}/pkgconfig/libafbwsc.pc \ -" -FILES_libafbwsc-dbg = "\ - ${libdir}/.debug/libafbwsc.so.* \ - ${bindir}/.debug/afb-client-demo \ -" -RDEPENDS_libafbwsc-dbg += "${PN}-dbg libafbwsc-dev" - - diff --git a/meta-app-framework/recipes-core/af-binder/af-binder_1.0.inc b/meta-app-framework/recipes-core/af-binder/af-binder_1.0.inc deleted file mode 100644 index cca794db7..000000000 --- a/meta-app-framework/recipes-core/af-binder/af-binder_1.0.inc +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "HTTP REST interface to automotive backends for HTML5 UI support" -DESCRIPTION = "Automotive-Framework-Binder Daemon provides a HTTP REST \ -interface to various automotive-oriented bindings, \ -allowing HTML5 UIs to send platform-specific requests in a secure way." - -HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/app-framework-binder" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/app-framework-binder;protocol=https;branch=${AGL_BRANCH}" - -SRCREV = "29f544ba5fa53407575b549c1d3b0a4e2619af8f" -PV = "${AGL_BRANCH}+git${SRCPV}" - -S = "${WORKDIR}/git" - -CFLAGS_append_agl-devel = " -DAGL_DEVEL" diff --git a/meta-app-framework/recipes-core/af-binder/af-binder_git.bb b/meta-app-framework/recipes-core/af-binder/af-binder_git.bb new file mode 100644 index 000000000..91f26b894 --- /dev/null +++ b/meta-app-framework/recipes-core/af-binder/af-binder_git.bb @@ -0,0 +1,92 @@ +require af-binder_${PV}.inc + +DEPENDS = "file json-c libmicrohttpd systemd util-linux openssl cynara" + +inherit cmake pkgconfig + +EXTRA_OECMAKE_append_class-target = "\ + -DUNITDIR_SYSTEM=${systemd_system_unitdir} \ +" + +EXTRA_OECMAKE_append_agl-devel = " \ + -DAGL_DEVEL=ON \ + -DINCLUDE_MONITORING=ON \ + -DINCLUDE_SUPERVISOR=ON -DAFS_SURPERVISION_SOCKET=/run/platform/supervisor \ +" + +pkg_postinst_${PN}() { + mkdir -p "$D${libdir}/afb" +} + +do_install_append_agl-devel_class-target() { + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d -m 0755 ${D}${systemd_system_unitdir}/multi-user.target.wants + ln -s ../afs-supervisor.service ${D}${systemd_system_unitdir}/multi-user.target.wants/afs-supervisor.service + fi +} + +############################################# +# setup package +############################################# +PACKAGES =+ "${PN}-tools ${PN}-devtools ${PN}-meta" + +FILES_${PN} += "${datadir}" + +FILES_${PN}_append_agl-devel = " ${libdir}/afb/monitoring ${systemd_system_unitdir}" + +ALLOW_EMPTY_${PN}-meta = "1" + +FILES_${PN}-tools = "\ + ${bindir}/afb-client-demo \ +" + +FILES_${PN}-devtools = "\ + ${bindir}/afb-exprefs \ + ${bindir}/afb-json2c \ + ${bindir}/afb-genskel \ +" + +RDEPENDS_${PN}-dev += "libafbwsc-dev" + +############################################# +# setup sample binding packages +############################################# +PACKAGES_DYNAMIC = "${PN}-binding-*" + +python populate_packages_prepend () { + afb_libdir = d.expand('${libdir}/afb') + postinst = d.getVar('binding_postinst', True) + pkgs = [] + pkgs_dbg = [] + + pkgs += do_split_packages(d, afb_libdir, '(.*)-api\.so$', d.expand('${PN}-binding-%s'), 'AFB binding for %s', postinst=postinst, extra_depends=d.expand('${PN}')) + pkgs += do_split_packages(d, afb_libdir, '(.*(?!-api))\.so$', d.expand('${PN}-binding-%s'), 'AFB binding for %s', postinst=postinst, extra_depends=d.expand('${PN}')) + + pkgs_dbg += do_split_packages(d, oe.path.join(afb_libdir, ".debug"), '(.*)-api\.so$', d.expand('${PN}-binding-%s-dbg'), 'AFB binding for %s, debug info', postinst=postinst, extra_depends=d.expand('${PN}')) + pkgs_dbg += do_split_packages(d, oe.path.join(afb_libdir, ".debug"), '(.*(?!-api))\.so$', d.expand('${PN}-binding-%s-dbg'), 'AFB binding for %s, debug info', postinst=postinst, extra_depends=d.expand('${PN}')) + + metapkg = d.getVar('PN', True) + '-meta' + d.setVar('RDEPENDS_' + metapkg, ' '.join(pkgs)) +} + +############################################# +# setup libafbwsc package +############################################# +PACKAGES =+ "libafbwsc libafbwsc-dev libafbwsc-dbg" + +FILES_libafbwsc = "\ + ${libdir}/libafbwsc.so.* \ +" +FILES_libafbwsc-dev = "\ + ${includedir}/afb/afb-wsj1.h \ + ${includedir}/afb/afb-ws-client.h \ + ${libdir}/libafbwsc.so \ + ${libdir}/pkgconfig/libafbwsc.pc \ +" +FILES_libafbwsc-dbg = "\ + ${libdir}/.debug/libafbwsc.so.* \ + ${bindir}/.debug/afb-client-demo \ +" +RDEPENDS_libafbwsc-dbg += "${PN}-dbg libafbwsc-dev" + + diff --git a/meta-app-framework/recipes-core/af-binder/af-binder_git.inc b/meta-app-framework/recipes-core/af-binder/af-binder_git.inc new file mode 100644 index 000000000..635da5b92 --- /dev/null +++ b/meta-app-framework/recipes-core/af-binder/af-binder_git.inc @@ -0,0 +1,22 @@ +SUMMARY = "HTTP REST interface to automotive backends for HTML5 UI support" +DESCRIPTION = "Automotive-Framework-Binder Daemon provides a HTTP REST \ +interface to various automotive-oriented bindings, \ +allowing HTML5 UIs to send platform-specific requests in a secure way." + +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/app-framework-binder" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/app-framework-binder;protocol=https;branch=${AGL_BRANCH}" + +SRCREV = "29f544ba5fa53407575b549c1d3b0a4e2619af8f" +PV = "${AGL_BRANCH}+git${SRCPV}" + +S = "${WORKDIR}/git" + +CFLAGS_append_agl-devel = " -DAGL_DEVEL" + +EXTRA_OECMAKE_append = "\ + -DAGLVERSION=${AGLVERSION} \ +" + diff --git a/meta-app-framework/recipes-core/af-binder/nativesdk-af-binder-devtools_1.0.bb b/meta-app-framework/recipes-core/af-binder/nativesdk-af-binder-devtools_1.0.bb deleted file mode 100644 index 3223dd05d..000000000 --- a/meta-app-framework/recipes-core/af-binder/nativesdk-af-binder-devtools_1.0.bb +++ /dev/null @@ -1,8 +0,0 @@ -require af-binder_${PV}.inc - -DEPENDS = "nativesdk-json-c" - -inherit cmake pkgconfig nativesdk - -EXTRA_OECMAKE_append = " -DONLY_DEVTOOLS=TRUE" - diff --git a/meta-app-framework/recipes-core/af-binder/nativesdk-af-binder-devtools_git.bb b/meta-app-framework/recipes-core/af-binder/nativesdk-af-binder-devtools_git.bb new file mode 100644 index 000000000..3223dd05d --- /dev/null +++ b/meta-app-framework/recipes-core/af-binder/nativesdk-af-binder-devtools_git.bb @@ -0,0 +1,8 @@ +require af-binder_${PV}.inc + +DEPENDS = "nativesdk-json-c" + +inherit cmake pkgconfig nativesdk + +EXTRA_OECMAKE_append = " -DONLY_DEVTOOLS=TRUE" + diff --git a/meta-app-framework/recipes-core/af-main/af-main_1.0.bb b/meta-app-framework/recipes-core/af-main/af-main_1.0.bb deleted file mode 100644 index 8e3b1e835..000000000 --- a/meta-app-framework/recipes-core/af-main/af-main_1.0.bb +++ /dev/null @@ -1,130 +0,0 @@ -require af-main_${PV}.inc - -# NOTE: using libcap-native and setcap in install doesn't work -# NOTE: maybe setting afm_name to agl-framework is cleaner but has implications -# NOTE: there is a hack of security for using groups and dbus (to be checked) -# NOTE: using ZIP programs creates directories with mode 777 (very bad) - -inherit cmake pkgconfig useradd systemd -BBCLASSEXTEND = "native" - -SECTION = "base" - -DEPENDS = "openssl libxml2 xmlsec1 systemd libzip json-c systemd security-manager af-binder" -DEPENDS_class-native = "openssl libxml2 xmlsec1 libzip json-c" -RDEPENDS_${PN}_class-target += "af-binder-tools" - -PACKAGE_WRITE_DEPS_append_with-lsm-smack = " smack-native libcap-native" - -EXTRA_OECMAKE_class-native = "\ - -DUSE_LIBZIP=1 \ - -DUSE_SIMULATION=1 \ - -DUSE_SDK=1 \ - -Dafm_name=${afm_name} \ - -Dafm_confdir=${afm_confdir} \ - -Dafm_datadir=${afm_datadir} \ -" - -EXTRA_OECMAKE = "\ - -DUSE_LIBZIP=1 \ - -DUSE_SIMULATION=0 \ - -DUSE_SDK=0 \ - -Dafm_name=${afm_name} \ - -Dafm_confdir=${afm_confdir} \ - -Dafm_datadir=${afm_datadir} \ - -Dsystemd_units_root=${systemd_units_root} \ - -DUNITDIR_USER=${systemd_user_unitdir} \ - -DUNITDIR_SYSTEM=${systemd_system_unitdir} \ -" - -# ------------------------ WARNING WARNING WARNNING --------------------------- -# -# ATM (FF.rc2), forcing all apps to be signed is an issue when building without -# agl-devel feature. A workaround is to define ALLOW_NO_SIGNATURE=ON for all -# builds but this must be removed later. See SPEC-1614 for more details. -# -# A variable AGL_FORBID_UNSIGNED_APPS is introduced to enable/disable this -# workaround in local.conf and allow transition to signed apps: -# * forbid unsigned apps by setting: AGL_FORBID_UNSIGNED_APPS="1" -# * [DEFAULT] allow unsigned apps: do nothing (or set: AGL_FORBID_UNSIGNED_APPS="0") -AGL_FORBID_UNSIGNED_APPS ?= "0" -# -# WORKAROUND: -EXTRA_OECMAKE_append_agl-devel = " -DAGL_DEVEL=1" -EXTRA_OECMAKE_append = " ${@bb.utils.contains('AGL_FORBID_UNSIGNED_APPS','1','','-DALLOW_NO_SIGNATURE=ON', d)}" -# -# Correct version (IMPORTANT TODO: to be restored later): -#EXTRA_OECMAKE_append_agl-devel = " -DAGL_DEVEL=1 -DALLOW_NO_SIGNATURE=ON" -# -# ------------------------ WARNING WARNING WARNNING --------------------------- - - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "-g ${afm_name} -d ${afm_datadir} -r ${afm_name}" -GROUPADD_PARAM_${PN} = "-r ${afm_name}" - -FILES_${PN} += "\ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/afm-user-daemon.service', '', d)} \ -" -RDEPENDS_${PN}_append_with-lsm-smack = " smack bash" -DEPENDS_append_with-lsm-smack = " smack-native" - -# short hacks here -SRC_URI += "\ - file://Hack-to-allow-the-debugging.patch \ -" - -do_install_append_class-target() { - install -d ${D}${bindir} - install -d -m 0775 ${D}${systemd_units_root}/system - install -d -m 0775 "${D}${systemd_units_root}/system/afm-user-session@.target.wants" - install -d -m 0775 ${D}${systemd_units_root}/user - install -d -m 0775 ${D}${systemd_units_root}/user/default.target.wants - install -d -m 0775 ${D}${systemd_units_root}/user/sockets.target.wants - install -d ${D}${afm_datadir}/applications - install -d ${D}${afm_datadir}/icons - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d -m 0755 ${D}${systemd_user_unitdir}/default.target.wants - ln -s ../afm-user-daemon.service ${D}${systemd_user_unitdir}/default.target.wants/afm-user-daemon.service - ln -s ../afm-user-session.service ${D}${systemd_user_unitdir}/default.target.wants/afm-user-session.service - install -d -m 0755 ${D}${systemd_system_unitdir}/multi-user.target.wants - install -d -m 0755 ${D}${systemd_system_unitdir}/sockets.target.wants - ln -sf ../afm-system-setup.service ${D}${systemd_system_unitdir}/multi-user.target.wants/afm-system-setup.service - ln -sf ../afm-system-daemon.service ${D}${systemd_system_unitdir}/multi-user.target.wants/afm-system-daemon.service - ln -sf ../afm-system-daemon.socket ${D}${systemd_system_unitdir}/sockets.target.wants/afm-system-daemon.socket - fi - echo "QT_WAYLAND_SHELL_INTEGRATION=ivi-shell" > ${D}${afm_confdir}/unit.env.d/qt-for-ivi-shell -} - -pkg_postinst_${PN}() { - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - chgrp ${afm_name} $D${systemd_units_root}/system - chgrp ${afm_name} $D${systemd_units_root}/system/afm-user-session@.target.wants - chgrp ${afm_name} $D${systemd_units_root}/user/default.target.wants - chgrp ${afm_name} $D${systemd_units_root}/user/sockets.target.wants - fi - chown ${afm_name}:${afm_name} $D${afm_datadir} - chown ${afm_name}:${afm_name} $D${afm_datadir}/applications - chown ${afm_name}:${afm_name} $D${afm_datadir}/icons -} - -pkg_postinst_${PN}_append_with-lsm-smack() { - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - chsmack -a 'System::Shared' -t $D${systemd_units_root}/system - chsmack -a 'System::Shared' -t $D${systemd_units_root}/system/afm-user-session@.target.wants - chsmack -a 'System::Shared' -t $D${systemd_units_root}/user/default.target.wants - chsmack -a 'System::Shared' -t $D${systemd_units_root}/user/sockets.target.wants - fi - chsmack -a 'System::Shared' -t $D${afm_datadir} - chsmack -a 'System::Shared' -t $D${afm_datadir}/applications - chsmack -a 'System::Shared' -t $D${afm_datadir}/icons -} -FILES_${PN} += "${systemd_units_root}/* ${systemd_system_unitdir} ${systemd_user_unitdir}" - -PACKAGES =+ "${PN}-binding ${PN}-binding-dbg" -FILES_${PN}-binding = " ${afb_binding_dir}/afm-main-binding.so " -FILES_${PN}-binding-dbg = " ${afb_binding_dir}/.debug/afm-main-binding.so " - -PACKAGES =+ "${PN}-tools ${PN}-tools-dbg" -FILES_${PN}-tools = "${bindir}/wgtpkg-*" -FILES_${PN}-tools-dbg = "${bindir}/.debug/wgtpkg-*" diff --git a/meta-app-framework/recipes-core/af-main/af-main_1.0.inc b/meta-app-framework/recipes-core/af-main/af-main_1.0.inc deleted file mode 100644 index 82489488e..000000000 --- a/meta-app-framework/recipes-core/af-main/af-main_1.0.inc +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "AGL Framework Main part" -DESCRIPTION = "\ -This is a core framework component for managing \ -applications, widgets, and components. \ -" - -HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/app-framework-main" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/app-framework-main;protocol=https;branch=${AGL_BRANCH}" - -SRCREV = "c152727a73c55782b6ffb65add51d03da5ff8e3b" -PV = "${AGL_BRANCH}+git${SRCPV}" - -S = "${WORKDIR}/git" - -afm_name = "afm" -afm_confdir = "${sysconfdir}/${afm_name}" -afm_datadir = "/var/local/lib/${afm_name}" -afb_binding_dir = "${libdir}/afb" -systemd_units_root = "/var/local/lib/systemd" - -CFLAGS_append_agl-devel = " -DAGL_DEVEL" - diff --git a/meta-app-framework/recipes-core/af-main/af-main_git.bb b/meta-app-framework/recipes-core/af-main/af-main_git.bb new file mode 100644 index 000000000..041816289 --- /dev/null +++ b/meta-app-framework/recipes-core/af-main/af-main_git.bb @@ -0,0 +1,132 @@ +require af-main_${PV}.inc + +# NOTE: using libcap-native and setcap in install doesn't work +# NOTE: maybe setting afm_name to agl-framework is cleaner but has implications +# NOTE: there is a hack of security for using groups and dbus (to be checked) +# NOTE: using ZIP programs creates directories with mode 777 (very bad) + +inherit cmake pkgconfig useradd systemd +BBCLASSEXTEND = "native" + +SECTION = "base" + +DEPENDS = "openssl libxml2 xmlsec1 systemd libzip json-c systemd security-manager af-binder" +DEPENDS_class-native = "openssl libxml2 xmlsec1 libzip json-c" +RDEPENDS_${PN}_class-target += "af-binder-tools" + +PACKAGE_WRITE_DEPS_append_with-lsm-smack = " smack-native libcap-native" + +EXTRA_OECMAKE_class-native = "\ + -DUSE_LIBZIP=1 \ + -DUSE_SIMULATION=1 \ + -DUSE_SDK=1 \ + -DAGLVERSION=${AGLVERSION} \ + -Dafm_name=${afm_name} \ + -Dafm_confdir=${afm_confdir} \ + -Dafm_datadir=${afm_datadir} \ +" + +EXTRA_OECMAKE = "\ + -DUSE_LIBZIP=1 \ + -DUSE_SIMULATION=0 \ + -DUSE_SDK=0 \ + -DAGLVERSION=${AGLVERSION} \ + -Dafm_name=${afm_name} \ + -Dafm_confdir=${afm_confdir} \ + -Dafm_datadir=${afm_datadir} \ + -Dsystemd_units_root=${systemd_units_root} \ + -DUNITDIR_USER=${systemd_user_unitdir} \ + -DUNITDIR_SYSTEM=${systemd_system_unitdir} \ +" + +# ------------------------ WARNING WARNING WARNNING --------------------------- +# +# ATM (FF.rc2), forcing all apps to be signed is an issue when building without +# agl-devel feature. A workaround is to define ALLOW_NO_SIGNATURE=ON for all +# builds but this must be removed later. See SPEC-1614 for more details. +# +# A variable AGL_FORBID_UNSIGNED_APPS is introduced to enable/disable this +# workaround in local.conf and allow transition to signed apps: +# * forbid unsigned apps by setting: AGL_FORBID_UNSIGNED_APPS="1" +# * [DEFAULT] allow unsigned apps: do nothing (or set: AGL_FORBID_UNSIGNED_APPS="0") +AGL_FORBID_UNSIGNED_APPS ?= "0" +# +# WORKAROUND: +EXTRA_OECMAKE_append_agl-devel = " -DAGL_DEVEL=1" +EXTRA_OECMAKE_append = " ${@bb.utils.contains('AGL_FORBID_UNSIGNED_APPS','1','','-DALLOW_NO_SIGNATURE=ON', d)}" +# +# Correct version (IMPORTANT TODO: to be restored later): +#EXTRA_OECMAKE_append_agl-devel = " -DAGL_DEVEL=1 -DALLOW_NO_SIGNATURE=ON" +# +# ------------------------ WARNING WARNING WARNNING --------------------------- + + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "-g ${afm_name} -d ${afm_datadir} -r ${afm_name}" +GROUPADD_PARAM_${PN} = "-r ${afm_name}" + +FILES_${PN} += "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_user_unitdir}/afm-user-daemon.service', '', d)} \ +" +RDEPENDS_${PN}_append_with-lsm-smack = " smack bash" +DEPENDS_append_with-lsm-smack = " smack-native" + +# short hacks here +SRC_URI += "\ + file://Hack-to-allow-the-debugging.patch \ +" + +do_install_append_class-target() { + install -d ${D}${bindir} + install -d -m 0775 ${D}${systemd_units_root}/system + install -d -m 0775 "${D}${systemd_units_root}/system/afm-user-session@.target.wants" + install -d -m 0775 ${D}${systemd_units_root}/user + install -d -m 0775 ${D}${systemd_units_root}/user/default.target.wants + install -d -m 0775 ${D}${systemd_units_root}/user/sockets.target.wants + install -d ${D}${afm_datadir}/applications + install -d ${D}${afm_datadir}/icons + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d -m 0755 ${D}${systemd_user_unitdir}/default.target.wants + ln -s ../afm-user-daemon.service ${D}${systemd_user_unitdir}/default.target.wants/afm-user-daemon.service + ln -s ../afm-user-session.service ${D}${systemd_user_unitdir}/default.target.wants/afm-user-session.service + install -d -m 0755 ${D}${systemd_system_unitdir}/multi-user.target.wants + install -d -m 0755 ${D}${systemd_system_unitdir}/sockets.target.wants + ln -sf ../afm-system-setup.service ${D}${systemd_system_unitdir}/multi-user.target.wants/afm-system-setup.service + ln -sf ../afm-system-daemon.service ${D}${systemd_system_unitdir}/multi-user.target.wants/afm-system-daemon.service + ln -sf ../afm-system-daemon.socket ${D}${systemd_system_unitdir}/sockets.target.wants/afm-system-daemon.socket + fi + echo "QT_WAYLAND_SHELL_INTEGRATION=ivi-shell" > ${D}${afm_confdir}/unit.env.d/qt-for-ivi-shell +} + +pkg_postinst_${PN}() { + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + chgrp ${afm_name} $D${systemd_units_root}/system + chgrp ${afm_name} $D${systemd_units_root}/system/afm-user-session@.target.wants + chgrp ${afm_name} $D${systemd_units_root}/user/default.target.wants + chgrp ${afm_name} $D${systemd_units_root}/user/sockets.target.wants + fi + chown ${afm_name}:${afm_name} $D${afm_datadir} + chown ${afm_name}:${afm_name} $D${afm_datadir}/applications + chown ${afm_name}:${afm_name} $D${afm_datadir}/icons +} + +pkg_postinst_${PN}_append_with-lsm-smack() { + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + chsmack -a 'System::Shared' -t $D${systemd_units_root}/system + chsmack -a 'System::Shared' -t $D${systemd_units_root}/system/afm-user-session@.target.wants + chsmack -a 'System::Shared' -t $D${systemd_units_root}/user/default.target.wants + chsmack -a 'System::Shared' -t $D${systemd_units_root}/user/sockets.target.wants + fi + chsmack -a 'System::Shared' -t $D${afm_datadir} + chsmack -a 'System::Shared' -t $D${afm_datadir}/applications + chsmack -a 'System::Shared' -t $D${afm_datadir}/icons +} +FILES_${PN} += "${systemd_units_root}/* ${systemd_system_unitdir} ${systemd_user_unitdir}" + +PACKAGES =+ "${PN}-binding ${PN}-binding-dbg" +FILES_${PN}-binding = " ${afb_binding_dir}/afm-main-binding.so " +FILES_${PN}-binding-dbg = " ${afb_binding_dir}/.debug/afm-main-binding.so " + +PACKAGES =+ "${PN}-tools ${PN}-tools-dbg" +FILES_${PN}-tools = "${bindir}/wgtpkg-*" +FILES_${PN}-tools-dbg = "${bindir}/.debug/wgtpkg-*" diff --git a/meta-app-framework/recipes-core/af-main/af-main_git.inc b/meta-app-framework/recipes-core/af-main/af-main_git.inc new file mode 100644 index 000000000..82489488e --- /dev/null +++ b/meta-app-framework/recipes-core/af-main/af-main_git.inc @@ -0,0 +1,25 @@ +SUMMARY = "AGL Framework Main part" +DESCRIPTION = "\ +This is a core framework component for managing \ +applications, widgets, and components. \ +" + +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/app-framework-main" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/app-framework-main;protocol=https;branch=${AGL_BRANCH}" + +SRCREV = "c152727a73c55782b6ffb65add51d03da5ff8e3b" +PV = "${AGL_BRANCH}+git${SRCPV}" + +S = "${WORKDIR}/git" + +afm_name = "afm" +afm_confdir = "${sysconfdir}/${afm_name}" +afm_datadir = "/var/local/lib/${afm_name}" +afb_binding_dir = "${libdir}/afb" +systemd_units_root = "/var/local/lib/systemd" + +CFLAGS_append_agl-devel = " -DAGL_DEVEL" + diff --git a/meta-app-framework/recipes-core/af-main/nativesdk-af-main_1.0.bb b/meta-app-framework/recipes-core/af-main/nativesdk-af-main_1.0.bb deleted file mode 100644 index 8d044345f..000000000 --- a/meta-app-framework/recipes-core/af-main/nativesdk-af-main_1.0.bb +++ /dev/null @@ -1,26 +0,0 @@ -require af-main_${PV}.inc - -inherit nativesdk cmake pkgconfig - -SECTION = "base" - -DEPENDS = "nativesdk-openssl nativesdk-libxml2 nativesdk-xmlsec1 nativesdk-libzip nativesdk-json-c" - -EXTRA_OECMAKE = "\ - -DUSE_LIBZIP=1 \ - -DUSE_SIMULATION=1 \ - -DUSE_SDK=1 \ - -Dafm_name=${afm_name} \ - -Dafm_confdir=${afm_confdir} \ - -Dafm_datadir=${afm_datadir} \ -" - -do_install_append() { - # remove unused .pc file we don't want to package - rm -rf ${D}/${libdir} -} - -PACKAGES = "${PN}-tools ${PN}-tools-dbg" -FILES_${PN}-tools = "${bindir}/wgtpkg-* ${afm_confdir}/*" -FILES_${PN}-tools-dbg = "${bindir}/.debug/wgtpkg-*" - diff --git a/meta-app-framework/recipes-core/af-main/nativesdk-af-main_git.bb b/meta-app-framework/recipes-core/af-main/nativesdk-af-main_git.bb new file mode 100644 index 000000000..759c893c7 --- /dev/null +++ b/meta-app-framework/recipes-core/af-main/nativesdk-af-main_git.bb @@ -0,0 +1,27 @@ +require af-main_${PV}.inc + +inherit nativesdk cmake pkgconfig + +SECTION = "base" + +DEPENDS = "nativesdk-openssl nativesdk-libxml2 nativesdk-xmlsec1 nativesdk-libzip nativesdk-json-c" + +EXTRA_OECMAKE = "\ + -DUSE_LIBZIP=1 \ + -DUSE_SIMULATION=1 \ + -DUSE_SDK=1 \ + -DAGLVERSION=${AGLVERSION} \ + -Dafm_name=${afm_name} \ + -Dafm_confdir=${afm_confdir} \ + -Dafm_datadir=${afm_datadir} \ +" + +do_install_append() { + # remove unused .pc file we don't want to package + rm -rf ${D}/${libdir} +} + +PACKAGES = "${PN}-tools ${PN}-tools-dbg" +FILES_${PN}-tools = "${bindir}/wgtpkg-* ${afm_confdir}/*" +FILES_${PN}-tools-dbg = "${bindir}/.debug/wgtpkg-*" + -- cgit 1.2.3-korg