platform/core/appfw/app-installers.git
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 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>
6 years agoRelease version 1.25.1 50/169050/1 accepted/tizen/unified/20180205.060500 submit/tizen/20180202.063742
Junghyun Yeon [Fri, 2 Feb 2018 05:01:16 +0000 (14:01 +0900)]
Release version 1.25.1

Changes:
 - Fix StepParsePreload
 - Fix StepRecoverGlobalAppSymlinks
 - Revert "Fix to send different signal based on recovery info"
 - Refine sending pkgmgr signal for recovery
 - Fix crash during mount update recovery
 - Adjust nodisplay attribute of widget application
 - Load plugins info from multiple lists

Change-Id: I1ef57eaf5b6cf5e4d4f633e1126d37b5c6e5fe14
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoLoad plugins info from multiple lists 95/163995/8
Sangyoon Jang [Thu, 14 Dec 2017 11:41:40 +0000 (20:41 +0900)]
Load plugins info from multiple lists

Installer will load plugins info from multiple lists which are located at
'/usr/share/parser-plugins'. Who want add their own plugin can add
plugin info file with valid format.

Change-Id: Ib7b9164eee73383856a9aeb7738052afcbbc33e6
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoAdjust nodisplay attribute of widget application 82/168582/2
Sangyoon Jang [Mon, 29 Jan 2018 10:42:09 +0000 (19:42 +0900)]
Adjust nodisplay attribute of widget application

The nodisplay attribute of widget application should be true,
but nodisplay of widget-service framework uses this attribute
as defined at manifest file. So we need to adjust this value
just before register in pkgmgr db.

Change-Id: Ia04208dc5269a6ae96348e4a29c14ebfff123ddb
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoFix crash during mount update recovery 87/167987/2
Sangyoon Jang [Tue, 23 Jan 2018 08:21:33 +0000 (17:21 +0900)]
Fix crash during mount update recovery

Change-Id: I51a51404c022f64c965dd98b97c67ce918044fe0
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoRefine sending pkgmgr signal for recovery 32/167932/4
Sangyoon Jang [Mon, 22 Jan 2018 06:30:48 +0000 (15:30 +0900)]
Refine sending pkgmgr signal for recovery

Set request type differently to each recovery mode.
Recovery for install will emit uninstall signal, and recovery for
update(RecoveryUpdate) will emit upgrade signal.

Change-Id: I619e041e9541ef00d84bdbe1150aa4265e60e67a
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoRevert "Fix to send different signal based on recovery info" 38/167938/1
Sangyoon Jang [Tue, 23 Jan 2018 05:18:25 +0000 (14:18 +0900)]
Revert "Fix to send different signal based on recovery info"

This reverts commit c9c50607c02b66ae82dd120374f68e8a77813328.

Change-Id: I92028da9cc1888087288c75031fa1ef1602d6c29

6 years agoFix StepRecoverGlobalAppSymlinks 13/167913/1
Sangyoon Jang [Tue, 23 Jan 2018 04:00:05 +0000 (13:00 +0900)]
Fix StepRecoverGlobalAppSymlinks

Use common methods instead of using existing step.
Existing steps should not be affected by recovery mode as possible.

Change-Id: Idbc438f82be89d3f490b482aac0d8b97eea70b51
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoFix StepParsePreload 12/167912/1
Sangyoon Jang [Tue, 23 Jan 2018 04:06:17 +0000 (13:06 +0900)]
Fix StepParsePreload

Remove a unnecessary condition.

Change-Id: Ia7043e5d1ae0db82acd477c12e9145b9ef4624a9
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoRelease version 1.25.0 83/167683/1 accepted/tizen/unified/20180123.061147 submit/tizen/20180119.081808
Junghyun Yeon [Fri, 19 Jan 2018 07:49:10 +0000 (16:49 +0900)]
Release version 1.25.0

Changes:
 - Refactoring ValidatePackage() functions parameter
 - Refactoring Run()
 - Add initdb options and constraints
 - Set nodisplay attribute of widget application as manifest value
 - Send error signal properly when installation failed
 - Add recovery mode for ReadonlyUpdateInstall
 - Fix StepRecoverSignature
 - Fix StepRecoverApplication
 - Fix removing globalapp symlinks
 - Add StepRecoverPrivilegeCompatibility
 - Add values to backend inherits capabilities.
 - Fix to send different signal based on recovery info

