webos-image: Add core-apps and services into System Apps package set

:Release Notes:
Add these apps and services into System Apps package set
 * core-apps
 * app-services
 * mojolocation-stub
 * mojomail

:Detailed Notes:

:Testing Performed:
Ran miniBAT

:QA Notes:

:Issues Addressed:
[GF-35149] CCC: Move core-apps and services into System Apps package set

 Open-webOS-DCO-1.0-Signed-off-by: Suresh Arumugam <suresh.arumugam@lge.com>

Change-Id: I3f10f6dd27d4441e9effc19d5b9289357bb0a973
Reviewed-on: https://g2g.palm.com/3260
Reviewed-by: Build Verification
Reviewed-by: Susan Montooth <susan.montooth@lge.com>
Tested-by: Susan Montooth <susan.montooth@lge.com>
recipes: Replace PR_append with EXTENDPRAUTO_append

:Release Notes:
Non-numeric PR_appends unlike PRINC doesn't provide stable versioning.

:Detailed Notes:
When .bbappend in layer A (with lower BBFILE_PRIORITY) adds
PR_append = "foo1"
and later layer B adds .bbappend for the same recipe with
PR_append = "bar1"
then version goes backward from "1.0-r0foo1" to "1.0-r0bar1foo1".
That's why PRINC was introduced to allow combining multiple .bbappends
while ensuring always increasing overall version, but we're not using
PRINC.

:Testing Performed:
PR_appends are moved to last part of PR, not before numeric value from
PR service or BB_TASKHASH.

:QA Notes:
No change in image.

:Issues Addressed:
[GF-13471] Assign to EXTENDPRAUTO_append instead of PR_append in
           .bbappend-s

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: I045d0433438604c52c8b7cdc0357406aad5daac7
Reviewed-on: https://g2g.palm.com/3156
Reviewed-by: Susan Montooth <susan.montooth@lge.com>
Tested-by: Susan Montooth <susan.montooth@lge.com>
webos-image: db8=81

:Release Notes:
db8=submissions/81

:Detailed Notes:
db8: submissions/80...submissions/81
- c55a5a3 Modify ID validation to use ...IdEngine
- 750165f MojDbMediaLinkManager returns unique symlink path
- 445c589 Add base-64 ID value to listActiveMedia API return set
- 259fe16 Improve searching when external devices change status
- 1950213 MojDbShardEngine: Refactoring and bug fixes
- 150bd7c MojDbShardEngine: fix kind indexes
- 1a9c23d Fix false negative for MojDecimalTest
- f944582 Add ShardInfo1 kind as builtin
- 68ab4df Fix db re-use in DatabaseSuite in gtest_db_core
- 7b46eeb Fix MediaLinkManager output directory path
- a216950 Fix LS2 role file for mojodb-luna
- f157bb8 Remove script/end script whenever possible
- ddcb2df Implemented MojDbShardEngine::update, getId
- 533748d PDM logic physically put shard info to database
- 78610e0 Fix test MojDbShardManagerTest

:Testing Performed:
- DB8 test suite
- mini-BAT

:QA Notes:

:Issues Addressed:
[GF-35801]  CCC: db8=81
[GF-23884]  Unit test failed: MojDbShardManagerTest
[GF-30407]  Unit tests failing: test_db_core and gtest_db_core
[GF-33473]  New 'listActiveMedia' never lists active media
[GF-33833]  Fix LS2 role file for mojodb-luna
[GF-33840]  ShardEngine doesn't lookup in database for existing shard
[GF-34998]  'put' records to a Kind related to shard doesn't work
[GF-34999]  'get' records with kind, that contain Shard doesn't work

Open-webos-DCO-1.0-Signed-off-by: Roger Stringer <roger.stringer@lge.com>

Change-Id: Idaccac496e7110eb4940ad454f44f5ff6a0f8667
Reviewed-on: https://g2g.palm.com/3309
Reviewed-by: Susan Montooth <susan.montooth@lge.com>
Tested-by: Susan Montooth <susan.montooth@lge.com>
webos-image: luna-prefs=2

:Release Notes:
luna-prefs: submissions/2

