platform/core/appfw/app-installers.git
5 years agoAdjust parsing component-based application 38/203138/1
Hwankyu Jhun [Wed, 10 Apr 2019 06:25:01 +0000 (15:25 +0900)]
Adjust parsing component-based application

FillComponentInfo step is removed.
FillAppControl, FillDataControl, FillMetadata, FillCategories and
FillSplashScreen are added.

Change-Id: I3c47918f04def3015f20df800005d88850cb8198
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
5 years agoRelease version 1.29.1 26/202726/1 accepted/tizen/unified/20190404.022016 submit/tizen/20190403.083158
Sangyoon Jang [Wed, 3 Apr 2019 08:28:51 +0000 (17:28 +0900)]
Release version 1.29.1

Changes:
 - Change log level of printing parsed pkgid
 - Revert "Reduce db connection while installer backend is running"

Change-Id: I3a07b53ccf360c8e7ce1c514c05fa700c1257df6
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoRevert "Reduce db connection while installer backend is running" 22/202722/1
Sangyoon Jang [Tue, 2 Apr 2019 07:47:04 +0000 (16:47 +0900)]
Revert "Reduce db connection while installer backend is running"

This reverts commit 5c30ad9f49cabedf7baa01dd5b23af22d669c230.

Change-Id: I8302871edf14c3968bdde0fc2b82b26bcb79354b

5 years agoChange log level of printing parsed pkgid 19/202519/1
Sangyoon Jang [Fri, 29 Mar 2019 08:46:37 +0000 (17:46 +0900)]
Change log level of printing parsed pkgid

Changed to INFO from DEBUG.

Change-Id: I087ba05e3e6359637ff1f85f697458c113d5106d
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoRelease version 1.29.0 67/202467/1 submit/tizen/20190329.023054 submit/tizen/20190401.061033
Sangyoon Jang [Fri, 29 Mar 2019 02:09:35 +0000 (11:09 +0900)]
Release version 1.29.0

Changes:
 - Reduce db connection while installer backend is running
 - Fix recovery helper
 - Merge "Reduce db connection while installer backend is running" into tizen
 - Fix build error
 - Fix exception case of plugin info callback
 - Fix coding style checker error
 - Add RemoveStep
 - Write log to file when installation process failed

Change-Id: Ifb0394b02ef504463038112588edb0d7e2330cda
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoWrite log to file when installation process failed 72/202272/6
Sangyoon Jang [Tue, 26 Mar 2019 12:05:32 +0000 (21:05 +0900)]
Write log to file when installation process failed

When installation process failed, installer will write entire log at
"/var/log/app-installers.log". (except DEBUG level log)

Change-Id: I1d7aee6be3f67d16ff2749405bf28fc14e076cfe
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoAdd RemoveStep 89/202089/2
Junghyun Yeon [Fri, 22 Mar 2019 11:04:20 +0000 (20:04 +0900)]
Add RemoveStep

RemoveStep() will be used to remove certain step already added at step list.

Change-Id: I0c8d132323a23cd95a5fa67559cb225a3406d9c4
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoFix coding style checker error 13/202313/2
Sangyoon Jang [Wed, 27 Mar 2019 05:12:05 +0000 (14:12 +0900)]
Fix coding style checker error

Change-Id: Id1542aa29cf21c90b7146a8e5773f99453d93277
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoFix exception case of plugin info callback 12/202312/1
Sangyoon Jang [Wed, 27 Mar 2019 05:00:28 +0000 (14:00 +0900)]
Fix exception case of plugin info callback

The appid can be null.

Change-Id: Id6d409936e33df7b7aa6505f2eb9b616b243d02b
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoFix build error 11/202311/1
Sangyoon Jang [Wed, 27 Mar 2019 04:58:09 +0000 (13:58 +0900)]
Fix build error

Fix wrong merged code.

Change-Id: I544c52b5f802823e75aaf9ca40056f071e90a908
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoMerge "Reduce db connection while installer backend is running" into tizen
Junghyun Yeon [Fri, 22 Mar 2019 10:30:10 +0000 (10:30 +0000)]
Merge "Reduce db connection while installer backend is running" into tizen

5 years agoFix recovery helper 46/202046/1
Sangyoon Jang [Fri, 5 Jan 2018 04:39:57 +0000 (13:39 +0900)]
Fix recovery helper

We don't need to check if the file is directory or not.

Change-Id: I5d43a0c6e8af10b61c3985ac72a86d5eea4c2ab4
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
(cherry picked from commit 3f040e9398d74cef639154e24493e74bf7c2dacd)

5 years agoReduce db connection while installer backend is running 38/200938/7
Junghyun Yeon [Wed, 6 Mar 2019 08:48:16 +0000 (17:48 +0900)]
Reduce db connection while installer backend is running

- Db connection during installation cause delay
  when some hard scenarios.

