platform/core/appfw/app-installers.git
7 years agotpk/wgt backend will run as system session 06/78206/23 submit/tizen/20160811.013634
Junghyun Yeon [Mon, 4 Jul 2016 12:34:34 +0000 (21:34 +0900)]
tpk/wgt backend will run as system session

Related changes
[slp-pkgmgr] https://review.tizen.org/gerrit/80764
[pkgmgr-server] https://review.tizen.org/gerrit/#/c/78205/
[app-installers] https://review.tizen.org/gerrit/#/c/78206/
[wgt-backend] https://review.tizen.org/gerrit/#/c/81099/

Change-Id: I0bd615388f539da3dc25594deb9b9eab999603a9
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoFix StepAcquireExternalStorage 96/83296/2
Sangyoon Jang [Wed, 10 Aug 2016 04:55:15 +0000 (13:55 +0900)]
Fix StepAcquireExternalStorage

Get installed storage from pkgmgr db when processing installed package.

Change-Id: I444eecd0caa1fe6b71b1dbbf58a542192e403172
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoFix pkg_initdb post script 97/83297/1 accepted/tizen/common/20160810.161603 accepted/tizen/ivi/20160810.081759 accepted/tizen/mobile/20160810.081646 accepted/tizen/tv/20160810.081703 accepted/tizen/wearable/20160810.081729 submit/tizen/20160810.000849
Hwankyu Jhun [Wed, 10 Aug 2016 05:00:07 +0000 (14:00 +0900)]
Fix pkg_initdb post script

fix typo

Change-Id: I4691dfbe35fb919f73298b487f5f821aaa7a3784
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
7 years agoapply c++ type cast 90/83190/2 accepted/tizen/common/20160809.183948 accepted/tizen/ivi/20160809.232613 accepted/tizen/mobile/20160809.232352 accepted/tizen/tv/20160809.232502 accepted/tizen/wearable/20160809.232708 submit/tizen/20160809.051427
jongmyeongko [Tue, 9 Aug 2016 10:20:08 +0000 (19:20 +0900)]
apply c++ type cast

Change-Id: I60f3b97fc586457a2e45cb544a759502ae17a8f0
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agofix build error for 64bit 40/83140/2
jongmyeongko [Tue, 9 Aug 2016 08:52:25 +0000 (17:52 +0900)]
fix build error for 64bit

Change-Id: Idc24a6f6d48253e0fe20d4d1d252f7b0b54f6aca
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agouse w/o restart version api for killing application 50/83050/4
jongmyeongko [Tue, 9 Aug 2016 02:13:51 +0000 (11:13 +0900)]
use w/o restart version api for killing application

Change-Id: I768afc6985714ec6e3fddbab377b60ab73a883f5
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoget external path using storage api. 59/80759/7
jongmyeongko [Wed, 20 Jul 2016 04:55:10 +0000 (13:55 +0900)]
get external path using storage api.

Change-Id: Idac5f15520125462240bc2fdc31e98d6505eeb7b
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoSet default operation of splash screen 60/82860/2
Hwankyu Jhun [Mon, 8 Aug 2016 07:44:14 +0000 (16:44 +0900)]
Set default operation of splash screen

Change-Id: I14f28544ff572d21affade002fb53d775025c396
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
7 years agofix dbus xml for DeleteLegacyDirs and CreateExternalDirsForAllPkgs 64/83064/1
Junghyun Yeon [Tue, 9 Aug 2016 04:55:18 +0000 (13:55 +0900)]
fix dbus xml for DeleteLegacyDirs and CreateExternalDirsForAllPkgs

Change-Id: Ieab373d880e90baf2a58486f46a3c8169641d4a4
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoImplement new dbus method for create all external directories 83/80383/17
Junghyun Yeon [Mon, 18 Jul 2016 01:15:01 +0000 (10:15 +0900)]
Implement new dbus method for create all external directories

Change-Id: I836cd0aaa72fc7e34ea650b55e7e279933fbc569
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agocheck null value of extra icon path. 82/74482/13 submit/tizen/20160809.011327
jongmyeongko [Tue, 14 Jun 2016 04:59:52 +0000 (13:59 +0900)]
check null value of extra icon path.

Change-Id: I5c281d023a9fd0ed7ba9483c6c9d604e0cf60ee0
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoUse pkgmgr API to get the parser db path 24/81324/8
Hwankyu Jhun [Mon, 25 Jul 2016 12:07:35 +0000 (21:07 +0900)]
Use pkgmgr API to get the parser db path

- Requires
https://review.tizen.org/gerrit/81322

Change-Id: Ieb0403b6d95ef57a9ddd569d03f89f46475cf25d
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
7 years agoFix preload request for wgt 24/82424/3
Tomasz Iwanek [Wed, 3 Aug 2016 08:35:49 +0000 (10:35 +0200)]
Fix preload request for wgt

This commit should allow to install preload wgt package with command:
 - wgt-backend --preload -i $package

Submit together:
 - https://review.tizen.org/gerrit/82424
 - https://review.tizen.org/gerrit/82496
 - https://review.tizen.org/gerrit/82497

Change-Id: I483f819444773f164fc63401efda93b6b828b10d

7 years agoStylecheck 30/82430/1
Tomasz Iwanek [Wed, 3 Aug 2016 08:47:41 +0000 (10:47 +0200)]
Stylecheck

Change-Id: I081823db8cf901310aed58549c905ed304eedeac