:Detailed Notes:
luna-prefs: submissions/1.01...submissions/2
- 79ebe84 Get system properties from Nyx modules
- a68ef30 Assign Copyright to LG Electronics, Inc.

:Testing Performed:
mini-BAT

:QA Notes:

:Issues Addressed:
[GF-35862] CCC:luna-prefs=2
[GF-9621]  systemProperties: getSomeSysPropertiesObj some keys don't exist
[GF-9625]  systemProperties: getAllSysProperties doesn't get expected results
[GF-33126] luna-prefs needs to get from build information from Nyx
[GF-33130] luna-prefs needs to get NDUID from Nyx

Open-webOS-DCO-1.0-Signed-off-by: Roger Stringer <roger.stringer@lge.com>

Change-Id: I99e3b2116cbe00b9e3cc87f0e111ad41578bfc00
Reviewed-on: https://g2g.palm.com/3313
Reviewed-by: Roger Stringer <roger.stringer@lge.com>
Tested-by: Roger Stringer <roger.stringer@lge.com>
Reviewed-by: Build Verification
Reviewed-by: Susan Montooth <susan.montooth@lge.com>
webos-image: luna-sysservice=8

:Release Notes:
luna-sysservice: submissions/8

:Detailed Notes:
luna-sysservice: submissions/6...submissions/8
- 0b49945 Remove script/end script whenever possible
- c6ab07a Added check for mandatory params in setTimeChangeLaunch
- 56abfba Fix for luna-sysservice getPreferences() bug
- 057dcc9 Fix for luna-sysservice getTimeZoneFromEasData bug
- 5581804 Use correct offset to get time from ntpserver

:Testing Performed:
mini-BAT

:QA Notes:

:Issues Addressed:
[GF-35816] CCC: luna-sysservice=8
[GF-9619]  Issue in com.palm.systemservice/getTimeZoneFromEasData
[GF-9623]  time/setTimeChangeLaunch : Returns true without a required field
[GF-10551] getNTPTime() doesn't work
[GF-13470] com.palm.systemservice doesn't respond with "subscribed: true"

Open-webOS-DCO-1.0-Signed-off-by: Roger Stringer <roger.stringer@lge.com>

Change-Id: Ia548bc1808508972cf650c7b5b6f95bbd27ecc75
Reviewed-on: https://g2g.palm.com/3311
Reviewed-by: Susan Montooth <susan.montooth@lge.com>
Tested-by: Susan Montooth <susan.montooth@lge.com>
webos_lttng.bbclass: Add bbclass for LTTng tracing

:Release Notes:
Setting WEBOS_LTTNG_ENABLED="1" in webos_lttng.bbclass or in
webos-local.conf will enable LTTng-UST tracing support in
multiple recipes. Recipes which use LTTng-UST should
"import webos_lttng".

:Detailed Notes:

:Testing Performed:
Built with and without WEBOS_LTTNG_ENABLED="1".
Without WEBOS_LTTNG_ENABLED, the tracepoints are not present, and
none of the dependencies such as lttng-ust and lttng-tools are
installed.
With WEBOS_LTTNG_ENABLED, all LTTng tracing functionality is
present and the runtime dependencies are automatically installed.

:QA Notes:
No special testing, since LTTng features are disabled by default.

:Issues Addressed:
[GF-30758] Add LTTng tracing for webapp launch time

Open-webOS-DCO-1.0-Signed-off-by: Martin Unsal <martin.unsal@lge.com>

Change-Id: I6925467b5c700077031a04b2f13e6ad7d8898a88
Reviewed-on: https://g2g.palm.com/3308
Reviewed-by: Build Verification
Reviewed-by: Susan Montooth <susan.montooth@lge.com>
Tested-by: Susan Montooth <susan.montooth@lge.com>
webos-image: pmloglib=39, pmlogdaemon=109

:Release Notes:
PmLogLib : Bug fix for pmloglib segfault
PmLogDaemon : Change method for uploading rotated log
              Change all ErrPrint to use SysLogMessage