Change-Id: Id313d669d029e98d1e3540c808ccaa75b391df50
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoRelease version 1.28.1 64/201964/1 accepted/tizen/unified/20190322.075512 submit/tizen/20190321.084911
Sangyoon Jang [Thu, 21 Mar 2019 08:43:18 +0000 (17:43 +0900)]
Release version 1.28.1

Changes:
 - Fix a bug when recover preload-rw update
 - Fix crash issue
 - Adjust to change of pkgmgrinfo_pkg_dependency_list_cb

Change-Id: I364c4b40948425fdcd7a33194b8e56ad9234bea3
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoAdjust to change of pkgmgrinfo_pkg_dependency_list_cb 68/201368/4
Sangyoon Jang [Wed, 13 Mar 2019 07:40:21 +0000 (16:40 +0900)]
Adjust to change of pkgmgrinfo_pkg_dependency_list_cb

Requires:
 - https://review.tizen.org/gerrit/c/platform/core/appfw/pkgmgr-info/+/201198

Change-Id: I20f0257cf7825306b5c96919db87a8ff32643df0
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoFix crash issue 95/201695/1
Hwankyu Jhun [Tue, 19 Mar 2019 02:31:49 +0000 (11:31 +0900)]
Fix crash issue

Before calling FillExtraInfo(), FillComponentBasedApplicationInfo()
should be called.

Change-Id: Icd436417f8e05618b16f243a6cf61607251054ef
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
5 years agoFix a bug when recover preload-rw update 96/201596/2
Sangyoon Jang [Mon, 18 Mar 2019 06:08:53 +0000 (15:08 +0900)]
Fix a bug when recover preload-rw update

The preload-rw package should not be a system package.

Change-Id: Iba5d917105fbdbfc699cd9a55403097638446aa3
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoMerge "Release version 1.28.0" into tizen accepted/tizen/unified/20190318.150652 submit/tizen/20190315.084013
Junghyun Yeon [Fri, 15 Mar 2019 08:38:36 +0000 (08:38 +0000)]
Merge "Release version 1.28.0" into tizen

5 years agoProvide methods for adding or replacing steps 89/201189/3
Junghoon Park [Mon, 11 Mar 2019 07:56:39 +0000 (16:56 +0900)]
Provide methods for adding or replacing steps

Change-Id: I0845a49e34dc3816d826502b55203dbd930ba744
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
5 years agoRelease version 1.28.0 94/201494/1
Hwankyu Jhun [Fri, 15 Mar 2019 03:05:00 +0000 (12:05 +0900)]
Release version 1.28.0

Changes:
 - Fix StepKillApps
 - Use lambda expressions for simple callback function
 - Implement package dependency feature
 - Add string into include list
 - Remove using assert() in ExternalStorage
 - Add GetRequestTypeString() to print request type
 - Change visibility of steps to protected
 - Print request type at StepConfigure
 - Remove routine for checking name duplication on installer plugin
 - Fix bug of debug mode installation of hybrid package
 - Implement execution of removed plugin feature
 - Parse new elements for component-based application

Change-Id: Ic3e0ab612712535f43a5efd1f51da35b3a8850d5
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
5 years agoParse new elements for component-based application 91/200691/8
Hwankyu Jhun [Thu, 28 Feb 2019 07:42:46 +0000 (16:42 +0900)]
Parse new elements for component-based application

Requires:
 - https://review.tizen.org/gerrit/#/c/platform/core/appfw/pkgmgr-info/+/200568/
 - https://review.tizen.org/gerrit/#/c/platform/core/appfw/tpk-manifest-handlers/+/200669/
 - https://review.tizen.org/gerrit/#/c/platform/core/appfw/app-installers/+/200691/
 - https://review.tizen.org/gerrit/#/c/platform/core/appfw/amd/+/200773/

Change-Id: Ia2a277fd0eaff0c8ad761294b4f45bf29c8e99a4
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
5 years agoImplement execution of removed plugin feature 44/195744/24
Junghyun Yeon [Fri, 14 Dec 2018 08:46:03 +0000 (17:46 +0900)]
Implement execution of removed plugin feature

Related changes:
[pkgmgr-info] : https://review.tizen.org/gerrit/#/c/platform/core/appfw/pkgmgr-info/+/195920/

Change-Id: Ief580418d693f98458334c7ac2a353964e9dd6ed
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoFix bug of debug mode installation of hybrid package 97/200897/3
Sangyoon Jang [Tue, 5 Mar 2019 11:53:12 +0000 (20:53 +0900)]
Fix bug of debug mode installation of hybrid package

The appdebugging privilege should be added for all applications
included in hybrid package.

Change-Id: Id0bced11063f7fb8c66b4a10ac696c5832f0acc7
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoRemove routine for checking name duplication on installer plugin 92/200492/2
Junghyun Yeon [Tue, 26 Feb 2019 02:02:49 +0000 (11:02 +0900)]
Remove routine for checking name duplication on installer plugin

Change-Id: Id53963dd55141ab87adb64d6f96db1187c4588f9
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoPrint request type at StepConfigure 48/200548/2
Sangyoon Jang [Tue, 26 Feb 2019 10:10:32 +0000 (19:10 +0900)]
Print request type at StepConfigure

