webos-image: luna-sysservice=15

:Release Notes:
Added LSMessageReply in setTimeWithNTP() to return the message to caller.
As setTimeWithNTP is returning only boolean values,
LSMessageReply is added to inform caller the status of execution.

Restructure: Move header files from Src to Inc
Restructure code by moving the header files from the Src folder to a new
Inc folder, providing a separation which is more appropriate to a
component with so many source and header files.

Remove obsolete, commented-out logging lines
The earlier conversion to PmLog commented out old messages.
This submission removes those commented out line.

Added check for dest folder in convert() api
1.Did the validation for the destination path
2.If the path does not exist created the path
3.If the path cannot be created given an error message

Add erase manager, originally from storaged
Since the presence of storaged cannot be guarenteed, the erase
functionality has been copied here, and modified for C++.
LunaSysService now supports an 'erase' category to support the
following commands: "EraseAll", "EraseMedia", "EraseVar" and "Wipe",
plus the new command "EraseDeveloper".

Add handling of compiled schema in JSONUtils
Extended API for LSMessageJsonParser to handle already compiled JSON
schemas (i.e. pre-constructed).

Add BroadcastTime tied with system UTC time
Added additional bit of information to keep broadcast time.

Replace hard-coded install paths
Now luna-sysservice takes into account actual installation prefix of
webOS

Add BroadcastTime callbacks
Provide new API calls setBroadcastTime, getBroadcastTime and
getEffectiveBroadcastTime.

Modify luna-sysservice schema as per newly added parameters
Schema of each category in lunasysservice is modified as per new schema
and to avoid validation errors
Below are the list of callbacks with schema modified -
1.msmAvail
2.msmProgress
3.msmPartitionAvailable
4.cbSetPeriodicWakeupPowerDResponse(setTimeWithNTP)
5.connectionManagerGetStatusCallback
6.msmEntry

Fix typo in EraseHandler.cpp

:Detailed Notes:
submissions/14..submissions/15
4c1d3a1 Added LSMessageReply in setTimeWithNTP() to return the message to caller.
92c5377 Restructure: Move header files from Src to Inc
773bbe2 Remove obsolete, commented-out logging lines
bbe2742 Added check for dest folder in convert() api
fb62cfb Add erase manager, originally from storaged
3614344 Add handling of compiled schema in JSONUtils
f855cd0 Add BroadcastTime tied with system UTC time
71c3786 Replace hard-coded install paths
28e6034 Add BroadcastTime callbacks
cdb6ced Modify luna-sysservice schema as per newly added parameters
d60ae78 Fix typo in EraseHandler.cpp

:Testing Performed:
Mini BAT

:Issues Addressed:
[GF-38485] - Fix: LS2 has schema errors when calling LunaSysService
[GF-39173] - LunaSysService is logging err message after connecting to a wifi network
[GF-40679] - luna-sysservice schema validation is rejecting valid incoming LS2 messages
[GF-10940] Passing invalid destination argument returns successful conversion in api wallpaper/convert
[GF-10942] - While passing no parameter,function is throwing exception "setTimeWithNTP{}"
[GF-39468] Provide factory reset message implementation
[GF-40247] Support API to send XDS time to luna-sysservice
[GF-40249] Provide API to obtain EBT from luna-sysservice
[GF-41379] CCC: luna-sysservice=15

Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Change-Id: I9adb63bd1a6c86527719564b7e98d04896e6df3c
Reviewed-on: https://g2g.palm.com/3610
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
Tested-by: Keith Derrick <keith.derrick@lge.com>
Reviewed-by: Build Verification
webos-image: db8=89

:Release Notes:
Modify db8 start condition in upstart script

:Detailed Notes:
submissions/88..submissions/89
2e9acb2 Modify process start time to support bootime
2e8158f Apply centralized nice script

:Testing Performed:
miniBAT : See GF-41639

:QA Notes:

:Issues Addressed:
[GF-36804] Adjust NICE values for important processes
[GF-41639] CCC: db8=89

Open-webOS-DCO-1.0-Signed-off-by: Sangwoo Kang <sangwoo82.kang@lge.com>

Change-Id: Ic52e973d94193c3ab5a00946bd60576e60d06a62
Reviewed-on: https://g2g.palm.com/3622
Reviewed-by: Build Verification
Reviewed-by: Sangwoo Kang <sangwoo82.kang@lge.com>
Tested-by: Sangwoo Kang <sangwoo82.kang@lge.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
Reviewed-by: Jongho Kim <jongho1208.kim@lge.com>
Tested-by: Jongho Kim <jongho1208.kim@lge.com>
upstart: Fix memory leak by turning off logging

:Release Notes:
A memory leak was found that traced to Upstart's attempts to log job
output to non-existent log file, which caused Upstart to buffer the data
with no way to clear it.