Change-Id: If074291216e4363bf83b1bbb7f8130b10e86ab5a
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoFix to send different signal based on recovery info 79/167679/1
Junghyun Yeon [Fri, 19 Jan 2018 04:48:00 +0000 (13:48 +0900)]
Fix to send different signal based on recovery info

- Previous implementation send only "install" signal as value
  when Recovery being performed.
- Installer will send proper signal based on recovery information
  with this changes.

Change-Id: Ia88d72a96af00e562384c38b177ac92b073ac842
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoAdd values to backend inherits capabilities. 99/167599/1
Junghyun Yeon [Thu, 18 Jan 2018 12:14:52 +0000 (21:14 +0900)]
Add values to backend inherits capabilities.

Change-Id: Ifd8a2d7fa216d845eb60450185bc57e5cd8ada5b
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoAdd StepRecoverPrivilegeCompatibility 11/167411/1
Sangyoon Jang [Wed, 17 Jan 2018 11:48:39 +0000 (20:48 +0900)]
Add StepRecoverPrivilegeCompatibility

Change-Id: Iaa05857f2e92867202e3ffc371316edf655c0a4b
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoFix removing globalapp symlinks 81/167381/1
Sangyoon Jang [Wed, 17 Jan 2018 08:52:49 +0000 (17:52 +0900)]
Fix removing globalapp symlinks

Do not return error when original package directory doesn't exist.
In some case(such as recovery mode), original package directory may not
exist.

Change-Id: I48f7c79b684871c204418592e8461f2f1aa4d979
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoFix StepRecoverApplication 23/167323/2
Sangyoon Jang [Wed, 17 Jan 2018 05:38:59 +0000 (14:38 +0900)]
Fix StepRecoverApplication

When recover updated preloaded package, some attributes should be set
properly.

Change-Id: Id189bb3a238036cae812d8ba9cc933cbb8a021af
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoFix StepRecoverSignature 79/167179/1
Sangyoon Jang [Tue, 16 Jan 2018 05:28:15 +0000 (14:28 +0900)]
Fix StepRecoverSignature

The privilege level should be initialized before calling
ValidateSignatures() to set privilege level properly.

Change-Id: Ica5fbf136a001f965d045f0e17edbaa1cb45d6a7
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoAdd recovery mode for ReadonlyUpdateInstall 44/158844/6
Sangyoon Jang [Fri, 3 Nov 2017 10:11:10 +0000 (19:11 +0900)]
Add recovery mode for ReadonlyUpdateInstall

Change-Id: I0d672be7831354a5e76d63e67b9220cfd40763ce
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoSend error signal properly when installation failed 19/166019/2
Sangyoon Jang [Fri, 5 Jan 2018 07:51:10 +0000 (16:51 +0900)]
Send error signal properly when installation failed

'status' which is result of each step should not be overwritten by undo
and clean operation.

Change-Id: Ia39713c5f480645536f4e6dfd187bbf05b0905e7
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoSet nodisplay attribute of widget application as manifest value 25/163125/5
Sangyoon Jang [Thu, 7 Dec 2017 09:06:05 +0000 (18:06 +0900)]
Set nodisplay attribute of widget application as manifest value

Change-Id: Ia6cd396e78b73da510a3e1eab80b96f55b59909d
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoAdd initdb options and constraints 21/164421/9
Junghyun Yeon [Tue, 19 Dec 2017 05:12:42 +0000 (14:12 +0900)]
Add initdb options and constraints

- "--rw" will only handle RW packages.
- "--keep-db" will preserve existing databases.
- Add constraints for some conflicting options.

Change-Id: If3db2636bc5cca49d3e1396d345a79fe2fefdf17
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoRefactoring Run() 45/133845/10
Piotr Ganicz [Tue, 21 Mar 2017 13:00:44 +0000 (14:00 +0100)]
Refactoring Run()

Function Run is too long and it is know code smell.
This patch reduces the size of the function introducting
two new functions and removes code duplication.

Change-Id: Ica13ffef0b807e6a066f288e2ed2b9e996289c10

6 years agoRefactoring ValidatePackage() functions parameter 39/159539/5
Damian Pietruchowski [Thu, 9 Nov 2017 12:38:59 +0000 (13:38 +0100)]
Refactoring ValidatePackage() functions parameter