Change-Id: I9361120c285cca5f7174a7aed731affd37fcb915
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoChange visibility of steps to protected 21/200321/2
Sangyoon Jang [Thu, 21 Feb 2019 11:12:22 +0000 (20:12 +0900)]
Change visibility of steps to protected

For extensibility, change visibility to protected.

Change-Id: I2338d6a9fc280d37f60e355d6a38f4690a1a0038
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoAdd GetRequestTypeString() to print request type 36/200236/1
Sangyoon Jang [Wed, 20 Feb 2019 10:52:11 +0000 (19:52 +0900)]
Add GetRequestTypeString() to print request type

Change-Id: Icb089a5eb63ef05fcd4e543f3a78995804528675
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoRemove using assert() in ExternalStorage 31/200231/1
Sangyoon Jang [Wed, 20 Feb 2019 10:10:06 +0000 (19:10 +0900)]
Remove using assert() in ExternalStorage

Just return error instead of assert.

Change-Id: I0804ec330aa8d7b0d2ea57440b49ff5bae650a79
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoAdd string into include list 19/200019/1
Junghyun Yeon [Mon, 18 Feb 2019 07:09:58 +0000 (16:09 +0900)]
Add string into include list

- Add string into include list for coding style

Change-Id: I17f1e9e1116e8ffde48855c9a120e9318dceb275
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoImplement package dependency feature 33/197433/8
Sangyoon Jang [Thu, 10 Jan 2019 10:35:56 +0000 (19:35 +0900)]
Implement package dependency feature

Requires:
 - https://review.tizen.org/gerrit/c/platform/core/appfw/tpk-manifest-handlers/+/195441
 - https://review.tizen.org/gerrit/c/platform/core/appfw/pkgmgr-info/+/197434

Change-Id: Ib48f15bfaa127b1a924cc6ebd1ad3ebb3b5ca3d1
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoUse lambda expressions for simple callback function 60/198860/2
Sangyoon Jang [Wed, 30 Jan 2019 10:39:54 +0000 (19:39 +0900)]
Use lambda expressions for simple callback function

Change-Id: I9295e905617326be56620909f01e6bfa54c03fd7
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoFix StepKillApps
Hwankyu Jhun [Tue, 15 Jan 2019 23:04:56 +0000 (08:04 +0900)]
Fix StepKillApps

This patch adds to check the elapsed time. After sending the terminate request,
we have to wait at least 5 seconds. According to Tizen policy,
the running application should be terminated within 5 seconds.
If the elapsed time exceeds 5 seconds, we send the kill request
to Application Manager to terminate the application forcedly.

Change-Id: Ic504f0899cfa55a13ff1eb2b8f6eee87ae9ec1ab
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
5 years agoRelease version 1.27.0 accepted/tizen/unified/20190117.151835 accepted/tizen/unified/20190128.061307 submit/tizen/20190116.050016 submit/tizen/20190116.052201 submit/tizen/20190117.001629 submit/tizen/20190121.002257
Hwankyu Jhun [Mon, 14 Jan 2019 02:17:02 +0000 (11:17 +0900)]
Release version 1.27.0

Changes:
 - Modify multiple LoadPlugins function call
 - Apply coding rules
 - Fix plugin smoketest failure
 - Support failure of plugin can cause install failure
 - Adjust log level
 - Fix build warning
 - Add attribute 'id' on app-control element
 - Merge "Add attribute 'id' on app-control element" into tizen
 - Fix some coding style
 - Fix log message

Change-Id: I0a8f40938eeab20ecf95b52b271528f2b3c68772
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
5 years agoFix log message 64/197064/2
ilho [Wed, 9 Jan 2019 07:21:47 +0000 (16:21 +0900)]
Fix log message

Change-Id: Ic187cb18478b7acfa5057c874d562ea9513b41b4
Signed-off-by: ilho <ilho159.kim@samsung.com>
5 years agoFix some coding style 01/197401/1
Sangyoon Jang [Fri, 11 Jan 2019 04:57:28 +0000 (13:57 +0900)]
Fix some coding style

Change-Id: I9b171ad8ed0d3307db2d0d942e6606f0a6350bad
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoMerge "Add attribute 'id' on app-control element" into tizen
HwanKyu Jhun [Thu, 10 Jan 2019 11:51:03 +0000 (11:51 +0000)]
Merge "Add attribute 'id' on app-control element" into tizen

5 years agoAdd attribute 'id' on app-control element 89/196889/1
Hwankyu Jhun [Mon, 7 Jan 2019 09:44:17 +0000 (18:44 +0900)]
Add attribute 'id' on app-control element

Change-Id: Ia575a9baf211f3f2d9734e6a53364ee901248477
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
5 years agoFix build warning 66/196866/2
ilho [Mon, 7 Jan 2019 05:22:18 +0000 (14:22 +0900)]
Fix build warning