7 years agoChange some log level in plugin processing 09/81909/2 accepted/tizen/common/20160803.193250 accepted/tizen/ivi/20160804.080811 accepted/tizen/mobile/20160804.080902 accepted/tizen/tv/20160804.080728 accepted/tizen/wearable/20160804.080616 submit/tizen/20160803.012753
Sangyoon Jang [Fri, 29 Jul 2016 07:41:05 +0000 (16:41 +0900)]
Change some log level in plugin processing

Some error logs can confuse the installation is failed.

Change-Id: I6f2ebd4ef39ca586b1a58cb05489e08a2d4f7cf4
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoDo not allow move operation for internal-only packages 91/76991/7
Sangyoon Jang [Tue, 28 Jun 2016 07:56:54 +0000 (16:56 +0900)]
Do not allow move operation for internal-only packages

Change-Id: I46b82272c6831f362c67f0b6eb3b55cc1850cc5d
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoGet default storage value to acquire external storage 57/76957/12
Sangyoon Jang [Tue, 28 Jun 2016 06:30:05 +0000 (15:30 +0900)]
Get default storage value to acquire external storage

Change-Id: Ie35187c1383a9305f92b61b270abf8bccab9f1e2
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agochange the method to check if the package is installed externally. 71/81871/3
jongmyeongko [Fri, 29 Jul 2016 04:09:23 +0000 (13:09 +0900)]
change the method to check if the package is installed externally.

app2ext api was removed.

Change-Id: I0e9d8f43d54e89d102355cef6b95b296da9e251b
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoFix StepDeltaPatch and ExternalMount 77/80277/5
Tomasz Iwanek [Fri, 15 Jul 2016 08:41:54 +0000 (10:41 +0200)]
Fix StepDeltaPatch and ExternalMount

Following changes allows StepDeltaPatch step to work with package
which is installed in external memory.

Additional abstraction of ExternalMount is added to enable/disable
package for delta update mode.

Change-Id: I686ccd356f2c061d24e3a8a2b625232b57506ffc

7 years agoremove NOT used functions. 04/80204/5
jongmyeongko [Fri, 15 Jul 2016 07:45:48 +0000 (16:45 +0900)]
remove NOT used functions.

Change-Id: Ib7776828cb9d419e002cc58fc8c7e6536ebec8f9
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoremove unnecessary code 79/79979/4
jongmyeongko [Thu, 14 Jul 2016 00:41:38 +0000 (09:41 +0900)]
remove unnecessary code

Change-Id: I5c29835d2c05680769223c33daa5b5a0f45ead6d
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agocall sync() before installer termination. 76/80276/3 accepted/tizen/common/20160722.135218 accepted/tizen/ivi/20160724.042103 accepted/tizen/mobile/20160724.041953 accepted/tizen/tv/20160724.042035 accepted/tizen/wearable/20160724.042049 submit/tizen/20160722.091303
jongmyeongko [Fri, 15 Jul 2016 12:31:28 +0000 (21:31 +0900)]
call sync() before installer termination.

Change-Id: Icbd4997bfa679a80b9260884a916f73dfe678dbb
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agosupport of legacy app directories 19/80319/7
jongmyeongko [Sat, 16 Jul 2016 07:31:02 +0000 (16:31 +0900)]
support of legacy app directories

dependent change:
https://review.tizen.org/gerrit/#/c/80279/

Change-Id: I418d9be1ded705e8fc2af286fb70adb2d594e277
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoremove deprecated and not-supported RW directories 79/80279/9
jongmyeongko [Fri, 15 Jul 2016 12:44:20 +0000 (21:44 +0900)]
remove deprecated and not-supported RW directories

and, remove pre-packed RW directories.

Change-Id: Id20197c874a7f8b831764cedd65676c1fb317f42
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoSet the SMACK security label to run given executable file in systemd services 44/80844/1 accepted/tizen/common/20160721.175911 accepted/tizen/ivi/20160721.090806 accepted/tizen/mobile/20160721.090532 accepted/tizen/tv/20160721.091345 accepted/tizen/wearable/20160721.091100 submit/tizen/20160721.003054
jooseong lee [Wed, 20 Jul 2016 11:15:03 +0000 (20:15 +0900)]
Set the SMACK security label to run given executable file in systemd services

Change-Id: Ifbe69ce58ab3116668f851041f9db818882eb020
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
7 years agoFix GetUserList 78/80478/1 accepted/tizen/common/20160719.171850 accepted/tizen/ivi/20160718.104415 accepted/tizen/mobile/20160718.104301 accepted/tizen/tv/20160718.104201 accepted/tizen/wearable/20160718.104318 submit/tizen/20160718.020809
Sangyoon Jang [Mon, 18 Jul 2016 08:15:22 +0000 (17:15 +0900)]
Fix GetUserList

Add "SECURITY" usertype for getting container users.

Change-Id: Ieffc46c62b9908ea8c6f17a09461eab9b6753e6a
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoFix parsing watch application 51/80451/1
Sangyoon Jang [Mon, 18 Jul 2016 06:53:06 +0000 (15:53 +0900)]
Fix parsing watch application

Change-Id: Ideb0cc9ff9f6e052865acce5f190edd759cebcf2
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoImplement pkg enable/disable 19/78919/5
Junghyun Yeon [Thu, 7 Jul 2016 10:19:57 +0000 (19:19 +0900)]
Implement pkg enable/disable

Related changes
[pkgmgr-tool] https://review.tizen.org/gerrit/78916
[slp-pkgmgr] https://review.tizen.org/gerrit/78917
[pkgmgr-server] https://review.tizen.org/gerrit/78918
[tpk-backend] https://review.tizen.org/gerrit/#/c/79070/