:Detailed Notes:
PmLogLib has modified bug when log message exceeds 1024 bytes.
PmLogDaemon has modified to change method for uploading rotated
log, and to change all ErrPrint to use PmLogLib's API.
If ErrPrint() is using when before PmLogDaemon start replaced by
DgbPrint(). DbgPrint() is nothing to do.

Changes included in pmloglib submissions/39
a61a929 Bug fix for pmloglib

Changes included in pmlogdaemon submissions/109
2860f29 Include luna-service2 from correct location
90e7869 Change ErrPrint to PmLogLib APIs
665f334 Change method for uploading rotated log
66d8800 Remove script/end script whenever possible
99b0e68 Request making report when mainstream is rotated.

:Testing Performed:
Compiled locally and tested on a device.
- Full clean local build performed to ensure no components failed
  to compile due to use of the -Werror option.A
- Verification build pulled down for mini-BAT

:QA Notes:
For the test information, refer to GF-34897

:Issues Addressed:
[GF-35485] CCC: pmlogdaemon=109 rdxd=132 pmloglib=39
[GF-35130] SunSpider benchmarks cause PmLogLib crash in WAM2
[GF-8012] Change all ErrPrint to use SysLogMessage
[GF-12506] pmlogdaemon: Initiate log report create and upload, ..

Open-webOS-DCO-1.0-Signed-off-by: Hongjeon Ha <hj.ha@lge.com>

Change-Id: Id8a3488cad63fed2a22b50c583420292d95e66bc
Reviewed-on: https://g2g.palm.com/3324
Reviewed-by: Susan Montooth <susan.montooth@lge.com>
Tested-by: Susan Montooth <susan.montooth@lge.com>
base-files: Create /media/internal to be writeable by all