Change-Id: I5d2bda3a27039917edcfb682db140ebd9e4317c9
Signed-off-by: ilho <ilho159.kim@samsung.com>
5 years agoAdjust log level 62/196862/1
Junghyun Yeon [Mon, 7 Jan 2019 02:39:40 +0000 (11:39 +0900)]
Adjust log level

Change-Id: I60c3f17a101492f152f7078e3142c24ae7a496a4
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoSupport failure of plugin can cause install failure 28/194628/16
ilho [Thu, 6 Dec 2018 10:45:18 +0000 (19:45 +0900)]
Support failure of plugin can cause install failure

the code see plugin_list file like :
type="type";name="name";path="path";vitalness="true"|"false"

if vitalness is "true" that plugin's failure cause install's failure

if not plugin's failure has no effect on the installation

Change-Id: Ia435c928d50e44cfdc3fe7da2faa86ea70442a3e
Signed-off-by: ilho <ilho159.kim@samsung.com>
5 years agoFix plugin smoketest failure 05/195805/3
ilho [Tue, 18 Dec 2018 07:38:52 +0000 (16:38 +0900)]
Fix plugin smoketest failure

smoke test failed because testcase has a dependency on the plugin list files
and fix that dependency

Change-Id: I03c3c7d282a98cec10b0eda3981816f8c8a599a2
Signed-off-by: ilho <ilho159.kim@samsung.com>
5 years agoApply coding rules 86/194986/1
ilho [Mon, 10 Dec 2018 05:22:47 +0000 (14:22 +0900)]
Apply coding rules

Change-Id: I397d258aca69fb861fee63fee38f3019a60bdf42
Signed-off-by: ilho <ilho159.kim@samsung.com>
5 years agoModify multiple LoadPlugins function call 16/193616/7
ilho [Thu, 22 Nov 2018 08:10:56 +0000 (17:10 +0900)]
Modify multiple LoadPlugins function call

Reduce process, undo, clean function's multiple LoadPlugins function call

Change-Id: I791be7ed53cd0feeccf6d9343373264d724674f9
Signed-off-by: ilho <ilho159.kim@samsung.com>
5 years agoRelease version 1.26.9 54/194354/1 accepted/tizen/unified/20181204.063711 submit/tizen/20181203.104606 submit/tizen/20181204.004649
Semun Lee [Mon, 3 Dec 2018 10:45:06 +0000 (19:45 +0900)]
Release version 1.26.9

Changes:
 - Fix dotnet app install failure in image creation stage

Change-Id: Iced241e4a37692db7fec4246fc1f0cffb3765916
Signed-off-by: Semun Lee <semun.lee@samsung.com>
5 years agoFix dotnet app install failure in image creation stage 46/194346/1
Sangyoon Jang [Mon, 3 Dec 2018 08:57:34 +0000 (17:57 +0900)]
Fix dotnet app install failure in image creation stage

During image creation stage, vconf API does not work.

Change-Id: Ie57b403463fe6e43c9095c0e55291f4eed247b27
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoRelease version 1.26.8 15/194315/1 submit/tizen/20181203.060015
Sangyoon Jang [Mon, 3 Dec 2018 04:34:10 +0000 (13:34 +0900)]
Release version 1.26.8

Changes:
 - Enable "keep-rwdata" flag for all uninstallation requests
 - Unmount only mount-update recover
 - Compare dotnet API level when installing dotnet app
 - Search all tags for plugin parser

Change-Id: I9c6c9a3f20598704a238596a3039cdc5b238f549
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoSearch all tags for plugin parser 27/193427/2
Sangyoon Jang [Tue, 20 Nov 2018 09:44:19 +0000 (18:44 +0900)]
Search all tags for plugin parser

Change-Id: I0c4dde36b67a3ac876db9805a150a60ab559e9f7
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoCompare dotnet API level when installing dotnet app 76/193776/7
Sangyoon Jang [Mon, 26 Nov 2018 08:25:02 +0000 (17:25 +0900)]
Compare dotnet API level when installing dotnet app

dotnet API level is not same with tizen platform version, but there
is only one attribute for representing this feature. So if there is
dotnet app, check dotnet API level instead of tizen API version.

Change-Id: Ib732637f9d7558e4cd87c7d6605695094d787f2c
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoUnmount only mount-update recover 44/193144/3
Junghyun Yeon [Thu, 15 Nov 2018 07:19:15 +0000 (16:19 +0900)]
Unmount only mount-update recover

Change-Id: I6cd8835fba89d82a5ac2edb703ab246f223256a3
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoEnable "keep-rwdata" flag for all uninstallation requests 46/190746/1
Junghyun Yeon [Fri, 5 Oct 2018 05:22:37 +0000 (14:22 +0900)]
Enable "keep-rwdata" flag for all uninstallation requests