Tpk package has different binary name than appid.
So we need to pass appid and exec name to ValidatePackage()
functions.

Submit with:
- https://review.tizen.org/gerrit/#/c/159540/
- https://review.tizen.org/gerrit/#/c/159542/

Change-Id: I265482ac53bcfaabb1668865ced60acfc7a5b661
Signed-off-by: Damian Pietruchowski <d.pietruchow@samsung.com>
6 years agoRelease version 1.24.2 67/164967/1 accepted/tizen/unified/20171228.065036 submit/tizen/20171222.073841
Junghyun Yeon [Fri, 22 Dec 2017 06:11:09 +0000 (15:11 +0900)]
Release version 1.24.2

Changes:
 - Fix minor errors in StepCreateRecoveryFile
 - Refactor and reduce unnecessary code
 - Fix step name of StepCreateRecoveryFile
 - Fix sending signal of ReadonlyUpdateInstall mode

Change-Id: I47c557364a9b515ad43393c2d12cabfd1a8d496b
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoFix sending signal of ReadonlyUpdateInstall mode 40/164840/1
Sangyoon Jang [Thu, 21 Dec 2017 07:10:33 +0000 (16:10 +0900)]
Fix sending signal of ReadonlyUpdateInstall mode

The pkgid should be set as real pkgid, not the name of package file.

Change-Id: Ifb202588e2711cb860eddce7da22485864e55f6e
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoFix step name of StepCreateRecoveryFile 38/164838/1
Sangyoon Jang [Thu, 21 Dec 2017 07:09:51 +0000 (16:09 +0900)]
Fix step name of StepCreateRecoveryFile

Change-Id: Ieb48f72b0b358783d4b287f908b075f1da00989e
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoRefactor and reduce unnecessary code 32/134632/33
Damian Pietruchowski [Mon, 19 Jun 2017 14:45:10 +0000 (16:45 +0200)]
Refactor and reduce unnecessary code

Change-Id: I09bedb005965173688050ce7d46471928ce2084c
Signed-off-by: Damian Pietruchowski <d.pietruchow@samsung.com>
6 years agoFix minor errors in StepCreateRecoveryFile 02/163302/1
Junghyun Yeon [Fri, 8 Dec 2017 09:44:55 +0000 (18:44 +0900)]
Fix minor errors in StepCreateRecoveryFile

Change-Id: I4b4b4415714e16a6a2e8b27da66b410fe8f220b3
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoRelease version 1.24.1 81/163281/1 accepted/tizen/unified/20171211.061325 submit/tizen/20171208.083756 submit/tizen/20171211.020230
Sangyoon Jang [Fri, 8 Dec 2017 08:23:27 +0000 (17:23 +0900)]
Release version 1.24.1

Changes:
 - Use PkgQueryInterface in StepCheckRemovable
 - Move create recovery file to new step
 - Integrate recovery file creation and first write procedure
 - Remove flag from plugins
 - Fix plugin smoketest failure

Change-Id: I2265b632669addc732e54160eca8baf1006034a4
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoFix plugin smoketest failure 13/162713/2
Sangyoon Jang [Tue, 5 Dec 2017 05:12:48 +0000 (14:12 +0900)]
Fix plugin smoketest failure

Now category plugin parser runs when name matched exactly.

Change-Id: I65a9bf003cf5972df17da37a6b0085815f9a66b2
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
6 years agoRemove flag from plugins 66/162166/6
Junghyun Yeon [Wed, 29 Nov 2017 09:56:32 +0000 (18:56 +0900)]
Remove flag from plugins

- Flag in plugin list used to identify uniqueness of each plugins
  but name could be identifier of uniqueness.

Change-Id: I77e5701f99622fadb6000f05d1375fd8810a4674
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoIntegrate recovery file creation and first write procedure 04/162304/1
Junghyun Yeon [Thu, 30 Nov 2017 07:27:39 +0000 (16:27 +0900)]
Integrate recovery file creation and first write procedure

- Recovery file creation process is separated with
  file creation and type write processes.
- Integrate those two processes into one.

Change-Id: I9c5e0b192c8f35d7a612e58417bed1d9468bfd87
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoMove create recovery file to new step 06/154906/10
Damian Pietruchowski [Wed, 11 Oct 2017 11:11:16 +0000 (13:11 +0200)]
Move create recovery file to new step