:Release Notes:
webOS expects /media/internal (${webos_mountablestoragedir}) to be
writeable by all (because it's typically been mounted on a VFAT
partition, which doesn't enforce permissions).

:Detailed Notes:
Also, remove the extraneous parent directory of ${webos_db8datadir}/temp
from dirs700 (install -d creates parent directories).

:Testing Performed:
Confirmed that image contains this directory with the expected
permissions.

:QA Notes:

:Issues Addressed:
[GF-34330] /media/internal (webos_mountablestoragedir) must be writeable
           by all
[GF-35143] CCC: base-files=webos2

Open-webOS-DCO-1.0-Signed-off-by: Herb Kuta <herb.kuta@lge.com>
Change-Id: I3a2d7ef2823eb48c4e717aa0ad7b11a70f5fea4e
Reviewed-on: https://g2g.palm.com/3272
Tested-by: Herb Kuta <herb.kuta@lge.com>
Reviewed-by: Susan Montooth <susan.montooth@lge.com>
webos-image: luna-service2=154,v3.5.1

:Release Notes:
Add APIs to register in gmainloop through context
Add ls-monitor-pub accessible from jail
Build luna-send-pub on the source code of luna-send
Add special support for "com.webos." the same as for "com.palm."
Compare whole subscription token instead of first 50 characters
Replace script/end with exec in upstart script

:Detailed Notes:
submissions/152..submissions/154
08562dd Revert comparator of service names
f0d7552 Remove script/end script whenever possible
aa15541 Change library version to 3.5.0
8144cbb Add APIs to register in gmainloop through context
a89d643 Add ls-monitor-pub accessible from jail
e599fae Deploy luna-send-pub with no access to the private hub
59dd2c5 Introduce comparator of service names
cab34fc Compare whole subscription token

:Testing Performed:
Intenal unit tests were passed successfully with memory error detection
MiniBAT test was done on the target

:QA Notes:

:Issues Addressed:
[GF-4768] Add special support for "com.webos." in luna-service2
[GF-35091] Upstart scripts leaving many dangling /bin/sh procs
[GF-14219] Add LCSGmainontextAttach(LSHandle *, GMainContext *, LSError *) call
[GF-13492] Deploy ls-monitor-pub to track public bus only
[GF-13491] Deploy luna-send-pub with restricted privileges
[GF-13831] LSSubscriptionProcess/LSSubscriptionAdd failure
[GF-34666] CCC: luna-service2=154,v3.5.1

Open-webOS-DCO-1.0-Signed-off-by: Alekseyev Oleksandr <alekseyev.oleksandr@lge.com>
Change-Id: I1ea4421ffc61c1b4f130c9c6b21c123f99d28ee9
Reviewed-on: https://g2g.palm.com/3241
Reviewed-by: Susan Montooth <susan.montooth@lge.com>
Tested-by: Susan Montooth <susan.montooth@lge.com>
sdparm: Add recipe for v1.08

:Release Notes:
Add linux shell utility for accessing SCSI device parameters.h

:Detailed Notes:

:Testing Performed:
Tested sdparm is built successfully.

:QA Notes:

:Issues Addressed:
[GF-35127] CCC: Add sdparm=v1.08 and gptfdisk=v0.8.7

Open-webOS-DCO-1.0-Signed-off-by: Juhee Cho <juhee.cho@lge.com>

Change-Id: I1c8a89958fe3dc2b87a9a20f40e7e41fa65a90b6
Reviewed-on: https://g2g.palm.com/3280
Reviewed-by: Juhee Cho <juhee.cho@lge.com>
Tested-by: Juhee Cho <juhee.cho@lge.com>
Reviewed-by: Martin Jansa <Martin.Jansa@lge.com>
Reviewed-by: Herb Kuta <herb.kuta@lge.com>
Reviewed-by: Susan Montooth <susan.montooth@lge.com>
gptfdisk: Add recipe for v0.8.7

:Release Notes:
Add recipe for gptfdisk, which are utilities for GUID Partition Tables.

:Detailed Notes:

:Testing Performed:
Tested gptfdisk is built successfully.

:QA Notes:

:Issues Addressed:
[GF-35127] CCC: Add sdparm=v1.08 gptfdisk=v0.8.7

Open-webOS-DCO-1.0-Signed-off-by: Juhee Cho <juhee.cho@lge.com>
Change-Id: Id3e5785ba3654c48c662836c0bd422df6167d7f6
Reviewed-on: https://g2g.palm.com/3281
Reviewed-by: Herb Kuta <herb.kuta@lge.com>
Reviewed-by: Build Verification
Reviewed-by: Susan Montooth <susan.montooth@lge.com>
Tested-by: Susan Montooth <susan.montooth@lge.com>
webos-repositories: Rename WEBOS_GIT_TAG to WEBOS_GIT_PARAM_TAG

:Release Notes:
Default WEBOS_GIT_PARAM_TAG value will later be set by
webos_enhanced_submissions and WEBOS_GIT_REPO_TAG will be used to
override default value.

:Detailed Notes:

:Testing Performed:
Only build tested.

:QA Notes:
No change in image.

:Issues Addressed:
[GF-12492] Convert from setting PREFERRED_VERSION centrally to setting
           WEBOS_VERSION in each recipe

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: Ib9aa7afb027206a2ba8b7271983f2d26cafe46b3
webos_enhanced_submissions, webos_submissions: Switch to use WEBOS_VERSION

:Release Notes:
Switch to "Decentralized BOM"

:Detailed Notes:
* findPreferredProvider shouldn't select provider based on PR
  because PR can be autoincremented
* nobody is using this syntax now
* it never worked correctly because of bug in bitbake code

* define WEBOS_GIT_PARAM_TAG in bbclass instead of recipes
  value can be:
  1) SRCREV when P_V contains underscore followed by revision
  2) submissions/${WEBOS_SUBMISSION}, when WEBOS_GIT_REPO_TAG
     isn't defined and SRCREV isn't in P_V
  3) ${WEBOS_GIT_TAG_CUSTOM} otherwise

* rename PREFERRED_VERSION to WEBOS_VERSION
  semantics of PREFERRED_VERSION is to select between multiple
  recipes with different versions not to define PV, rename it
  to WEBOS_VERSION to avoid confusion
  http://docs.openembedded.org/bitbake/html/ch04s04.html#id440478
  Example 4.7. Specifying version preference

* webos_submissions now only splits WEBOS_COMPONENT_VERSION and
  WEBOS_SUBMISSION from PV.