Change-Id: Ie0467a66d133cec859108229a4a499ebcf4d6b21
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoadd app-context plugin lib in plugins_list 96/79096/2
jongmyeongko [Fri, 8 Jul 2016 07:10:36 +0000 (16:10 +0900)]
add app-context plugin lib in plugins_list

Change-Id: I90491eee2735afdaeef9bee2d69a570935a66b36
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoMerge data directory when copying backup storage dir 40/79340/1
Sangyoon Jang [Mon, 11 Jul 2016 04:43:49 +0000 (13:43 +0900)]
Merge data directory when copying backup storage dir

Some packages have empty data directory. This caused update failure.

Change-Id: I87feb6b7e27ff3bfe24a3ca1a3612ebc5ea044da
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agofix pkg move behavior 45/78445/2 accepted/tizen/common/20160706.141854 accepted/tizen/ivi/20160706.014240 accepted/tizen/mobile/20160706.014157 accepted/tizen/tv/20160706.014215 accepted/tizen/wearable/20160706.014230 submit/tizen/20160705.114429
jongmyeongko [Tue, 5 Jul 2016 12:54:43 +0000 (21:54 +0900)]
fix pkg move behavior

remove invalid checking code.

Change-Id: I482f2a0e68531871a5d128e73375b5922e746b01
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoMerge "Make pkgdir-tool as non-root service" into tizen
Sangyoon Jang [Tue, 5 Jul 2016 11:57:33 +0000 (04:57 -0700)]
Merge "Make pkgdir-tool as non-root service" into tizen

7 years agoSet default color depth for splash screen 51/78351/1
Hwankyu Jhun [Tue, 5 Jul 2016 07:30:35 +0000 (16:30 +0900)]
Set default color depth for splash screen

Change-Id: I2ccba4e61ad3a37ea58fec3ed817cb4c45bdd753
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
7 years agoMake pkgdir-tool as non-root service 62/77762/3
Sangyoon Jang [Fri, 1 Jul 2016 04:29:07 +0000 (13:29 +0900)]
Make pkgdir-tool as non-root service

Use system user: app_fw
Following capabilities are required:
 - CAP_DAC_OVERRIDE, CAP_CHOWN, CAP_FOWNER

Change-Id: Id593a2e00f5c379f5b7e4facc86df6a118095c88
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoUnknown request handling 82/77782/4
Piotr Ganicz [Thu, 30 Jun 2016 14:29:44 +0000 (16:29 +0200)]
Unknown request handling

The following patchset should be submitted together:
https://review.tizen.org/gerrit/#/c/77784/

Change-Id: I55e1f0e5ad7e280c0a4020b7b06e384c35345a29

7 years agolabeling the contents under .mmc 72/78072/4 accepted/tizen/common/20160706.141403 accepted/tizen/ivi/20160705.044606 accepted/tizen/mobile/20160705.044438 accepted/tizen/tv/20160705.044548 accepted/tizen/wearable/20160705.044502 submit/tizen/20160704.042542
jongmyeongko [Mon, 4 Jul 2016 07:52:49 +0000 (16:52 +0900)]
labeling the contents under .mmc

Requires :
        https://review.tizen.org/gerrit/#/c/78145/

Change-Id: Id1892ae218463bcadef99f93f2507b7a98d4fbd5
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoCreate directories for TEP on sd card 99/77899/3
Tomasz Iwanek [Fri, 1 Jul 2016 11:22:14 +0000 (13:22 +0200)]
Create directories for TEP on sd card

Installing package with tep on fresh sd card should result in success.

Change-Id: I241f572ff6ef929c1cf4401f0e1172332f4d91ca

7 years agoQuery installed storage for installed apps 34/74034/6 accepted/tizen/common/20160703.130824 accepted/tizen/ivi/20160701.034205 accepted/tizen/mobile/20160701.034338 accepted/tizen/tv/20160701.034057 accepted/tizen/wearable/20160701.034233 submit/tizen/20160630.141237 submit/tizen_common/20160701.180000
Tomasz Iwanek [Fri, 10 Jun 2016 11:31:50 +0000 (13:31 +0200)]
Query installed storage for installed apps

Change in logic:
 - for installed apps query pkgmgr,
 - for new apps set internal storage by default;
   installed_storage value is overwriten in StepAcquireExternalStorage
   if initialization of sd card works well.

This is just some factoring. To verify:
 - run smoke tests for tpk,
 - check that move request is still working:
     tpk-backend -i ${package}
     tpk-backend -m ${pkgid} -t 1
     tpk-backend -m ${pkgid} -t 2

Change-Id: Id24ab0667e356917f2ed10dd36a6cef1e58edf95

7 years agoUse security-manager api for labeling user directories 84/77384/4
Sangyoon Jang [Wed, 29 Jun 2016 12:41:25 +0000 (21:41 +0900)]
Use security-manager api for labeling user directories

Use security-manager api for labeling.
Remove CAP_MAC_ADMIN from pkgdir-tool.

Change-Id: I52bc785e6449bfb12147dfd0f40e72121fe23456
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoRemove attr_copy_file 80/77380/3
Sangyoon Jang [Wed, 29 Jun 2016 12:22:09 +0000 (21:22 +0900)]
Remove attr_copy_file

Copying smack label will be replaced with security-manager api.

Change-Id: I241d27f7c75b101eaacc9ca5e28b8abdf8989240

7 years agoadd new error code for granting permission step 74/71274/4
jongmyeongko [Wed, 25 May 2016 01:24:15 +0000 (10:24 +0900)]
add new error code for granting permission step

Requires :
https://review.tizen.org/gerrit/#/c/76822