Submit together:
- https://review.tizen.org/gerrit/#/c/154907/
- https://review.tizen.org/gerrit/#/c/154908/

Change-Id: Ia0cc4e85c200cf35ece43dae7e802a0c04d50507
Signed-off-by: Damian Pietruchowski <d.pietruchow@samsung.com>
6 years agoUse PkgQueryInterface in StepCheckRemovable 12/151312/6
Damian Pietruchowski [Wed, 20 Sep 2017 11:13:33 +0000 (13:13 +0200)]
Use PkgQueryInterface in StepCheckRemovable

Change-Id: I07b37dcb2509e833b4b43a448b19c91ee1a074f8
Signed-off-by: Damian Pietruchowski <d.pietruchow@samsung.com>
6 years agoRelease version 1.24.0 80/161780/1 accepted/tizen/unified/20171128.150345 submit/tizen/20171127.102301
Junghyun Yeon [Mon, 27 Nov 2017 10:09:40 +0000 (19:09 +0900)]
Release version 1.24.0

Changes:
 - Add error getter to PkgQueryInterface
 - Change code to store api_version of application
 - Refactor functions creating/opening a recovery file
 - Replace pkg_path with GetPkgPath() method in InstallerContext
 - AppInstaller logic export
 - Security registration refactoring
 - Remove checking existance of shared/data directory
 - Fix coding style - security_registration.cc

Change-Id: I610a25fa715fca4050f2f7c085ac8b891a44cbb5
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoFix coding style - security_registration.cc 02/161502/1
Damian Pietruchowski [Thu, 23 Nov 2017 16:13:03 +0000 (17:13 +0100)]
Fix coding style - security_registration.cc

Change-Id: I20734177ebad610e3f5ce823ba2d082bf794fbae
Signed-off-by: Damian Pietruchowski <d.pietruchow@samsung.com>
6 years agoRemove checking existance of shared/data directory 09/160309/2
Junghyun Yeon [Wed, 15 Nov 2017 09:07:11 +0000 (18:07 +0900)]
Remove checking existance of shared/data directory

- Security context should be updated even if shared/data is existed.

Change-Id: I3e18ff55fa72523063b7283fb611c8fe7ce0665f
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
6 years agoSecurity registration refactoring 06/140006/15
Damian Pietruchowski [Fri, 21 Jul 2017 09:01:38 +0000 (11:01 +0200)]
Security registration refactoring

SecurityContextRequest class to resources management.

Change-Id: I40b4f9120f3b54e6ca47434b9dd009914af33fbd
Signed-off-by: Damian Pietruchowski <d.pietruchow@samsung.com>
6 years agoAppInstaller logic export 98/93998/15
Piotr Ganicz [Mon, 24 Oct 2016 14:04:29 +0000 (16:04 +0200)]
AppInstaller logic export

This commit gather the logic of choosing proper steps sequence
to app-installer repository. All backends have to prepare their
own sequences for each pkgmgr request. The default implementation
of such methods is provided and there is no need for overriding
each function in backends.

    Submit together:
     - https://review.tizen.org/gerrit/#/c/93999/
     - https://review.tizen.org/gerrit/#/c/94000/

Change-Id: Ice10a836c28786f92f6fdd8bc0d23a6c7febce19
Signed-off-by: Damian Pietruchowski <d.pietruchow@samsung.com>
6 years agoReplace pkg_path with GetPkgPath() method in InstallerContext 96/154196/11
Damian Pietruchowski [Mon, 9 Oct 2017 09:38:01 +0000 (11:38 +0200)]
Replace pkg_path with GetPkgPath() method in InstallerContext

pkg_path is always equal to root_application_path + pkgid.
Storing this information in separate variable is problematic,
because it requires to remember to update pkg_path after
root_application_path or pkgid is changed.

Submit with:
- https://review.tizen.org/gerrit/#/c/160353/
- https://review.tizen.org/gerrit/#/c/154904/

Change-Id: I8cc45cd003a642225be88669360b540186f8c678
Signed-off-by: Damian Pietruchowski <d.pietruchow@samsung.com>
7 years agoRefactor functions creating/opening a recovery file 79/159379/5
Sangyoon Jang [Wed, 8 Nov 2017 10:55:44 +0000 (19:55 +0900)]
Refactor functions creating/opening a recovery file

