summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2018-04-26 09:23:02 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2019-03-24 11:13:28 +0100
commite45f3d305e25ff2aef9e42697e583e6f69a9b6e6 (patch)
tree0bf698ed62d258d6e05d5a3129dea2e52b2d2121 /meta
parentc44fc9b620f762ce68441f834e1a157288a488e6 (diff)
downloadopenembedded-core-contrib-e45f3d305e25ff2aef9e42697e583e6f69a9b6e6.tar.gz
meta-webosose: import recipes which often reproduce Yocto #12434
* just temporary to make it easier to reproduce, import big part of meta-webosose and some recipes from meta-oe * luna-init: /luna-init-fonts/usr/share/fonts/PreludeCompWGL-Light.ttf is owned by uid 1001, which is the same as the user running bitbake. This may be due to host contamination * qml-webos-framework: /qml-webos-framework/usr/share/dbus-1/system-services/com.webos.qml-app.service is owned by uid 1101, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated] * to reproduce this you can try to use something like this: export COMP=luna-init; for i in `seq -w 1 999`; do echo $i; bitbake -v -v -DDDD -f -c package ${COMP} 2>${COMP}-logerr.$i >${COMP}-log.$i; bitbake -v -v -DDDD -f -c package_qa ${COMP} 2>${COMP}-logerr.qa.$i >${COMP}-log.qa.$i || { cp -ra BUILD/work/i586-oe-linux/${COMP}/ ${COMP}-workdir-$i; bitbake -c cleansstate ${COMP} ; } done export COMP=qml-webos-framework; for i in `seq -w 1 999`; do echo $i; bitbake -v -v -DDDD -f -c package ${COMP} 2>${COMP}-logerr.$i >${COMP}-log.$i; bitbake -v -v -DDDD -f -c package_qa ${COMP} 2>${COMP}-logerr.qa.$i >${COMP}-log.qa.$i || { cp -ra BUILD/work/i586-oe-linux/${COMP}/ ${COMP}-workdir-$i; bitbake -c cleansstate ${COMP} ; } done Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/webos_app_generate_security_files.bbclass179
-rw-r--r--meta/classes/webos_arch_indep.bbclass17
-rw-r--r--meta/classes/webos_autotools.bbclass10
-rw-r--r--meta/classes/webos_cmake.bbclass183
-rw-r--r--meta/classes/webos_component.bbclass13
-rw-r--r--meta/classes/webos_configure_manifest.bbclass330
-rw-r--r--meta/classes/webos_core_os_dep.bbclass8
-rw-r--r--meta/classes/webos_daemon.bbclass10
-rw-r--r--meta/classes/webos_distro_dep.bbclass10
-rw-r--r--meta/classes/webos_distro_variant_dep.bbclass23
-rw-r--r--meta/classes/webos_enhanced_submissions.bbclass309
-rw-r--r--meta/classes/webos_filesystem_paths.bbclass162
-rw-r--r--meta/classes/webos_fs_layout.bbclass15
-rw-r--r--meta/classes/webos_library.bbclass11
-rw-r--r--meta/classes/webos_lttng.bbclass21
-rw-r--r--meta/classes/webos_machine_dep.bbclass19
-rw-r--r--meta/classes/webos_machine_impl_dep.bbclass19
-rw-r--r--meta/classes/webos_pkgconfig.bbclass11
-rw-r--r--meta/classes/webos_pmlog_config.bbclass8
-rw-r--r--meta/classes/webos_prerelease_dep.bbclass7
-rw-r--r--meta/classes/webos_program.bbclass10
-rw-r--r--meta/classes/webos_public_repo.bbclass19
-rw-r--r--meta/classes/webos_qmake5.bbclass78
-rw-r--r--meta/classes/webos_qmllint.bbclass31
-rw-r--r--meta/classes/webos_submissions.bbclass36
-rw-r--r--meta/classes/webos_system_bus.bbclass100
-rw-r--r--meta/classes/webos_test_provider.bbclass45
-rw-r--r--meta/classes/webos_version.bbclass63
-rw-r--r--meta/conf/layer.conf2
-rw-r--r--meta/recipes-webos/cjson/cjson.bb30
-rw-r--r--meta/recipes-webos/cmake-modules-webos/cmake-modules-webos-native.bb57
-rw-r--r--meta/recipes-webos/cpushareholder-stub/cpushareholder-stub.bb22
-rw-r--r--meta/recipes-webos/gtest/gtest/0001-explicit-bool-cast.patch26
-rw-r--r--meta/recipes-webos/gtest/gtest/CMakeLists-gtest.pc.in-Add-pkg-config-support-to-gte.patch55
-rw-r--r--meta/recipes-webos/gtest/gtest/cmake-Add-install-command-for-libraries-and-headers.patch39
-rw-r--r--meta/recipes-webos/gtest/gtest_1.7.0.bb60
-rw-r--r--meta/recipes-webos/lemon/files/lemon.163
-rw-r--r--meta/recipes-webos/lemon/lemon.inc25
-rw-r--r--meta/recipes-webos/lemon/lemon_3.7.3.bb7
-rw-r--r--meta/recipes-webos/libpbnjson/libpbnjson.bb39
-rw-r--r--meta/recipes-webos/luna-init/luna-init.bb45
-rw-r--r--meta/recipes-webos/luna-prefs/luna-prefs-data.bb47
-rw-r--r--meta/recipes-webos/luna-prefs/luna-prefs.bb32
-rw-r--r--meta/recipes-webos/luna-service2-security-conf/luna-service2-security-conf.bb28
-rw-r--r--meta/recipes-webos/luna-service2/luna-service2.bb60
-rw-r--r--meta/recipes-webos/nyx-lib/nyx-lib.bb32
-rw-r--r--meta/recipes-webos/nyx-utils/nyx-utils.bb23
-rw-r--r--meta/recipes-webos/pmloglib/pmloglib-private.bb25
-rwxr-xr-xmeta/recipes-webos/pmloglib/pmloglib.bb30
-rw-r--r--meta/recipes-webos/python-tz/python-tz-native_2015.4.bb22
-rw-r--r--meta/recipes-webos/python-tz/python-tz/fix.for.tzdata-2015e.patch29
-rw-r--r--meta/recipes-webos/qml-webos-framework/qml-webos-framework.bb55
-rw-r--r--meta/recipes-webos/qt-features-webos/qt-features-webos.bb36
-rw-r--r--meta/recipes-webos/qt-features-webos/qt-features-webos/qt.patch76
-rw-r--r--meta/recipes-webos/qt5/qtwayland-native_git.bbappend28
-rw-r--r--meta/recipes-webos/qt5/qtwayland/qt.patch91
-rw-r--r--meta/recipes-webos/qt5/qtwayland/qt2.patch169
-rw-r--r--meta/recipes-webos/qt5/qtwayland/qt3.patch36
-rw-r--r--meta/recipes-webos/qt5/qtwayland_git.bbappend40
-rw-r--r--meta/recipes-webos/qtwayland-webos/qtwayland-webos.bb48
-rw-r--r--meta/recipes-webos/qtwayland-webos/qtwayland-webos/qt.patch57
-rw-r--r--meta/recipes-webos/rdxd/rdxd.bb33
-rw-r--r--meta/recipes-webos/uriparser/uriparser_0.8.0.bb19
-rw-r--r--meta/recipes-webos/webos-wayland-extensions/webos-wayland-extensions.bb22
-rw-r--r--meta/recipes-webos/yajl/yajl_2.1.0.bb18
65 files changed, 3272 insertions, 1 deletions
diff --git a/meta/classes/webos_app_generate_security_files.bbclass b/meta/classes/webos_app_generate_security_files.bbclass
new file mode 100644
index 0000000000..ac21866de1
--- /dev/null
+++ b/meta/classes/webos_app_generate_security_files.bbclass
@@ -0,0 +1,179 @@
+# Copyright (c) 2015-2017 LG Electronics, Inc.
+#
+# webos_app_generate_security_files
+#
+# This class is to be inherited by the recipe for every application that needs
+# to generate permission and role files from its appinfo.json.
+# This will happen implicitly, as all such applications will inherit from
+# webos_app, which inherits this class.
+#
+# Keep this code in sync with that in appinstalld that does the same thing
+# until [DRD-4417] is implemented.
+#
+
+inherit webos_system_bus
+
+WEBOS_SYSTEM_BUS_CONFIGURE_FILES ??= "TRUE"
+
+def webos_app_generate_security_files_write_permission_file(d, app_info):
+ import os
+ import json
+
+ app_id = app_info["id"]
+ key = app_id + "-*"
+ type = app_info["type"]
+
+ permission = {}
+
+ if "requiredPermissions" in app_info:
+ permission[key] = app_info["requiredPermissions"]
+ else:
+ permission[key] = []
+ pub_bus = False
+ prv_bus = False
+ trust_level = app_info.get("trustLevel", "default")
+ if trust_level == "default":
+ pub_bus = True
+ elif trust_level == "trusted":
+ pub_bus = True
+ prv_bus = True
+ elif trust_level == "netcast":
+ # According to https://wiki.lgsvl.com/display/webOSDocs/Security+Level+for+web+applications
+ # netcast level dosn't have access to public and private bus
+ pass
+ else:
+ bb.fatal("Unexpected trustLevel: " + trust_level)
+
+ if type == "web":
+ if "com.palm." in app_id or "com.webos." in app_id:
+ prv_bus = True
+ elif type == "qml":
+ prv_bus = True
+ pub_bus = True
+
+ if prv_bus:
+ permission[key].append("private")
+ pub_bus = True
+
+ if pub_bus:
+ permission[key].append("public")
+
+ dst_dir = d.getVar("D", True)
+ permissions_dir = d.getVar("webos_sysbus_permissionsdir", True)
+ permission_file = permissions_dir + "/" + app_id + ".app.json"
+
+ if not os.path.exists(dst_dir + permissions_dir):
+ os.makedirs(dst_dir + permissions_dir)
+
+ with open(dst_dir + permission_file, "w") as f:
+ json.dump(permission, f, indent=4)
+ f.write("\n")
+
+ return permission_file
+
+def webos_app_generate_security_files_write_role_file(d, app_info):
+ import os
+ import json
+
+ app_id = app_info["id"]
+
+ role = {}
+
+ role["appId"] = app_id
+ role["type"] = "regular"
+ role["allowedNames"] = [app_id + "-*"]
+ role["permissions"] = [{"service": app_id + "-*", "outbound": ["*"] }]
+
+ dst_dir = d.getVar("D", True)
+ roles_dir = d.getVar("webos_sysbus_rolesdir", True)
+ role_file = roles_dir + "/" + app_id + ".app.json"
+
+ if not os.path.exists(dst_dir + roles_dir):
+ os.makedirs(dst_dir + roles_dir)
+
+ with open(dst_dir + role_file, "w") as f:
+ json.dump(role, f, indent=4)
+ f.write("\n")
+
+ return role_file
+
+def webos_app_generate_security_files_get_immediate_subdirectories(root):
+ import os
+ return [name for name in os.listdir(root)
+ if os.path.isdir(os.path.join(root, name))]
+
+def webos_app_generate_security_files_comment_remover(text):
+ import re
+
+ def replacer(match):
+ s = match.group(0)
+ return "" if s.startswith('/') else s
+
+ pattern = re.compile(r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"',
+ re.DOTALL | re.MULTILINE
+ )
+ return re.sub(pattern, replacer, text)
+
+def webos_app_generate_security_files_read_json(file):
+ """ Read a JSON file with comments: //, /**/ """
+
+ import json
+
+ with open(file, "r") as f:
+ content = f.read()
+
+ content = webos_app_generate_security_files_comment_remover(content)
+ return json.loads(content)
+
+fakeroot python do_configure_security() {
+ import json
+ import os.path
+
+ if d.getVar("WEBOS_SYSTEM_BUS_CONFIGURE_FILES", True) != "TRUE":
+ return
+
+ dst_dir = d.getVar("D", True)
+ app_dir = dst_dir + d.getVar("webos_applicationsdir", True)
+
+ # ignore component that isn't app
+ if not os.path.exists(app_dir):
+ return
+
+ roles_dir = dst_dir + d.getVar("webos_sysbus_rolesdir", True)
+ pub_roles_dir = dst_dir + d.getVar("webos_sysbus_pubrolesdir", True)
+ prv_roles_dir = dst_dir + d.getVar("webos_sysbus_prvrolesdir", True)
+
+ apps = webos_app_generate_security_files_get_immediate_subdirectories(app_dir)
+
+ pkg_name = d.getVar("PN", True)
+ for app in apps:
+ app_info_file = app_dir + "/" + app + "/appinfo.json"
+
+ # ignore app that doesn't have appinfo.json
+ if not os.path.exists(app_info_file):
+ continue
+
+ # ignore app that already has role file
+ role_file = roles_dir + "/" + app + ".role.json"
+ if os.path.exists(role_file):
+ continue
+
+ # ignore app that already has public role file
+ pub_role_file = pub_roles_dir + "/" + app + ".json"
+ if os.path.exists(pub_role_file):
+ continue
+
+ # ignore app that already has private role file
+ prv_role_file = prv_roles_dir + "/" + app + ".json"
+ if os.path.exists(prv_role_file):
+ continue
+
+ app_info = webos_app_generate_security_files_read_json(app_info_file)
+
+ type = app_info["type"]
+ if type in ["qml", "web"]:
+ role_file = webos_app_generate_security_files_write_role_file(d, app_info)
+ permission_file = webos_app_generate_security_files_write_permission_file(d, app_info)
+}
+
+addtask configure_security after do_install before do_package
diff --git a/meta/classes/webos_arch_indep.bbclass b/meta/classes/webos_arch_indep.bbclass
new file mode 100644
index 0000000000..b6d450ca65
--- /dev/null
+++ b/meta/classes/webos_arch_indep.bbclass
@@ -0,0 +1,17 @@
+# Copyright (c) 2012-2014 LG Electronics, Inc.
+#
+# webos_arch_indep
+#
+# This class is to be inherited by the recipe for every component that is CPU
+# architecture independent.
+#
+
+inherit allarch
+
+python () {
+ if bb.data.inherits_class('webos_machine_dep', d) or bb.data.inherits_class('webos_machine_impl_dep', d):
+ pa = d.getVar('PACKAGE_ARCH', True)
+ if pa == "all":
+ pn = d.getVar('PN', True)
+ bb.error("%s: You should inherit webos_machine_dep or webos_machine_impl_dep _after_ webos_arch_indep to set PACKAGE_ARCH to MACHINE_ARCH" % pn)
+}
diff --git a/meta/classes/webos_autotools.bbclass b/meta/classes/webos_autotools.bbclass
new file mode 100644
index 0000000000..feb81f920a
--- /dev/null
+++ b/meta/classes/webos_autotools.bbclass
@@ -0,0 +1,10 @@
+# Copyright (c) 2012-2013 LG Electronics, Inc.
+#
+# webos_autotools
+#
+# This class is to be inherited by the recipe for every component that uses
+# autotools for configuration.
+#
+
+inherit autotools
+
diff --git a/meta/classes/webos_cmake.bbclass b/meta/classes/webos_cmake.bbclass
new file mode 100644
index 0000000000..aa94626f96
--- /dev/null
+++ b/meta/classes/webos_cmake.bbclass
@@ -0,0 +1,183 @@
+# Copyright (c) 2012-2015 LG Electronics, Inc.
+#
+# webos_cmake
+#
+# This class is to be inherited by every recipe in meta-webos whose component
+# uses CMake. It adds a dependency on cmake-modules-webos-native, which will be
+# extraneous until the component is converted, but who cares?
+#
+# Expects that webos_submissions or webos_enhanced_submissions will also be
+# inherited (for WEBOS_COMPONENT_VERSION).
+
+# Extra variable is needed to be able to inhibit this dependency in case
+# we have some recipe which can reuse this bbclass but without this dependency.
+WEBOS_CMAKE_DEPENDS = "cmake-modules-webos-native"
+DEPENDS_append = " ${WEBOS_CMAKE_DEPENDS}"
+
+inherit cmake
+inherit webos_filesystem_paths
+
+WEBOS_PKGCONFIG_BUILDDIR = "${B}"
+
+EXTRA_OECMAKE += "-DWEBOS_INSTALL_ROOT:PATH=/"
+
+WEBOS_TARGET_MACHINE_IMPL ?= "emulator"
+WEBOS_TARGET_CORE_OS ?= "rockhopper"
+
+# XXX Should error if WEBOS_COMPONENT_VERSION is unset
+EXTRA_OECMAKE += "-DWEBOS_COMPONENT_VERSION:STRING=${WEBOS_COMPONENT_VERSION}"
+
+EXTRA_OECMAKE_TARGET_CORE_OS = "${@ \
+ '-DWEBOS_TARGET_CORE_OS:STRING=${WEBOS_TARGET_CORE_OS}' \
+ if bb.data.inherits_class('webos_core_os_dep', d) and not bb.data.inherits_class('native', d) else \
+ '' \
+}"
+EXTRA_OECMAKE_TARGET_CORE_OS[vardepvalue] = "${EXTRA_OECMAKE_TARGET_CORE_OS}"
+EXTRA_OECMAKE += "${EXTRA_OECMAKE_TARGET_CORE_OS}"
+
+# XXX Add webos_kernel_dep() to webOS.cmake that adds WEBOS_TARGET_KERNEL_HEADERS to the search path
+EXTRA_OECMAKE_KERNEL_HEADERS = "${@ \
+ '-DWEBOS_TARGET_KERNEL_HEADERS:STRING=${STAGING_KERNEL_DIR}/include' \
+ if bb.data.inherits_class('webos_kernel_dep', d) and not bb.data.inherits_class('native', d) else \
+ '' \
+}"
+EXTRA_OECMAKE_KERNEL_HEADERS[vardepsexclude] = "${@ \
+ '' \
+ if bb.data.inherits_class('webos_kernel_dep', d) and not bb.data.inherits_class('native', d) else \
+ 'STAGING_KERNEL_DIR' \
+}"
+EXTRA_OECMAKE += "${EXTRA_OECMAKE_KERNEL_HEADERS}"
+
+EXTRA_OECMAKE_MACHINE_ACTUAL ?= "${MACHINE}"
+EXTRA_OECMAKE_MACHINE = "${@ \
+ '-DWEBOS_TARGET_MACHINE:STRING=${EXTRA_OECMAKE_MACHINE_ACTUAL}' \
+ if bb.data.inherits_class('webos_machine_dep', d) and not bb.data.inherits_class('native', d) else \
+ '' \
+}"
+EXTRA_OECMAKE_MACHINE[vardepvalue] = "${EXTRA_OECMAKE_MACHINE}"
+EXTRA_OECMAKE += "${EXTRA_OECMAKE_MACHINE}"
+
+# If SOC_FAMILY is empty, don't add -DWEBOS_TARGET_SOC_FAMILY.
+EXTRA_OECMAKE_SOC_FAMILY = "${@ \
+ '-DWEBOS_TARGET_SOC_FAMILY:STRING=' + d.getVar('SOC_FAMILY', True) \
+ if bb.data.inherits_class('webos_soc_family_dep', d) and not bb.data.inherits_class('native', d) and (d.getVar('SOC_FAMILY', True) or '') != '' else \
+ '' \
+}"
+EXTRA_OECMAKE_SOC_FAMILY[vardepvalue] = "${EXTRA_OECMAKE_SOC_FAMILY}"
+EXTRA_OECMAKE += "${EXTRA_OECMAKE_SOC_FAMILY}"
+
+EXTRA_OECMAKE_MACHINE_IMPL = "${@ \
+ '-DWEBOS_TARGET_MACHINE_IMPL:STRING=${WEBOS_TARGET_MACHINE_IMPL}' \
+ if bb.data.inherits_class('webos_machine_impl_dep', d) and not bb.data.inherits_class('native', d) else \
+ '' \
+}"
+EXTRA_OECMAKE_MACHINE_IMPL[vardepvalue] = "${EXTRA_OECMAKE_MACHINE_IMPL}"
+EXTRA_OECMAKE += "${EXTRA_OECMAKE_MACHINE_IMPL}"
+
+EXTRA_OECMAKE_MACHINE_VARIANT = "${@ \
+ '-DWEBOS_TARGET_MACHINE_VARIANT:STRING=${WEBOS_TARGET_MACHINE_VARIANT}' \
+ if bb.data.inherits_class('webos_machine_variant_dep', d) and not bb.data.inherits_class('native', d) else \
+ '' \
+}"
+EXTRA_OECMAKE_MACHINE_VARIANT[vardepvalue] = "${EXTRA_OECMAKE_MACHINE_VARIANT}"
+#EXTRA_OECMAKE += "${EXTRA_OECMAKE_MACHINE_VARIANT}"
+
+# If DISTRO is unset, don't add -DWEBOS_TARGET_DISTRO. If it is set, always pass
+# it, even for -native components.
+EXTRA_OECMAKE_DISTRO = "${@ \
+ '-DWEBOS_TARGET_DISTRO:STRING=' + d.getVar('DISTRO', True) \
+ if bb.data.inherits_class('webos_distro_dep', d) and (d.getVar('DISTRO', True) or '') != '' else \
+ '' \
+}"
+EXTRA_OECMAKE_DISTRO[vardepvalue] = "${EXTRA_OECMAKE_DISTRO}"
+EXTRA_OECMAKE += "${EXTRA_OECMAKE_DISTRO}"
+
+EXTRA_OECMAKE_DISTRO_VARIANT = "${@ \
+ '-DWEBOS_TARGET_DISTRO_VARIANT:STRING=${WEBOS_TARGET_DISTRO_VARIANT}' \
+ if bb.data.inherits_class('webos_distro_variant_dep', d) and not bb.data.inherits_class('native', d) else \
+ '' \
+}"
+EXTRA_OECMAKE_DISTRO_VARIANT[vardepvalue] = "${EXTRA_OECMAKE_DISTRO_VARIANT}"
+#EXTRA_OECMAKE += "${EXTRA_OECMAKE_DISTRO_VARIANT}"
+
+# This information is always useful to have around
+EXTRA_OECMAKE += "-Wdev"
+
+# Fixup in case CMake files don't recognize the new value i586 for
+# CMAKE_SYSTEM_PROCESSOR (e.g. nodejs)
+do_generate_toolchain_file_append() {
+ sed '/CMAKE_SYSTEM_PROCESSOR/ s/i586/i686/' -i ${WORKDIR}/toolchain.cmake
+}
+
+# Record how cmake was invoked
+do_configure_append() {
+ # Keep in sync with how cmake_do_configure() invokes cmake
+ echo $(which cmake) \
+ ${OECMAKE_SITEFILE} \
+ ${S} \
+ -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
+ -DCMAKE_INSTALL_SO_NO_EXE=0 \
+ -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
+ -DCMAKE_VERBOSE_MAKEFILE=1 \
+ ${EXTRA_OECMAKE} \
+ -Wno-dev > ${WORKDIR}/cmake.status
+}
+
+# Used in webOS.cmake _webos_set_from_env
+export webos_bootdir
+export webos_browserpluginsdir
+export webos_defaultconfdir
+export webos_execstatedir
+export webos_firmwaredir
+export webos_homedir
+export webos_logdir
+export webos_mediadir
+export webos_mntdir
+export webos_pkgconfigdir
+export webos_preservedtmpdir
+export webos_qtpluginsdir
+export webos_runtimeinfodir
+export webos_srcdir
+export webos_udevscriptsdir
+export webos_upstartconfdir
+export webos_prefix
+export webos_localstatedir
+export webos_sysconfdir
+export webos_accttemplatesdir
+export webos_applicationsdir
+export webos_frameworksdir
+export webos_keysdir
+export webos_pluginsdir
+export webos_servicesdir
+export webos_soundsdir
+export webos_sysmgrdir
+export webos_db8datadir
+export webos_filecachedir
+export webos_preferencesdir
+export webos_sysbus_pubservicesdir
+export webos_sysbus_prvservicesdir
+export webos_sysbus_pubrolesdir
+export webos_sysbus_prvrolesdir
+export webos_sysbus_dynpubservicesdir
+export webos_sysbus_dynprvservicesdir
+export webos_sysbus_dynpubrolesdir
+export webos_sysbus_dynprvrolesdir
+export webos_sysbus_devpubservicesdir
+export webos_sysbus_devprvservicesdir
+export webos_sysbus_devpubrolesdir
+export webos_sysbus_devprvrolesdir
+export webos_sysmgr_datadir
+export webos_sysmgr_localstatedir
+export webos_cryptofsdir
+export webos_browserstoragedir
+export webos_downloadeddir
+export webos_downloadeddir
+export webos_downloaded_applicationsdir
+export webos_downloaded_applicationsdir
+export webos_downloaded_frameworksdir
+export webos_downloaded_pluginsdir
+export webos_downloaded_servicesdir
+export webos_persistentstoragedir
+export webos_db8mediadir
+export webos_mountablestoragedir
+export webos_mountablestoragedir
diff --git a/meta/classes/webos_component.bbclass b/meta/classes/webos_component.bbclass
new file mode 100644
index 0000000000..e29bdf46d9
--- /dev/null
+++ b/meta/classes/webos_component.bbclass
@@ -0,0 +1,13 @@
+# Copyright (c) 2012-2013 LG Electronics, Inc.
+#
+# webos_component
+#
+# This class is to be inherited by the recipe for every component developed by
+# Palm that has had any do_*() task code required for its standalone Ubuntu desktop
+# build to work moved to be in its CMakeLists/Makefile and is able to support
+# having the filesystem layout rooted at /opt/webos.
+#
+
+inherit webos_fs_layout
+
+WEBOS_SYSTEM_BUS_SKIP_DO_TASKS = "1"
diff --git a/meta/classes/webos_configure_manifest.bbclass b/meta/classes/webos_configure_manifest.bbclass
new file mode 100644
index 0000000000..f2278f9c02
--- /dev/null
+++ b/meta/classes/webos_configure_manifest.bbclass
@@ -0,0 +1,330 @@
+# Copyright (c) 2015-2018 LG Electronics, Inc.
+
+WEBOS_SYSTEM_BUS_MANIFEST_TYPE ??= "PACKAGE"
+
+inherit webos_filesystem_paths
+
+def webos_configure_manifest_template():
+ manifest = {}
+ manifest["id"] = ""
+ manifest["version"] = "1.0.0"
+
+ return manifest
+
+def webos_configure_manifest_warn(d, message):
+ pn = d.getVar("BPN", True)
+ bb.warn("webos_configure_manifest: warning in package: %s, with message: %s" % (pn, message))
+
+def webos_configure_manifest_lookup_files_by_ext(d, dir_var, ext):
+ ret = []
+
+ dst = d.getVar("D", True)
+ rel_dir = d.getVar(dir_var, True)
+ abs_dir = dst + rel_dir
+
+ if not os.path.exists(abs_dir):
+ return ret
+
+ for f in os.listdir(abs_dir):
+ if f.endswith(ext):
+ ret.append(os.path.join(rel_dir, f))
+
+ return sorted(ret)
+
+def webos_configure_manifest_lookup_file_by_name(d, dir_name, srv_name):
+ dst = d.getVar("D", True)
+ rel_dir = d.getVar(dir_name, True)
+ abs_dir = dst + rel_dir
+
+ if not os.path.exists(abs_dir):
+ return None
+
+ for f in os.listdir(abs_dir):
+ if srv_name in f:
+ return os.path.join(rel_dir, f)
+
+ return None
+
+def webos_configure_manifest_find_file_by_name_or_pn(d, dirpath, name, ext):
+ f = webos_configure_manifest_lookup_file_by_name(d, dirpath, name + ext)
+ return f
+
+def webos_configure_manifest_service(d):
+ import os.path
+
+ dirs = [ "webos_sysbus_servicedir", "webos_sysbus_pubservicesdir", "webos_sysbus_prvservicesdir" ]
+
+ def generate_manifests(d, dirpath):
+ found_srvs = webos_configure_manifest_lookup_files_by_ext(d, dirpath, ".service")
+
+ manifests = []
+ for srv in found_srvs:
+ srv_name = os.path.splitext(os.path.basename(srv))[0]
+
+ manifest = webos_configure_manifest_template()
+ manifest["id"] = srv_name
+ manifest["serviceFiles"] = [srv]
+
+ role = None
+ if "pub" in dirpath:
+ role = webos_configure_manifest_find_file_by_name_or_pn(d, "webos_sysbus_pubrolesdir", srv_name, ".role.json")
+ if role: manifest["roleFilesPub"] = [role]
+ elif "prv" in dirpath:
+ role = webos_configure_manifest_find_file_by_name_or_pn(d, "webos_sysbus_prvrolesdir", srv_name, ".role.json")
+ if role: manifest["roleFilesPrv"] = [role]
+ else:
+ role = webos_configure_manifest_find_file_by_name_or_pn(d, "webos_sysbus_rolesdir", srv_name, ".role.json")
+ if role: manifest["roleFiles"] = [role]
+
+ provides = webos_configure_manifest_find_file_by_name_or_pn(d, "webos_sysbus_apipermissionsdir", srv_name, ".api.json")
+ if provides: manifest["apiPermissionFiles"] = [provides]
+
+ requires = webos_configure_manifest_find_file_by_name_or_pn(d, "webos_sysbus_permissionsdir", srv_name, ".perm.json")
+ if requires: manifest["clientPermissionFiles"] = [requires]
+
+ if role:
+ manifests.append(manifest)
+ else:
+ webos_configure_manifest_warn(d, "Can not distinguish role file for service %s" % srv_name)
+
+ return manifests
+
+ manifests = generate_manifests(d, dirs[0])
+ if len(manifests) != 0:
+ return manifests
+
+ manifests_pub = generate_manifests(d, dirs[1]) # public directory
+ manifests_prv = generate_manifests(d, dirs[2]) # private direcotry
+
+ # merge public and private to one manifest
+ manifests = []
+
+ # some packages don't provide both files
+ for manifest_pub in manifests_pub:
+ manifest = webos_configure_manifest_template()
+ manifest["id"] = manifest_pub["id"]
+
+ if "serviceFiles" in manifest_pub:
+ manifest["serviceFiles"] = manifest_pub["serviceFiles"]
+ if "roleFilesPub" in manifest_pub:
+ manifest["roleFilesPub"] = manifest_pub["roleFilesPub"]
+
+ manifests.append(manifest)
+
+ for manifest_prv in manifests_prv:
+ manifest = None
+ for manifest in manifests:
+ if manifest["id"] == manifest_prv["id"]:
+ break
+
+ if manifest is None:
+ # There is not any public manifest, generate new
+ manifest = webos_configure_manifest_template()
+ manifest["id"] = manifest_prv["id"]
+ manifests.append(manifest)
+
+ if "serviceFiles" in manifest_prv:
+ if "serviceFiles" in manifest:
+ manifest["serviceFiles"].extend(manifest_prv["serviceFiles"])
+ else:
+ manifest["serviceFiles"] = manifest_prv["serviceFiles"]
+
+ if "roleFilesPrv" in manifest_prv:
+ manifest["roleFilesPrv"] = manifest_prv["roleFilesPrv"]
+
+ return manifests
+
+def webos_configure_manifest_comment_remover(text):
+ import re
+
+ def replacer(match):
+ s = match.group(0)
+ return "" if s.startswith('/') else s
+
+ pattern = re.compile(r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"', re.DOTALL | re.MULTILINE)
+ return re.sub(pattern, replacer, text)
+
+def webos_configure_manifest_application_from_appinfo(d, app_info_file):
+ import json
+ import os.path
+
+ manifest = webos_configure_manifest_template()
+
+ with open(app_info_file, "r") as f:
+ app_info = json.loads(webos_configure_manifest_comment_remover(f.read()))
+
+
+ def is_valid_version(version):
+ """
+ This function checks that string is valid version string
+ according to semver.org.
+ """
+ import re
+ pattern = re.compile("^(\d+\.\d+\.\d+)"
+ "(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?"
+ "(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$")
+ return re.match(pattern, version)
+
+ manifest["id"] = app_info["id"]
+ manifest["version"] = app_info["version"]
+
+ if not is_valid_version(manifest["version"]):
+ webos_configure_manifest_warn(d, "Incompatible version string found in %s" % app_info_file)
+
+ dst = d.getVar("D", True)
+
+ # Possible behaviuors:
+ # 1. There is native or native_builtin type
+ # 1.1. The role is merged to service file
+ # 1.2. The role is installed in place
+ # 2. There is not native or native_builtin type, role files are generated by webos_app_configure_security
+ if "native" in app_info["type"]:
+ def warn_mismatch(d, dirpath):
+ files = webos_configure_manifest_lookup_files_by_ext(d, dirpath, ".json")
+ if len(files) == 0:
+ return False
+
+ webos_configure_manifest_warn(d, "Can not determinate role file for application %s" % manifest["id"])
+ webos_configure_manifest_warn(d, "Possible name mismatch required %s but found %s"
+ % (manifest["id"], ', '.join(files)))
+
+ return True
+
+ role_file = webos_configure_manifest_find_file_by_name_or_pn(d, "webos_sysbus_rolesdir", app_info["id"], ".json")
+ if role_file:
+ manifest["roleFile"] = [role_file]
+
+ provides = webos_configure_manifest_find_file_by_name_or_pn(d, "webos_sysbus_apipermissionsdir", app_info["id"], ".json")
+ if provides: manifest["apiPermissionFiles"]= [provides]
+
+ requires = webos_configure_manifest_find_file_by_name_or_pn(d, "webos_sysbus_permissionsdir", app_info["id"], ".json")
+ if requires: manifest["clientPermissionFiles"] = [requires]
+ return manifest
+
+ if warn_mismatch(d, "webos_sysbus_rolesdir"):
+ return None
+
+ role_file_pub = webos_configure_manifest_find_file_by_name_or_pn(d, "webos_sysbus_pubrolesdir", app_info["id"], ".json")
+ role_file_prv = webos_configure_manifest_find_file_by_name_or_pn(d, "webos_sysbus_prvrolesdir", app_info["id"], ".json")
+
+ if not role_file_pub and not role_file_prv:
+ warn_mismatch(d, "webos_sysbus_pubrolesdir")
+ warn_mismatch(d, "webos_sysbus_prvrolesdir")
+ return None
+
+ if role_file_pub: manifest["roleFilesPub"] = [role_file_pub]
+ if role_file_prv: manifest["roleFilesPrv"] = [role_file_prv]
+ else:
+ role_dir_rel = d.getVar("webos_sysbus_rolesdir", True)
+ role_file = os.path.join(role_dir_rel, manifest["id"] + ".app.json")
+ if not os.path.exists(dst + role_file):
+ webos_configure_manifest_warn(d, "Can not determinate role file for application %s" % manifest["id"])
+ return None
+
+ perm_dir = d.getVar("webos_sysbus_permissionsdir", True)
+ perm_file = os.path.join(perm_dir, manifest["id"] + ".app.json")
+ if not os.path.exists(dst + perm_file):
+ webos_configure_manifest_warn(d, "Can not determinate client permissions file for application %s" % manifest["id"])
+ return None
+
+ manifest["roleFiles"] = [role_file]
+ manifest["clientPermissionFiles"] = [perm_file]
+
+ return manifest
+
+def webos_configure_manifest_application(d):
+ import os
+
+ manifests = []
+ def get_immediate_subdirectories(root):
+ return [name for name in os.listdir(root)
+ if os.path.isdir(os.path.join(root, name))]
+
+ dst = d.getVar("D", True)
+ app_dir = dst + d.getVar("webos_applicationsdir", True)
+ if not os.path.exists(app_dir):
+ return manifests
+
+ apps_dir = get_immediate_subdirectories(app_dir)
+ if len(apps_dir) == 0:
+ webos_configure_manifest_warn(d, "There aren't any app in application dir")
+
+ for app in apps_dir:
+ app_info_file = os.path.join(app_dir, os.path.join(app, 'appinfo.json'))
+
+ if not os.path.exists(app_info_file):
+ # ignore application template
+ if app_dir == d.getVar("BPN", True) and len(apps_dir) != 1:
+ webos_configure_manifest_warn(d, "There is no application info for %s" % app)
+ continue
+
+ manifest = webos_configure_manifest_application_from_appinfo(d, app_info_file)
+ if not manifest is None:
+ manifests.append(manifest)
+ return manifests
+
+def webos_configure_manifest_package(d):
+ import os
+
+ pn = d.getVar("BPN", True)
+
+ manifest = webos_configure_manifest_template()
+
+ manifest["id"] = pn
+
+ role = webos_configure_manifest_lookup_files_by_ext(d, "webos_sysbus_rolesdir", ".json")
+ if role: manifest["roleFiles"] = role
+
+ role_pub = webos_configure_manifest_lookup_files_by_ext(d, "webos_sysbus_pubrolesdir", ".json")
+ if role_pub: manifest["roleFilesPub"] = role_pub
+
+ role_prv = webos_configure_manifest_lookup_files_by_ext(d, "webos_sysbus_prvrolesdir", ".json")
+ if role_prv: manifest["roleFilesPrv"] = role_prv
+
+ srv = []
+ srv.extend(webos_configure_manifest_lookup_files_by_ext(d, "webos_sysbus_servicedir", ".service"))
+ srv.extend(webos_configure_manifest_lookup_files_by_ext(d, "webos_sysbus_pubservicesdir", ".service"))
+ srv.extend(webos_configure_manifest_lookup_files_by_ext(d, "webos_sysbus_prvservicesdir", ".service"))
+ if srv: manifest["serviceFiles"] = srv
+
+ provides = webos_configure_manifest_lookup_files_by_ext(d, "webos_sysbus_apipermissionsdir", ".json")
+ if provides: manifest["apiPermissionFiles"] = provides
+
+ requires = webos_configure_manifest_lookup_files_by_ext(d, "webos_sysbus_permissionsdir", ".json")
+ if requires: manifest["clientPermissionFiles"] = requires
+
+ return [manifest]
+
+fakeroot python do_configure_manifest() {
+ import os, json
+
+ manifests = []
+
+ manifest_type = d.getVar("WEBOS_SYSTEM_BUS_MANIFEST_TYPE", True)
+ if manifest_type == "SERVICE":
+ manifests.extend(webos_configure_manifest_service(d))
+ elif manifest_type == "APPLICATION":
+ manifests.extend(webos_configure_manifest_application(d))
+ elif manifest_type == "PACKAGE":
+ manifests.extend(webos_configure_manifest_package(d))
+ elif manifest_type == "PASS":
+ return
+ else:
+ webos_configure_manifest_warn(d, "Unrecognized manifest type %s" % manifest_type)
+
+ if len(manifests) == 0:
+ webos_configure_manifest_warn(d, "No manifests were configured")
+ return
+
+ man_dir = d.getVar("D", True) + d.getVar("webos_sysbus_manifestsdir", True)
+ if not os.path.exists(man_dir):
+ os.makedirs(man_dir)
+
+ for manifest in manifests:
+ name = os.path.join(man_dir, manifest["id"] + ".manifest.json")
+ with open(name, "w+") as f:
+ json.dump(manifest, f, indent = 4, sort_keys = False)
+ f.write("\n")
+}
+
+addtask configure_manifest after do_install do_configure_security before do_package
diff --git a/meta/classes/webos_core_os_dep.bbclass b/meta/classes/webos_core_os_dep.bbclass
new file mode 100644
index 0000000000..a48ab09c5d
--- /dev/null
+++ b/meta/classes/webos_core_os_dep.bbclass
@@ -0,0 +1,8 @@
+# Copyright (c) 2012-2013 LG Electronics, Inc.
+#
+# webos_core_os_dep
+#
+# This class is to be inherited by the recipe for every component is dependent
+# on the core OS at build time.
+#
+
diff --git a/meta/classes/webos_daemon.bbclass b/meta/classes/webos_daemon.bbclass
new file mode 100644
index 0000000000..412393f76d
--- /dev/null
+++ b/meta/classes/webos_daemon.bbclass
@@ -0,0 +1,10 @@
+# Copyright (c) 2012-2013 LG Electronics, Inc.
+#
+# webos_daemon
+#
+# This class is to be inherited by the recipe for every component that installs
+# a daemon.
+#
+
+# We expect all daemons will use pkgconfig when building.
+inherit webos_pkgconfig
diff --git a/meta/classes/webos_distro_dep.bbclass b/meta/classes/webos_distro_dep.bbclass
new file mode 100644
index 0000000000..e9952655d4
--- /dev/null
+++ b/meta/classes/webos_distro_dep.bbclass
@@ -0,0 +1,10 @@
+# Copyright (c) 2015 LG Electronics, Inc.
+#
+# webos_distro_dep
+#
+# This class is to be inherited by the recipe for every component that depends
+# on DISTRO at build time.
+#
+
+# Append this to EXTRA_OEMAKE to allow your makefile be DISTRO-dependent:
+WEBOS_EXTRA_OEMAKE_DISTRO_DEP = "DISTRO=${DISTRO}"
diff --git a/meta/classes/webos_distro_variant_dep.bbclass b/meta/classes/webos_distro_variant_dep.bbclass
new file mode 100644
index 0000000000..0222708b4e
--- /dev/null
+++ b/meta/classes/webos_distro_variant_dep.bbclass
@@ -0,0 +1,23 @@
+# Copyright (c) 2014-2018 LG Electronics, Inc.
+#
+# webos_distro_variant_dep
+#
+# This class is to be inherited by the recipe for every component that depends
+# on WEBOS_TARGET_DISTRO_VARIANT or WEBOS_DISTRO_NAME_SUFFIX at build time.
+# When different from the default ("normal"), WEBOS_TARGET_DISTRO_VARIANT is
+# set in MACHINE.conf and WEBOS_DISTRO_NAME_SUFFIX is set in
+# distro/include/<DISTRO>-<WEBOS_TARGET_DISTRO_VARIANT>.inc .
+#
+# Inheriting this class arranges for two overrides to be added that are selected
+# ahead of "<DISTRO>":
+# - "distrovariant-<WEBOS_TARGET_DISTRO_VARIANT>", which is meant to be used when
+# an override applies to all DISTRO-s that have a particular variant.
+# - "<DISTRO>-<WEBOS_TARGET_DISTRO_VARIANT>", which is meant to be used when an
+# override applies to a particular DISTRO with that variant.
+#
+# "distrovariant-<WEBOS_TARGET_DISTRO_VARIANT>" is selected ahead of
+# "<DISTRO>-<WEBOS_TARGET_DISTRO_VARIANT>".
+
+
+# Append this to EXTRA_OEMAKE to allow your makefile be distro variant-dependent:
+WEBOS_EXTRA_OEMAKE_DISTRO_VARIANT_DEP = "WEBOS_TARGET_DISTRO_VARIANT=${WEBOS_TARGET_DISTRO_VARIANT}"
diff --git a/meta/classes/webos_enhanced_submissions.bbclass b/meta/classes/webos_enhanced_submissions.bbclass
new file mode 100644
index 0000000000..e4ad2b856d
--- /dev/null
+++ b/meta/classes/webos_enhanced_submissions.bbclass
@@ -0,0 +1,309 @@
+# Copyright (c) 2012-2018 LG Electronics, Inc.
+#
+# webos_enhanced_submissions
+#
+# Parse a WEBOS_VERSION in the following format:
+#
+# <component-version>-<enhanced-submission>
+#
+# where <enhanced-submission> is of the form:
+#
+# <submission>_<40-character-SHA-1>[;branch=<branch>]
+#
+# setting WEBOS_COMPONENT_VERSION, WEBOS_SUBMISSION, WEBOS_GIT_PARAM_TAG,
+# WEBOS_GIT_TAG, WEBOS_GIT_PARAM_BRANCH, WEBOS_SRCREV, SRCREV, and PV.
+#
+# The default tag name is the webOS convention for submission tags, i.e.,
+# they are of the form:
+# submissions/<decimal-integer> (default branch: "master")
+# or, when the submission is from some permanent branch:
+# submissions/<name>.<decimal-integer> (default branch: "@<name>")
+# where <decimal-integer> does not contain leading zeros.
+#
+# <name> is the branch name without leading '@' and can have following forms:
+# <decimal-integer> when the branch was created from submissions/<decimal-integer>.
+# <decimal-integer>.<codename> when the branch was also created from
+# submissions/<decimal-integer> tag, but for some specific <codename> release.
+# <decimal-integer>.<codename>.<decimal-integer> is used for multiple levels of
+# branched submissions, e.g. NN.<codename>.MM.PP is PP-th submission along the
+# @NN.<codename>.MM branch.
+#
+# The default branch name value can be overriden by "branch" parameter in WEBOS_VERSION
+# or by setting WEBOS_GIT_PARAM_BRANCH.
+#
+# The default tag name can be overriden by setting WEBOS_GIT_PARAM_TAG.
+#
+# WEBOS_SUBMISSION '0' has special meaning to disable check
+# that selected SHA-1 is matching with submissions tag
+#
+# There is limited support for recipes with multiple git repositories in SRC_URI.
+# Exactly one of them needs to have empty 'name' parameter or 'name' parameter with
+# value 'main' and this one will get SRCREV set and verified by this bbclass.
+
+inherit webos_submissions
+
+def webos_enhsub_get_srcrev(d, webos_v):
+ webos_srcrev = webos_version_get_srcrev(webos_v)
+ webos_submission = d.getVar('WEBOS_SUBMISSION', True)
+ # submission 0 means that we're using:
+ # a) AUTOREV
+ # b) SHA-1 possibly not included in any tag or branch
+ # c) something else (like reference to a Gerrit review)
+ #
+ # a) and b) should be set in SRCREV
+ # c) should be set in WEBOS_GIT_PARAM_TAG with WEBOS_GIT_TAG enabled and let git ls-remote resolve it
+ # Another way to handle c) is to override WEBOS_GIT_TAG directly with ";tag=<ref>"
+ if webos_submission == '0':
+ # return only valid SRCREV or "AUTOINC", otherwise "INVALID"
+ if webos_srcrev == "AUTOINC" or not (len(webos_srcrev) != 40 or (False in [c in "abcdef0123456789" for c in webos_srcrev])):
+ return webos_srcrev
+ else:
+ return "INVALID"
+ if webos_srcrev == None or len(webos_srcrev) != 40 or (False in [c in "abcdef0123456789" for c in webos_srcrev]):
+ file = d.getVar('FILE', True)
+ webos_git_repo_tag = d.getVar('WEBOS_GIT_REPO_TAG', True) or "submissions/%s" % webos_submission
+ bb.fatal(("%s: WEBOS_VERSION needs to end with _<SHA-1> where " +
+ "<SHA-1> is the 40-character identifier of '%s' tag")
+ % (file, webos_git_repo_tag))
+ # only valid SRCREVs at this point
+ return webos_srcrev
+
+def webos_enhsub_get_tag(d, webos_v):
+ webos_submission = d.getVar('WEBOS_SUBMISSION', True)
+ webos_git_repo_tag = d.getVar('WEBOS_GIT_REPO_TAG', True) or "submissions/%s" % webos_submission
+ return webos_git_repo_tag
+
+# Set WEBOS_SRCREV to value from WEBOS_VERSION.
+WEBOS_SRCREV = "${@webos_enhsub_get_srcrev(d, '${WEBOS_VERSION}')}"
+
+# we don't include SRCPV in PV, so we have to manually include SRCREVs in do_fetch vardeps
+do_fetch[vardeps] += "SRCREV_main SRCREV"
+SRCREV = "${WEBOS_SRCREV}"
+SRCREV_main = "${WEBOS_SRCREV}"
+
+# append WEBOS_PV_SUFFIX to PV when you're using 0 as WEBOS_SUBMISSION to make it clear which SHA-1 was built
+WEBOS_PV_SUFFIX = "+gitr${SRCPV}"
+
+# srcrev is mandatory and enough, don't put tag= in SRC_URI
+# to reenable you need to set WEBOS_GIT_TAG to ";tag=${WEBOS_GIT_PARAM_TAG}"
+WEBOS_GIT_PARAM_TAG = "${@webos_enhsub_get_tag(d, '${WEBOS_VERSION}')}"
+WEBOS_GIT_TAG = ""
+
+WEBOS_GIT_PARAM_BRANCH = "${@webos_version_get_branch('${WEBOS_VERSION}')}"
+
+# When SRCREV isn't SHA-1 show error
+do_fetch[prefuncs] += "webos_enhsub_srcrev_sanity_check"
+
+# '0' in 'webos_submission' is used with AUTOREV or SHA-1 without matching tag
+# show non-fatal ERROR to make sure that it's not accidentally merged in master
+python webos_enhsub_srcrev_sanity_check() {
+ srcrev = d.getVar('SRCREV', True)
+ webos_submission = d.getVar('WEBOS_SUBMISSION', True)
+ if webos_submission == '0':
+ webos_version = d.getVar('WEBOS_VERSION', True)
+ pn = d.getVar('PN', True)
+ file = d.getVar('FILE', True)
+ msg = "WEBOS_VERSION '%s' for recipe '%s' (file '%s') contains submission 0, which indicates using AUTOREV or SHA-1 without matching tag and cannot be used in official builds." % (webos_version, pn, file)
+ package_qa_handle_error("webos-enh-sub-autorev-error", msg, d)
+ elif (len(srcrev) != 40 or (False in [c in "abcdef0123456789" for c in srcrev])):
+ file = d.getVar('FILE', True)
+ bb.error("%s: SRCREV needs to contain 40-character SHA1" % file)
+}
+
+# When both SRCREV and WEBOS_SUBMISSION are defined check that they correspond
+# This only compares tag and SHA-1 in local checkout (without using git ls-remote)
+# This check is executed only when do_fetch is executed, that means that if someone
+# moves the tag in remote repository, we won't notice it until do_fetch is re-executed.
+do_unpack[postfuncs] += "submission_sanity_check"
+python submission_sanity_check() {
+ def webos_enhsub_remote_update(d, u, pn, checkout):
+ """ Runs git remote update to fetch newly added tags or updated branches in case one of the checks fails
+ It runs git remote update twice, first in DL_DIR (e.g. downloads/git2/github.com.openwebos.librolegen/)
+ then in actuall checkout in WORKDIR, because we're already in do_unpack task and sanity checks are
+ executed in WORKDIR.
+ This isn't as efficient as the implementation in newer bitbake, because PREMIRROR tarballs aren't
+ recreated after this git remote update, so local builds will fetch the tarball and also run own
+ git remote update until PREMIRROR tarball is updated by fetching even newer SRCREV.
+ """
+ bb.debug(2, "Running git remote update for pn '%s', checkout '%s'" % (pn, checkout))
+ fetcher = bb.fetch2.Fetch([u], d)
+ localpath = fetcher.localpath(u)
+ bb.warn("Fetcher accessing the network, because sanity check failed %s, %s" % (u, localpath))
+ cmd = "cd %s && git remote update" % (localpath)
+ try:
+ output = bb.fetch.runfetchcmd(cmd, d, quiet=True)
+ except bb.fetch2.FetchError:
+ msg = "Unable to update '%s' checkout for recipe '%s'" % (localpath, pn)
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+ # and the same in WORKDIR
+ cmd = "cd %s && git remote update" % (checkout)
+ try:
+ output = bb.fetch.runfetchcmd(cmd, d, quiet=True)
+ except bb.fetch2.FetchError:
+ msg = "Unable to update '%s' checkout for recipe '%s'" % (checkout, pn)
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+
+
+ def webos_enhsub_tag_sanity_check(d, fetcher, u, pn, tag_param, rev, webos_git_repo_tag, checkout, file, first=True):
+ """ Checks that tag:
+ 1) exists
+ 2) is annotated (not lightweight)
+ 3) uniq
+ 4) matches with selected SRCREV
+ """
+ bb.debug(2, "sanity check for tag in pn '%s', tag_param '%s', rev '%s', webos_git_repo_tag '%s', checkout '%s'" % (pn, tag_param, rev, webos_git_repo_tag, checkout))
+ cmd = "cd %s && git tag -l 2>/dev/null | grep '^%s$' | wc -l" % (checkout, webos_git_repo_tag)
+ tag_exists = bb.fetch.runfetchcmd(cmd, d).strip()
+ if tag_exists != "1":
+ if first:
+ webos_enhsub_remote_update(d, u, pn, checkout)
+ webos_enhsub_tag_sanity_check(d, fetcher, u, pn, tag_param, rev, webos_git_repo_tag, checkout, file, False)
+ return
+ else:
+ localpath = fetcher.localpath(u)
+ msg = "The tag '%s' for recipe '%s' (file '%s') doesn't exist in local checkout of SHA-1 '%s'. It's possible that the tag already exists in a remote repository, but your local checkout (or checkout downloaded as a tarball from PREMIRROR) contains the requested SHA-1 without a tag assigned to it (this cannot happen with annotated tags, because they have their own SHA-1 which either exists or not). Please update your checkout in %s by executing git fetch --tags and run again." % (webos_git_repo_tag, pn, file, rev, localpath)
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+ return
+ # for annotated tags there are 2 SHA-1s and we don't care which one is used (same source)
+ # $ git show-ref -d --tags 0.5
+ # 70fb05fd340ab342c5132dc8bfa174dbe6c9d330 refs/tags/0.5
+ # 215f9c884d0139c93feea940d255dc3575678218 refs/tags/0.5^{}
+ # prefix with 'refs/tags/' so that partial tags aren't matched, e.g. librolegen:
+ # $ git show-ref -d --tags 18
+ # cbedc69733f65cd2f498787a621c014e219d38ab refs/tags/submissions/18
+ # 9040954a24115b05219e7dd459dcf91ad05cc739 refs/tags/submissions/18^{}
+ # $ git show-ref -d --tags refs/tags/18
+ # <nothing>
+ cmd = "cd %s && git show-ref -d --tags refs/tags/%s" % (checkout, webos_git_repo_tag)
+ tag_srcrevs = bb.fetch.runfetchcmd(cmd, d).strip().split('\n')
+ found_srcrev = False
+ if len(tag_srcrevs) > 2:
+ msg = "The reference refs/tags/%s is matching more than 2 entries for recipe '%s' (file '%s'):\n%s" % (webos_git_repo_tag, pn, file, '\n'.join(tag_srcrevs))
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+ if len(tag_srcrevs) == 1:
+ if first:
+ webos_enhsub_remote_update(d, u, pn, checkout)
+ webos_enhsub_tag_sanity_check(d, fetcher, u, pn, tag_param, rev, webos_git_repo_tag, checkout, file, False)
+ return
+ else:
+ msg = "The tag '%s' for recipe '%s' (file '%s') is lightweight tag, please use annotated tag in next submission" % (webos_git_repo_tag, pn, file)
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+ for tag_srcrev in tag_srcrevs:
+ (sha, name) = tag_srcrev.split()
+ if sha == rev:
+ found_srcrev = True
+ if tag_srcrev != tag_srcrevs[0] or tag_srcrev.find("^{}") == len(tag_srcrev) - 3:
+ msg = "The tag '%s' for recipe '%s' (file '%s') is annotated, but WEBOS_VERSION '%s' is using SHA-1 of last commit included, not of the tag itself '%s'" % (webos_git_repo_tag, pn, file, webos_version, tag_srcrevs[0].split()[0])
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+
+ if not found_srcrev:
+ if first:
+ webos_enhsub_remote_update(d, u, pn, checkout)
+ webos_enhsub_tag_sanity_check(d, fetcher, u, pn, tag_param, rev, webos_git_repo_tag, checkout, file, False)
+ return
+ else:
+ if len(tag_srcrevs) < 1:
+ msg = "The SHA-1 '%s' defined in WEBOS_VERSION for recipe '%s' (file '%s') doesn't match with tag '%s', tag couldn't be found in refs/tags/" % (rev, pn, file, webos_git_repo_tag)
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+ elif len(tag_srcrevs) == 1:
+ msg = "The SHA-1 '%s' defined in WEBOS_VERSION for recipe '%s' (file '%s') doesn't match with tag '%s', which is seen as SHA-1 '%s'" % (rev, pn, file, webos_git_repo_tag, tag_srcrevs[0].split()[0])
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+ else:
+ msg = "The SHA-1 '%s' defined in WEBOS_VERSION for recipe '%s' (file '%s') doesn't match with tag '%s', which is seen as SHA-1s:\n%s" % (rev, pn, file, webos_git_repo_tag, '\n'.join(tag_srcrevs))
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+
+ def webos_enhsub_branch_sanity_check(d, u, fetcher, branch_in_webos_version, branch_in_src_uri, pn, file, checkout, rev, first=True):
+ """ Checks that selected SRCREV is included in selected branch
+ duplicates bitbake's git fetcher functionality added in
+ http://git.openembedded.org/bitbake/commit/?id=89abfbc1953e3711d6c90aff793ee622c22609b1
+ http://git.openembedded.org/bitbake/commit/?id=31467c0afe0346502fcd18bd376f23ea76a27d61
+ http://git.openembedded.org/bitbake/commit/?id=f594cb9f5a18dd0ab2342f96ffc6dba697b35f65
+ """
+ bb.debug(2, "sanity check for branch in pn '%s', branch_in_webos_version '%s', branch_in_src_uri '%s', rev '%s', checkout '%s'" % (pn, branch_in_webos_version, branch_in_src_uri, rev, checkout))
+ if branch_in_src_uri != branch_in_webos_version:
+ msg = "Branch is set in WEBOS_VERSION '%s' for recipe '%s' (file '%s') as well as in SRC_URI '%s' and they don't match" % (branch_in_webos_version, pn, file, branch_in_src_uri)
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+ cmd = "cd %s && git branch -a --contains %s --list origin/%s 2> /dev/null | wc -l" % (checkout, rev, branch_in_webos_version)
+ try:
+ output = bb.fetch.runfetchcmd(cmd, d, quiet=True)
+ except bb.fetch2.FetchError:
+ msg = "Unable to check if SHA-1 '%s' defined in WEBOS_VERSION for recipe '%s' (file '%s') is included in branch '%s'" % (rev, pn, file, branch)
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+ if len(output.split()) > 1:
+ msg = "Unable to check if SHA-1 '%s' defined in WEBOS_VERSION for recipe '%s' (file '%s') is included in branch '%s', unexpected output from '%s': '%s'" % (rev, pn, file, branch_in_webos_version, cmd, output)
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+ if output.split()[0] == "0":
+ if first:
+ webos_enhsub_remote_update(d, u, pn, checkout)
+ webos_enhsub_branch_sanity_check(d, u, fetcher, branch_in_webos_version, branch_in_src_uri, pn, file, checkout, rev, False)
+ return
+ else:
+ msg = "Revision '%s' defined in WEBOS_VERSION for recipe '%s' (file '%s') isn't included in branch '%s'" % (rev, pn, file, branch_in_webos_version)
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+
+ src_uri = (d.getVar('SRC_URI', True) or "").split()
+ if len(src_uri) == 0:
+ return
+
+ externalsrc = d.getVar('EXTERNALSRC', True) or ""
+ if len(externalsrc) != 0:
+ return
+
+ found_first = False
+ workdir = d.getVar('WORKDIR', True)
+ pn = d.getVar('PN', True)
+ file = d.getVar('FILE', True)
+ fetcher = bb.fetch.Fetch(src_uri, d)
+ urldata = fetcher.ud
+ autoinc_templ = 'AUTOINC+'
+ for u in urldata:
+ tag_param = urldata[u].parm['tag'] if 'tag' in urldata[u].parm else None
+ name_param = urldata[u].parm['name'] if 'name' in urldata[u].parm else 'main'
+ if urldata[u].type == 'git' and name_param == 'main':
+ if found_first:
+ msg = "webos_enhanced_submission bbclass has limited support for recipes with multiple git repos in SRC_URI. They have to have different 'name' parameter and the one which points to repository with submissions tag should have 'name=main'. Recipe '%s' (file '%s') has multiple git repos with 'main' name or without names" % (pn, file)
+ package_qa_handle_error("webos-enh-sub-warning", msg, d)
+ break
+ found_first = True
+ destsuffix_param = urldata[u].parm['destsuffix'] if 'destsuffix' in urldata[u].parm else 'git'
+ webos_version = d.getVar('WEBOS_VERSION', True)
+ srcrev = d.getVar('SRCREV', True)
+ name = urldata[u].parm['name'] if 'name' in urldata[u].parm else 'default'
+ try:
+ rev = urldata[u].method.sortable_revision(urldata[u], d, name)
+ except TypeError:
+ # support old bitbake versions
+ rev = urldata[u].method.sortable_revision(u, urldata[u], d, name)
+ # Clean this up when we next bump bitbake version
+ if type(rev) != str:
+ autoinc, rev = rev
+ elif rev.startswith(autoinc_templ):
+ rev = rev[len(autoinc_templ):]
+
+ webos_git_repo_tag = d.getVar('WEBOS_GIT_REPO_TAG', True)
+ webos_submission = d.getVar('WEBOS_SUBMISSION', True)
+ default_webos_git_repo_tag = "submissions/%s" % webos_submission
+ if not srcrev:
+ # Recipe needs to have SRCREV set one way or another
+ # it could be in WEBOS_VERSION, from AUTOREV or by explicit SRCREV assignment
+ msg = "Recipe '%s' (file '%s') doesn't contain SRCREV" % (pn, file)
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+ if not webos_git_repo_tag:
+ webos_git_repo_tag = default_webos_git_repo_tag
+ elif webos_git_repo_tag == default_webos_git_repo_tag:
+ msg = "Don't set WEBOS_GIT_REPO_TAG when the component is using default scheme 'submissions/${WEBOS_SUBMISSION}' in recipe '%s' (file '%s')" % (pn, file)
+ package_qa_handle_error("webos-enh-sub-error", msg, d)
+ checkout = "%s/%s" % (workdir, destsuffix_param)
+
+ # '0' in 'webos_submission' is used with AUTOREV -> so don't check AUTOREV against submissions/0 tag
+ if webos_submission != '0' and webos_git_repo_tag and rev:
+ webos_enhsub_tag_sanity_check(d, fetcher, u, pn, tag_param, rev, webos_git_repo_tag, checkout, file)
+
+ if not 'nobranch' in urldata[u].parm or urldata[u].parm['nobranch'] != "1":
+ branch_in_src_uri = urldata[u].parm['branch'] if 'branch' in urldata[u].parm else 'master'
+ branch_in_webos_version = d.getVar('WEBOS_GIT_PARAM_BRANCH', True)
+ webos_enhsub_branch_sanity_check(d, u, fetcher, branch_in_webos_version, branch_in_src_uri, pn, file, checkout, rev)
+ if not found_first:
+ msg = "Recipe '%s' (file '%s') doesn't have git repository without 'name' parameter or with 'name=main' in SRC_URI, webos_enhanced_submission bbclass shouldn't be inherited here (it has nothing to do)" % (pn, file)
+ package_qa_handle_error("webos-enh-sub-warning", msg, d)
+}
diff --git a/meta/classes/webos_filesystem_paths.bbclass b/meta/classes/webos_filesystem_paths.bbclass
new file mode 100644
index 0000000000..b8865f5b08
--- /dev/null
+++ b/meta/classes/webos_filesystem_paths.bbclass
@@ -0,0 +1,162 @@
+# Copyright (c) 2012-2018 LG Electronics, Inc.
+
+#
+# Variables invented by webOS for standard locations
+#
+
+webos_bootdir = "${base_prefix}/boot"
+webos_browserpluginsdir = "${libdir}/BrowserPlugins"
+webos_defaultconfdir = "${sysconfdir}/default"
+webos_execstatedir = "${localstatedir}/lib"
+webos_fontsdir = "${datadir}/fonts"
+webos_homedir = "${base_prefix}/home"
+webos_firmwaredir = "${base_libdir}/firmware"
+webos_logdir = "${localstatedir}/log"
+webos_mediadir = "${base_prefix}/media"
+webos_mntdir = "${base_prefix}/mnt"
+# Discourage use of ${libdir}/pkgconfig by not providing a variable for it.
+webos_pkgconfigdir = "${datadir}/pkgconfig"
+webos_preservedtmpdir = "${localstatedir}/tmp"
+# Having a Qt plugins directory is standard, but the value used by webOS OSE isn't.
+webos_qtpluginsdir = "${libdir}/qt5/plugins"
+webos_runtimeinfodir = "${localstatedir}/run"
+webos_srcdir = "${prefix}/src"
+webos_udevscriptsdir = "${base_libdir}/udev"
+webos_upstartconfdir = "${sysconfdir}/event.d"
+
+
+#
+# Variables for webOS additions to the filesystem hierarchy
+#
+
+# Increment this every time values for the variables below change. But
+# don't increment if merely adding a new variable for an existing location.
+WEBOS_FILESYSTEM_LAYOUT_VERSION = "1"
+
+webos_prefix = "${prefix}/palm"
+webos_localstatedir = "${localstatedir}/palm"
+webos_sysconfdir = "${sysconfdir}/palm"
+
+# The /palm/ subdirectories have been deliberately left as literals.
+webos_accttemplatesdir = "${prefix}/palm/public/accounts"
+# This is the location of webOS applications, both JS and native. There is a
+# subdirectory tree for each application that is named using its complete name.
+webos_applicationsdir = "${prefix}/palm/applications"
+webos_frameworksdir = "${prefix}/palm/frameworks"
+webos_keysdir = "${prefix}/palm/data"
+# This is the location of the pre-installed catalog apps IPKs
+webos_picapkgdir = "${webos_mntdir}/pica"
+# This is the location of webOS application plugins. There is a subdirectory for
+# each application that is named using the final field of its complete name.
+webos_pluginsdir = "${prefix}/palm/plugins"
+# This is the location of the trees for JS services; the files for native (dynamic)
+# services are located under sbindir, libdir, etc. as if they were Linux daemons.
+webos_servicesdir = "${prefix}/palm/services"
+webos_smartkeydatadir = "${prefix}/palm/smartkey"
+webos_soundsdir = "${prefix}/palm/sounds"
+webos_sysmgrdir = "${prefix}/palm/sysmgr"
+
+# Note that everything under localstatedir is erased by a NYX_SYSTEM_ERASE_VAR
+# erasure.
+webos_db8datadir = "${localstatedir}/db"
+webos_filecachedir = "${localstatedir}/file-cache"
+webos_preferencesdir = "${localstatedir}/preferences"
+
+webos_sysbus_prefix = "${datadir}"
+webos_sysbus_datadir = "${webos_sysbus_prefix}/luna-service2"
+webos_sysbus_dyndatadir = "${localstatedir}/luna-service2"
+webos_sysbus_devdatadir = "${localstatedir}/luna-service2-dev"
+webos_sysbus_apipermissionsdir = "${webos_sysbus_datadir}/api-permissions.d"
+webos_sysbus_dynapipermissionsdir = "${webos_sysbus_dyndatadir}/api-permissions.d"
+webos_sysbus_devapipermissionsdir = "${webos_sysbus_devdatadir}/api-permissions.d"
+webos_sysbus_containersdir = "${webos_sysbus_datadir}/containers.d"
+webos_sysbus_permissionsdir = "${webos_sysbus_datadir}/client-permissions.d"
+webos_sysbus_dynpermissionsdir = "${webos_sysbus_dyndatadir}/client-permissions.d"
+webos_sysbus_devpermissionsdir = "${webos_sysbus_devdatadir}/client-permissions.d"
+webos_sysbus_rolesdir = "${webos_sysbus_datadir}/roles.d"
+webos_sysbus_dynrolesdir = "${webos_sysbus_dyndatadir}/roles.d"
+webos_sysbus_devrolesdir = "${webos_sysbus_devdatadir}/roles.d"
+webos_sysbus_servicedir = "${webos_sysbus_datadir}/services.d"
+webos_sysbus_dynservicedir = "${webos_sysbus_dyndatadir}/services.d"
+webos_sysbus_devservicesdir = "${webos_sysbus_devdatadir}/services.d"
+webos_sysbus_manifestsdir = "${webos_sysbus_datadir}/manifests.d"
+webos_sysbus_dynmanifestsdir = "${webos_sysbus_dyndatadir}/manifests.d"
+webos_sysbus_devmanifestsdir = "${webos_sysbus_devdatadir}/manifests.d"
+webos_sysbus_groupsdir = "${webos_sysbus_datadir}/groups.d"
+
+# Legacy sysbus locations
+webos_sysbus_pubservicesdir = "${webos_sysbus_prefix}/dbus-1/services"
+webos_sysbus_prvservicesdir = "${webos_sysbus_prefix}/dbus-1/system-services"
+webos_sysbus_pubrolesdir = "${webos_sysbus_prefix}/ls2/roles/pub"
+webos_sysbus_prvrolesdir = "${webos_sysbus_prefix}/ls2/roles/prv"
+webos_sysbus_dynpubservicesdir = "${localstatedir}/palm/ls2/services/pub"
+webos_sysbus_dynprvservicesdir = "${localstatedir}/palm/ls2/services/prv"
+webos_sysbus_dynpubrolesdir = "${localstatedir}/palm/ls2/roles/pub"
+webos_sysbus_dynprvrolesdir = "${localstatedir}/palm/ls2/roles/prv"
+webos_sysbus_devpubservicesdir = "${localstatedir}/palm/ls2-dev/services/pub"
+webos_sysbus_devprvservicesdir = "${localstatedir}/palm/ls2-dev/services/prv"
+webos_sysbus_devpubrolesdir = "${localstatedir}/palm/ls2-dev/roles/pub"
+webos_sysbus_devprvrolesdir = "${localstatedir}/palm/ls2-dev/roles/prv"
+
+webos_sysmgr_datadir = "${libdir}/luna"
+webos_sysmgr_localstatedir = "${localstatedir}/luna"
+
+webos_cryptofsdir = "${webos_mediadir}/cryptofs"
+
+# Everything under this tree is erased by a NYX_SYSTEM_ERASE_VAR erasure.
+webos_browserstoragedir = "${webos_cryptofsdir}/.browser"
+
+# This is the tree for components downloaded from the app catalog; everything
+# under this tree is erased by a NYX_SYSTEM_ERASE_VAR erasure.
+webos_downloadeddir = "${webos_cryptofsdir}/apps"
+# The old name for webos_downloadeddir
+webos_appstoragedir = "${webos_downloadeddir}"
+webos_downloaded_applicationsdir = "${webos_downloadeddir}/usr/palm/applications"
+# The old name for webos_downloaded_applicationsdir
+webos_installedappsdir = "${webos_downloaded_applicationsdir}"
+webos_downloaded_frameworksdir = "${webos_downloadeddir}/usr/palm/frameworks"
+webos_downloaded_pluginsdir = "${webos_downloadeddir}/usr/palm/plugins"
+webos_downloaded_servicesdir = "${webos_downloadeddir}/usr/palm/services"
+
+# The specs for webos_execstatedir apply to this location with the additional
+# constraint that everything under this tree persists a NYX_SYSTEM_ERASE_VAR
+# erasure. It is only deleted by a NYX_SYSTEM_ERASE_ALL erasure.
+webos_persistentstoragedir = "${webos_cryptofsdir}/data"
+
+# db8 database use this directory to store mediadb database.
+# mediadb database store results of fileindexer and contain information
+# about media files. Potentially this db can be big
+webos_db8mediadir = "${webos_persistentstoragedir}/db8/mediadb"
+
+# On devices that support it, this tree is externally mountable as (USB) mass
+# storage. Applications that want their data to be visible in this manner should
+# store them here instead of under webos_persistentstoragedir. This tree is
+# erased by NYX_SYSTEM_ERASE_MEDIA.
+webos_mountablestoragedir = "${webos_mediadir}/internal"
+# The old name for webos_mountablestoragedir
+webos_localstoragedir = "${webos_mountablestoragedir}"
+
+# This is the root of the tree that is accessible to developers who log into a
+# device with ssh when it is in developer mode. It is where their side-loaded
+# (webOS and native) apps will be installed for debugging. Everything
+# under this tree is erased by a NYX_SYSTEM_ERASE_DEVELOPER erasure.
+webos_developerdir = "${webos_mediadir}/developer"
+
+# Unit test executables and other test scripts or executables are installed,
+# if at all, under ${webos_testsdir}/${PN}
+webos_testsdir = "/opt/webos/tests"
+
+# This tree contains subdirectories of various types of customization data
+webos_customizationdir = "${prefix}/palm/customization"
+
+# This directory is shared by the emulator for network mounting by its host OS
+webos_emulatorshareddir = "${webos_mediadir}/shared"
+
+# The presence of this file indicates that First Use has been completed.
+webos_firstusesentinelfile = "${webos_sysmgr_localstatedir}/preferences/ran-firstuse"
+
+# Note that everything under localstatedir is erased by a NYX_SYSTEM_ERASE_VAR erasure.
+webos_crashddir = "${webos_logdir}/crashd"
+
+# Path to file which indicate failure to init settingsservice
+webos_settingsservice_errorsentinelfile = "${webos_localstatedir}/settingsservice_critical_error"
diff --git a/meta/classes/webos_fs_layout.bbclass b/meta/classes/webos_fs_layout.bbclass
new file mode 100644
index 0000000000..d38e4bdc12
--- /dev/null
+++ b/meta/classes/webos_fs_layout.bbclass
@@ -0,0 +1,15 @@
+# Copyright (c) 2012-2013 LG Electronics, Inc.
+#
+# webos_fs_layout
+#
+# This class alters the filesystem layout to be root under /opt/webos. It is
+# intended that this only be inherited by webos_component, webos_upstream_from_repo,
+# and webos_upstream_with_patches.
+#
+
+# XXX Not ready to activate this
+#export base_prefix = "/opt/webos"
+#export prefix = "/opt/webos/usr"
+#export sysconfdir = "/opt/webos/etc"
+#export localstatedir = "/opt/webos/var"
+#export servicedir = "/opt/webos/srv"
diff --git a/meta/classes/webos_library.bbclass b/meta/classes/webos_library.bbclass
new file mode 100644
index 0000000000..17df3d99ae
--- /dev/null
+++ b/meta/classes/webos_library.bbclass
@@ -0,0 +1,11 @@
+# Copyright (c) 2012-2013 LG Electronics, Inc.
+#
+# webos_library
+#
+# This class is to be inherited by the recipe for every component that installs a
+# library.
+#
+
+# We expect all libraries will use pkgconfig when building and will install
+# pkgconfig (.pc) files.
+inherit webos_pkgconfig
diff --git a/meta/classes/webos_lttng.bbclass b/meta/classes/webos_lttng.bbclass
new file mode 100644
index 0000000000..b984135224
--- /dev/null
+++ b/meta/classes/webos_lttng.bbclass
@@ -0,0 +1,21 @@
+# Copyright (c) 2013 LG Electronics, Inc.
+#
+# webos_lttng
+#
+# This class is to be inherited by the recipe for any component that
+# uses LTTng tracing.
+#
+# Each recipe is responsible for setting a compilation flag to enable
+# its own LTTng tracepoints based on the value of WEBOS_LTTNG_ENABLED.
+
+# LTTng is disabled by default. To enable, add:
+# WEBOS_LTTNG_ENABLED = "1"
+# to your webos-local.conf or the location of your choice.
+WEBOS_LTTNG_ENABLED ??= "0"
+# Only enable LTTng for target components
+WEBOS_LTTNG_ENABLED_class-native = "0"
+WEBOS_LTTNG_ENABLED_class-nativesdk = "0"
+
+# Use _append so that WEBOS_LTTNG_ENABLED is evaluated during finalization so that the overrides effectual.
+DEPENDS_append = "${@ ' lttng-ust' if '${WEBOS_LTTNG_ENABLED}' == '1' else ''}"
+RDEPENDS_${PN}_append = "${@ ' lttng-tools lttng-modules babeltrace' if '${WEBOS_LTTNG_ENABLED}' == '1' else ''}"
diff --git a/meta/classes/webos_machine_dep.bbclass b/meta/classes/webos_machine_dep.bbclass
new file mode 100644
index 0000000000..edb5e47fdc
--- /dev/null
+++ b/meta/classes/webos_machine_dep.bbclass
@@ -0,0 +1,19 @@
+# Copyright (c) 2012-2016 LG Electronics, Inc.
+#
+# webos_machine_dep
+#
+# This class is to be inherited by the recipe for every component that depends
+# on MACHINE at build time.
+#
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+# Uncomment to allow all PACKAGE_ARCH-s variants to be built in the same tree.
+# (Note that the OE 2011.03 bitbake.conf defines WORKDIR to effectively prepend
+# "${PACKAGE_ARCH}-${TARGET_VENDOR}-${TARGET_OS}/" for all PACKAGE_ARCH-s, i.e.
+# there are separate subdirectories instead of suffixes.)
+# WORKDIR_append = "-${PACKAGE_ARCH}"
+
+# Append this to EXTRA_OEMAKE to allow your makefile be MACHINE-dependent:
+WEBOS_MACHINE ?= "${MACHINE}"
+WEBOS_EXTRA_OEMAKE_MACHINE_DEP = "MACHINE=${WEBOS_MACHINE}"
diff --git a/meta/classes/webos_machine_impl_dep.bbclass b/meta/classes/webos_machine_impl_dep.bbclass
new file mode 100644
index 0000000000..45017332de
--- /dev/null
+++ b/meta/classes/webos_machine_impl_dep.bbclass
@@ -0,0 +1,19 @@
+# Copyright (c) 2012-2013 LG Electronics, Inc.
+#
+# webos_machine_impl_dep
+#
+# This class is to be inherited by the recipe for every component that depends
+# on the "machine implementation" at build time.
+
+# If there are MACHINE-s with different "machine implementations" but with the
+# same TUNE_PKGARCH, they will have the same package name unless PACKAGE_ARCH
+# is set to MACHINE_ARCH. XXX Is there a better way to handle this?
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+# Allow the use of WEBOS_TARGET_MACHINE_IMPL overrides. It's checked after
+# what's set by the machine architecture .inc file, which is checked after
+# MACHINE. WEBOS_EXTRA_MACHINEOVERRIDES is deliberately assigned to and not
+# appended to or prepended to so that the order of inherit statements will not
+# affect the order of what's in MACHINEOVERRIDES.
+
+WEBOS_EXTRA_MACHINEOVERRIDES = "${WEBOS_TARGET_MACHINE_IMPL}:"
diff --git a/meta/classes/webos_pkgconfig.bbclass b/meta/classes/webos_pkgconfig.bbclass
new file mode 100644
index 0000000000..c408fc9a45
--- /dev/null
+++ b/meta/classes/webos_pkgconfig.bbclass
@@ -0,0 +1,11 @@
+# Copyright (c) 2012-2013 LG Electronics, Inc.
+#
+# webos_pkgconfig
+#
+# This class is to be inherited by the recipe for every component that uses
+# pkgconfig when building or installs a pkgconfig (.pc) file. This usually
+# happens implicitly by inheriting from webos_library, webos_program,
+# or webos_daemon.
+#
+
+inherit pkgconfig
diff --git a/meta/classes/webos_pmlog_config.bbclass b/meta/classes/webos_pmlog_config.bbclass
new file mode 100644
index 0000000000..e4e282afb2
--- /dev/null
+++ b/meta/classes/webos_pmlog_config.bbclass
@@ -0,0 +1,8 @@
+# Copyright (c) 2014 LG Electronics, Inc.
+#
+# webos_pmlog_config
+
+# This class is to be inherited by pmloglib and pmlogdaemon recipes
+#
+
+EXTRA_OECMAKE += "-DENABLE_LOGGING:BOOL=YES"
diff --git a/meta/classes/webos_prerelease_dep.bbclass b/meta/classes/webos_prerelease_dep.bbclass
new file mode 100644
index 0000000000..59d4af3659
--- /dev/null
+++ b/meta/classes/webos_prerelease_dep.bbclass
@@ -0,0 +1,7 @@
+# Copyright (c) 2013 LG Electronics, Inc.
+#
+# webos_prerelease_dep
+#
+# This class is to be inherited by the recipe for every component that depends
+# on WEBOS_DISTRO_PRERELEASE value at build time.
+#
diff --git a/meta/classes/webos_program.bbclass b/meta/classes/webos_program.bbclass
new file mode 100644
index 0000000000..7320047f19
--- /dev/null
+++ b/meta/classes/webos_program.bbclass
@@ -0,0 +1,10 @@
+# Copyright (c) 2012-2013 LG Electronics, Inc.
+#
+# webos_program
+#
+# This class is to be inherited by the recipe for every component that installs
+# a console program.
+#
+
+# We expect all programs will use pkgconfig when building.
+inherit webos_pkgconfig
diff --git a/meta/classes/webos_public_repo.bbclass b/meta/classes/webos_public_repo.bbclass
new file mode 100644
index 0000000000..1cd3597fad
--- /dev/null
+++ b/meta/classes/webos_public_repo.bbclass
@@ -0,0 +1,19 @@
+# Copyright (c) 2012-2018 LG Electronics, Inc.
+#
+# webos_public_repo
+#
+# This class is to be inherited by the recipe for every component that has (or
+# will have) a public webOS OSE repo.
+#
+
+# The default repo name is the "base" component name (no -native, etc.)
+WEBOS_REPO_NAME ??= "${BPN}"
+
+WEBOS_GIT_PARAM_BRANCH ?= "master"
+WEBOS_GIT_BRANCH ?= ";branch=${WEBOS_GIT_PARAM_BRANCH}"
+# Default is empty but webos_enhanced_submissions.bbclass will always set the value
+WEBOS_GIT_PARAM_TAG ?= ""
+WEBOS_GIT_TAG ?= ";tag=${WEBOS_GIT_PARAM_TAG}"
+
+WEBOSOSE_GIT_REPO ?= "git://github.com/webosose"
+WEBOSOSE_GIT_REPO_COMPLETE ?= "${WEBOSOSE_GIT_REPO}/${WEBOS_REPO_NAME}${WEBOS_GIT_TAG}${WEBOS_GIT_BRANCH}"
diff --git a/meta/classes/webos_qmake5.bbclass b/meta/classes/webos_qmake5.bbclass
new file mode 100644
index 0000000000..38165a181f
--- /dev/null
+++ b/meta/classes/webos_qmake5.bbclass
@@ -0,0 +1,78 @@
+# Copyright (c) 2013-2018 LG Electronics, Inc.
+
+inherit qmake5
+inherit webos_filesystem_paths
+
+# These are used in the luna-sysmgr recipe
+export QT_CONFIGURE_PREFIX_PATH = "${OE_QMAKE_PATH_PREFIX}"
+export QT_CONFIGURE_HEADERS_PATH = "${OE_QMAKE_PATH_QT_HEADERS}"
+export QT_CONFIGURE_LIBRARIES_PATH = "${OE_QMAKE_PATH_LIBS}"
+export QT_CONFIGURE_BINARIES_PATH = "${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}"
+
+# This is used in the webappmanager recipes
+export STAGING_INCDIR
+
+# Set webOS specific locations for .pr* files to access
+EXTRA_QMAKEVARS_PRE += "\
+ WEBOS_STAGING_INCDIR=${STAGING_INCDIR} \
+"
+# Used by mkspecs/features/webos-variables.prf
+EXTRA_QMAKEVARS_PRE += "\
+ WEBOS_INSTALL_BINS=${bindir} \
+ WEBOS_INSTALL_LIBS=${libdir} \
+ WEBOS_INSTALL_HEADERS=${includedir}/ \
+ WEBOS_INSTALL_QML=${OE_QMAKE_PATH_QML} \
+ WEBOS_INSTALL_QTPLUGINSDIR=${webos_qtpluginsdir} \
+ WEBOS_INSTALL_WEBOS_APPLICATIONSDIR=${webos_applicationsdir} \
+ WEBOS_PREFERENCESDIR=${webos_preferencesdir} \
+ WEBOS_INSTALL_ROOT=${base_prefix} \
+"
+# webos-variables.prf is using default value of ${prefix}, but here we use ${OE_QMAKE_PATH_PREFIX}
+EXTRA_QMAKEVARS_PRE += "\
+ WEBOS_INSTALL_PREFIX=${OE_QMAKE_PATH_PREFIX} \
+ WEBOS_INSTALL_DATADIR=${datadir} \
+ WEBOS_INSTALL_SYSCONFDIR=${sysconfdir} \
+ WEBOS_INSTALL_SYSBUS_DATADIR=${sysbus_datadir} \
+ WEBOS_INSTALL_UPSTARTCONFDIR=${webos_upstartconfdir} \
+"
+# webos-variables.prf is using default value of webos_sysbus_servicesdir
+# but the rest of the system is using singular servicedir
+# webosSet(WEBOS_INSTALL_SYSBUS_SERVICESDIR, $$(webos_sysbus_servicesdir), $$WEBOS_INSTALL_SYSBUS_DATADIR/services.d)
+# meta-webos/classes/webos_filesystem_paths.bbclass:webos_sysbus_servicedir = "${webos_sysbus_datadir}/services.d"
+# Set both here from webos_sysbus_servicedir until PLAT-9971 is fixed
+EXTRA_QMAKEVARS_PRE += "\
+ WEBOS_INSTALL_SYSBUS_SERVICEDIR=${webos_sysbus_servicedir} \
+ WEBOS_INSTALL_SYSBUS_SERVICESDIR=${webos_sysbus_servicedir} \
+ WEBOS_INSTALL_SYSBUS_PUBSERVICESDIR=${webos_sysbus_pubservicesdir} \
+ WEBOS_INSTALL_SYSBUS_PRVSERVICESDIR=${webos_sysbus_prvservicesdir} \
+ WEBOS_INSTALL_SYSBUS_ROLESDIR=${webos_sysbus_rolesdir} \
+ WEBOS_INSTALL_SYSBUS_PUBROLESDIR=${webos_sysbus_pubrolesdir} \
+ WEBOS_INSTALL_SYSBUS_PRVROLESDIR=${webos_sysbus_prvrolesdir} \
+ WEBOS_INSTALL_SYSBUS_APIDIR=${webos_sysbus_apipermissionsdir} \
+ WEBOS_INSTALL_SYSBUS_PERMDIR=${webos_sysbus_permissionsdir} \
+ WEBOS_INSTALL_SYSBUS_GROUPDIR=${webos_sysbus_groupsdir} \
+"
+
+# this value is exported in do_configure, so that project file can select MACHINE_NAME
+WEBOS_QMAKE_MACHINE_ACTUAL ?= "${MACHINE}"
+WEBOS_QMAKE_MACHINE ?= "${WEBOS_QMAKE_MACHINE_ACTUAL}"
+# this value is defined only for make through EXTRA_OEMAKE
+WEBOS_QMAKE_TARGET ?= ""
+
+# add only when WEBOS_QMAKE_MACHINE is defined (by default it equals MACHINE)
+EXPORT_WEBOS_QMAKE_MACHINE += "${@ 'export MACHINE=${WEBOS_QMAKE_MACHINE}' if d.getVar('WEBOS_QMAKE_MACHINE', True) != '' and bb.data.inherits_class('webos_machine_dep', d) and not bb.data.inherits_class('native', d) else '' }"
+EXPORT_WEBOS_QMAKE_MACHINE[vardepvalue] = "${EXPORT_WEBOS_QMAKE_MACHINE}"
+
+# add only when WEBOS_QMAKE_TARGET is defined (by default it's empty)
+EXPORT_WEBOS_QMAKE_TARGET = "${@ 'MACHINE=${WEBOS_QMAKE_TARGET}' if d.getVar('WEBOS_QMAKE_TARGET', True) != '' and bb.data.inherits_class('webos_machine_dep', d) and not bb.data.inherits_class('native', d) else '' }"
+EXPORT_WEBOS_QMAKE_TARGET[vardepvalue] = "${EXPORT_WEBOS_QMAKE_TARGET}"
+
+EXTRA_OEMAKE += "${EXPORT_WEBOS_QMAKE_TARGET}"
+
+# Add the the native tool in the paths as some project require rcc
+# to be available
+WEBOS_EXTRA_PATH .= "${OE_QMAKE_PATH_EXTERNAL_HOST_BINS}:"
+
+do_configure_prepend() {
+ ${EXPORT_WEBOS_QMAKE_MACHINE}
+}
diff --git a/meta/classes/webos_qmllint.bbclass b/meta/classes/webos_qmllint.bbclass
new file mode 100644
index 0000000000..7e19305e3d
--- /dev/null
+++ b/meta/classes/webos_qmllint.bbclass
@@ -0,0 +1,31 @@
+# Copyright (c) 2017 LG Electronics, Inc.
+#
+# QML syntax verifier
+#
+
+DEPENDS_append = " qtdeclarative-native libxml2-native"
+
+inherit qmake5_paths
+
+do_compile_prepend () {
+ bbnote "Verify QML syntax(step 1): .qml or .js files stored as qresource"
+ find ${S} -type f -name "*.qrc" | while read qrc; do
+ local _dirname_=$(dirname $qrc)
+ ${STAGING_BINDIR_NATIVE}/xmllint --xpath '//RCC/qresource/file' $qrc | sed 's/<file>//g' | sed 's/<\/file>/\n/g' | grep -E "*.qml$|*.js$" | while read file; do
+ if [ -f "$_dirname_/$file" ]; then
+ bbnote "Inspecting $_dirname_/$file"
+ ${STAGING_DIR_NATIVE}${OE_QMAKE_PATH_QT_BINS}/qmllint "$_dirname_/$file"
+ fi
+ done
+ done
+ bbnote "Done verifying QML syntax(step 1), no errors detected"
+}
+
+do_install_append () {
+ bbnote "Verify QML syntax(step 2): .qml or .js files to be installed"
+ find ${D} -type f -name "*.qml" -o -name "*.js" | while read file; do
+ bbnote "Inspecting $file"
+ ${STAGING_DIR_NATIVE}${OE_QMAKE_PATH_QT_BINS}/qmllint "$file"
+ done
+ bbnote "Done verifying QML syntax(step 2), no errors detected"
+}
diff --git a/meta/classes/webos_submissions.bbclass b/meta/classes/webos_submissions.bbclass
new file mode 100644
index 0000000000..1a77c54aec
--- /dev/null
+++ b/meta/classes/webos_submissions.bbclass
@@ -0,0 +1,36 @@
+# Copyright (c) 2012-2013 LG Electronics, Inc.
+#
+# webos_submissions
+#
+# Parse a WEBOS_VERSION in the following format:
+#
+# <component-version>-<submission>
+#
+# setting WEBOS_COMPONENT_VERSION, WEBOS_SUBMISSION, and PV.
+#
+
+inherit webos_version
+
+# When WEBOS_VERSION isn't defined show error
+do_fetch[prefuncs] += "webos_submissions_version_sanity_check"
+
+python webos_submissions_version_sanity_check() {
+ webos_version = d.getVar('WEBOS_VERSION', True)
+ webos_component_version = d.getVar('WEBOS_COMPONENT_VERSION', True)
+ pv = d.getVar('PV', True)
+ file = d.getVar('FILE', True)
+ src_uri = d.getVar('SRC_URI', True)
+ if not webos_version or webos_version == '0':
+ bb.fatal("%s: WEBOS_VERSION needs to be defined for recipes inheriting webos_submissions or webos_enhanced_submissions" % file)
+ if not webos_component_version or webos_component_version == '0':
+ bb.fatal("%s: WEBOS_VERSION needs contain WEBOS_COMPONENT_VERSION different from '0'" % file)
+ if not pv or pv == '0':
+ bb.fatal("%s: WEBOS_VERSION needs contain PV different from '0'" % file)
+ if src_uri.find('git://') != -1 and not bb.data.inherits_class('webos_enhanced_submissions', d):
+ bb.fatal("%s: inherit webos_enhanced_submissions when the recipe uses git:// in SRC_URI" % file)
+}
+
+WEBOS_VERSION ?= "0"
+PV = "${@webos_version_get_pv('${WEBOS_VERSION}')}"
+WEBOS_COMPONENT_VERSION = "${@webos_version_get_component_version('${WEBOS_VERSION}')}"
+WEBOS_SUBMISSION = "${@webos_version_get_submission('${WEBOS_VERSION}')}"
diff --git a/meta/classes/webos_system_bus.bbclass b/meta/classes/webos_system_bus.bbclass
new file mode 100644
index 0000000000..7cfca3f559
--- /dev/null
+++ b/meta/classes/webos_system_bus.bbclass
@@ -0,0 +1,100 @@
+# Copyright (c) 2012-2018 LG Electronics, Inc.
+#
+# webos_system_bus
+
+# This class is to be inherited by the recipe for every component that offers
+# Luna System Bus services.
+#
+# Variables that control this bbclass's behavior:
+#
+# WEBOS_SYSTEM_BUS_FILES_LOCATION
+# - The location of the system bus files to be installed. Defaults to
+# ${S}/service. Set to "" to skip.
+#
+# WEBOS_SYSTEM_BUS_SKIP_DO_TASKS
+# - If "1", all do_*() tasks or additions to them defined in this bbclass are
+# skipped.
+#
+
+inherit webos_configure_manifest
+inherit webos_filesystem_paths
+
+webos_system_bus_install_files () {
+ local _LS_PRV_DIR="${D}$1" # destination directory for private hub files
+ local _LS_PUB_DIR="${D}$2" # destination directory for public hub files
+ local _LS_PRV_FILE="$3" # match string for private hub files
+ local _LS_PUB_FILE="$4" # match string for public hub files
+ local _LS_TREE="$5" # tree under which to search for the files
+ local i
+
+ _LS_PUB=`find $_LS_TREE -name "$_LS_PUB_FILE"`
+ _LS_PRV=`find $_LS_TREE -name "$_LS_PRV_FILE"`
+
+ if [ ${#_LS_PUB[@]} -ne 0 ]; then
+ install -d $_LS_PUB_DIR
+ fi
+
+ for i in $_LS_PUB; do
+ _LS_PUB_DEST=`basename $i .pub`
+ bbnote "PUBLIC: $_LS_PUB_DIR/$_LS_PUB_DEST"
+ install -v -m 0644 $i $_LS_PUB_DIR/$_LS_PUB_DEST
+ done
+
+ if [ ${#_LS_PRV[@]} -ne 0 ]; then
+ install -d $_LS_PRV_DIR
+ fi
+
+ for i in $_LS_PRV; do
+ _LS_PRV_DEST=`basename $i .prv`
+ bbnote "PRIVATE: $_LS_PRV_DIR/$_LS_PRV_DEST"
+ install -v -m 0644 $i $_LS_PRV_DIR/$_LS_PRV_DEST
+ done
+}
+
+# - Can't assume our current directory is still ${S}
+# - Default to the pre webOS OSE location (because it's intended everything in
+# webOS OSE is not require installation by the recipe).
+WEBOS_SYSTEM_BUS_FILES_LOCATION ?= "${S}/service"
+
+do_install_append () {
+ # Only want WEBOS_SYSTEM_BUS_SKIP_DO_TASKS to be expanded by bitbake => single quotes
+ if [ '${WEBOS_SYSTEM_BUS_SKIP_DO_TASKS}' != 1 ]; then
+ local tree=${WEBOS_SYSTEM_BUS_FILES_LOCATION}
+
+ if [ -n "$tree" -a -d "$tree" ]; then
+ webos_system_bus_install_files ${webos_sysbus_prvservicesdir} ${webos_sysbus_pubservicesdir} "*.service.prv" "*.service.pub" "$tree"
+ webos_system_bus_install_files ${webos_sysbus_prvrolesdir} ${webos_sysbus_pubrolesdir} "*.json.prv" "*.json.pub" "$tree"
+
+ # If the files don't have .prv/.pub suffixes, then the same file is meant to be used for both (and there's no suffix to be removed)
+ webos_system_bus_install_files ${webos_sysbus_prvservicesdir} ${webos_sysbus_pubservicesdir} "*.service" "*.service" "$tree"
+ webos_system_bus_install_files ${webos_sysbus_prvrolesdir} ${webos_sysbus_pubrolesdir} "*.json" "*.json" "$tree"
+
+ bbwarn "$pkgname: Installing roles and services files from bitbake is deprecated - use cmake, qmake, etc."
+ fi
+ fi
+}
+
+WEBOS_SYSTEM_BUS_DIRS_LEGACY += " \
+ ${webos_sysbus_prvservicesdir} \
+ ${webos_sysbus_pubservicesdir} \
+ ${webos_sysbus_prvrolesdir} \
+ ${webos_sysbus_pubrolesdir} \
+"
+
+WEBOS_SYSTEM_BUS_DIRS += " \
+ ${webos_sysbus_rolesdir} \
+ ${webos_sysbus_servicedir} \
+ ${webos_sysbus_permissionsdir} \
+ ${webos_sysbus_apipermissionsdir} \
+ ${webos_sysbus_groupsdir} \
+ ${webos_sysbus_manifestsdir} \
+"
+
+FILES_${PN} += "${WEBOS_SYSTEM_BUS_DIRS_LEGACY} ${WEBOS_SYSTEM_BUS_DIRS}"
+
+sysroot_stage_dirs_append() {
+ # $to is 2nd parameter passed to sysroot_stage_dir, e.g. ${SYSROOT_DESTDIR} passed from sysroot_stage_all
+ for dir in ${WEBOS_SYSTEM_BUS_DIRS_LEGACY} ${WEBOS_SYSTEM_BUS_DIRS}; do
+ rm -rf $to$dir
+ done
+}
diff --git a/meta/classes/webos_test_provider.bbclass b/meta/classes/webos_test_provider.bbclass
new file mode 100644
index 0000000000..1223d50af8
--- /dev/null
+++ b/meta/classes/webos_test_provider.bbclass
@@ -0,0 +1,45 @@
+# Copyright (c) 2014-2018 LG Electronics, Inc.
+#
+# webos_test_provider
+#
+# This class is to be inherited by every recipe whose component is able to build
+# and install unit- or other test scripts based on the build variables
+# WEBOS_CONFIG_BUILD_TESTS and WEBOS_CONFIG_INSTALL_TESTS.
+#
+# For components which also inherit from the webos_cmake bbclass, it adds the
+# following defines to their CMake command lines.
+#
+# -DWEBOS_CONFIG_BUILD_TESTS:BOOL=<TRUE or FALSE>
+# -DWEBOS_CONFIG_INSTALL_TESTS:BOOL=<TRUE or FALSE>
+#
+# By definition, WEBOS_CONFIG_INSTALL_TESTS implies WEBOS_CONFIG_BUILD_TESTS
+# so either one will cause tests to be built.
+#
+
+# Bring in the ptest functionality and packages etc.
+inherit ptest
+inherit webos_filesystem_paths
+
+# (Weakly) set default values for both control variables to ensure they are defined
+#
+# As the tests are placed in their own package, which may or may not be included in
+# a particular image, set the default so that they are always built (i.e. available
+# for inclusion).
+
+WEBOS_CONFIG_BUILD_TESTS[type] = "boolean"
+WEBOS_CONFIG_BUILD_TESTS ??= "${PTEST_ENABLED}"
+WEBOS_CONFIG_INSTALL_TESTS[type] = "boolean"
+WEBOS_CONFIG_INSTALL_TESTS ??= "${PTEST_ENABLED}"
+
+# Pass the control variableis into CMake (will have no effect if component does not use CMake)
+EXTRA_OECMAKE += "-DWEBOS_CONFIG_BUILD_TESTS:BOOL=${@ 'TRUE' if oe.data.typed_value('WEBOS_CONFIG_BUILD_TESTS',d) or oe.data.typed_value('WEBOS_CONFIG_INSTALL_TESTS',d) else 'FALSE' }"
+EXTRA_OECMAKE += "-DWEBOS_CONFIG_INSTALL_TESTS:BOOL=${@ 'TRUE' if oe.data.typed_value('WEBOS_CONFIG_INSTALL_TESTS',d) else 'FALSE' }"
+
+# Ensure tests are installed if they are in the correct place
+FILES_${PN}-ptest += "${webos_testsdir}/${BPN}"
+
+# Bring in the g-lib test runner, as something is bound to use it
+RDEPENDS_${PN}-ptest += "glib-2.0-utils"
+
+# Also, add an RDEPENDS on ptest-runner - saves adding it to a packagegroup
+RDEPENDS_${PN}-ptest += "ptest-runner"
diff --git a/meta/classes/webos_version.bbclass b/meta/classes/webos_version.bbclass
new file mode 100644
index 0000000000..5c19ea7cb4
--- /dev/null
+++ b/meta/classes/webos_version.bbclass
@@ -0,0 +1,63 @@
+# Copyright (c) 2013-2014 LG Electronics, Inc.
+#
+# webos_version
+#
+# Functions to parse the fields of a WEBOS_VERSION, which have the following format:
+#
+# <component-version>-<submission>[_<40-character-revision-hash>[;branch=<branch>]]
+#
+
+# PV is the first underscore-separated field in WEBOS_VERSION,
+# i.e., it includes the submission. If there is no WEBOS_VERSION
+# setting, '0' will be returned.
+def webos_version_get_pv(wv):
+ if not wv:
+ return '0'
+ split_wv = wv.split(';branch=')
+ return split_wv[0].split('_')[0]
+
+# The component version is PV with the last hyphen-separated field
+# removed; i.e., it does not include the submission.
+def webos_version_get_component_version(wv):
+ pv = webos_version_get_pv(wv)
+ split_pv = pv.split('-')
+ if len(split_pv) == 1:
+ # If there's no submission, then the component version can't
+ # contain a hyphen
+ return split_pv[0]
+ return "-".join(split_pv[:-1])
+
+# The submission is the last hyphen-separated field in PV.
+# If there is no hyphen in PV setting, '0' will be returned.
+def webos_version_get_submission(wv):
+ pv = webos_version_get_pv(wv)
+ split_pv = pv.split('-')
+ if len(split_pv) == 1:
+ # If there no hyphen, that means there's no submission
+ return '0'
+ return split_pv[-1]
+
+# The revision-hash (SRCREV) is the second underscore-separated field in
+# WEBOS_VERSION. Returns "INVALID" if the field is absent.
+def webos_version_get_srcrev(wv):
+ split_wv = wv.split(';branch=')
+ split_wv = split_wv[0].split('_')
+ if len(split_wv) == 1:
+ return "INVALID" # this is default SRCREV value from bitbake.conf
+ return split_wv[1]
+
+# The branch is optional parameter, last in WEBOS_VERSION after ;branch=
+# when not specified it will use @<name> when WEBOS_VERSION is in
+# <name>.NN format (contains at least one dot) and "master" in all other cases.
+def webos_version_get_branch(wv):
+ split_wv = wv.split(';branch=')
+ if len(split_wv) == 1:
+ submission = webos_version_get_submission(wv)
+ # Assume <name>.NN format (NN is submission number, @<name> is branch name)
+ split_submission = submission.rsplit('.', 1)
+ if len(split_submission) > 1:
+ return "@%s" % (split_submission[0])
+ else:
+ # otherwise it's simply a submission along the master branch
+ return "master"
+ return split_wv[1]
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index 12e3956651..0ea4507815 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -1,7 +1,7 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
-BBFILES += "${LAYERDIR}/recipes-*/*/*.bb"
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "core"
BBFILE_PATTERN_core = "^${LAYERDIR}/"
diff --git a/meta/recipes-webos/cjson/cjson.bb b/meta/recipes-webos/cjson/cjson.bb
new file mode 100644
index 0000000000..86fa5d6ffc
--- /dev/null
+++ b/meta/recipes-webos/cjson/cjson.bb
@@ -0,0 +1,30 @@
+# Copyright (c) 2012-2018 LG Electronics, Inc.
+
+SUMMARY = "webOS of the open-source json-c library"
+AUTHOR = "Keith Derrick <keith.derrick@lge.com>"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+inherit webos_autotools
+inherit webos_enhanced_submissions
+inherit webos_library
+inherit webos_public_repo
+
+WEBOS_VERSION = "1.8.0-1_d07d717a33c4067e75e7f47688add9e28686106d"
+PR = "r4"
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF += "--disable-static"
+
+EXTRA_OEMAKE += "all"
+
+# autotools-brokensep (autogen calls autoreconf in $B)
+B = "${S}"
+do_configure_prepend() {
+ # Force a configure to happen
+ rm -f ${S}/config.status
+ sh ${S}/autogen.sh
+}
diff --git a/meta/recipes-webos/cmake-modules-webos/cmake-modules-webos-native.bb b/meta/recipes-webos/cmake-modules-webos/cmake-modules-webos-native.bb
new file mode 100644
index 0000000000..cc910d5715
--- /dev/null
+++ b/meta/recipes-webos/cmake-modules-webos/cmake-modules-webos-native.bb
@@ -0,0 +1,57 @@
+# Copyright (c) 2012-2018 LG Electronics, Inc.
+
+DESCRIPTION = "CMake modules used by webOS"
+LICENSE = "Apache-2.0"
+SECTION = "webos/devel/tools"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+WEBOS_VERSION = "1.6.3-1_4ca5fd1f785d045bd43cccaf7ce65429698abef8"
+PR = "r1"
+
+inherit webos_component
+inherit webos_public_repo
+inherit webos_enhanced_submissions
+inherit webos_arch_indep
+inherit webos_cmake
+inherit native
+
+WEBOS_CMAKE_DEPENDS = ""
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
+
+do_compile() {
+ :
+}
+
+# Keep in sync with classes/webos_pro_filesystem_paths.bbclass
+do_install_append() {
+ # The location of webOS.cmake depends on CMAKE_ROOT, which isn't accessible
+ # to OE, but it's got to be somewhere under ${D} (assume there's only one):
+ local webos_cmake=$(find ${D} -name webOS.cmake)
+
+ # Insert an invocation of _webos_init_install_vars_pro() just before
+ # the endmacro() of _webos_init_install_vars(). Output to a temporary file
+ # so that do_install() can be re-executed.
+ awk '/^macro\(_webos_init_install_vars\)/,/^endmacro\(\)/ { \
+ if ($0 == "endmacro()") { \
+ printf "\t_webos_init_install_vars_pro()\n"
+ } \
+ }; \
+ { print }' $webos_cmake > ${WORKDIR}/webOS.cmake
+
+ # Use tr to generate tabs and to prevent OE from trying to expand the
+ # WEBOS_INSTALL_* just in case they're defined in OE somehow.
+ tr '~@' '\t$' <<! >> ${WORKDIR}/webOS.cmake
+
+macro(_webos_init_install_vars_pro)
+~_webos_set_from_env(WEBOS_INSTALL_WEBOS_CUSTOMIZATIONDIR webos_customizationdir @{WEBOS_INSTALL_PREFIX}/palm/customization)
+~_webos_set_from_env(WEBOS_INSTALL_DEVELOPERDIR webos_developerdir @{WEBOS_INSTALL_MEDIADIR}/developer)
+~_webos_set_from_env(WEBOS_INSTALL_EMULATORSHAREDDIR webos_emulatorshareddir @{WEBOS_INSTALL_MEDIADIR}/shared)
+~_webos_set_from_env(WEBOS_INSTALL_FIRSTUSESENTINELFILE webos_firstusesentinelfile @{WEBOS_INSTALL_SYSMGR_LOCALSTATEDIR}/preferences/ran-firstuse)
+~_webos_set_from_env(WEBOS_INSTALL_SETTINGSSERVICE_ERRORSENTINELFILE webos_settingsservice_errorsentinelfile @{WEBOS_INSTALL_WEBOS_LOCALSTATEDIR}/settingsservice_critical_error)
+endmacro()
+!
+
+ mv -f ${WORKDIR}/webOS.cmake $webos_cmake
+}
diff --git a/meta/recipes-webos/cpushareholder-stub/cpushareholder-stub.bb b/meta/recipes-webos/cpushareholder-stub/cpushareholder-stub.bb
new file mode 100644
index 0000000000..11ce7ffad1
--- /dev/null
+++ b/meta/recipes-webos/cpushareholder-stub/cpushareholder-stub.bb
@@ -0,0 +1,22 @@
+# Copyright (c) 2012-2018 LG Electronics, Inc.
+
+SUMMARY = "Stubbed implementation of the webOS CPU shares scripts"
+AUTHOR = "Maksym Shevchenko <myshevchenko@luxoft.com>"
+SECTION = "webos/base"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+RPROVIDES_${PN} = "cpushareholder"
+
+WEBOS_VERSION = "2.0.1-1_4f7322eb7854e3df5139cc54266a2c400b45b4f9"
+PR = "r2"
+
+inherit webos_component
+inherit webos_public_repo
+inherit webos_enhanced_submissions
+inherit webos_cmake
+inherit webos_arch_indep
+inherit webos_program
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
diff --git a/meta/recipes-webos/gtest/gtest/0001-explicit-bool-cast.patch b/meta/recipes-webos/gtest/gtest/0001-explicit-bool-cast.patch
new file mode 100644
index 0000000000..15b06dd232
--- /dev/null
+++ b/meta/recipes-webos/gtest/gtest/0001-explicit-bool-cast.patch
@@ -0,0 +1,26 @@
+Copyright (c) 2014 LG Electronics, Inc.
+
+From: Andrii Motsok <andrii.motsok@lge.com>
+Date: Wed, 28 May 2014 14:40:31 +0300
+Subject: [PATCH] Explicit bool cast
+
+---
+ include/gtest/internal/gtest-internal.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/gtest/internal/gtest-internal.h b/include/gtest/internal/gtest-internal.h
+index 0dcc3a3..d5c13cf 100644
+--- a/include/gtest/internal/gtest-internal.h
++++ b/include/gtest/internal/gtest-internal.h
+@@ -1108,7 +1108,7 @@ class NativeArray {
+ #define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \
+ GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
+ if (const ::testing::AssertionResult gtest_ar_ = \
+- ::testing::AssertionResult(expression)) \
++ ::testing::AssertionResult(bool(expression))) \
+ ; \
+ else \
+ fail(::testing::internal::GetBoolAssertionFailureMessage(\
+--
+1.7.9.5
+
diff --git a/meta/recipes-webos/gtest/gtest/CMakeLists-gtest.pc.in-Add-pkg-config-support-to-gte.patch b/meta/recipes-webos/gtest/gtest/CMakeLists-gtest.pc.in-Add-pkg-config-support-to-gte.patch
new file mode 100644
index 0000000000..1ece136b6a
--- /dev/null
+++ b/meta/recipes-webos/gtest/gtest/CMakeLists-gtest.pc.in-Add-pkg-config-support-to-gte.patch
@@ -0,0 +1,55 @@
+From d4b25ce723812faf78d8ee038b7cbed00cbba682 Mon Sep 17 00:00:00 2001
+From: Rodrigo Caimi <caimi@datacom.ind.br>
+Date: Tue, 7 Oct 2014 15:37:10 -0300
+Subject: [PATCH] CMakeLists, gtest.pc.in: Add pkg-config support to gtest
+ 1.7.0
+
+Signed-off-by: Rodrigo Caimi <caimi@datacom.ind.br>
+---
+ CMakeLists.txt | 6 ++++++
+ gtest.pc.in | 9 +++++++++
+ 2 files changed, 15 insertions(+)
+ create mode 100644 gtest.pc.in
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 281c4c2..e4354a8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -29,6 +29,9 @@ if (COMMAND pre_project_set_up_hermetic_build)
+ pre_project_set_up_hermetic_build()
+ endif()
+
++# pkg-config support
++configure_file("gtest.pc.in" "gtest.pc" @ONLY)
++
+ ########################################################################
+ #
+ # Project-wide settings
+@@ -75,6 +78,9 @@ target_link_libraries(gtest_main gtest)
+
+ install(TARGETS gtest DESTINATION lib)
+ install(TARGETS gtest_main DESTINATION lib)
++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gtest.pc"
++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/"
++)
+
+ ########################################################################
+ #
+diff --git a/gtest.pc.in b/gtest.pc.in
+new file mode 100644
+index 0000000..57b1049
+--- /dev/null
++++ b/gtest.pc.in
+@@ -0,0 +1,9 @@
++Name: libgtest
++Version: 1.7.0
++Description: Google's framework for writing C++ tests on a variety of platforms
++
++prefix=@CMAKE_INSTALL_PREFIX@
++includedir=${prefix}/include
++libdir=${prefix}/lib
++Cflags:-I${includedir}/gtest
++Libs: -L${libdir} -lgtest -lgtest_main
+--
+1.9.1
+
diff --git a/meta/recipes-webos/gtest/gtest/cmake-Add-install-command-for-libraries-and-headers.patch b/meta/recipes-webos/gtest/gtest/cmake-Add-install-command-for-libraries-and-headers.patch
new file mode 100644
index 0000000000..0c160b02a9
--- /dev/null
+++ b/meta/recipes-webos/gtest/gtest/cmake-Add-install-command-for-libraries-and-headers.patch
@@ -0,0 +1,39 @@
+From 5318983562be6babeb5a6996e7dda4b31acfdba8 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Wed, 30 Jul 2014 16:49:53 -0300
+Subject: [PATCH] cmake: Add install command for libraries and headers
+Organization: O.S. Systems Software LTDA.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ CMakeLists.txt | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 57470c8..281c4c2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -56,6 +56,8 @@ include_directories(
+ ${gtest_SOURCE_DIR}/include
+ ${gtest_SOURCE_DIR})
+
++install(DIRECTORY ${gtest_SOURCE_DIR}/include/gtest DESTINATION include)
++
+ # Where Google Test's libraries can be found.
+ link_directories(${gtest_BINARY_DIR}/src)
+
+@@ -71,6 +73,9 @@ cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
+ cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
+ target_link_libraries(gtest_main gtest)
+
++install(TARGETS gtest DESTINATION lib)
++install(TARGETS gtest_main DESTINATION lib)
++
+ ########################################################################
+ #
+ # Samples on how to link user tests with gtest or gtest_main.
+--
+1.9.1
+
diff --git a/meta/recipes-webos/gtest/gtest_1.7.0.bb b/meta/recipes-webos/gtest/gtest_1.7.0.bb
new file mode 100644
index 0000000000..b57543555d
--- /dev/null
+++ b/meta/recipes-webos/gtest/gtest_1.7.0.bb
@@ -0,0 +1,60 @@
+# Copyright (c) 2013-2017 LG Electronics, Inc.
+
+DESCRIPTION = "Google C++ Testing Framework"
+HOMEPAGE = "https://code.google.com/p/googletest"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=cbbd27594afd089daa160d3a16dd515a"
+
+PR = "r5"
+
+# matches release-1.7.0 tag, which doesn't exist on any branch
+SRCREV = "c99458533a9b4c743ed51537e25989ea55944908"
+SRC_URI = "\
+ git://github.com/google/googletest.git;nobranch=1 \
+ file://cmake-Add-install-command-for-libraries-and-headers.patch \
+ file://CMakeLists-gtest.pc.in-Add-pkg-config-support-to-gte.patch \
+ file://0001-explicit-bool-cast.patch \
+"
+S = "${WORKDIR}/git"
+
+inherit lib_package
+inherit cmake
+
+WEBOS_NO_STATIC_LIBRARIES_WHITELIST = "libgtest.a libgtest_main.a"
+
+# GTest developers recommend to use source code instead of linking
+# against a prebuilt library.
+do_install() {
+ mkdir ${B}/fused-src || true
+ ${S}/scripts/fuse_gtest_files.py ${B}/fused-src
+ cp -vf ${S}/src/gtest_main.cc ${B}/fused-src/gtest/
+
+ install -d ${D}${includedir}/gtest/internal
+ install -d ${D}${prefix}/src/gtest/src
+ install -d ${D}${prefix}/src/gtest/cmake
+
+ install -v -m 0644 ${S}/include/gtest/*.h ${D}${includedir}/gtest
+ install -v -m 0644 ${S}/include/gtest/internal/*.h ${D}${includedir}/gtest/internal
+ install -v -m 0644 ${B}/fused-src/gtest/* ${D}${prefix}/src/gtest/src
+ install -v -m 0644 ${S}/CMakeLists.txt ${D}${prefix}/src/gtest
+ install -v -m 0644 ${S}/cmake/* ${D}${prefix}/src/gtest/cmake
+ install -v -m 0644 ${S}/gtest.pc.in ${D}${prefix}/src/gtest
+
+ install -d ${D}${libdir}/pkgconfig
+
+ install -v -m 0644 ${B}/*.a ${D}${libdir}
+ install -v -m 0644 ${B}/gtest.pc ${D}${libdir}/pkgconfig
+
+ install -d ${D}${bindir}/gtest
+ install -v -m 0755 ${S}/test/*.py ${D}${bindir}/gtest
+}
+
+sysroot_stage_all_append() {
+ sysroot_stage_dir ${D}${prefix}/src ${SYSROOT_DESTDIR}${prefix}/src
+}
+
+FILES_${PN} += "${bindir}/gtest"
+FILES_${PN}-dev += "${prefix}/src"
+
+ALLOW_EMPTY_${PN} = "1"
+ALLOW_EMPTY_${PN}-dbg = "1"
diff --git a/meta/recipes-webos/lemon/files/lemon.1 b/meta/recipes-webos/lemon/files/lemon.1
new file mode 100644
index 0000000000..914ee07013
--- /dev/null
+++ b/meta/recipes-webos/lemon/files/lemon.1
@@ -0,0 +1,63 @@
+.Dd 2002-10-04
+.Dt LEMON 1
+.Os "Debian GNU/Linux"
+.\" Manual page created by Guus Sliepen <guus@debian.org>
+.Sh NAME
+.Nm lemon
+.Nd The Lemon Parser Generator
+.Sh SYNOPSIS
+.Nm
+.Op Fl bcgmqsx
+.Ar input
+.Sh DESCRIPTION
+.Nm
+is an LALR(1) parser generator for C or C++.
+It does the same job as bison and yacc.
+But
+.Nm
+is not another bison or yacc clone.
+It uses a different grammar syntax which is designed to reduce the number of coding errors.
+.Nm
+also uses a more sophisticated parsing engine that is faster than yacc and bison
+and which is both reentrant and thread-safe.
+Furthermore,
+.Nm
+implements features that can be used to eliminate resource leaks,
+making is suitable for use in long-running programs such as graphical user interfaces or embedded controllers.
+.Pp
+.Nm
+will read the grammer from
+.Ar input
+and write out a parser for that grammar in the C language.
+.Sh OPTIONS
+.Bl -tag -width indent
+.It Fl b
+Print only the basis in report.
+.It Fl c
+Don't compress the action table.
+.It Fl g
+Print grammar without actions.
+.It Fl m
+Output a makeheaders compatible file.
+.It Fl q
+(Quiet) Don't print the report file.
+.It Fl s
+Print parser stats to standard output.
+.It Fl x
+Print the version number.
+.El
+.Sh FILES
+.Bl -tag -width indent
+.It Pa /usr/share/lemon/lempar.c
+Driver template for the
+.Nm
+parser generator.
+.El
+.Sh AUTHOR
+.Nm
+has been written by
+.An D. Richard Hipp Aq drh@hwaci.com .
+.Pp
+This manual page was written by
+.An Guus Sliepen Aq guus@debian.org
+for the Debian GNU/Linux system.
diff --git a/meta/recipes-webos/lemon/lemon.inc b/meta/recipes-webos/lemon/lemon.inc
new file mode 100644
index 0000000000..57b9fb710e
--- /dev/null
+++ b/meta/recipes-webos/lemon/lemon.inc
@@ -0,0 +1,25 @@
+DESCRIPTION = "The Lemon Parser Generator"
+HOMEPAGE = "http://www.hwaci.com/sw/lemon/"
+LICENSE = "PD"
+SECTION = "devel"
+
+SRC_URI = "http://www.sqlite.org/sqlite-${PV}.tar.gz \
+ file://lemon.1"
+
+S = "${WORKDIR}/sqlite-${PV}/tool"
+
+do_compile() {
+ ${CC} ${CFLAGS} lemon.c -c -o lemon.o
+ ${CCLD} ${LDFLAGS} lemon.o -o lemon
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 lemon ${D}${bindir}
+ install -m 0644 lempar.c ${D}${bindir}
+ install -d ${D}${mandir}/man1
+ install -m 0644 ${WORKDIR}/lemon.1 ${D}${mandir}/man1/
+}
+
+BBCLASSEXTEND = "native"
+
diff --git a/meta/recipes-webos/lemon/lemon_3.7.3.bb b/meta/recipes-webos/lemon/lemon_3.7.3.bb
new file mode 100644
index 0000000000..354db17e6e
--- /dev/null
+++ b/meta/recipes-webos/lemon/lemon_3.7.3.bb
@@ -0,0 +1,7 @@
+require lemon.inc
+
+LIC_FILES_CHKSUM = "file://lemon.c;endline=8;md5=c7551a78fa3fdecd96d1ad6761d205ee"
+
+SRC_URI[md5sum] = "5437978aae90350cf984993091e0d695"
+SRC_URI[sha256sum] = "dbf352e8fbb74829f5e7a88f9f6ceeb80a709537f668c36e4b6cdfb271309ef6"
+
diff --git a/meta/recipes-webos/libpbnjson/libpbnjson.bb b/meta/recipes-webos/libpbnjson/libpbnjson.bb
new file mode 100644
index 0000000000..b6691165db
--- /dev/null
+++ b/meta/recipes-webos/libpbnjson/libpbnjson.bb
@@ -0,0 +1,39 @@
+# Copyright (c) 2012-2018 LG Electronics, Inc.
+
+SUMMARY = "Palm's Better Native JSON library"
+AUTHOR = "Anatolii Sakhnik <anatolii.sakhnik@lge.com>"
+SECTION = "webos/libs"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+DEPENDS = "yajl glib-2.0 gperf-native flex-native lemon-native gmp uriparser boost"
+
+WEBOS_VERSION = "2.15.0-1_bdfbf107257bbe674c5e3b85b02c7cba419ea2aa"
+PR = "r7"
+
+inherit webos_component
+inherit webos_public_repo
+inherit webos_enhanced_submissions
+inherit webos_cmake
+inherit webos_library
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG_append_class-native = " tools"
+
+# These are the defaults, but explicitly specify so that readers know they exist
+EXTRA_OECMAKE += "-DWITH_DOCS:BOOL=FALSE -DWITH_TESTS:BOOL=FALSE -DNO_LOGGING:BOOL=TRUE"
+# Disable #line statements in autogenerated files
+EXTRA_OECMAKE += "-DLEMON_WITH_LINE:BOOL=FALSE"
+# Don't use CMake detection mechanisms for AR (it fails for class-native)
+EXTRA_OECMAKE += "-DCMAKE_AR:FILEPATH=${AR}"
+
+PACKAGECONFIG[tools] = "-DPBNJSON_INSTALL_TOOLS:BOOL=TRUE,-DPBNJSON_INSTALL_TOOLS:BOOL=FALSE"
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native"
+
+# Otherwise it fails with:
+# libpbnjson-native/2.15.0-68-r7/git/src/pbnjson_c/validation/schema_builder.c:24:10: fatal error: schema_keywords.h: No such file or directory
+OECMAKE_GENERATOR="Unix Makefiles"
diff --git a/meta/recipes-webos/luna-init/luna-init.bb b/meta/recipes-webos/luna-init/luna-init.bb
new file mode 100644
index 0000000000..5be37da91b
--- /dev/null
+++ b/meta/recipes-webos/luna-init/luna-init.bb
@@ -0,0 +1,45 @@
+# Copyright (c) 2012-2018 LG Electronics, Inc.
+
+SUMMARY = "Initialization, setup, and font files used by luna-sysmgr and luna-sysservice"
+AUTHOR = "Alekseyev Oleksandr <alekseyev.oleksandr@lge.com>"
+SECTION = "webos/base"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+DEPENDS = "tzdata python-tz-native"
+
+WEBOS_VERSION = "2.0.1-1_701ec4b373b776fba829c882b05ae19de9a476ed"
+PR = "r14"
+
+#inherit webos_component TODO
+inherit webos_arch_indep
+inherit webos_public_repo
+inherit webos_enhanced_submissions
+inherit webos_cmake
+inherit pythonnative
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
+
+do_install_append() {
+ # Expand fonts tarball
+ if [ -e ${S}/files/conf/fonts/fonts.tgz ]; then
+ install -d ${D}${datadir}/fonts
+ tar xvzf ${S}/files/conf/fonts/fonts.tgz --directory=${D}${datadir}/fonts
+ fi
+ install -d ${D}${webos_sysconfdir}
+ install -v -m 644 ${S}/files/conf/locale.txt ${D}${webos_sysconfdir}
+}
+
+do_install_append_webos() {
+ install -v -m 644 ${S}/files/conf/apollo/defaultPreferences.txt ${D}${webos_sysconfdir}
+}
+
+PACKAGES =+ "${PN}-fonts"
+FILES_${PN} += "${webos_prefix} ${webos_sysconfdir}"
+FILES_${PN}-fonts += "${datadir}/fonts/"
+
+# until pseudo is completely fixed
+# PLAT-48507 pseudo: random package_qa failures
+# This issue seems to be triggered only in luna-init-fonts packages
+#INSANE_SKIP_${PN}-fonts += "host-user-contaminated"
diff --git a/meta/recipes-webos/luna-prefs/luna-prefs-data.bb b/meta/recipes-webos/luna-prefs/luna-prefs-data.bb
new file mode 100644
index 0000000000..cd6b3844c6
--- /dev/null
+++ b/meta/recipes-webos/luna-prefs/luna-prefs-data.bb
@@ -0,0 +1,47 @@
+# Copyright (c) 2015 LG Electronics, Inc.
+
+# WARNING: This recipe appears in the SIGGEN_EXCLUDERECIPES_ABISAFE list in
+# conf/layer.conf which means that changes to it will not be used in the generation
+# of sstate signatures. This is unlikely to cause problems, unless luna-prefs is
+# changed to no longer use the files under /etc/prefs/properties to determine the
+# properties its exposes and their values.
+
+SUMMARY = "Preferences Manager data for ${MACHINE}"
+AUTHOR = "Oleksandr Ivanov <oleksandr.ivanov@lge.com>"
+SECTION = "webos/base"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+PV = "3.0.0"
+PR = "r1"
+
+inherit webos_machine_dep
+
+PRODUCT_DEVICE_NAME ?= "${DISTRO_NAME} Device"
+PRODUCT_DEVICE_NAME_BRANDED ?= "LGE ${DISTRO_NAME} Device"
+PRODUCT_DEVICE_NAME_SHORT ?= "${DISTRO_NAME} Device"
+PRODUCT_DEVICE_NAME_SHORT_BRANDED ?= "LGE ${DISTRO_NAME} Device"
+PRODUCT_DEVICE_NAME_PRODUCT_LINE_NAME ?= "${DISTRO_NAME} Device"
+PRODUCT_DEVICE_NAME_PRODUCT_CLASS ?= "${DISTRO_NAME}"
+PRODUCT_DEVICE_NAME_PRODUCT_BROWSER_OS_NAME ?= "${DISTRO_NAME}"
+
+# Versions can not be overridden
+PRODUCT_DEVICE_NAME_PRODUCT_BROWSER_OS_VERSION = "${WEBOS_DISTRO_API_VERSION}"
+
+do_install() {
+ install -d ${D}${sysconfdir}/prefs/properties
+
+ echo -n "${PRODUCT_DEVICE_NAME}" > ${D}${sysconfdir}/prefs/properties/deviceName
+ echo -n "${PRODUCT_DEVICE_NAME_BRANDED}" > ${D}${sysconfdir}/prefs/properties/deviceNameBranded
+ echo -n "${PRODUCT_DEVICE_NAME_SHORT}" > ${D}${sysconfdir}/prefs/properties/deviceNameShort
+ echo -n "${PRODUCT_DEVICE_NAME_SHORT_BRANDED}" > ${D}${sysconfdir}/prefs/properties/deviceNameShortBranded
+ echo -n "${MACHINE}" > ${D}${sysconfdir}/prefs/properties/machineName
+ echo -n "${PRODUCT_DEVICE_NAME_PRODUCT_LINE_NAME}" > ${D}${sysconfdir}/prefs/properties/productLineName
+ echo -n "${PRODUCT_DEVICE_NAME_PRODUCT_CLASS}" > ${D}${sysconfdir}/prefs/properties/productClass
+ echo -n "${PRODUCT_DEVICE_NAME_PRODUCT_BROWSER_OS_NAME}" > ${D}${sysconfdir}/prefs/properties/browserOsName
+ if [ "webOS" = "${PRODUCT_DEVICE_NAME_PRODUCT_BROWSER_OS_NAME}" ]
+ then
+ echo -n "${PRODUCT_DEVICE_NAME_PRODUCT_BROWSER_OS_VERSION}" > ${D}${sysconfdir}/prefs/properties/browserOsVersion
+ fi
+}
+
diff --git a/meta/recipes-webos/luna-prefs/luna-prefs.bb b/meta/recipes-webos/luna-prefs/luna-prefs.bb
new file mode 100644
index 0000000000..b1b03ac8e0
--- /dev/null
+++ b/meta/recipes-webos/luna-prefs/luna-prefs.bb
@@ -0,0 +1,32 @@
+# Copyright (c) 2012-2018 LG Electronics, Inc.
+
+SUMMARY = "webOS preferences manager"
+AUTHOR = "Oleksandr Ivanov <oleksandr.ivanov@lge.com>"
+SECTION = "webos/base"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+DEPENDS = "luna-service2 cjson sqlite3 glib-2.0 nyx-lib"
+RDEPENDS_${PN} = "luna-prefs-data"
+
+WEBOS_VERSION = "3.0.0-1_0827814ccdc5ebe2b372d90120427043cc6ac94e"
+PR = "r12"
+
+#inherit webos_component
+inherit webos_public_repo
+inherit webos_enhanced_submissions
+inherit webos_cmake
+inherit webos_program
+inherit webos_library
+inherit webos_system_bus
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
+
+do_install_append() {
+ # CFISH-930: remove "other" perms granted by pmmakefiles (aka palmmake):
+ chmod o-rwx ${D}${bindir}/luna-prefs-service
+ chmod o-rwx ${D}${bindir}/lunaprop
+
+}
+
diff --git a/meta/recipes-webos/luna-service2-security-conf/luna-service2-security-conf.bb b/meta/recipes-webos/luna-service2-security-conf/luna-service2-security-conf.bb
new file mode 100644
index 0000000000..60ab2bbb7f
--- /dev/null
+++ b/meta/recipes-webos/luna-service2-security-conf/luna-service2-security-conf.bb
@@ -0,0 +1,28 @@
+# Copyright (c) 2015-2018 LG Electronics, Inc.
+
+SUMMARY = "webOS LS2 security configuration"
+AUTHOR = "Anatolii Sakhnik <anatolii.sakhnik@lge.com>"
+SECTION = "webos/base"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+WEBOS_VERSION = "1.0.2-1_1304f4377720e076a252cf4d24c098647db048ec"
+PR = "r2"
+
+inherit webos_component
+inherit webos_public_repo
+inherit webos_enhanced_submissions
+inherit webos_cmake
+inherit webos_system_bus
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
+
+FILES_${PN} += "${webos_sysbus_datadir}"
+
+# The security configuration data isn't needed to build other components => don't stage it.
+sysroot_stage_dirs_append() {
+ # ${to} is the 2nd parameter passed to sysroot_stage_dir(),
+ # e.g. ${SYSROOT_DESTDIR} passed from sysroot_stage_all()
+ rm -vrf ${to}${webos_sysbus_datadir}
+}
diff --git a/meta/recipes-webos/luna-service2/luna-service2.bb b/meta/recipes-webos/luna-service2/luna-service2.bb
new file mode 100644
index 0000000000..f29272c7dd
--- /dev/null
+++ b/meta/recipes-webos/luna-service2/luna-service2.bb
@@ -0,0 +1,60 @@
+# Copyright (c) 2012-2018 LG Electronics, Inc.
+
+SUMMARY = "webOS Luna System Bus library, daemon, and utilities"
+AUTHOR = "Anatolii Sakhnik <anatolii.sakhnik@lge.com>"
+SECTION = "webos/base"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+DEPENDS = "libpbnjson pmloglib glib-2.0 gtest"
+VIRTUAL-RUNTIME_cpushareholder ?= "cpushareholder-stub"
+VIRTUAL-RUNTIME_rdx-utils ?= "rdxd"
+VIRTUAL-RUNTIME_bash ?= "bash"
+RDEPENDS_${PN} = "luna-service2-security-conf ${VIRTUAL-RUNTIME_cpushareholder} ${VIRTUAL-RUNTIME_rdx-utils} ${VIRTUAL-RUNTIME_bash}"
+
+WEBOS_VERSION = "3.21.2-1_ee050fd7507c1fb5f014709307add1dbf670ef23"
+PR = "r23"
+
+WEBOS_DISTRO_PRERELEASE ??= ""
+EXTRA_OECMAKE += "${@ '-DWEBOS_DISTRO_PRERELEASE:STRING="devel"' \
+ if d.getVar('WEBOS_DISTRO_PRERELEASE',True) != '' else ''}"
+
+inherit webos_component
+inherit webos_public_repo
+inherit webos_enhanced_submissions
+inherit webos_cmake
+inherit webos_library
+inherit webos_daemon
+inherit webos_program
+inherit webos_system_bus
+inherit webos_core_os_dep
+inherit webos_machine_impl_dep
+inherit webos_prerelease_dep
+inherit webos_lttng
+inherit webos_test_provider
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
+
+# This fix-up will be removed shortly. luna-service2 headers must be included
+# using '#include <luna-service2/*.h>'
+do_install_append() {
+ # XXX Temporarily, create links from the old locations until all users of
+ # luna-service2 convert to using pkg-config
+ ln -svnf luna-service2/lunaservice.h ${D}${includedir}/lunaservice.h
+ ln -svnf luna-service2/lunaservice-errors.h ${D}${includedir}/lunaservice-errors.h
+ ln -svnf lib${BPN}.so ${D}${libdir}/liblunaservice.so
+}
+
+# Disable LTTng tracepoints explicitly.
+# LTTng tracepoints in LS2 can cause out of memory, because LS2 is used by many components.
+# To enable tracepoints back use WEBOS_LTTNG_ENABLED_pn-luna-service2 = "1"
+WEBOS_LTTNG_ENABLED = "0"
+EXTRA_OECMAKE += " ${@bb.utils.contains('WEBOS_LTTNG_ENABLED', '1', '-DWEBOS_LTTNG_ENABLED:BOOLEAN=True', '', d)}"
+
+WEBOS_DISABLE_LS2_SECURITY ?= "0"
+EXTRA_OECMAKE += '${@oe.utils.conditional("WEBOS_DISABLE_LS2_SECURITY", "1", "-DWEBOS_LS2_SECURE:BOOLEAN=False", "" ,d)}'
+
+PACKAGES += "${PN}-perf"
+
+FILES_${PN}-perf += "${webos_testsdir}/${BPN}-perf"
diff --git a/meta/recipes-webos/nyx-lib/nyx-lib.bb b/meta/recipes-webos/nyx-lib/nyx-lib.bb
new file mode 100644
index 0000000000..fb7d9acc39
--- /dev/null
+++ b/meta/recipes-webos/nyx-lib/nyx-lib.bb
@@ -0,0 +1,32 @@
+# Copyright (c) 2012-2018 LG Electronics, Inc.
+
+SUMMARY = "webOS portability layer - library"
+AUTHOR = "Keith Derrick <keith.derrick@lge.com>"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+SECTION = "webos/libs"
+
+# nyx-lib needs nyx-modules at runtime, but a runtime dependency is not defined
+# here because nyx-modules is MACHINE_ARCH (e.g. qemux86), while nyx-lib is
+# TUNE_PKGARCH (e.g. i586). Instead, it is pulled into the image by adding it to
+# the RDPENDS_${PN} of packagegroup-webos-extended. Putting
+# RDEPENDS_${PN} = "nyx-modules"
+# here would cause bitbake to re-execute the do_package task for each MACHINE,
+# even if these MACHINE-s were all i586 and should therefore share the same nyx-lib
+# .ipk and sstate files. (The reason do_package is re-executed when a component
+# in any of the R* variables is re-built is because its package name is stored in
+# this component's .ipk and it may have changed because debian.bbclass is inherited.)
+
+DEPENDS = "glib-2.0 pmloglib"
+
+WEBOS_VERSION = "7.3.0-1_fa1ed2c0365ece68282e8d26951de1f043874a6c"
+PR = "r7"
+
+inherit webos_component
+inherit webos_public_repo
+inherit webos_enhanced_submissions
+inherit webos_cmake
+inherit webos_library
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
diff --git a/meta/recipes-webos/nyx-utils/nyx-utils.bb b/meta/recipes-webos/nyx-utils/nyx-utils.bb
new file mode 100644
index 0000000000..c96f277505
--- /dev/null
+++ b/meta/recipes-webos/nyx-utils/nyx-utils.bb
@@ -0,0 +1,23 @@
+# Copyright (c) 2012-2018 LG Electronics, Inc.
+
+SUMMARY = "Command line utilities for the webOS Platform Portability Layer"
+AUTHOR = "Ed Chejlava <ed.chejlava@lge.com>"
+SECTION = "webos/base"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+DEPENDS = "nyx-lib glib-2.0"
+
+WEBOS_VERSION = "1.5.0-1_31fae17542c46ff0f6b5a8e0bbf1461d61881f2a"
+PR = "r2"
+
+inherit webos_component
+inherit webos_public_repo
+inherit webos_enhanced_submissions
+inherit webos_cmake
+inherit webos_program
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
+
+FILES_${PN} += "${libdir}/nyx/nyxcmd/"
diff --git a/meta/recipes-webos/pmloglib/pmloglib-private.bb b/meta/recipes-webos/pmloglib/pmloglib-private.bb
new file mode 100644
index 0000000000..db974af200
--- /dev/null
+++ b/meta/recipes-webos/pmloglib/pmloglib-private.bb
@@ -0,0 +1,25 @@
+# Copyright (c) 2013-2018 LG Electronics, Inc.
+
+SUMMARY = "webOS logging library - private interface"
+AUTHOR = "Anatolii Sakhnik <anatolii.sakhnik@lge.com>"
+SECTION = "webos/libs"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+WEBOS_VERSION = "3.3.0-1_1de57d269d4c6cc2dba93c4683acc22cbc2ecb35"
+PR = "r1"
+
+inherit webos_component
+inherit webos_public_repo
+inherit webos_enhanced_submissions
+inherit webos_cmake
+inherit webos_pkgconfig
+
+# B needs to be different from that of pmloglib so there's
+# no collision in the case of local development.
+B = "${S}/build-private"
+EXTRA_OECMAKE += "-DBUILD_PRIVATE=ON"
+
+WEBOS_REPO_NAME = "pmloglib"
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
diff --git a/meta/recipes-webos/pmloglib/pmloglib.bb b/meta/recipes-webos/pmloglib/pmloglib.bb
new file mode 100755
index 0000000000..fcc2edb5c4
--- /dev/null
+++ b/meta/recipes-webos/pmloglib/pmloglib.bb
@@ -0,0 +1,30 @@
+# Copyright (c) 2012-2018 LG Electronics, Inc.
+
+SUMMARY = "webOS logging library"
+AUTHOR = "Gayathri Srinivasan <gayathri.srinivasan@lge.com>"
+SECTION = "webos/libs"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+DEPENDS = "glib-2.0 libpbnjson"
+
+WEBOS_VERSION = "3.3.0-1_1de57d269d4c6cc2dba93c4683acc22cbc2ecb35"
+PR = "r9"
+
+LEAD_SONAME = "libPmLogLib.so"
+WEBOS_DISTRO_PRERELEASE ??= ""
+EXTRA_OECMAKE += "-DWEBOS_DISTRO_PRERELEASE:STRING='${WEBOS_DISTRO_PRERELEASE}'"
+
+inherit webos_component
+inherit webos_public_repo
+inherit webos_enhanced_submissions
+inherit webos_cmake
+inherit webos_library
+inherit webos_prerelease_dep
+inherit webos_pmlog_config
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[whitelist] = "-DENABLE_WHITELIST:BOOL=TRUE, -DENABLE_WHITELIST:BOOL=FALSE"
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
diff --git a/meta/recipes-webos/python-tz/python-tz-native_2015.4.bb b/meta/recipes-webos/python-tz/python-tz-native_2015.4.bb
new file mode 100644
index 0000000000..f3880b3f84
--- /dev/null
+++ b/meta/recipes-webos/python-tz/python-tz-native_2015.4.bb
@@ -0,0 +1,22 @@
+# Copyright (c) 2014-2015 LG Electronics, Inc.
+
+SUMMARY = "pytz brings the Olson tz database into Python"
+
+DESCRIPTION="This library allows accurate and cross platform timezone calculations using Python 2.4 or higher"
+
+HOMEPAGE = "https://pypi.python.org/pypi/pytz/"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=22b38951eb857cf285a4560a914b7cd6"
+
+PR = "r1"
+
+SRC_URI = "https://pypi.python.org/packages/source/p/pytz/pytz-${PV}.tar.gz \
+ file://fix.for.tzdata-2015e.patch \
+"
+SRC_URI[md5sum] = "417a47b1c432d90333e42084a605d3d8"
+SRC_URI[sha256sum] = "c4ee70cb407f9284517ac368f121cf0796a7134b961e53d9daf1aaae8f44fb90"
+
+S="${WORKDIR}/pytz-${PV}"
+
+inherit native
+inherit setuptools
diff --git a/meta/recipes-webos/python-tz/python-tz/fix.for.tzdata-2015e.patch b/meta/recipes-webos/python-tz/python-tz/fix.for.tzdata-2015e.patch
new file mode 100644
index 0000000000..fed62c95fc
--- /dev/null
+++ b/meta/recipes-webos/python-tz/python-tz/fix.for.tzdata-2015e.patch
@@ -0,0 +1,29 @@
+Since tzdata-2015e there are UTF-8 characters in iso3166.tab, see:
+http://mm.icann.org/pipermail/tz/2015-May/022258.html
+http://mm.icann.org/pipermail/tz/2015-June/022306.html
+
+pytz/__init__.py:_CountryNameDict(LazyDict) is using:
+ zone_tab = open_resource('iso3166.tab')
+ try:
+ for line in zone_tab.readlines():
+ line = line.decode('US-ASCII')
+
+to read it and fails on AX, CI, RE lines, using UTF-8 fixes the
+issues and should work OK even with older tzdata releases.
+
+Upstream-Status: Submitted (https://bugs.launchpad.net/pytz/+bug/1473533)
+
+Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
+
+diff -uNr pytz-2015.4.orig/pytz/__init__.py pytz-2015.4/pytz/__init__.py
+--- pytz-2015.4.orig/pytz/__init__.py 2015-05-13 03:50:26.000000000 -0700
++++ pytz-2015.4/pytz/__init__.py 2015-07-10 11:35:30.080242726 -0700
+@@ -357,7 +357,7 @@
+ zone_tab = open_resource('iso3166.tab')
+ try:
+ for line in zone_tab.readlines():
+- line = line.decode('US-ASCII')
++ line = line.decode('UTF-8')
+ if line.startswith('#'):
+ continue
+ code, name = line.split(None, 1)
diff --git a/meta/recipes-webos/qml-webos-framework/qml-webos-framework.bb b/meta/recipes-webos/qml-webos-framework/qml-webos-framework.bb
new file mode 100644
index 0000000000..4fdbe50bda
--- /dev/null
+++ b/meta/recipes-webos/qml-webos-framework/qml-webos-framework.bb
@@ -0,0 +1,55 @@
+# Copyright (c) 2014-2018 LG Electronics, Inc.
+
+SUMMARY = "QML widgets and runtime framework for webOS apps"
+AUTHOR = "Mikko Levonmaa <mikko.levonmaa@lge.com>"
+SECTION = "webos/base"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+DEPENDS = "qt-features-webos qtdeclarative qtwayland-webos pmloglib luna-service2"
+
+RPROVIDES_${PN}-examples = " \
+ eos.bare \
+ eos.widgetgallery \
+"
+
+WEBOS_VERSION = "1.0.0-1_6546141a61ef76a475bde19272fa0155302af307"
+PR = "r23"
+
+inherit webos_qmake5
+inherit webos_enhanced_submissions
+inherit webos_machine_dep
+inherit webos_app_generate_security_files
+inherit webos_filesystem_paths
+inherit webos_distro_variant_dep
+inherit webos_qmllint
+inherit webos_public_repo
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
+
+OE_QMAKE_PATH_HEADERS = "${OE_QMAKE_PATH_QT_HEADERS}"
+
+# upstart
+do_install_append () {
+ if [ "${DISTRO}" != "webos-wearable" ] && [ "${WEBOS_TARGET_DISTRO_VARIANT}" != "mini" ]; then
+ install -d ${D}${sysconfdir}/init
+ install -m 0644 ${S}/tools/booster/booster.upstart ${D}${sysconfdir}/init/booster.conf
+ fi
+}
+
+FILES_${PN} += "${OE_QMAKE_PATH_QML}/Eos/*"
+
+PACKAGES += "${PN}-examples"
+FILES_${PN}-examples += "${webos_applicationsdir}/*"
+
+# unit-tests
+PACKAGES =+ "${PN}-tests"
+FILES_${PN}-tests += "${datadir}/booster/tests/*"
+
+# we don't provide cmake tests
+EXTRA_QMAKEVARS_POST += "CONFIG-=create_cmake"
+
+# until pseudo is completely fixed
+# PLAT-48507 pseudo: random package_qa failures
+#INSANE_SKIP_${PN} += "host-user-contaminated"
diff --git a/meta/recipes-webos/qt-features-webos/qt-features-webos.bb b/meta/recipes-webos/qt-features-webos/qt-features-webos.bb
new file mode 100644
index 0000000000..984ba7dc25
--- /dev/null
+++ b/meta/recipes-webos/qt-features-webos/qt-features-webos.bb
@@ -0,0 +1,36 @@
+# Copyright (c) 2013-2018 LG Electronics, Inc.
+
+SUMMARY = "Common Qt features for webOS components"
+AUTHOR = "Anupam Kaul <anulam.kaul@lge.com>"
+SECTION = "webos/base"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+DEPENDS = "qtbase"
+
+WEBOS_VERSION = "1.0.0-1_67a99fc04d01e3025d137f7d50b0aa15016c4525"
+PR = "r4"
+
+inherit webos_qmake5
+inherit webos_enhanced_submissions
+inherit webos_public_repo
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
+
+SRC_URI += "file://qt.patch"
+
+FILES_${PN}-dev += "${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs"
+
+# An empty package is needed to satisfy package dependencies when building bdk.
+ALLOW_EMPTY_${PN} = "1"
+
+BBCLASSEXTEND = "native"
+
+do_configure_class-native() {
+ ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} -r ${S}/tools/generate_qmap
+}
+
+do_install_class-native() {
+ oe_runmake install INSTALL_ROOT=${D}
+}
diff --git a/meta/recipes-webos/qt-features-webos/qt-features-webos/qt.patch b/meta/recipes-webos/qt-features-webos/qt-features-webos/qt.patch
new file mode 100644
index 0000000000..35749a7c1f
--- /dev/null
+++ b/meta/recipes-webos/qt-features-webos/qt-features-webos/qt.patch
@@ -0,0 +1,76 @@
+---
+ tools/generate_qmap/generate_qmap.cpp | 35 +++++++++++++++++++++++++++++++----
+ tools/generate_qmap/generate_qmap.pro | 2 +-
+ 2 files changed, 32 insertions(+), 5 deletions(-)
+
+diff --git a/tools/generate_qmap/generate_qmap.cpp b/tools/generate_qmap/generate_qmap.cpp
+index 0ec03d1..2df5834 100644
+--- a/tools/generate_qmap/generate_qmap.cpp
++++ b/tools/generate_qmap/generate_qmap.cpp
+@@ -18,7 +18,35 @@
+ #include <QDataStream>
+ #include <QDebug>
+
+-#include <QtPlatformSupport/private/qevdevkeyboardhandler_p.h>
++namespace QEvdevKeyboardMap {
++ const quint32 FileMagic = 0x514d4150; // 'QMAP'
++
++ struct Mapping {
++ quint16 keycode;
++ quint16 unicode;
++ quint32 qtcode;
++ quint8 modifiers;
++ quint8 flags;
++ quint16 special;
++
++ };
++
++ struct Composing {
++ quint16 first;
++ quint16 second;
++ quint16 result;
++ };
++}
++
++inline QDataStream &operator<<(QDataStream &ds, const QEvdevKeyboardMap::Mapping &m)
++{
++ return ds << m.keycode << m.unicode << m.qtcode << m.modifiers << m.flags << m.special;
++}
++
++inline QDataStream &operator<<(QDataStream &ds, const QEvdevKeyboardMap::Composing &c)
++{
++ return ds << c.first << c.second << c.result;
++}
+
+ //HACK : to use evdev default keymap which is private static variable
+ //Change to the class name for local usage QEvdevKeyboardHandler -> WebOSKeymapHandler
+@@ -26,11 +54,10 @@
+ class WebOSKeymapHandler
+ {
+ public:
+- static const QEvdevKeyboardMap::Mapping s_keymap_default[];
+- static const QEvdevKeyboardMap::Composing s_keycompose_default[];
++ static const QEvdevKeyboardMap::Mapping s_keymap_default[0];
++ static const QEvdevKeyboardMap::Composing s_keycompose_default[0];
+ };
+ #define QEvdevKeyboardHandler WebOSKeymapHandler
+-#include <QtPlatformSupport/private/qevdevkeyboard_defaultmap_p.h>
+
+ #include "webos_keymap_p.h"
+
+diff --git a/tools/generate_qmap/generate_qmap.pro b/tools/generate_qmap/generate_qmap.pro
+index 0825651..4d84906 100644
+--- a/tools/generate_qmap/generate_qmap.pro
++++ b/tools/generate_qmap/generate_qmap.pro
+@@ -20,7 +20,7 @@ CONFIG += no_module_headers internal_module
+
+ TARGET = generate_qmap
+ CONFIG += console warn_off
+-QT = core platformsupport-private
++QT = core
+
+ SOURCES += generate_qmap.cpp
+
+--
+1.9.1
+
diff --git a/meta/recipes-webos/qt5/qtwayland-native_git.bbappend b/meta/recipes-webos/qt5/qtwayland-native_git.bbappend
new file mode 100644
index 0000000000..19be80b426
--- /dev/null
+++ b/meta/recipes-webos/qt5/qtwayland-native_git.bbappend
@@ -0,0 +1,28 @@
+# Copyright (c) 2014-2018 LG Electronics, Inc.
+
+AUTHOR = "Anupam Kaul <anupam.kaul@lge.com>"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/qtwayland-native:"
+
+WEBOS_VERSION = "5.4.2-1_ee4a49f2ab723631174d7f2b8dae2263565c9ece"
+
+EXTENDPRAUTO_append = "webos2"
+
+# Upstream 5.5.0 recipe updated LIC_FILES_CHKSUM
+LIC_FILES_CHKSUM = " \
+ file://LICENSE.LGPL;md5=4193e7f1d47a858f6b7c0f1ee66161de \
+ file://LICENSE.GPL;md5=d32239bcb673463ab874e80d47fae504 \
+ file://LGPL_EXCEPTION.txt;md5=0145c4d1b6f96a661c2c139dfb268fb6 \
+ file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
+"
+
+inherit webos_enhanced_submissions
+inherit webos_public_repo
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+
+# Carrying the "0001-Install-the-qtwaylandscanner-tool-to-the-native-side" from the
+# base recipe
+SRC_URI_append = " \
+ file://0001-Install-the-qtwaylandscanner-tool-to-the-native-side.patch \
+"
diff --git a/meta/recipes-webos/qt5/qtwayland/qt.patch b/meta/recipes-webos/qt5/qtwayland/qt.patch
new file mode 100644
index 0000000000..d70097d24d
--- /dev/null
+++ b/meta/recipes-webos/qt5/qtwayland/qt.patch
@@ -0,0 +1,91 @@
+From 7c530fc16626fb63eb4b5991476a45b9e747d3aa Mon Sep 17 00:00:00 2001
+From: Martin Jansa <martin.jansa@lge.com>
+Date: Mon, 26 Feb 2018 19:45:51 +0000
+Subject: [PATCH] WIP: qt 5.11 compatibility
+
+Signed-off-by: Martin Jansa <martin.jansa@lge.com>
+---
+ src/client/qwaylanddnd.cpp | 7 -------
+ src/client/qwaylanddnd_p.h | 2 --
+ src/client/qwaylandwindow.cpp | 4 ++--
+ src/client/qwaylandwindow_p.h | 4 ++--
+ 4 files changed, 4 insertions(+), 13 deletions(-)
+
+diff --git a/src/client/qwaylanddnd.cpp b/src/client/qwaylanddnd.cpp
+index 94a2687..e51325e 100644
+--- a/src/client/qwaylanddnd.cpp
++++ b/src/client/qwaylanddnd.cpp
+@@ -62,13 +62,6 @@ QWaylandDrag::~QWaylandDrag()
+ {
+ }
+
+-QMimeData * QWaylandDrag::platformDropData()
+-{
+- if (drag())
+- return drag()->mimeData();
+- return 0;
+-}
+-
+ void QWaylandDrag::startDrag()
+ {
+ bool cancel = false;
+diff --git a/src/client/qwaylanddnd_p.h b/src/client/qwaylanddnd_p.h
+index 1d1b277..d8ccc02 100644
+--- a/src/client/qwaylanddnd_p.h
++++ b/src/client/qwaylanddnd_p.h
+@@ -60,8 +60,6 @@ public:
+ QWaylandDrag(QWaylandDisplay *display);
+ ~QWaylandDrag();
+
+- QMimeData *platformDropData() Q_DECL_OVERRIDE;
+-
+ void updateTarget(const QString &mimeType);
+ void setResponse(const QPlatformDragQtResponse &response);
+ void finishDrag(const QPlatformDropQtResponse &response);
+diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
+index 6d27473..e2097f5 100644
+--- a/src/client/qwaylandwindow.cpp
++++ b/src/client/qwaylandwindow.cpp
+@@ -73,7 +73,7 @@ QWaylandWindow::QWaylandWindow(QWindow *window)
+ : QObject()
+ , QPlatformWindow(window)
+ , mScreen(QWaylandScreen::waylandScreenFromWindow(window))
+- , mDisplay(mScreen->display())
++// , mDisplay(mScreen->display())
+ , mShellSurface(0)
+ , mSubSurfaceWindow(0)
+ , mWindowDecoration(0)
+@@ -688,7 +688,7 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe
+ void QWaylandWindow::setMouseCursor(QWaylandInputDevice *device, Qt::CursorShape shape)
+ {
+ if (m_cursorShape != shape || device->serial() > device->cursorSerial()) {
+- device->setCursor(shape, mScreen);
++ //device->setCursor(shape, mScreen);
+ m_cursorShape = shape;
+ }
+ }
+diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
+index cee6f6f..601f19a 100644
+--- a/src/client/qwaylandwindow_p.h
++++ b/src/client/qwaylandwindow_p.h
+@@ -129,7 +129,7 @@ public:
+ QWaylandDisplay *display() const { return mDisplay; }
+ QWaylandShellSurface *shellSurface() const;
+ QWaylandSubSurface *subSurfaceWindow() const;
+- QWaylandScreen *screen() const { return mScreen; }
++ QPlatformScreen *screen() const { return mScreen; }
+
+ void handleContentOrientationChange(Qt::ScreenOrientation orientation);
+ void setOrientationMask(Qt::ScreenOrientations mask);
+@@ -194,7 +194,7 @@ public slots:
+ void requestResize();
+
+ protected:
+- QWaylandScreen *mScreen;
++ QPlatformScreen *mScreen;
+ QWaylandDisplay *mDisplay;
+ QWaylandShellSurface *mShellSurface;
+ QWaylandSubSurface *mSubSurfaceWindow;
+--
+1.9.1
+
diff --git a/meta/recipes-webos/qt5/qtwayland/qt2.patch b/meta/recipes-webos/qt5/qtwayland/qt2.patch
new file mode 100644
index 0000000000..e741064316
--- /dev/null
+++ b/meta/recipes-webos/qt5/qtwayland/qt2.patch
@@ -0,0 +1,169 @@
+From f71dd7f1a74437b0f62c718ee30e53a0e4788d26 Mon Sep 17 00:00:00 2001
+From: Valery Volgutov <valery.volgutov@lge.com>
+Date: Mon, 22 Jan 2018 12:54:08 +0300
+Subject: [PATCH] QtWayland compile error fix on Qt 5.9
+
+:Release Notes:
+
+:Detailed Notes:
+!!! Need to change meta-qt5 !!!
+============================================================
+meta-qt5/classes/qmake5_base.bbclass
+============================================================
+- CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST -- $QMAKE_VARSUBST_CONFIGURE"
+- ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST -- $QMAKE_VARSUBST_CONFIGURE || die "Error calling $CMD"
++ CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST"
++ ${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} ${OE_QMAKE_RECURSIVE} $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling $CMD"
+============================================================
+============================================================
+
+:Testing Performed:
+
+:QA Notes:
+
+:Issues Addressed:
+[PLAT-49438] Fix compile own Qt components on Qt 5.9
+
+Change-Id: I9728c41910be3a9245849ccda4c21d6c811ef500
+---
+ src/client/client.pro | 14 +++++++++++++-
+ src/client/qwaylandintegration.cpp | 12 +++++++++---
+ .../client/wayland-egl/qwaylandeglwindow.cpp | 6 +++++-
+ .../client/wayland-egl/qwaylandglcontext.cpp | 21 ++++++++++++++++++---
+ .../client/wayland-egl/qwaylandglcontext.h | 6 ++++--
+ 5 files changed, 49 insertions(+), 10 deletions(-)
+
+diff --git a/src/client/client.pro b/src/client/client.pro
+index 13bcd6f..14a2e30 100644
+--- a/src/client/client.pro
++++ b/src/client/client.pro
+@@ -1,6 +1,18 @@
+ TARGET = QtWaylandClient
++
+ QT += core-private gui-private
+-QT_FOR_PRIVATE += platformsupport-private
++
++equals(QT_MAJOR_VERSION,5) {
++ lessThan(QT_MINOR_VERSION, 8) {
++ QT_FOR_PRIVATE += platformsupport-private
++ }
++ else {
++ QT += egl_support-private
++ QT += fontdatabase_support-private
++ QT += eventdispatcher_support-private
++ QT += theme_support-private
++ }
++}
+
+ MODULE=waylandclient
+ MODULE_PLUGIN_TYPES = wayland-graphics-integration-client wayland-decoration-client wayland-inputdevice-integration
+diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
+index df9e7d9..1496260 100644
+--- a/src/client/qwaylandintegration.cpp
++++ b/src/client/qwaylandintegration.cpp
+@@ -53,9 +53,15 @@
+ #include "qwaylandscreen_p.h"
+ #include "qwaylandcursor_p.h"
+
+-#include "QtPlatformSupport/private/qgenericunixfontdatabase_p.h"
+-#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
+-#include <QtPlatformSupport/private/qgenericunixthemes_p.h>
++#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0))
++ #include "QtPlatformSupport/private/qgenericunixfontdatabase_p.h"
++ #include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
++ #include <QtPlatformSupport/private/qgenericunixthemes_p.h>
++#else
++ #include "QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h"
++ #include <QtEventDispatcherSupport/private/qgenericunixeventdispatcher_p.h>
++ #include <QtThemeSupport/private/qgenericunixthemes_p.h>
++#endif
+
+ #include <QtGui/private/qguiapplication_p.h>
+
+diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
+index 524902a..7f2c83b 100644
+--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
++++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
+@@ -44,7 +44,11 @@
+ #include <QtWaylandClient/private/qwaylandscreen_p.h>
+ #include "qwaylandglcontext.h"
+
+-#include <QtPlatformSupport/private/qeglconvenience_p.h>
++#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0))
++ #include <QtPlatformSupport/private/qeglconvenience_p.h>
++#else
++ #include <QtEglSupport/private/qeglconvenience_p.h>
++#endif
+
+ #include <QDebug>
+ #include <QtGui/QWindow>
+diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+index 3c09b62..cc15216 100644
+--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
++++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+@@ -46,11 +46,15 @@
+ #include <QtWaylandClient/private/qwaylandabstractdecoration_p.h>
+ #include <QtWaylandClient/private/qwaylandintegration_p.h>
+ #include "qwaylandeglwindow.h"
+-
+ #include "qtwaylandclienttracer.h"
+-
+ #include <QDebug>
+-#include <QtPlatformSupport/private/qeglconvenience_p.h>
++
++#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0))
++ #include <QtPlatformSupport/private/qeglconvenience_p.h>
++#else
++ #include <QtEglSupport/private/qeglconvenience_p.h>
++#endif
++
+ #include <QtGui/private/qopenglcontext_p.h>
+ #include <QtGui/private/qopengltexturecache_p.h>
+ #include <QtGui/private/qguiapplication_p.h>
+@@ -545,6 +549,17 @@ void (*QWaylandGLContext::getProcAddress(const QByteArray &procName)) ()
+ return eglGetProcAddress(procName.constData());
+ }
+
++#if (QT_VERSION > QT_VERSION_CHECK(5, 7, 0))
++QFunctionPointer QWaylandGLContext::getProcAddress(const char *procName)
++{
++ QFunctionPointer proc = (QFunctionPointer) eglGetProcAddress(procName);
++ if (!proc)
++ proc = (QFunctionPointer) dlsym(RTLD_DEFAULT, procName);
++
++ return proc;
++}
++#endif
++
+ EGLConfig QWaylandGLContext::eglConfig() const
+ {
+ return m_config;
+diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
+index eb05411..1ab7706 100644
+--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
++++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
+@@ -43,10 +43,9 @@
+ #define QWAYLANDGLCONTEXT_H
+
+ #include <QtWaylandClient/private/qwaylanddisplay_p.h>
+-
+ #include <qpa/qplatformopenglcontext.h>
+-
+ #include "qwaylandeglinclude.h"
++#include <QtGlobal>
+
+ QT_BEGIN_NAMESPACE
+
+@@ -74,6 +73,9 @@ public:
+
+ void (*getProcAddress(const QByteArray &procName)) ();
+
++#if (QT_VERSION > QT_VERSION_CHECK(5, 7, 0))
++ QFunctionPointer getProcAddress(const char *procName);
++#endif
+ QSurfaceFormat format() const { return m_format; }
+
+ EGLConfig eglConfig() const;
+--
+1.9.1
+
diff --git a/meta/recipes-webos/qt5/qtwayland/qt3.patch b/meta/recipes-webos/qt5/qtwayland/qt3.patch
new file mode 100644
index 0000000000..b71b9497b8
--- /dev/null
+++ b/meta/recipes-webos/qt5/qtwayland/qt3.patch
@@ -0,0 +1,36 @@
+From 6483b2c78977e59418e7c1279eda9977ef1fb935 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <martin.jansa@lge.com>
+Date: Tue, 30 Jan 2018 21:55:50 +0000
+Subject: [PATCH] examples: build qwindow-compositor only when examples and
+ wayland-compositor are in CONFIG
+
+:Issues Addressed:
+[PLAT-49438] Fix compile own Qt components on Qt 5.9
+
+Change-Id: I9728c41910be3a9245849ccda4c21d6c811ef501
+---
+ examples/wayland/wayland.pro | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/examples/wayland/wayland.pro b/examples/wayland/wayland.pro
+index d633fb9..794b5f9 100644
+--- a/examples/wayland/wayland.pro
++++ b/examples/wayland/wayland.pro
+@@ -1,7 +1,8 @@
+ TEMPLATE=subdirs
+
+ #Only build compositor examples if we are building
+-#the QtCompositor API
++#the QtCompositor API and examples
++contains(CONFIG, examples) {
+ contains(CONFIG, wayland-compositor) {
+ SUBDIRS += qwindow-compositor
+
+@@ -11,3 +12,4 @@ contains(CONFIG, wayland-compositor) {
+
+ SUBDIRS += server-buffer
+ }
++}
+--
+1.9.1
+
diff --git a/meta/recipes-webos/qt5/qtwayland_git.bbappend b/meta/recipes-webos/qt5/qtwayland_git.bbappend
new file mode 100644
index 0000000000..43055fe82f
--- /dev/null
+++ b/meta/recipes-webos/qt5/qtwayland_git.bbappend
@@ -0,0 +1,40 @@
+# Copyright (c) 2013-2018 LG Electronics, Inc.
+
+SUMMARY = "luna-surfacemanager qtwayland "
+AUTHOR = "Anupam Kaul <anupam.kaul@lge.com>"
+
+DEPENDS += "webos-wayland-extensions qt-features-webos"
+
+WEBOS_VERSION = "5.4.2-1_ee4a49f2ab723631174d7f2b8dae2263565c9ece"
+EXTENDPRAUTO_append = "webos13"
+
+# Upstream 5.5.0 recipe updated LIC_FILES_CHKSUM
+LIC_FILES_CHKSUM = " \
+ file://LICENSE.LGPL;md5=4193e7f1d47a858f6b7c0f1ee66161de \
+ file://LICENSE.GPL;md5=d32239bcb673463ab874e80d47fae504 \
+ file://LGPL_EXCEPTION.txt;md5=0145c4d1b6f96a661c2c139dfb268fb6 \
+ file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
+"
+
+inherit webos_enhanced_submissions
+inherit webos_qmake5
+inherit webos_lttng
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+# Assume we're using the same Qt version to this component has.
+QT_VERSION = "${WEBOS_COMPONENT_VERSION}"
+
+inherit webos_public_repo
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
+
+# By default the recipe will not compile any specific backend for the compositor.
+QT_WAYLAND_CONFIG_append = " CONFIG+=wayland_egl"
+QT_WAYLAND_DEFINES_append = "QT_COMPOSITOR_QUICK"
+
+# Enable LTTng tracing capability when enabled in webos_lttng class
+EXTRA_QMAKEVARS_PRE += "${@oe.utils.conditional('WEBOS_LTTNG_ENABLED', '1', 'CONFIG+=lttng', '', d)}"
+
+EXTRA_QMAKEVARS_POST += "CONFIG-=create_cmake"
diff --git a/meta/recipes-webos/qtwayland-webos/qtwayland-webos.bb b/meta/recipes-webos/qtwayland-webos/qtwayland-webos.bb
new file mode 100644
index 0000000000..df0734049a
--- /dev/null
+++ b/meta/recipes-webos/qtwayland-webos/qtwayland-webos.bb
@@ -0,0 +1,48 @@
+# Copyright (c) 2016-2018 LG Electronics, Inc.
+
+SUMMARY = "webOS extension for Qtwayland"
+AUTHOR = "Elvis Lee <kwangwoong.lee@lge.com>"
+SECTION = "webos/base"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+DEPENDS = "qtwayland webos-wayland-extensions libxkbcommon qt-features-webos wayland-native qtwayland-native"
+
+WEBOS_VERSION = "1.0.0-1_959fb8c916f6e80065b98b948c1bef8ea113ed73"
+PR = "r7"
+
+inherit webos_qmake5
+inherit webos_enhanced_submissions
+inherit webos_lttng
+inherit webos_public_repo
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
+
+SRC_URI += "file://qt.patch"
+
+# No debian package renaming
+DEBIAN_NOAUTONAME_${PN} = "1"
+DEBIAN_NOAUTONAME_${PN}-dbg = "1"
+DEBIAN_NOAUTONAME_${PN}-dev = "1"
+
+# Enable LTTng tracing capability when enabled in webos_lttng class
+EXTRA_QMAKEVARS_PRE += "${@oe.utils.conditional('WEBOS_LTTNG_ENABLED', '1', 'CONFIG+=lttng', '', d)}"
+
+# we don't provide cmake tests
+EXTRA_QMAKEVARS_POST += "CONFIG-=create_cmake"
+
+FILES_${PN} += " \
+ ${OE_QMAKE_PATH_PLUGINS}/*/*${SOLIBSDEV} \
+"
+
+# FIXME: weboscompositorextensionclient is deprecated and merged into
+# webos-platform-interface. We provide weboscompositorextensionclient.pc
+# as an alias of webos-platform-interface.pc so that components used to
+# depend on weboscompositorextensionclient build and run as before.
+# This should be removed once all these components have no dependency
+# on weboscompositorextensionclient.
+do_install_append() {
+ ln -snvf webos-platform-interface.pc ${D}${libdir}/pkgconfig/weboscompositorextensionclient.pc
+ sed -i 's@prefix=${STAGING_DIR_HOST}@prefix=@g ;s@-L${STAGING_DIR_HOST} @ @g;' ${D}${libdir}/pkgconfig/*.pc
+}
diff --git a/meta/recipes-webos/qtwayland-webos/qtwayland-webos/qt.patch b/meta/recipes-webos/qtwayland-webos/qtwayland-webos/qt.patch
new file mode 100644
index 0000000000..96611cdbe0
--- /dev/null
+++ b/meta/recipes-webos/qtwayland-webos/qtwayland-webos/qt.patch
@@ -0,0 +1,57 @@
+From 109b1503ed8ae4d09e764292ca23e1450931c3bc Mon Sep 17 00:00:00 2001
+From: Martin Jansa <martin.jansa@lge.com>
+Date: Mon, 26 Feb 2018 20:08:14 +0000
+Subject: [PATCH] WIP: qt 5.11 compatibility
+
+---
+ .../platforms/webos-wayland-egl/webosplatformwindow.cpp | 16 +---------------
+ .../platforms/webos-wayland-egl/webosplatformwindow_p.h | 1 -
+ 2 files changed, 1 insertion(+), 16 deletions(-)
+
+diff --git a/src/plugins/platforms/webos-wayland-egl/webosplatformwindow.cpp b/src/plugins/platforms/webos-wayland-egl/webosplatformwindow.cpp
+index 3c87a23..6b2f5b6 100644
+--- a/src/plugins/platforms/webos-wayland-egl/webosplatformwindow.cpp
++++ b/src/plugins/platforms/webos-wayland-egl/webosplatformwindow.cpp
+@@ -86,20 +86,6 @@ bool WebOSPlatformWindow::setWindowStateInternal(Qt::WindowState state)
+ return true;
+ }
+
+-void WebOSPlatformWindow::setWindowState(Qt::WindowState state)
+-{
+- setWindowStateInternal(state);
+-
+- WebOSShellSurface *ss = webOSShellSurfaceFor(window());
+- if (ss)
+- ss->setState(state);
+-
+- // If client is Qt::WindowNoState, it is assumed that
+- // client wants to change its own geometry by itself
+- if (state == Qt::WindowNoState)
+- m_hasOwnSize = true;
+-}
+-
+ void WebOSPlatformWindow::setGeometry(const QRect &rect)
+ {
+ bool initialize = false;
+@@ -169,5 +155,5 @@ void WebOSPlatformWindow::restoreMouseCursor(QWaylandInputDevice *device)
+
+ //Do not use qt's setCursor here. Cause App's window cursor haven't chagned,
+ //it will not affect current cursor shape, that is same shape.
+- mScreen->waylandCursor()->changeCursor(cp, window());
++ //mScreen->waylandCursor()->changeCursor(cp, window());
+ }
+diff --git a/src/plugins/platforms/webos-wayland-egl/webosplatformwindow_p.h b/src/plugins/platforms/webos-wayland-egl/webosplatformwindow_p.h
+index 2397dac..c3fe415 100644
+--- a/src/plugins/platforms/webos-wayland-egl/webosplatformwindow_p.h
++++ b/src/plugins/platforms/webos-wayland-egl/webosplatformwindow_p.h
+@@ -27,7 +27,6 @@ class WebOSPlatformWindow : public QWaylandEglWindow
+ {
+ public:
+ WebOSPlatformWindow(QWindow *window);
+- void setWindowState(Qt::WindowState state) Q_DECL_OVERRIDE;
+ void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
+
+ private:
+--
+1.9.1
+
diff --git a/meta/recipes-webos/rdxd/rdxd.bb b/meta/recipes-webos/rdxd/rdxd.bb
new file mode 100644
index 0000000000..4b08168238
--- /dev/null
+++ b/meta/recipes-webos/rdxd/rdxd.bb
@@ -0,0 +1,33 @@
+# Copyright (c) 2013-2018 LG Electronics, Inc.
+
+SUMMARY = "Remote diagnostics daemon and utilities"
+AUTHOR = "Gayathri Srinivasan <gayathri.srinivasan@lge.com>"
+SECTION = "base"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+DEPENDS = "glib-2.0 libpbnjson luna-prefs luna-service2 pmloglib"
+#Add tar dependency since --absolute-names support is missing in busybox tar
+RDEPENDS_${PN} = "nyx-utils tar"
+
+WEBOS_VERSION = "4.0.2-1_0c0fe24f6f0e7c36cddae04d56a3580d58812ad8"
+PR = "r8"
+
+PROVIDES = "librdx rdx-utils"
+
+inherit webos_component
+inherit webos_enhanced_submissions
+inherit webos_cmake
+inherit webos_daemon
+inherit webos_system_bus
+inherit webos_library
+inherit webos_distro_dep
+inherit webos_public_repo
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
+
+EXTRA_OECMAKE += "-DWEBOS_USE_LEGACY_PACKAGE_MANAGER:BOOL=FALSE"
+
+VIRTUAL-RUNTIME_bash ?= "bash"
+RDEPENDS_${PN}_append_class-target = " ${VIRTUAL-RUNTIME_bash}"
diff --git a/meta/recipes-webos/uriparser/uriparser_0.8.0.bb b/meta/recipes-webos/uriparser/uriparser_0.8.0.bb
new file mode 100644
index 0000000000..9645e682b5
--- /dev/null
+++ b/meta/recipes-webos/uriparser/uriparser_0.8.0.bb
@@ -0,0 +1,19 @@
+# Copyright (c) 2012-2016 LG Electronics, Inc.
+
+SECTION = "uriparser"
+DESCRIPTION = "RFC 3986 compliant URI parsing library"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=72b0f9c74ae96eeab8cf1bf3efe08da2"
+
+PR = "r2"
+
+SRC_URI := "${SOURCEFORGE_MIRROR}/project/uriparser/Sources/${PV}/uriparser-${PV}.tar.bz2"
+
+inherit autotools
+
+EXTRA_OECONF = "--disable-test --disable-doc"
+
+SRC_URI[md5sum] = "77601f52ab91c0e100fc5d783d9c1ee5"
+SRC_URI[sha256sum] = "1dd9f9779d8f17822bd7d68ba042fd67779b6e4ccf162bd3c9d0ff19a8ba9bf7"
+
+BBCLASSEXTEND = "native"
diff --git a/meta/recipes-webos/webos-wayland-extensions/webos-wayland-extensions.bb b/meta/recipes-webos/webos-wayland-extensions/webos-wayland-extensions.bb
new file mode 100644
index 0000000000..b911f2161c
--- /dev/null
+++ b/meta/recipes-webos/webos-wayland-extensions/webos-wayland-extensions.bb
@@ -0,0 +1,22 @@
+# Copyright (c) 2013-2018 LG Electronics, Inc.
+
+SUMMARY = "Wayland protocol extensions for webOS"
+AUTHOR = "Anupam Kaul <anupam.kaul@lge.com>"
+SECTION = "webos/base"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+DEPENDS = "wayland wayland-native"
+
+WEBOS_VERSION = "1.0.0-1_e77a753ad662f904a7b0f7830911b95ea4d4093c"
+PR = "r2"
+
+inherit webos_component
+inherit webos_cmake
+inherit webos_enhanced_submissions
+inherit webos_public_repo
+
+SRC_URI = "${WEBOSOSE_GIT_REPO_COMPLETE}"
+S = "${WORKDIR}/git"
+
+FILES_${PN}-dev += "${datadir}/*"
diff --git a/meta/recipes-webos/yajl/yajl_2.1.0.bb b/meta/recipes-webos/yajl/yajl_2.1.0.bb
new file mode 100644
index 0000000000..d9a5821cbb
--- /dev/null
+++ b/meta/recipes-webos/yajl/yajl_2.1.0.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Yet Another JSON Library."
+
+DESCRIPTION = "YAJL is a small event-driven (SAX-style) JSON parser \
+written in ANSI C, and a small validating JSON generator."
+
+HOMEPAGE = "http://lloyd.github.com/yajl/"
+
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://COPYING;md5=39af6eb42999852bdd3ea00ad120a36d"
+
+SRC_URI = "git://github.com/lloyd/yajl"
+SRCREV = "a0ecdde0c042b9256170f2f8890dd9451a4240aa"
+
+S = "${WORKDIR}/git"
+
+inherit cmake lib_package
+
+EXTRA_OECMAKE = "-DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')}"