Change-Id: I7ae5489d473b4ee879f68002a577c9d445b6804b
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoRevert "Clean up author_id parameter and shared_dirs API" 74/76974/3 accepted/tizen/common/20160703.125718 accepted/tizen/ivi/20160629.015649 accepted/tizen/mobile/20160629.015608 accepted/tizen/tv/20160629.015720 accepted/tizen/wearable/20160629.015522 submit/tizen/20160627.042541
jongmyeong ko [Tue, 28 Jun 2016 07:09:40 +0000 (00:09 -0700)]
Revert "Clean up author_id parameter and shared_dirs API"

This causes installation failure of some prelaoded apps which have no signing file.

This reverts commit f62a7f7737536137cdb2ba4e1a9c8581e269e491.

Change-Id: I8e648af9d8ff0317b7327bd21258b78e48102339

7 years agoAdd gumd useradd script 30/76730/2
Sangyoon Jang [Mon, 27 Jun 2016 05:35:20 +0000 (14:35 +0900)]
Add gumd useradd script

This script will run pkg_initdb when new user added.
(Moved from pkgmgr-tool package)

Change-Id: I86341a94f42322df85f208a0d754c40c6e6c7131
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoClean up author_id parameter and shared_dirs API 16/74816/4
Tomasz Iwanek [Wed, 15 Jun 2016 15:13:20 +0000 (17:13 +0200)]
Clean up author_id parameter and shared_dirs API

Change-Id: I9bd22d902994aa618d35e48b0b9ff17724b98658

7 years agoblock CheckFeature 28/76428/2 accepted/tizen/common/20160624.133930 accepted/tizen/ivi/20160624.064654 accepted/tizen/mobile/20160624.064554 accepted/tizen/tv/20160624.064458 accepted/tizen/wearable/20160624.064714 submit/tizen/20160624.022316
jongmyeongko [Fri, 24 Jun 2016 02:12:14 +0000 (11:12 +0900)]
block CheckFeature

Change-Id: I39d0e2c37a498a691b8c9590d97926cde8d2aa20
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoSplit API in pkgmgr_registration.h 09/75109/4
Tomasz Iwanek [Wed, 15 Jun 2016 15:39:28 +0000 (17:39 +0200)]
Split API in pkgmgr_registration.h

API that gets existing data from pkgmgr database is moved to seperate file.

Submit together:
 - https://review.tizen.org/gerrit/75107
 - https://review.tizen.org/gerrit/75108
 - https://review.tizen.org/gerrit/75109

Change-Id: Idbc71bdb646d5afb2c90c559f59c565d2338795b

7 years agoRename backup_paths.h to paths.h 96/74296/3
Tomasz Iwanek [Mon, 13 Jun 2016 14:01:30 +0000 (16:01 +0200)]
Rename backup_paths.h to paths.h

Submit together:
 - https://review.tizen.org/gerrit/74296
 - https://review.tizen.org/gerrit/74297
 - https://review.tizen.org/gerrit/74298

Change-Id: I753c25993092cb48665e4e93cee83c3a7e223003

7 years agosuppress build warning 20/75720/1 accepted/tizen/common/20160621.184524 accepted/tizen/ivi/20160622.093652 accepted/tizen/mobile/20160622.093542 accepted/tizen/tv/20160622.093611 accepted/tizen/wearable/20160622.093632 submit/tizen/20160621.063045
jongmyeongko [Tue, 21 Jun 2016 06:12:10 +0000 (15:12 +0900)]
suppress build warning

Change-Id: I783093faacd5ace9b303af90ecf5bb4d7ee8d195
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoSimple validation of features 82/72782/12
Tomasz Iwanek [Thu, 2 Jun 2016 09:54:12 +0000 (11:54 +0200)]
Simple validation of features

Validation is added in StepParseManifest instead of:
 - parser - parsing should not check platform details
 - separate step - there is no feature field in manifest_x

Verification requires installing tpk package with some features and testing
via manipulating /etc/config/model-config.xml

There is only check if feature of given type exists in model-config.xml

Requires:
 - https://review.tizen.org/gerrit/72780
 - https://review.tizen.org/gerrit/74004

Change-Id: I521c0e18f76bf7eeecc56ee10cb31ce9f848378a

7 years agoMove tep between internal memory and sd card 68/74068/6
Tomasz Iwanek [Fri, 10 Jun 2016 12:48:59 +0000 (14:48 +0200)]
Move tep between internal memory and sd card

This commit:
 - keeps tep name as ${pkgid}-${appstore_hash}.tep,
 - adds helper functions for tep paths,
 - adds support for copying tep file to external storage,
 - adds moving tep in move request.

Requires:
 - https://review.tizen.org/gerrit/#/c/74045/

Submit together:
 - https://review.tizen.org/gerrit/#/c/74068/
 - https://review.tizen.org/gerrit/#/c/74293/
 - https://review.tizen.org/gerrit/#/c/74294/

Change-Id: I17ce7aafcbe85b731aaf9356c2c55427f79e5769

7 years agoadjust error log condition. 26/75226/1
jongmyeongko [Fri, 17 Jun 2016 05:58:09 +0000 (14:58 +0900)]
adjust error log condition.

Change-Id: I6320f98b9d35af9f5a4a2c5ec8e37ffa7d5aad94
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoHandling external appdata directories 05/74805/4
Tomasz Iwanek [Mon, 13 Jun 2016 15:17:49 +0000 (17:17 +0200)]
Handling external appdata directories

 - fixes scenarios of adding and removing external appdata
   directories
 - reworks parameter author_id in shared_dirs to trusted
   (trusted should be removed probably),
 - separate API from shared_dirs resposible for requests (IPC)
   into separate file different functionalities are defined
   in different headers.