* webos_enhanced_submissions is splits WEBOS_VERSION to PV and
  SRCREV and defines WEBOS_GIT_PARAM_TAG.

:Testing Performed:
Builds the image from the same source even when tag is accidentally
moved to different revision.

:QA Notes:
No change in image

:Issues Addressed:
[GF-5328]  Improve build performance and allow to build completely from
           PREMIRROR
[GF-12492] Convert from setting PREFERRED_VERSION centrally to setting
           WEBOS_VERSION in each recipe

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: I142f669deb4bbf6c53c0346b76bba4e43f19b2f6
webos_enhanced_submissions: Add sanity check for tags

:Release Notes:
When SRCREV as well as submission is set, compare if they correspond
to each other.

:Detailed Notes:
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.

:Testing Performed:
I've set SRCREV to incorrect value and the warning was shown, I've
forced do_fetch to reexecute for recipe with WEBOS_GIT_TAG_CUSTOM and
recipe without SRCREV in WEBOS_VERSION, all worked fine.

:QA Notes:
No change in image.

:Issues Addressed:
[GF-12496] Introduce sanity checks on WEBOS_VERSION

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: I5bc4ad416ce62a700e06f483bac5b2277a5694eb
webkit-webos: Move PV to recipe

:Release Notes:
webos_submissions bbclass now parses PV directly instead of using
PREFERRED_VERSION_recipe-name

:Detailed Notes:

:Testing Performed:
Only build tested, the same versions are used in image.

:QA Notes:
No change in image.

:Build Notes:
This change needs to be applied together with new webos_submissions.

:Issues Addressed:
[GF-12492] Convert from setting PREFERRED_VERSION centrally to setting
           WEBOS_VERSION in each recipe

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: Iaf511f95c795a197222783f236563122e23836a2
webos-preferred-versions: Use WEBOS_VERSION in recipes

:Release Notes:
Switch to "Decentralized BOM".

:Detailed Notes:
* Global files are causing a lot of rebase/merge conflicts.
  *-preferred-version.inc file never worked correctly as BOM and BOM
  is now implemented from installed-packages.txt file which is more
  reliable and contains all parts use in image build.
* Moving it to recipe will also reduce the need to reparse everything,
  because when changing submission we won't modify global namespace
  so just one recipe will be reparsed
* This will also allow to have 2 recipes for the same component with
  different version (e.g. in different layers or with different do_install
  task) and let PREFERRED_VERSION select which one should be used based
  on DISTRO or MACHINE.

:Testing Performed:
Builds the same versions even when git tag is accidentaly moved to
different revision.

:QA Notes:
No change in image.

:Issues Addressed:
[GF-5328]  Improve build performance and allow to build completely from
           PREMIRROR
[GF-12492] Convert from setting PREFERRED_VERSION centrally to setting
           WEBOS_VERSION in each recipe

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: Ib2d55574686705a3bb4393ba88dfdb213f459389
prepare-submission.sh: Add simple script for creating webos tags

:Release Notes:
Creating submission or version tags is a bit error prone, most common
issues are:
* tags are moved after they have been used in build
* tags aren't annotated, so we cannot find who created or moved tag
* tags don't match expected format or minimal submission (1),
  version (0.1.0)
* developers are tagging latest commit in their local tree (after they
  check that it was merged on gerrit), but even when it's the same
  commit it has different revision in master branch, because it was
  cherry-picked by gerrit.

:Detailed Notes:
This script checks for issues listed above, creates correct tags,
pushes tags and allows automatic update of WEBOS_VERSION in recipe
when -r parameter is used. It will also show how commit subject and
git log --oneline in ":Detailed Notes:" should look.

:Testing Performed:
Created couple of tags with every possible combination of used
parameters on normal clone as well as on bare clone, bare+mirror
clone cannot be used -> script detects that and shows error.

:QA Notes:
No change in image

:Issues Addressed:
[GF-5328]  Improve build performance and allow to build completely
           from PREMIRROR
[GF-12492] Convert PREFERRED_VERSION to WEBOS_VERSION and modify
           webos_enhanced_submissions.bbclass

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: I9fe5d66c1e5cbb5e10628af6dd61d1b6c15d660d