Change-Id: Id7d5668aa99c264958ad46ddfd70384a0be0602a
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
7 years agoChange code to store api_version of application 61/159061/6
Junghyun Yeon [Tue, 7 Nov 2017 00:40:02 +0000 (09:40 +0900)]
Change code to store api_version of application

- Tpk and wgt pkg could have different api version in hybrid pkg.
- Previous code passes wgt's hybrid pkg so it could be issue
  if api version of tpk is different with wgt's.
- Change logic to store api version at application structure
  in parsing time and deliver it to security manager.

Change-Id: Ibe78bad3b4b87b20714097252a57c3aedbc8ee16
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoAdd error getter to PkgQueryInterface 11/151311/5
Damian Pietruchowski [Wed, 20 Sep 2017 11:12:44 +0000 (13:12 +0200)]
Add error getter to PkgQueryInterface

Required by: https://review.tizen.org/gerrit/#/c/151312/

Change-Id: I7bccdbaff658ac59f3c332352aab3b0bf6cc8357
Signed-off-by: Damian Pietruchowski <d.pietruchow@samsung.com>
7 years agoRelease version 1.23.1 14/159414/3 accepted/tizen/unified/20171109.124921 submit/tizen/20171109.041728
Seungha Son [Wed, 8 Nov 2017 23:52:59 +0000 (08:52 +0900)]
Release version 1.23.1

Changes:
 - Fix wrong IsPackageInstalled() logic
 - Clean up files at extended storage when install failed

Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: I700af1b35816fa36cb33638e62b4adbb51a89580

7 years agoClean up files at extended storage when install failed 57/157757/4
Sangyoon Jang [Thu, 26 Oct 2017 03:36:36 +0000 (12:36 +0900)]
Clean up files at extended storage when install failed

Change-Id: I458c83f1683ffc07e5a8a7cf8e204a7be95c1806
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
7 years agoFix wrong IsPackageInstalled() logic 89/159389/1
Seungha Son [Wed, 8 Nov 2017 12:24:21 +0000 (21:24 +0900)]
Fix wrong IsPackageInstalled() logic

Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: I63d0f8a956bda8b9974dcfa0a2231a69fa05654c

7 years agoRelease version 1.23.0 77/159077/3 submit/tizen/20171107.031828 submit/tizen/20171108.023404
Junghyun Yeon [Tue, 7 Nov 2017 01:53:13 +0000 (10:53 +0900)]
Release version 1.23.0

Changes:
 - Add new lib with common smoke utils for tests
 - Check author signature using public key
 - Fix coding rule
 - Add sdk directory backup
 - Fix coding rule and supress build warning
 - Change security code routine for performance
 - Return error code when the recovery file is unknown type
 - Fix build error
 - Disable copy PkgQueryInterface
 - Fix description
 - Fix wrong log
 - Separate IsPackageInstalled()

Change-Id: Ia1a5ab813f1d5683ad5ec8398dfd7236bbf4a7fb
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoSeparate IsPackageInstalled() 43/157443/8
Seungha Son [Tue, 24 Oct 2017 11:36:20 +0000 (20:36 +0900)]
Separate IsPackageInstalled()

Separate the method of checking whether it is installed only and how to
check whether the installed or not as ReqeustMode.

related patch : https://review.tizen.org/gerrit/#/c/158632/

Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: I62f7e7c6c30cda101cc0856fc057431552837dfb

7 years agoFix wrong log 33/158933/1
Seungha Son [Mon, 6 Nov 2017 04:40:08 +0000 (13:40 +0900)]
Fix wrong log

Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: I02074f0b94158d171926bf8e3d160d27d05b811d

7 years agoFix description 90/158790/2
Seungha Son [Fri, 3 Nov 2017 05:25:57 +0000 (14:25 +0900)]
Fix description

Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: I204507e8d78a8fc3fbe7f3986db58aa8eecd45b8

7 years agoDisable copy PkgQueryInterface 91/150191/6
Damian Pietruchowski [Thu, 14 Sep 2017 15:02:37 +0000 (17:02 +0200)]
Disable copy PkgQueryInterface

Only one object should own specific pkgmgrinfo_pkginfo_h handle.
So copy constructor and copy assignment operator should be deleted.