Change-Id: I99f924632fff0badfa2cec75029ecb6237e09ddb
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoRelease version 1.26.7 67/186767/1 accepted/tizen/5.0/unified/20181102.013452 accepted/tizen/unified/20180816.062942 submit/tizen/20180814.083738 submit/tizen_5.0/20181101.000002
Junghyun Yeon [Tue, 14 Aug 2018 07:40:24 +0000 (16:40 +0900)]
Release version 1.26.7

Changes:
 - Remove recovery file before write new one
 - Remove unnecessary function
 - Add StepRecoverTrustAnchor

Change-Id: I14c8e516ddca3dfae78f0fb1fc9eca242b3dd1ad
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoAdd StepRecoverTrustAnchor 22/186122/3
Junghyun Yeon [Tue, 7 Aug 2018 10:32:46 +0000 (19:32 +0900)]
Add StepRecoverTrustAnchor

- Add new step to handle some exceptional cases.

Change-Id: Idcee8bde65327738e0ad8efbe20c35f11364bac3
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoRemove unnecessary function 62/186562/1
Junghyun Yeon [Fri, 10 Aug 2018 10:06:02 +0000 (19:06 +0900)]
Remove unnecessary function

Change-Id: I867b512c5a093710c46e80f43165bd47243b2aa0
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoRemove recovery file before write new one 67/186067/1
Junghyun Yeon [Tue, 7 Aug 2018 05:46:38 +0000 (14:46 +0900)]
Remove recovery file before write new one

Change-Id: I3aa2819670d4e0fdb5de9793458352f77af213e7
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoRelease version 1.26.6 33/184833/1 accepted/tizen/unified/20180724.073408 submit/tizen/20180723.124652
Junghyun Yeon [Mon, 23 Jul 2018 12:45:03 +0000 (21:45 +0900)]
Release version 1.26.6

Changes:
 - Add condition for detecting externally-installed pkg

Change-Id: I22544c600e16da6728c18b021db1941e25af200a
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoAdd condition for detecting externally-installed pkg 08/184808/2
Junghyun Yeon [Mon, 23 Jul 2018 08:51:03 +0000 (17:51 +0900)]
Add condition for detecting externally-installed pkg

- Now db recovery requests tries to detect given pkg is
  installed at external storage or not.

Change-Id: I74858c14eeb25cd4e9606d2ddf4884de74af0e61
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoRelease version 1.26.5 61/184461/1 accepted/tizen/unified/20180719.063011 submit/tizen/20180718.064806
Junghyun Yeon [Wed, 18 Jul 2018 05:45:19 +0000 (14:45 +0900)]
Release version 1.26.5

Changes:
 - Fix static analysis issue
 - Remove unnecessary free operation
 - Add codes for Recover databases
 - Fix code to be more secure

Change-Id: Ic2208683a97d40ac5699006a015b4d5a739687a5
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoFix code to be more secure 19/184319/1
Semun Lee [Tue, 17 Jul 2018 07:43:20 +0000 (16:43 +0900)]
Fix code to be more secure

- dlopen with absolute path to prevent LD_LIBRARY_PATH attack
- add "x" to prevent symlink attack for recovery file creation

Change-Id: I5f94740e1fd7e1df6c711767d63b624d829b399b
Signed-off-by: Semun Lee <semun.lee@samsung.com>
5 years agoAdd codes for Recover databases 76/182176/11
Junghyun Yeon [Thu, 21 Jun 2018 06:15:12 +0000 (15:15 +0900)]
Add codes for Recover databases

- New request type for register infomation into pkg database is needed.
- Add new options in pkg_initdb to invoke backend with "recover-db" option.
- Add new steps to get privilege level from stored signature values.

Related changes:
[slp-pkgmgr] : https://review.tizen.org/gerrit/182189

Change-Id: If9eb06937fc8049fc354b8a33f161207678b2401
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoRemove unnecessary free operation 87/183287/1
Junghyun Yeon [Wed, 4 Jul 2018 06:01:40 +0000 (15:01 +0900)]
Remove unnecessary free operation

- It will not affect at all but also unnecessary.

Change-Id: Ib710ded02c036d5937ab362b8b0addc9894683a7
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoFix static analysis issue 40/183040/1
Junghyun Yeon [Mon, 2 Jul 2018 02:43:22 +0000 (11:43 +0900)]
Fix static analysis issue

Change-Id: Ib1cffbc442d78e9b5cd8fd4f9f875d627ca65e41
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoRelease version 1.26.4 20/182520/2 accepted/tizen/unified/20180627.070020 submit/tizen/20180626.064201
Sangyoon Jang [Tue, 26 Jun 2018 01:34:38 +0000 (10:34 +0900)]
Release version 1.26.4

Changes:
 - Supplement ParserPlugin
 - Remove unused plugin from list
 - Change initdb logic
 - Fix crash issue
 - Set default type value of app as capp
 - Fix unexpected assertion at external storage initialization

Change-Id: I642dd09ea913df48388939ce1166eb58d71111c1
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoFix unexpected assertion at external storage initialization 43/182543/1
Sangyoon Jang [Tue, 26 Jun 2018 05:01:34 +0000 (14:01 +0900)]
Fix unexpected assertion at external storage initialization