Submit together:
 - https://review.tizen.org/gerrit/74805
 - https://review.tizen.org/gerrit/74806

Change-Id: If9a9d664fe8188727f5a92a9a2bf274553bcf810

7 years agoapply PIE option 67/75067/3 accepted/tizen/common/20160620.163115 accepted/tizen/ivi/20160617.083627 accepted/tizen/mobile/20160617.083449 accepted/tizen/tv/20160617.083321 accepted/tizen/wearable/20160617.083653 submit/tizen/20160616.134250
jongmyeongko [Thu, 16 Jun 2016 11:28:12 +0000 (20:28 +0900)]
apply PIE option

Change-Id: Idf95a4e41c2a5d13abba00b6a62ceb0568da9fd3
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoFix exception handling at pkg_initdb 62/74962/2
Sangyoon Jang [Wed, 15 Jun 2016 07:42:14 +0000 (16:42 +0900)]
Fix exception handling at pkg_initdb

Catch bad_any_cast, bad_lexical_cast.

Change-Id: Id41d7ab752b3c548a4206670918fee1fc184a5b8
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoPrint step name when error occured 46/74946/1
Sangyoon Jang [Thu, 16 Jun 2016 06:40:43 +0000 (15:40 +0900)]
Print step name when error occured

Change-Id: Ib6afc89ebc38ac288555ce491774114d3728d8d2
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoDon't check restriction mode when running in offline mode 33/74933/1 accepted/tizen/common/20160616.151934 accepted/tizen/ivi/20160616.132156 accepted/tizen/mobile/20160616.132129 accepted/tizen/tv/20160616.132139 accepted/tizen/wearable/20160616.132145 submit/tizen/20160616.063122
Sangyoon Jang [Thu, 16 Jun 2016 06:19:57 +0000 (15:19 +0900)]
Don't check restriction mode when running in offline mode

Change-Id: I9759ddeb53725e70f5b7a61a311dc99a9298a6cc
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agodo force_clean before pre_install. 48/74248/3 accepted/tizen/common/20160616.151533 accepted/tizen/ivi/20160616.002906 accepted/tizen/mobile/20160616.002835 accepted/tizen/tv/20160616.002818 accepted/tizen/wearable/20160616.002731 submit/tizen/20160615.073423
jongmyeongko [Mon, 13 Jun 2016 10:15:55 +0000 (19:15 +0900)]
do force_clean before pre_install.

Change-Id: Ida2443346113a07ae7f555f1621ba55edd91a8c2
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoset label to prevent execution by non-system application. 50/73950/4
jongmyeongko [Fri, 10 Jun 2016 07:11:29 +0000 (16:11 +0900)]
set label to prevent execution by non-system application.

Change-Id: I4ccb3ebab109b43d207caadf922f1f9454234d90
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoRevert removing smack capabilties from pkgdir-tool 43/74343/1 accepted/tizen/common/20160614.143929 accepted/tizen/ivi/20160614.103506 accepted/tizen/mobile/20160614.103402 accepted/tizen/tv/20160614.103436 accepted/tizen/wearable/20160614.103425 submit/tizen/20160614.023654
Sangyoon Jang [Tue, 14 Jun 2016 03:54:58 +0000 (12:54 +0900)]
Revert removing smack capabilties from pkgdir-tool

pkgdir-tool needs MAC_ADMIN(copying smack label), and
MAC_OVERRIDE(accessing to /etc/.pwd.lock by gumd api)

Change-Id: I935db34ed33b8825329eb5c6318f328f9a2476a2
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoFix StepCheckRestriction 51/74251/2
Sangyoon Jang [Mon, 13 Jun 2016 10:20:19 +0000 (19:20 +0900)]
Fix StepCheckRestriction

- Use proper api.
- Print pkgid at error log.

Change-Id: If73974fcde73235ed4a499b4a8f2695c2098135e
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoFix null pointer dereference 16/74116/1
Sangyoon Jang [Mon, 13 Jun 2016 01:57:56 +0000 (10:57 +0900)]
Fix null pointer dereference

Change-Id: Ic88d998171a7403a2f507919a23b69002474d0b6
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoRemove smack related capabilities from pkgdir-tool 94/73694/4
Sangyoon Jang [Thu, 9 Jun 2016 07:31:18 +0000 (16:31 +0900)]
Remove smack related capabilities from pkgdir-tool

Remove capabilities using systemd service.

Change-Id: Ie1af8ef697086383269a5d05a5918fdf71ede64d
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoImplement pkg move 16/72616/15 accepted/tizen/common/20160613.144713 accepted/tizen/ivi/20160610.114459 accepted/tizen/mobile/20160610.114409 accepted/tizen/tv/20160610.114427 accepted/tizen/wearable/20160610.114445 submit/tizen/20160610.015635
Junghyun Yeon [Thu, 2 Jun 2016 00:35:40 +0000 (09:35 +0900)]
Implement pkg move

Releated change : tpk-backend
https://review.tizen.org/gerrit/#/c/72618/

Change-Id: I57bb2b5deffd5294010e8b0a2512f992cb3f466a
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoadd <string> header from cpplint 92/73792/3
jongmyeongko [Thu, 9 Jun 2016 11:28:52 +0000 (20:28 +0900)]
add <string> header from cpplint

Change-Id: I121a0e59f4a6769f65e392bf71dee1520d501530
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoRemove unnecessary mount directory handling 44/73444/2
Semun Lee [Wed, 8 Jun 2016 06:51:50 +0000 (15:51 +0900)]
Remove unnecessary mount directory handling

tzip create and remove the mount directory in it.
We don't need to handle mount directory directly.