Change-Id: Ib40189336c837e48292f7990e3f76655e3237321
Signed-off-by: Damian Pietruchowski <d.pietruchow@samsung.com>
7 years agoFix build error 85/158585/2
Junghyun Yeon [Thu, 2 Nov 2017 02:46:36 +0000 (11:46 +0900)]
Fix build error

Add static casting to remove build error

Change-Id: I74bf8378f611f2c79b94af260b481146f1916e77
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoReturn error code when the recovery file is unknown type 46/158446/4
Sangyoon Jang [Wed, 1 Nov 2017 04:58:43 +0000 (13:58 +0900)]
Return error code when the recovery file is unknown type

Change-Id: If712388b238ee15c8ce562885c84ad23829d2d75
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
7 years agoChange security code routine for performance 52/154752/7
Junghyun Yeon [Wed, 11 Oct 2017 08:41:42 +0000 (17:41 +0900)]
Change security code routine for performance

- Security-manager APIs for Security registration/unregistration logic
  has changed to send all appid at once for performance.
- So, change app-installer logic for it.

Change-Id: Ic8a9d2b98426652fec657497391458ba760d1729
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoFix coding rule and supress build warning 99/157099/5
Junghyun Yeon [Mon, 23 Oct 2017 10:07:35 +0000 (19:07 +0900)]
Fix coding rule and supress build warning

Change-Id: I8ca81a25867bea6d5a7955bf3e470412f349bd8b
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoAdd sdk directory backup 34/158034/3
kniedzielew [Fri, 27 Oct 2017 10:34:37 +0000 (12:34 +0200)]
Add sdk directory backup

This solution is needed in order to provide SetUp
and TearDown for RDSMode and avoid modification of
"/home/owner/share/tmp/sdk_tools" during testing.

Change-Id: I871ab59c55a9eafaadf382d3e3f2f88eef3f5840
Signed-off-by: kniedzielew <k.niedzielew@samsung.com>
7 years agoFix coding rule 37/157937/1
Seungha Son [Fri, 27 Oct 2017 02:28:07 +0000 (11:28 +0900)]
Fix coding rule

Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: Ib92564d998cd7ffc08e7f8c2d538775ea6441c4e

7 years agoCheck author signature using public key 38/157538/6
Sangyoon Jang [Wed, 25 Oct 2017 03:44:45 +0000 (12:44 +0900)]
Check author signature using public key

The certificate string value(in base64 format) will be changed when the
certificate is renewed. To verify whether two author of certificate
is same, using public key of certificate is correct instead of
entire certificate string value.

Change-Id: I99bcfce48a77b4dbf65df9d3274945db9ef27635
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
7 years agoAdd new lib with common smoke utils for tests 36/149136/7
Damian Pietruchowski [Mon, 21 Aug 2017 09:27:35 +0000 (11:27 +0200)]
Add new lib with common smoke utils for tests

Wgt-backend and tpk-backend have common util functions for smoke tests.
They should be exported to lib in app-installers.

Submit together:
- https://review.tizen.org/gerrit/#/c/149137/
- https://review.tizen.org/gerrit/#/c/149601/

Change-Id: Ifef1e9f38790133c7337650c8641e0cd0bab57f1
Signed-off-by: Damian Pietruchowski <d.pietruchow@samsung.com>
7 years agoRelease version 1.22.8 91/156891/1 accepted/tizen/4.0/unified/20171021.044940 accepted/tizen/unified/20171023.152039 submit/tizen/20171020.110656 submit/tizen_4.0/20171020.110530 tizen_4.0.m2_release
Sangyoon Jang [Fri, 20 Oct 2017 11:03:23 +0000 (20:03 +0900)]
Release version 1.22.8

Changes:
 - Change directory path for unpacking package

Change-Id: Ibf3d312e45a267a16ff6dd7dda15c1855b8c21cc
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
7 years agoChange directory path for unpacking package 86/156886/2
Sangyoon Jang [Fri, 20 Oct 2017 10:47:54 +0000 (19:47 +0900)]
Change directory path for unpacking package

$TZ_SYS_SHARE(/opt/share/) may not have enough space.
Use /opt/usr/share/package-unpacked instead.