Change-Id: Id48e63101164d21a93f5d8febd003306526ffd29
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoSet default type value of app as capp 59/182459/4
Sangyoon Jang [Mon, 25 Jun 2018 09:09:13 +0000 (18:09 +0900)]
Set default type value of app as capp

Some security module uses type attribute, so it should not be null.

Change-Id: I75a3300b4449e42758b6e99e027bcf0a2227431c
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
5 years agoFix crash issue 75/182075/1
Junghyun Yeon [Wed, 20 Jun 2018 07:30:11 +0000 (16:30 +0900)]
Fix crash issue

- Manifest could be null when recover pkg.

Change-Id: I2ad4b86cc8fe7924bedf169cbce93179af3e5b4f
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
5 years agoChange initdb logic 03/181603/1
Junghyun Yeon [Fri, 15 Jun 2018 05:00:37 +0000 (14:00 +0900)]
Change initdb logic

- Initializing user parser db will not remove integrated cert db.
- Change method to get certificate db.

Related changes:
[pkgmgr-info] : https://review.tizen.org/gerrit/#/c/181599/

Change-Id: Id932d0e4ae7690a825aa4169b699d2ff10d08dff
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoRemove unused plugin from list 89/180489/2
Junghyun Yeon [Wed, 30 May 2018 04:57:09 +0000 (13:57 +0900)]
Remove unused plugin from list

Change-Id: I804369a94c12512604fa00acc64f8b5ef6ab983c
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoSupplement ParserPlugin 62/178962/14
Junghyun Yeon [Tue, 15 May 2018 04:52:06 +0000 (13:52 +0900)]
Supplement ParserPlugin

- Add StepRecoverParserPlugin to provide recovery interface.
- Add clean / undo interface.
- Change StepRemoveManifest to remove manifest file at cleanup time.
- StepUnregisterApp will not remove modified manifest file.

Change-Id: I296bf6acfd5dbd2281e9eefb093e89688b2d9b15
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoRelease version 1.26.3 25/179025/1 accepted/tizen/unified/20180516.065605 accepted/tizen/unified/20180521.003607 submit/tizen/20180515.094318 submit/tizen/20180518.004605
Sangyoon Jang [Tue, 15 May 2018 09:05:07 +0000 (18:05 +0900)]
Release version 1.26.3

Changes:
 - Parse remote appcontrol

Change-Id: I228ab20e1a5212a34daaac9a428ae48744387c66
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoParse remote appcontrol 07/170907/9
Sangyoon Jang [Fri, 23 Feb 2018 06:40:46 +0000 (15:40 +0900)]
Parse remote appcontrol

Requires:
 - https://review.tizen.org/gerrit/170905
 - https://review.tizen.org/gerrit/178434

Change-Id: I5f54a6630e31559e66466d4efabaa4ff1b9103c9
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoRelease version 1.26.2 02/178102/1 accepted/tizen/unified/20180509.072928 submit/tizen/20180508.071542
Hwankyu Jhun [Tue, 8 May 2018 06:07:49 +0000 (15:07 +0900)]
Release version 1.26.2

Changes:
 - Change rules for default dbus policy
 - Merge "Change rules for default dbus policy" into tizen
 - Fix update recovery logic
 - Change security registration method
 - Fix checking the application status

Change-Id: I7cca622d251c83874cbaf38723ae706ce196edf8
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
6 years agoFix checking the application status 96/177896/3
Hwankyu Jhun [Fri, 4 May 2018 07:47:06 +0000 (16:47 +0900)]
Fix checking the application status

After this patch is applied, app-installer uses
aul_app_get_status_for_uid() intead of aul_app_is_running_for_uid()
to check whether an application is running or NOT.
When an application is dying, aul_app_is_running_for_uid() returns
false.

Change-Id: I1af3904d524ee8ac9a9414a79e55f7d86aefd7e2
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
6 years agoChange security registration method 99/177599/2
Junghyun Yeon [Wed, 2 May 2018 05:51:45 +0000 (14:51 +0900)]
Change security registration method

- Change security registration method to let developer change pkg
  between wgt and hybrid.

Change-Id: I1607de843dc2228981f74dff7349112187bb7537
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoFix update recovery logic 16/177616/6
Sangyoon Jang [Wed, 2 May 2018 07:14:21 +0000 (16:14 +0900)]
Fix update recovery logic

Set backup done flag to recover original package contents properly.
If update fail during backup original contents, recovery process may delete
original contents and restore partial contents from backup path.

Change-Id: I8321dd470ed245d8f40c83a4f94557d563744cb1
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoMerge "Change rules for default dbus policy" into tizen
Inkyun Kil [Wed, 2 May 2018 05:17:15 +0000 (05:17 +0000)]
Merge "Change rules for default dbus policy" into tizen