Change-Id: I7a0212a3bc32f40625b25693e445db53c61dfcb1
Signed-off-by: Semun Lee <sm79.lee@samsung.com>
7 years agoFix handling widget-application icon 73/72573/2 accepted/tizen/common/20160610.175852 accepted/tizen/ivi/20160609.091408 accepted/tizen/mobile/20160609.091542 accepted/tizen/tv/20160609.091345 accepted/tizen/wearable/20160609.091320 submit/tizen/20160609.010102
Tomasz Iwanek [Wed, 1 Jun 2016 13:21:01 +0000 (15:21 +0200)]
Fix handling widget-application icon

Icon name should match appid. Checking by prefix is invalid.

Change-Id: I2b3894e868f7ff9a26b7139f8463593e978e8b3d

7 years agoAdd StepCheckRestriction 58/72958/5
Sangyoon Jang [Fri, 3 Jun 2016 08:30:00 +0000 (17:30 +0900)]
Add StepCheckRestriction

Change-Id: If31097047c03df9a5d51ed6a4ced3a220e3781ad
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agochange 'chown' to 'fchown'. 21/72921/2
jongmyeongko [Fri, 3 Jun 2016 05:20:09 +0000 (14:20 +0900)]
change 'chown' to 'fchown'.

Change-Id: Ied38b55a07606600d4a1adce96e2ffa2675d364d
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoSTEP_NAME marco 27/72827/4
Tomasz Iwanek [Thu, 2 Jun 2016 12:55:26 +0000 (14:55 +0200)]
STEP_NAME marco

Adding marco to print name of step that failed
in AppInstaller class

Following must be submitted together:
 - https://review.tizen.org/gerrit/72827
 - https://review.tizen.org/gerrit/72828
 - https://review.tizen.org/gerrit/72829

Change-Id: I6dcaa9b797836b3e6adde082513aba240fa1040b

7 years agoPrivilages refactor 42/72342/3
Piotr Ganicz [Tue, 31 May 2016 11:01:11 +0000 (13:01 +0200)]
Privilages refactor

This patch moves the privileges.h header from wgt-backend
to app-installer repository. It collects the privileges
definitions to one place.

The following patchsets should be submitted together:
    - https://review.tizen.org/gerrit/72341
    - https://review.tizen.org/gerrit/72342

Change-Id: I0cec9b08340193e0ed28c00c3bb7083fecc16ddd

7 years agorefactor setting installed_storage 08/72908/1 accepted/tizen/common/20160606.141715 accepted/tizen/ivi/20160606.040558 accepted/tizen/mobile/20160606.035159 accepted/tizen/tv/20160606.035900 accepted/tizen/wearable/20160606.040103 submit/tizen/20160603.030057
jongmyeongko [Fri, 3 Jun 2016 04:18:36 +0000 (13:18 +0900)]
refactor setting installed_storage

Change-Id: Iaa29a44bf3639bde4d02a727969da04e5a66f240
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agochecking 'apps' existence of external storage. 36/72736/1 accepted/tizen/common/20160606.141604 accepted/tizen/ivi/20160602.230743 accepted/tizen/mobile/20160602.230724 accepted/tizen/tv/20160602.230706 accepted/tizen/wearable/20160602.230641 submit/tizen/20160602.040935
jongmyeongko [Thu, 2 Jun 2016 08:11:51 +0000 (17:11 +0900)]
checking 'apps' existence of external storage.

Change-Id: I613723e71183177aaaeebb9b94afb06858ea6880
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agofix wrong return type. 36/72536/2 accepted/tizen/common/20160602.140049 accepted/tizen/ivi/20160602.022900 accepted/tizen/mobile/20160602.023032 accepted/tizen/tv/20160602.022608 accepted/tizen/wearable/20160602.022747 submit/tizen/20160531.024853
jongmyeongko [Wed, 1 Jun 2016 10:34:26 +0000 (19:34 +0900)]
fix wrong return type.

Change-Id: I6f2ec8e22baf253c8f2d89137b7414bbcda78789
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoExternal installation 80/61680/23
Tomasz Iwanek [Fri, 2 Oct 2015 09:01:32 +0000 (11:01 +0200)]
External installation

This patch implements installation of package in external sd card storage.
Tpk and wgt applications may declare preference of being installed on external
storage. If so and space requirement is satisified then their resource directory
is installed in sd card with use of app2sd API.

Following patchsets should be submitted together:
 - https://review.tizen.org/gerrit/61678
 - https://review.tizen.org/gerrit/61679
 - https://review.tizen.org/gerrit/61680

Verify by:
 - running smoke tests,
 - running installation, update, deinstallation for package that prefers external
   installation (SD card must be inserted).

Requires:
 - https://review.tizen.org/gerrit/#/c/64796/

Change-Id: I3c49eaa3c65ce318b2e1ce6ccf049d285a83e58b
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoAdd plugins for NFC parser 12/71612/4
Junghyun Yeon [Thu, 26 May 2016 07:11:08 +0000 (16:11 +0900)]
Add plugins for NFC parser

Change-Id: I887aa9ed97bf4237e2bebd1d8afc5631a082c295
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agofix additional '/' character in plugin_list path. 25/72025/1
jongmyeongko [Mon, 30 May 2016 08:38:04 +0000 (17:38 +0900)]
fix additional '/' character in plugin_list path.

plus, log manifest name when pkg_initdb is doing.

Change-Id: I37fbc83f52f7432717762595873d3996fdf7648c
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
7 years agoFix update failure 01/71201/4
Sangyoon Jang [Tue, 24 May 2016 11:12:13 +0000 (20:12 +0900)]
Fix update failure