Change-Id: If08299d5263b35a415a92ade0824e9ca5a85094b
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
7 years agoRelease version 1.22.7 52/156852/1 accepted/tizen/4.0/unified/20171020.092832 submit/tizen/20171020.073206 submit/tizen_4.0/20171020.073230
Sangyoon Jang [Fri, 20 Oct 2017 07:30:55 +0000 (16:30 +0900)]
Release version 1.22.7

Changes:
 - Use TZ_SYS_EXTENDEDSD_APP TZ_USER_EXTENDEDSD_APP for extended app path
 - Install at internal storage when extended storage is not available
 - Set install location to internal when external storage is not available
 - Fix issue while converting public key

Change-Id: I32596eed405bcd743505b9fbaf13d4e30657796d
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
7 years agoFix issue while converting public key 70/156770/5
Junghyun Yeon [Fri, 20 Oct 2017 01:36:49 +0000 (10:36 +0900)]
Fix issue while converting public key

- PublicKey is retrieved as unsigned character and some of its value
  is missed during converting into const char due to some hexdata such as 0x00.
- It would cause security issue such as one application could access
  shared/trusted of other non-trusted application.
- Fix codes to convert unsigned character value properly.

Change-Id: Iaca2f7c0fa60677d7aa5852725bb5b120ed54a09
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoSet install location to internal when external storage is not available 94/156694/1
Sangyoon Jang [Thu, 19 Oct 2017 12:09:14 +0000 (21:09 +0900)]
Set install location to internal when external storage is not available

Change-Id: If10270f36776d1151c99e0ff87bff217f776175f
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
7 years agoInstall at internal storage when extended storage is not available 28/156628/2
Sangyoon Jang [Thu, 19 Oct 2017 07:28:07 +0000 (16:28 +0900)]
Install at internal storage when extended storage is not available

Change-Id: I37175df644fef97b859107002938d2fd7ba3342d
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
7 years agoUse TZ_SYS_EXTENDEDSD_APP TZ_USER_EXTENDEDSD_APP for extended app path 58/156558/1
Sangyoon Jang [Thu, 19 Oct 2017 02:14:09 +0000 (11:14 +0900)]
Use TZ_SYS_EXTENDEDSD_APP TZ_USER_EXTENDEDSD_APP for extended app path

Change-Id: I1fb562650f2f887719bf32d6cea0ed7e68902724
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
7 years agoRelease version 1.22.6 04/156104/1 accepted/tizen/4.0/unified/20171018.060922 accepted/tizen/unified/20171018.062513 submit/tizen/20171017.074628 submit/tizen_4.0/20171017.080654
Junghyun Yeon [Tue, 17 Oct 2017 06:54:28 +0000 (15:54 +0900)]
Release version 1.22.6

Changes:
 - Fix test ManifestDirectInstallMode failure
 - Fix reinstall
 - Use TZ_SYS_EXTENDEDSD for extended storage path
 - Change path for unpacking package
 - Change bahavior of trust anchor

Change-Id: I6e7a11abe67489d70a0056e906ad728c70a86a81
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoChange bahavior of trust anchor 36/149836/14
Junghyun Yeon [Wed, 13 Sep 2017 07:55:40 +0000 (16:55 +0900)]
Change bahavior of trust anchor

- Trust-anchor certificate file directory has fixed.
- Make symbolic link when given pkg type is wgt or hybrid.
- When updating wgt/hybrid pkg, previous symlink will be removed.
- Register and update trust anchor have integrated.

Related changes:
[pkgmgr-info] : https://review.tizen.org/gerrit/149784
[wgt-backend] : https://review.tizen.org/gerrit/149978
[tpk-manifest-handlers] : https://review.tizen.org/gerrit/150060
[wgt-manifest-handlers] : https://review.tizen.org/gerrit/150136

Change-Id: Ibdfc760bcb15da324e7237b8b0a5a9103effc129
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoChange path for unpacking package 15/155715/2
Sangyoon Jang [Mon, 16 Oct 2017 03:17:25 +0000 (12:17 +0900)]
Change path for unpacking package

Current path for unpacking has "User::Home" label because of transmute
option. During installation time, other(application) can be access
this unpacked dir because the smack label is readable.

Change-Id: I291c429c8d7172e3caddb43273a51f4b1059548e
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
7 years agoUse TZ_SYS_EXTENDEDSD for extended storage path 41/155641/2
Sangyoon Jang [Mon, 16 Oct 2017 01:57:32 +0000 (10:57 +0900)]
Use TZ_SYS_EXTENDEDSD for extended storage path