6 years agoFix StepUpdateStorageDirectories 61/177061/2 accepted/tizen/unified/20180427.062445 submit/tizen/20180425.085313
Sangyoon Jang [Wed, 25 Apr 2018 05:10:23 +0000 (14:10 +0900)]
Fix StepUpdateStorageDirectories

This step should not do anything when global installation mode.

Change-Id: Ibb2f6093badde0ecb28d4a53b04291e8aad9e7e0
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoSet ownership of shared data dir properly when update 59/177059/1
Sangyoon Jang [Wed, 25 Apr 2018 05:07:01 +0000 (14:07 +0900)]
Set ownership of shared data dir properly when update

Change-Id: Iab4b7e3a2581ee84b7d63f3e4a24fbd769e7d851
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoChange rules for default dbus policy 52/177052/2
Inkyun Kil [Tue, 17 Apr 2018 10:57:43 +0000 (19:57 +0900)]
Change rules for default dbus policy

Change-Id: I4462b1a8034c2fea88b7aa2f1e2085dbe280ceb3
Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com>
6 years agoRemove libprivilege from plugin list 32/176732/1
Junghyun Yeon [Mon, 23 Apr 2018 06:09:16 +0000 (15:09 +0900)]
Remove libprivilege from plugin list

Change-Id: Iccc9d6a03846b767c60bbe02ad673a34c5d830a0
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoImplement undo operation of trust anchor 51/158351/26
Junghyun Yeon [Tue, 31 Oct 2017 08:01:28 +0000 (17:01 +0900)]
Implement undo operation of trust anchor

- Trust-anchor registration/unregistration should be revoked
  when installation has failed.
- Old certificates should be rollbacked so make additional steps
  to perform revoke operation after rollback file has done.
- Disable making symlink for preload rw requests.

Change-Id: Id63f0b248a930f77da959bdd84c127843b9fecac
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoFix coding rule 30/175730/3
Junghyun Yeon [Thu, 12 Apr 2018 04:21:49 +0000 (13:21 +0900)]
Fix coding rule

Change-Id: Ib31ba9f6e9f500a396fb46137309cda00de32e91
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoReplace dbus-glib-1 with gdbus 97/176297/6
Sangyoon Jang [Wed, 18 Apr 2018 06:29:08 +0000 (15:29 +0900)]
Replace dbus-glib-1 with gdbus

Change-Id: If73b7c470883f2812296704db3c06ede0ce98922
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoRelease version 1.26.1 96/176296/1 submit/tizen/20180416.022000
Junghyun Yeon [Wed, 18 Apr 2018 06:23:36 +0000 (15:23 +0900)]
Release version 1.26.1

Changes:
 - Fix StepSaveSignature
 - Set mode 2755 to data and cache in useradd script
 - Add missing dependency

Change-Id: I3ae7e6283000a95c4b87b2f6fc88eb164b545685
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoAdd missing dependency 49/176249/1
Junghyun Yeon [Wed, 18 Apr 2018 00:29:57 +0000 (09:29 +0900)]
Add missing dependency

Change-Id: Ia10f601201f59ed8f2b69b8505472c5fabcec4f4
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoSet mode 2755 to data and cache in useradd script 01/175601/1
Semun Lee [Wed, 11 Apr 2018 05:01:51 +0000 (14:01 +0900)]
Set mode 2755 to data and cache in useradd script

data and cache directory should have group_write
and setgid permissions.

Change-Id: I42fbbede4fc783d598fb42c2388788c7f3fce2d2
Signed-off-by: Semun Lee <semun.lee@samsung.com>
6 years agoFix StepSaveSignature 93/174993/1
Junghyun Yeon [Fri, 6 Apr 2018 00:27:30 +0000 (09:27 +0900)]
Fix StepSaveSignature

- Remove duplicated code about removing dist signatures.
- dist signatures will not be extracted during mount install or update.

Change-Id: I08272080a7202afcd05c69dbb9acc278b5231187
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoRelease version 1.26.0 52/174352/1 accepted/tizen/unified/20180403.060137 submit/tizen/20180330.081956 submit/tizen/20180330.082234 submit/tizen/20180402.081755
Junghyun Yeon [Fri, 30 Mar 2018 08:13:29 +0000 (17:13 +0900)]
Release version 1.26.0

Changes:
 - Add StepSaveSignature step
 - Check space before backup while installation

Change-Id: I51f84d149bc140738597557009a12d64019ea835
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoCheck space before backup while installation 64/174264/3
Junghyun Yeon [Thu, 29 Mar 2018 10:46:44 +0000 (19:46 +0900)]
Check space before backup while installation

- Backup algorithm changed from move to copy for several directories
  for access permission.
- Due to change above, extra storage is needed to back it up but
  calculating it was missing.

Change-Id: Ia935d1ba460f19ddc0dfb69e13015f78d00fec32
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoAdd StepSaveSignature step 53/171653/13
Junghyun Yeon [Tue, 6 Mar 2018 08:16:11 +0000 (17:16 +0900)]
Add StepSaveSignature step

- Storing distributor signature file itself let user extract
  installed package.