Add FS_COPY_XATTR flag to copy smack label only when installer has permission.
(normally installer doesn't have permission to copy smack label)

Change-Id: Icb4d6219ba9d7085b72e2779bf17d01d63fd6c73
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoAdd StepCheckTizenVersion 43/71143/10
Sangyoon Jang [Tue, 24 May 2016 08:35:29 +0000 (17:35 +0900)]
Add StepCheckTizenVersion

Requires:
 - https://review.tizen.org/gerrit/71327

Change-Id: Id0d838a9244395f4b996f17391ee1dbdfed2c77a
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
7 years agoCoding style patch 51/71151/1
Piotr Ganicz [Tue, 24 May 2016 08:22:54 +0000 (10:22 +0200)]
Coding style patch

This patch provides 0 errors in check-coding-style script.

Change-Id: I46795f5ce502616116e330d126b2e0f5fbf079ba

7 years agoRework pkgdir-tool 33/67933/26
Sangyoon Jang [Fri, 29 Apr 2016 08:10:31 +0000 (17:10 +0900)]
Rework pkgdir-tool

For several issue(performace, code consistency, ...), the pkgdir-tool is
reworked.

The app-installer calls security-manager api just once for labeling
skel directories, not for each users.
And the pkgdir-tool copies those labeled directories to each user's home
directory.

The pkgdir-tool doesn't have setuid bit no more(because of security issue),
so it will be launched by dbus activation.
(It still needs root privilege for writing permission to user directories)

Requires:
 - https://review.tizen.org/gerrit/68140
 - https://review.tizen.org/gerrit/68294

Change-Id: Ib96c41f08d681443c5993bedd3fcf4f1c91db8c3
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
8 years agoRevert "Don't create skel dirs for packages" 76/67676/13
Sangyoon Jang [Mon, 16 May 2016 10:41:33 +0000 (19:41 +0900)]
Revert "Don't create skel dirs for packages"

This reverts commit cc661b012078be469db6b60cd2e8926d770c7a52.

The way of making per user directory will be changed.
Installer will create skel directories when install global app, and
the pkgdir-tool will copy those skel directories to each users home.

Change-Id: Ifd538689825cb019558222ecef1cd532b0c22922

8 years agoRevert "Add user option at pkgdir-tool" 75/67675/14
Sangyoon Jang [Mon, 16 May 2016 10:40:21 +0000 (19:40 +0900)]
Revert "Add user option at pkgdir-tool"

This reverts commit 58b27b575dd085ef13c05f8c452266d5ce0e6933.

Conflicts:
packaging/app-installers.spec
src/common/shared_dirs.cc

Change-Id: I3e45b7dc8050a199c08b57057c817008d19fa4a7

8 years agoRevert "Revert "Revert "remove privilege plugin for the list.""" 46/70646/2 accepted/tizen/common/20160520.171351 accepted/tizen/ivi/20160520.134533 accepted/tizen/mobile/20160520.134123 accepted/tizen/tv/20160520.134237 accepted/tizen/wearable/20160520.134423 submit/tizen/20160520.050106 submit/tizen/20160520.060844
jongmyeong ko [Fri, 20 May 2016 04:22:05 +0000 (21:22 -0700)]
Revert "Revert "Revert "remove privilege plugin for the list."""

Security needs privilege plugin again.

This reverts commit 3ca7391c234dc880825455052cbef2f70862caf9.

Change-Id: I592f8db6b3ebf6d21313eaefbd7e7551134edf72

8 years agoFix rollback in mount update 05/69305/2
Tomasz Iwanek [Thu, 12 May 2016 12:05:30 +0000 (14:05 +0200)]
Fix rollback in mount update

To verify, check that you still cannot update mount-installed
package in normal manner and vice-versa. Run smoke tests.

Change-Id: I5de71a59c92b7f1ae8d0ab612ed5784911ece083

8 years agoRemove blacklist feature 47/69947/2 accepted/tizen/common/20160518.125117 accepted/tizen/ivi/20160518.090804 accepted/tizen/mobile/20160518.090832 accepted/tizen/tv/20160518.090739 accepted/tizen/wearable/20160518.090725 submit/tizen/20160518.054712
Junghyun Yeon [Tue, 17 May 2016 09:45:14 +0000 (18:45 +0900)]
Remove blacklist feature

Blacklist feature is integrated with restriction mode.
It will be added when its done.

Change-Id: Ie3346e1b39ce9164e6308ad985ce54ee760a44c8
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
8 years agoFix style 64/69764/2 submit/tizen/20160518.002620
Tomasz Iwanek [Mon, 16 May 2016 14:12:46 +0000 (16:12 +0200)]
Fix style

Change-Id: I4d2477093ec0f6e865f988c6de9e61af53d9d3fd

8 years agoFix StepDeltaPatch 66/69066/4
Tomasz Iwanek [Wed, 11 May 2016 08:50:51 +0000 (10:50 +0200)]
Fix StepDeltaPatch

This patch modifies StepDeltaPatch step that it will remove
installer generated icons for web applications from temporary
directory before it applies patch and checks signature.

Reference package content for applying delta changes is taken
from installation location of package so we copy not only package
files but also installer generated files that are not in signature.

Problematic directory is /shared/res/ where there are package files
and installer generated files.

Requires:
 - https://review.tizen.org/gerrit/69115

To verify, run:
 $ /usr/bin/wgt-backend-ut/smoke-test --gtest_filter=SmokeTest.DeltaMode_Hybrid

Change-Id: Iee5a6561164e9cfb161e8e41a65aedec71b85e54

8 years agoadd move request type at app-installers 55/66255/6
Junghyun Yeon [Mon, 18 Apr 2016 06:03:32 +0000 (15:03 +0900)]
add move request type at app-installers

Change-Id: I52a024a804da5e66460b53435520f9c3230d46b6
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
8 years agoChange implementation of step kill apps 32/69032/12 submit/tizen/20160517.005404
Junghyun Yeon [Wed, 11 May 2016 07:12:33 +0000 (16:12 +0900)]
Change implementation of step kill apps

Change implementation of step_kill_apps
to work properly on multi-user scenario
such as kill global apps, etc.

Change-Id: I48a7953d2f1ae72f6671f588697e56d8cb5de2df
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
8 years agoStyle & build warning fix 81/69681/1
Sangyoon Jang [Mon, 16 May 2016 10:14:13 +0000 (19:14 +0900)]
Style & build warning fix

- use nullptr instead of NULL
- one variable per one line
- return false when setuid failed

Change-Id: I8f23d9c52da418110cb41cc7f11e4b186fff2ff2
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
8 years agochange the base-path for external rw dirs to 'SDCardA1/apps' 69/68269/7
jongmyeongko [Tue, 3 May 2016 07:25:16 +0000 (16:25 +0900)]
change the base-path for external rw dirs to 'SDCardA1/apps'

the mount path of sdcard was changed (sdcard -> SDCardA1)

Change-Id: I371ec1f66c8d98fe5ca1306657799d2b8e816b45
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
8 years agoadd PROJECT_TAG as 'APP_INSTALLERS' 83/69183/2 accepted/tizen/common/20160513.123344 accepted/tizen/ivi/20160513.004708 accepted/tizen/mobile/20160513.004736 accepted/tizen/tv/20160513.004652 accepted/tizen/wearable/20160513.004625 submit/tizen/20160512.083806
jongmyeongko [Thu, 12 May 2016 05:49:39 +0000 (14:49 +0900)]
add PROJECT_TAG as 'APP_INSTALLERS'

Change-Id: Iee5512c198c3e5d97ef81725c014ec0c6c97a271
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
8 years agoStore zip file location in manifest_x 40/68540/3 accepted/tizen/common/20160513.123135 submit/tizen/20160511.132536
Tomasz Iwanek [Thu, 5 May 2016 14:13:50 +0000 (16:13 +0200)]
Store zip file location in manifest_x

Requires:
 - https://review.tizen.org/gerrit/#/c/68001/

Change-Id: I73bfdf5bfd92261e0fc324759a5b30d9b37daad1

8 years agoAdjusted setters 66/68566/3
Piotr Ganicz [Fri, 6 May 2016 13:04:28 +0000 (15:04 +0200)]
Adjusted setters

This commit adjust setters in code to take by value with std::move.

Change-Id: Ib034ed8379be68fa620298eede8f122a18416c1f

8 years agoReorder the header files 17/68917/3
Piotr Ganicz [Tue, 10 May 2016 10:25:17 +0000 (12:25 +0200)]
Reorder the header files

This commit reorders the header files to provide better coding style.
The patch provides zero errors in /tools/check-coding-style app.

Change-Id: I5269a2eb68b93eb245491f2f3608844861e38cb1

8 years agoRemove pkg-install-manifest helper binary 43/64543/7
Tomasz Iwanek [Fri, 1 Apr 2016 14:42:17 +0000 (16:42 +0200)]
Remove pkg-install-manifest helper binary

In situation pkg-initdb is moved to app-installers repository,
this binary is not needed.

pkg-initdb should be able to restore pkgmgr database:
1) for user:
 $ pkg-initdb --uid 5001