Change-Id: Iad1ebaea52e9f11ca3cce79af22048b9efffa58d
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
7 years agoFix reinstall 90/155390/3
Junghyun Yeon [Fri, 13 Oct 2017 05:33:32 +0000 (14:33 +0900)]
Fix reinstall

- SDK deploys rds files into different location due to permission issue
  so change rds path realted with it.

Change-Id: I7dcab005cfa710630bb4f416fa792da330d5e8fa
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoFix test ManifestDirectInstallMode failure 34/146434/11
kniedzielew [Mon, 28 Aug 2017 14:00:19 +0000 (16:00 +0200)]
Fix test ManifestDirectInstallMode failure

Failure message returned by test ManifestDirectInstallMode
in wgt-backend smoke_test was:
"unknown file: Failure
C++ exception with description "boost::filesystem::status:...
... Permission denied: "smokewgt40"" thrown in the test body."

Function GetPkgIdFromPath throws exception
when arg is not a file path but package ID.
To avoid exception throw we check file existence
prior the excecution of GetPkgIdFromPath.

Now test passes with no failure.

Change-Id: I95f276e148071c47dac9fd131f4d37430548ba12
Signed-off-by: kniedzielew <k.niedzielew@samsung.com>
7 years agoRelease version 1.22.5 50/154950/1 accepted/tizen/4.0/unified/20171012.074543 accepted/tizen/unified/20171012.075127 submit/tizen/20171011.123741 submit/tizen_4.0/20171011.124331 tizen_4.0.IoT.p1_release
Junghyun Yeon [Wed, 11 Oct 2017 12:30:34 +0000 (21:30 +0900)]
Release version 1.22.5

Changes:
 - Fix side-effect on StepCheckForceClean

Change-Id: Ie151852d07fea3ecab6b8ed76da94bf4e72c650d
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoFix side-effect on StepCheckForceClean 43/154843/1
Junghyun Yeon [Wed, 11 Oct 2017 09:47:54 +0000 (18:47 +0900)]
Fix side-effect on StepCheckForceClean

- IsPackageInstalled is not working properly on StepCheckForceClean.
  So, deliver parameter when calling to fix it.

Change-Id: I6c646cdb8e5bcbf769d9f01001ba3610bdcaeef8
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoRelease version 1.22.4 66/153166/1 accepted/tizen/4.0/unified/20170929.080006 accepted/tizen/unified/20170929.081459 submit/tizen/20170928.055049 submit/tizen_4.0/20170928.055126 submit/tizen_4.0/20170928.143447
Seungha Son [Thu, 28 Sep 2017 04:46:31 +0000 (13:46 +0900)]
Release version 1.22.4

Changes:
 - Add step for privacy privilege

Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: Ia4f426cdf84876b75041f6ce87d300cfee789227

7 years agoAdd step for privacy privilege 03/146903/19
Seungha Son [Thu, 31 Aug 2017 05:51:09 +0000 (14:51 +0900)]
Add step for privacy privilege

Related changes:
 tpk-backend : https://review.tizen.org/gerrit/#/c/147031/
 wgt-backend : https://review.tizen.org/gerrit/#/c/147038/

Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: I22094e3a2956987f775e79ffa60c254eaaf0e6ee

7 years agoRelease version 1.22.3 38/152438/1 accepted/tizen/4.0/unified/20170927.181735 accepted/tizen/unified/20170927.063515 submit/tizen/20170926.073829 submit/tizen_4.0/20170926.120510
Junghyun Yeon [Tue, 26 Sep 2017 06:53:10 +0000 (15:53 +0900)]
Release version 1.22.3

Changes:
 - Fix memory leak

Change-Id: I0130869cdd63d7917d0e9236637aaf944fe58f92
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
7 years agoFix memory leak 66/151666/1
Junghyun Yeon [Thu, 21 Sep 2017 11:24:03 +0000 (20:24 +0900)]
Fix memory leak

- Newly allocated manifest variable is not assigned at installer context
  at that time and it will be leaked if any of function calls in
  FillManifestX has failed.

Change-Id: I33c4525d37a2f9a3a19074288246ce6e06af749a
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>