- New step will store signature values into separated files
  and it will be referenced when db has corrupted.
- Also, new step will remove distributor signature files.

Change-Id: I73de9304a9ad296ecc9a4a8687941d427bf5a9fe
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoRelease version 1.25.3 70/173970/1 accepted/tizen/unified/20180330.060602 submit/tizen/20180327.085346
Junghyun Yeon [Tue, 27 Mar 2018 08:49:32 +0000 (17:49 +0900)]
Release version 1.25.3

Changes:
 - Fix static analysis issue

Change-Id: I3d3290ab0cbca4170e8c54ba4ab26692886bb189
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoFix static analysis issue 15/173515/1
Junghyun Yeon [Thu, 22 Mar 2018 06:16:24 +0000 (15:16 +0900)]
Fix static analysis issue

Change-Id: Ic5dcae18ac388923ac95bb8ef72e381453cbbddb
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoRelease version 1.25.2 10/171910/1 accepted/tizen/unified/20180313.061121 submit/tizen/20180308.061646 submit/tizen/20180312.045921
Sangyoon Jang [Thu, 8 Mar 2018 06:02:09 +0000 (15:02 +0900)]
Release version 1.25.2

Changes:
 - Fix Empty() of GListRange
 - Enable ManifestDirectUpdate for ReadonlyUpdateInstalled pkg
 - Add codes to enable ManifestDirectInstall for mount installed pkg
 - Fix coding rule
 - Fix smack deny issue while updating pkg
 - Remove unpacked dir when finished copying
 - Add StepRemoveUserData
 - Fix registering provides-appdefined-privileges

Change-Id: Ic765a7cf227cfa945e3212db6fba64521ad313d0
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoFix registering provides-appdefined-privileges 85/171885/1
Sangyoon Jang [Thu, 8 Mar 2018 02:46:58 +0000 (11:46 +0900)]
Fix registering provides-appdefined-privileges

security-manager manages security context per app, not package.
And it doesn't allow two apps to define same provides-appdefined-privileges.

Change-Id: Ibaa791cb9505573478bab6e487101b96eeb82e6b
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoAdd StepRemoveUserData 98/169698/3
Sangyoon Jang [Mon, 19 Feb 2018 02:05:56 +0000 (11:05 +0900)]
Add StepRemoveUserData

This step removes user data for ReadonlyUpdateUninstall mode by removing
and creating user directories.

Change-Id: If59413122b22c8aabf97f1ae19e584b44a6ffce6
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoRemove unpacked dir when finished copying 86/170486/1
Junghyun Yeon [Tue, 20 Feb 2018 08:10:30 +0000 (17:10 +0900)]
Remove unpacked dir when finished copying

Change-Id: I5dd9d8e91123caa0d70aa3a4717eaaaf4b08409d
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoFix smack deny issue while updating pkg 23/168823/15
Junghyun Yeon [Wed, 31 Jan 2018 07:52:05 +0000 (16:52 +0900)]
Fix smack deny issue while updating pkg

- When certain pkg is updating and some other application
  tries to access its shared/res directory, it may cause
  smack deny if file has copied but security registration is
  not performed.
- This patch preserves shared and shared/res directory to
  preserve its smack label and this will transmuted into
  files and directories which will be copied into it.

Change-Id: I7eed21df0387ad969d6b8a13f0c269e1022db8e2
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoFix coding rule 25/169325/1
Junghyun Yeon [Tue, 6 Feb 2018 04:18:02 +0000 (13:18 +0900)]
Fix coding rule

Change-Id: I7b3fc65879e27ef838b69e30c3b87812add7337a
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoAdd codes to enable ManifestDirectInstall for mount installed pkg 44/167144/8
Junghyun Yeon [Tue, 16 Jan 2018 00:12:15 +0000 (09:12 +0900)]
Add codes to enable ManifestDirectInstall for mount installed pkg

- Add step to check existance of mount path to determine
  whether pkg is mount installed or not during ManifestDirectInstall.
- Refactoring functions for backup directory.

Change-Id: I582671ae1f679f0553cf11bbcc6c64ff49dce2b4
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoEnable ManifestDirectUpdate for ReadonlyUpdateInstalled pkg 32/156432/22
Junghyun Yeon [Wed, 18 Oct 2017 09:07:53 +0000 (18:07 +0900)]
Enable ManifestDirectUpdate for ReadonlyUpdateInstalled pkg

- User can update preload pkg by downloaded pkg
  and its installation procedure is called "ReadonlyUpdateInstall".
- ManifestDirectUpdate for these kind of packages should be enabled
  in case of db corruption.

Change-Id: I403d32f996616d88f96372df91123b35ff6af2a0
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoFix Empty() of GListRange 34/169234/1
Sangyoon Jang [Mon, 5 Feb 2018 05:22:03 +0000 (14:22 +0900)]
Fix Empty() of GListRange

Make return true if list is null.

Change-Id: I6695bcb316d0be17d4b0f09c2e4edf71657dd1da
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>