2) globaly:
 $ pkg-initdb

Change-Id: Ic4305b440f25f6b7170e4e6c9134e013544e4f22

8 years agoMove pkg_initdb implementation to app-installers 04/64204/17
Tomasz Iwanek [Wed, 30 Mar 2016 10:00:22 +0000 (12:00 +0200)]
Move pkg_initdb implementation to app-installers

New binary name is: /usr/bin/pkg-initdb

Scripts that creates image should switch to new binary when ready
by changing called binary to given one (then old one may be removed).

/usr/bin/pkg-install-manifest will be removed in next patches.

pkg-initdb should be able to restore pkgmgr database:
 1) for user:
 $ pkg_initdb --uid 5001
 2) globaly:
 $ pkg_initdb

Requires to be submitted with:
 - https://review.tizen.org/gerrit/64351
 - https://review.tizen.org/gerrit/64204

Change-Id: If58d9326c5afcc877ac6ff3ae86924083b764f1c

8 years agoStore distributor2 certificates 45/68645/3
Sangyoon Jang [Mon, 9 May 2016 05:49:07 +0000 (14:49 +0900)]
Store distributor2 certificates

Change-Id: Ibdc88d3cddc5245f6bd42c47625d478660cb5106
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
8 years agoIME info extra manifest data 03/67903/6
Kamil Rojewski [Tue, 19 Apr 2016 08:37:47 +0000 (10:37 +0200)]
IME info extra manifest data

Change-Id: I92d6b830d5b75cf09e892bb1c8ae8b6ac0af731e

8 years agoFix TEP copying 78/68678/4
Tomasz Iwanek [Mon, 9 May 2016 08:57:20 +0000 (10:57 +0200)]
Fix TEP copying

To verify, install/update package with tep. Tep can be any file.
 $ backend -i ${package} -e ${tep_file}
tep file must be copied to ${package_root}/tep/

Change-Id: Ie28a94ba8b32606fa29fb7c6309e697f2e1bca7e