:Detailed Notes:
Upstart's defaults include logging the output of all job files to a
number of files located in /var/log/upstart/<jobname>.log.  Since we do
not create /var/log/upstart, it was apparently failing the create, but
then continuing to try to log the data, and when it couldn't open the
log file, it was buffering the data (often the same block again and
again) to a never-ending increasing sized buffer.  This is ... bad.
We did not know that Upstart was trying to log, and we do not want it
to log, so the quick fix for us is to simply change the default to
not do logging.  As we do not want Upstart logging, there is no added
mechanism to override this setting.
I also moved the upstart 1.8 specific patch files to the upstart-1.8
directory as they are unlikely to work on any other version.

:Testing Performed:
Locally built - overnight memory logging run show zero increase in
usage by init. (Previous tests showed about 100kB per minute
increases)
MiniBAT run on flashed TV using gf build 1472.  Results attached
in comment of CCC GF-41569

:QA Notes:

:Issues Addressed:
[GF-37332] Upstart memory consumption keeps going up when TV is idle
[GF-41569] CCC: upstart=r4

Open-webOS-DCO-1.0-Signed-off-by: Ed Chejlava <ed.chejlava@lge.com>

Change-Id: Id782d5b0b5e53fbd57ed9bb682c9cf51c8c9d928
Reviewed-on: https://g2g.palm.com/3620
Reviewed-by: Jongho Kim <jongho1208.kim@lge.com>
Tested-by: Jongho Kim <jongho1208.kim@lge.com>
nodejs: Fix build with long path to native sysroot, part II

:Release Notes:
Calling sed -i on symlink causes symlink to be replaced by normal
file and wrong shebang wasn't updated in npm-cli.js

:Detailed Notes:

:Testing Performed:
Only build tested.

:QA Notes:
No change in image.

:Issues Addressed:
[GF-2506]  Upgrade Node.js to v0.10
[GF-41162] CCC: nodejs=r3

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: I23c76d3b4773b5b4edabb92ccd13769dd7756303
Reviewed-on: https://g2g.palm.com/3618
Reviewed-by: Mark Bessey <mark.bessey@lge.com>
Reviewed-by: Build Verification
Reviewed-by: Martin Jansa <Martin.Jansa@lge.com>
Tested-by: Martin Jansa <Martin.Jansa@lge.com>
Reviewed-by: Jongho Kim <jongho1208.kim@lge.com>
Tested-by: Jongho Kim <jongho1208.kim@lge.com>
nodejs: Fix build for qemux86-64

:Release Notes:
64bit build for target device doesn't always work correctly on 64bit
build machine, e.g. qemux86-64 binary doesn't work on 64bit Ubuntu.

:Detailed Notes:
Fix that by using mksnapshot from nodejs-native when building target
nodejs.

:Testing Performed:
Only build tested.

:QA Notes:
No change in image.

:Issues Addressed:
[GF-2506]  Upgrade Node.js to v0.10
[GF-41162] CCC: nodejs=r3

Open-webOS-DCO-1.0-Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Change-Id: Iaf5bfa52775b47822237aabe2b3f65940b0addee
Reviewed-on: https://g2g.palm.com/3625
Reviewed-by: Mark Bessey <mark.bessey@lge.com>
Reviewed-by: Build Verification
Reviewed-by: Martin Jansa <Martin.Jansa@lge.com>
Tested-by: Martin Jansa <Martin.Jansa@lge.com>
Reviewed-by: Jongho Kim <jongho1208.kim@lge.com>
Tested-by: Jongho Kim <jongho1208.kim@lge.com>
libnih: Fix upstart crash on power-up

:Release Notes:
In a repeated on/off test, we saw about 2% of cycles resulted in an
assert crash in Upstart.  Adding this patch from Ubuntu fixes it

:Detailed Notes:
In power cycling tests, about 2% of power-ons resulted in an assert
crash in Upstart - giving this message:
init:com.ubuntu.Upstart.c:2651:
    Assertion failed in control_emit_event_emitted: env != NULL
Patch 4ubuntu16 for libnih resolves this issue.

:Testing Performed:
After a local build with this patch in place for libnih, I power-cycled
my TV 6117 times over the weekend and saw Zero crashes
miniBAT on vbuild 1475 attached to CCC GF-41045

:QA Notes:

:Issues Addressed:
[GF-40057] Crash on Upstart while repeated on/off test
[GF-41045] CCC: libnih=r2-4ubuntu16

Open-webOS-DCO-1.0-Signed-off-by: Ed Chejlava <ed.chejlava@lge.com>

Change-Id: I5925bf75b8496d077a69e98fb0e63f0b03a62514
Reviewed-on: https://g2g.palm.com/3603
Reviewed-by: Ed Chejlava <ed.chejlava@lge.com>
Tested-by: Ed Chejlava <ed.chejlava@lge.com>
Reviewed-by: Build Verification
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
Reviewed-by: Jongho Kim <jongho1208.kim@lge.com>
Tested-by: Jongho Kim <jongho1208.kim@lge.com>