platform/core/appfw/app-installers.git
9 years ago[Feature] Kill applications before deinstallation/update 78/46978/4
Tomasz Iwanek [Thu, 27 Aug 2015 13:05:15 +0000 (15:05 +0200)]
[Feature] Kill applications before deinstallation/update

App-manager is used to kill apps.

Change-Id: I2b34b860bfb6b217b6de6190e8b82d1bb25c491c

9 years agoAlignement to the manifest-parser key exposition changes 27/46527/2
Pawel Sikorski [Fri, 21 Aug 2015 09:41:22 +0000 (11:41 +0200)]
Alignement to the manifest-parser key exposition changes

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

Change-Id: I56f60053b47c78a49e0a7b98f6d7848651ee19d2

9 years agoRelease 1.7 25/46925/1 accepted/tizen/mobile/20150828.011739 accepted/tizen/tv/20150828.011753 accepted/tizen/wearable/20150828.011806 submit/tizen/20150827.083556
Pawel Sikorski [Thu, 27 Aug 2015 08:31:26 +0000 (10:31 +0200)]
Release 1.7

Main changes:
- fixes: privileges list length, manifest generation, icon for tpk
- RequestMode introduction

Change-Id: Iefd9dd857bec53823efddb0cce379c575fa4286a

9 years agoRequestMode (Global/User) type introduction 64/46064/4
Pawel Sikorski [Thu, 13 Aug 2015 12:25:16 +0000 (14:25 +0200)]
RequestMode (Global/User) type introduction

Change-Id: I862d7c7df1ceb0f41b4daf4e34490ef21fb480ab

9 years ago[Bug] Fix generation of multiple entries in platform manifest 16/46816/2
Tomasz Iwanek [Wed, 26 Aug 2015 09:51:13 +0000 (11:51 +0200)]
[Bug] Fix generation of multiple entries in platform manifest

Iteration should start from beginning of the list.
Wrongly generated elements:
 - app-control,
 - ui-application,
 - svc-application.

Change-Id: Idecb65a87059bb8e824e61c24a71bde19c01207d

9 years agoSetting proper icon name in tpk manifest 40/46640/4
Wojciech Kosowicz [Mon, 24 Aug 2015 09:48:50 +0000 (11:48 +0200)]
Setting proper icon name in tpk manifest

Also included style fixes for the project
Change-Id: I2e6ebc71f408e7df91684bc166c435271e27ca73

9 years agoFix getting length of privilege list 14/46614/1 accepted/tizen/mobile/20150824.072105 accepted/tizen/tv/20150824.072116 accepted/tizen/wearable/20150824.072131 submit/tizen/20150824.065629
Sangyoon Jang [Mon, 24 Aug 2015 06:47:13 +0000 (15:47 +0900)]
Fix getting length of privilege list

it should be privilege_x, not privileges_x

Change-Id: Id00a81c42b841a8ae5dcfd4d8de682a4ca975e16
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
9 years agoRelease 1.6-1 65/46565/1 accepted/tizen/mobile/20150822.064642 accepted/tizen/tv/20150822.065226 accepted/tizen/wearable/20150822.065657 submit/tizen/20150821.141612
Pawel Sikorski [Fri, 21 Aug 2015 14:14:29 +0000 (16:14 +0200)]
Release 1.6-1

Main changes:
 - Icons generation fix;
 - Privilege translation for backward compatilibity

Change-Id: Ifa5f991a156b4aec1629acf1e6bf378d58bf3a43

9 years ago[Feature] Privilege translation for backward compatilibity 64/46564/4
Tomasz Iwanek [Thu, 20 Aug 2015 13:46:05 +0000 (15:46 +0200)]
[Feature] Privilege translation for backward compatilibity

ConfigData class was removed because it had only one member
field and it was redundant.

API added to security-manager and used here should be implemented
in privilege-checker instead probably. Security manager and
privilege-checker holds very similar databases now.

Change-Id: I4ee1bfd7a98cf9aecbd291fda9e5c7e1f05ceb20

9 years agoFix for finding proper extension for icon 24/46524/4
Wojciech Kosowicz [Fri, 21 Aug 2015 09:39:37 +0000 (11:39 +0200)]
Fix for finding proper extension for icon

Change-Id: I3336ffccc8dbab996f697d9ecd43eeffca5aa7a2

9 years agoMoving step_generate_xml to wgt directory 95/46495/3
Wojciech Kosowicz [Fri, 21 Aug 2015 07:05:29 +0000 (09:05 +0200)]
Moving step_generate_xml to wgt directory

Change-Id: I07a279f2ca3dc03547808fbfa6d1a96866794b42

9 years agoSmack label for smoke tests 22/46522/1
Tomasz Iwanek [Fri, 21 Aug 2015 09:06:41 +0000 (11:06 +0200)]
Smack label for smoke tests

Installer is now running with 'System' label so the smoke tests.

Change-Id: I685119a8efe4978b8c860399ff2f3f9b20ac256c

9 years agoRelease 1.5-1 08/46508/1 accepted/tizen/mobile/20150821.092256 accepted/tizen/tv/20150821.092308 accepted/tizen/wearable/20150821.092326 submit/tizen/20150821.075339
Pawel Sikorski [Fri, 21 Aug 2015 07:52:01 +0000 (09:52 +0200)]
Release 1.5-1

MainChanges:
* installation/deinstallation fix for SMACK

Change-Id: I844e1da20b4a75ff84015a46c53f6aac6306ad8e

9 years ago[Bug] Fix installation/deinstallation mode with smack 29/46429/7
Tomasz Iwanek [Thu, 20 Aug 2015 07:24:23 +0000 (09:24 +0200)]
[Bug] Fix installation/deinstallation mode with smack

As stated in: https://review.tizen.org/gerrit/#/c/46420/

"""
On uninstall steps, old code runs StepRevokeSecurity before
StepRemoveFiles. With SMACK enabled, once StepRevokeSecurity
is finished, the installer processes(tpk and wgt) don't have
an authority to remove files, so the app
directory($HOME/apps_rw/[pkgid]) is still remained. When the
same app is installed again, the installer process crashes,
as the boost::exists() to the app destination directory raises
an exception on SMACK denial. This patch moves the
StepRevokeSecurity to the end of the list of steps on uninstall,
to give the privilege to delete the app directory to the installers.
"""

Splitting StepRevokeSecurity into two parts so that deinstallation
and deinstallation rollback should work.

Splitting StepRegisterSecurity into 2 steps. Because we need to
remove files before revoking security on rollback.

Change-Id: If597a3c256e09d57aa923566f5c3454d497c0593

9 years agoRelease 1.4-1 41/46441/1 accepted/tizen/mobile/20150820.115728 accepted/tizen/tv/20150820.115854 accepted/tizen/wearable/20150820.115950 submit/tizen/20150820.084129
Pawel Sikorski [Thu, 20 Aug 2015 08:50:58 +0000 (10:50 +0200)]
Release 1.4-1

Main changes:
- WebApp encryption alignement to the libwebappenc API change
- TPK recovery, update; WGT RDS fixup; icon fixes;
- Smoke tests updated

Change-Id: I31095bf673998db2d8dfc56236b8838b1419f51b

9 years agoFix for adding icon into platform manifest 75/46375/2
Wojciech Kosowicz [Wed, 19 Aug 2015 13:29:26 +0000 (15:29 +0200)]
Fix for adding icon into platform manifest

Change-Id: I5b534b754ba326c422682134804e59c1d73da917

9 years agoWebApp encryption step alignement to libwebapenc library API change 54/46054/3
Pawel Sikorski [Thu, 13 Aug 2015 10:41:12 +0000 (12:41 +0200)]
WebApp encryption step alignement to libwebapenc library API change

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

Change-Id: I718f11f597cf8a7bd9916607864920582ca21cd7

9 years agoSmoke tests for recovery of tpk packages 42/46142/3
Tomasz Iwanek [Fri, 14 Aug 2015 10:32:46 +0000 (12:32 +0200)]
Smoke tests for recovery of tpk packages

Change-Id: I0d8d0d5840e46ed77f33c4d7e116d91878d7aa62

9 years agoRecovery for tpk backend 41/46141/3
Tomasz Iwanek [Fri, 14 Aug 2015 08:04:49 +0000 (10:04 +0200)]
Recovery for tpk backend

Change-Id: I8d0ec4bd539cc2227ce582a9c291a87e17b1f2e1

9 years agoFix detecting update 69/46169/2
Tomasz Iwanek [Mon, 17 Aug 2015 09:26:38 +0000 (11:26 +0200)]
Fix detecting update

If application is installed globally but not locally,
false update is detected for new installation.

Problem is that function pkgmgrinfo_pkginfo_get_usr_pkginfo()
return all apps. There is needed additional check to find out
if application found is global or it is already installed per
user.

Change-Id: I8b84c956fd37ac5750fe5596657c5f3240e4aeb4

9 years agoFix RDS when no start file is updated 00/45900/6
Tomasz Iwanek [Mon, 10 Aug 2015 06:48:11 +0000 (08:48 +0200)]
Fix RDS when no start file is updated

RDS failed to work when start file was not updated
due to switch to WidgetConfigParser that has additional
filesystem checks for start file.

StepParse has flags_ parameter now to prevent RDS from
failing when start file is localized.

Fixed backup path of files.

Requeries submit of: https://review.tizen.org/gerrit/#/c/45895/

Change-Id: I129a5face58c51324de0fd774c39008cceac86f0

9 years agoTpk icons location - shared/res/ 40/46140/3
Tomasz Iwanek [Wed, 12 Aug 2015 13:56:10 +0000 (15:56 +0200)]
Tpk icons location - shared/res/

Quickfix for icon location of tpk packages.
Icons are not found otherwise.

Change-Id: I73c12bbbccccf55e4d1193fc6ba761948773448b

9 years agoRelease 1.3-1 66/46266/1 accepted/tizen/mobile/20150818.220141 accepted/tizen/tv/20150818.220149 accepted/tizen/wearable/20150818.220157 submit/tizen/20150818.160938
Pawel Sikorski [Tue, 18 Aug 2015 16:06:42 +0000 (18:06 +0200)]
Release 1.3-1

Main changes:
- TPK installer exposed and TPK smoke tests added; smoke tests cleanup;
- preserving icons extensions in backup; fix deinstallation rollback
- SMACK label changed

Change-Id: I7cf616d88423af90e175f57482e0e45173616150

9 years agoSmoke tests for tpk 39/46139/3
Tomasz Iwanek [Wed, 12 Aug 2015 12:23:29 +0000 (14:23 +0200)]
Smoke tests for tpk

Change-Id: I869a23c74feae696341b71eff80710aa398e2137

9 years agoAdd static tpk backend library 38/46138/3
Tomasz Iwanek [Tue, 11 Aug 2015 08:28:21 +0000 (10:28 +0200)]
Add static tpk backend library

For linking with testsuites.
Task was renamed to TpkInstaller class.

HOSTTEST was removed due to missing files for this configuration
in project files.

Change-Id: I97de47bb1b4a622cfea89c8f7a692253056a1535

9 years agoTestsuite cleanup in smoke tests 27/46227/4
Tomasz Iwanek [Tue, 18 Aug 2015 07:29:06 +0000 (09:29 +0200)]
Testsuite cleanup in smoke tests

Change-Id: I5033d45052bdb6f3d2fa92426b51af11da345120

9 years agoChange installer's subject SMACK label to System 61/46161/1 submit/tizen/20150818.143616
Youmin Ha [Mon, 17 Aug 2015 10:33:26 +0000 (19:33 +0900)]
Change installer's subject SMACK label to System

Both global and per-user pkg DB files have SMACK label as
System::Shared, which allows User labeled subjects to read, and System
labeled subjects to read/write.
To write pkg DB files, the SMACK label of the app installers is changed
to System.
Note that the global pkg DB files in /usr/dbspace/ are still protected
with DAC, as their owner is tizenglobalapp.

Change-Id: Ie193da8901a296e6489c4927ac4a0d3510b741f7
Signed-off-by: Youmin Ha <youmin.ha@samsung.com>
9 years agoFix deinstallation rollback 03/45903/4
Tomasz Iwanek [Mon, 10 Aug 2015 11:35:15 +0000 (13:35 +0200)]
Fix deinstallation rollback

Security must be deregistered before files removal as
in rollback operation files must be restored before
security in applied to them once again.

Change-Id: Iacd6bfdcd52e072fcd00a3d04b2f355ddd8ceb2d

9 years agoFix preserving icon extension 02/45902/4
Tomasz Iwanek [Mon, 10 Aug 2015 11:14:16 +0000 (13:14 +0200)]
Fix preserving icon extension

Code of:
 - StepBackupIcons,
 - StepRecoverIcons,
 - StepRemoveIcons,
was adjusted to code of StepCreateIcons which preserves
icon extension during creation of platform icons.

Note: internalizalizaton of icons is not supported as
there is needed policy so there is copy of one icon per
ui application of package.

Change-Id: Ic9229a64d0a4973f6ab3275c12dd9ca4672a73a3

9 years agoRelease 1.2-1 90/46090/1 accepted/tizen/mobile/20150815.071903 accepted/tizen/tv/20150815.072142 accepted/tizen/wearable/20150815.090538 submit/tizen/20150814.151152
Pawel Sikorski [Fri, 14 Aug 2015 15:05:15 +0000 (17:05 +0200)]
Release 1.2-1

Main changes:
* Account info added to manifest.xml during installation;
* Smoke tests added;
* TPK update detection

Change-Id: I9a5b71d7ca124ac459e4a98d83972300f333822a

9 years agoSmoke tests for installation modes 01/45901/4
Tomasz Iwanek [Thu, 6 Aug 2015 08:57:59 +0000 (10:57 +0200)]
Smoke tests for installation modes

Those test are able to be run per normal user to
detect any problems with package registeration and
package files in all supported requests.

Tests don't perform cleanup so it is adviced to create
backups for apps_rw/ and .applications/.

Change-Id: I6ebfeca6067b85a58802b253525262eba0027244

9 years agoUpdate detection for tpk backend 04/45904/4
Tomasz Iwanek [Mon, 10 Aug 2015 13:42:21 +0000 (15:42 +0200)]
Update detection for tpk backend

This commit adds detection of package update for tpk
backend.

Update fails due to coping shared directory when there is
one supplied by package. As there is no policy, I'm disabling
shared directory creation and TODO is left.

Change-Id: I5d2bd4f334babf3ce88cad9132dc70719b0feefd

9 years agoGenerate account info in platform manifest 67/46067/3
Tomasz Iwanek [Thu, 13 Aug 2015 08:38:03 +0000 (10:38 +0200)]
Generate account info in platform manifest

Change-Id: I5f699063dba7034d21e214d8652cd7b544971b7a

9 years agoRefactoring for implementing smoke tests 04/45804/3
Tomasz Iwanek [Thu, 6 Aug 2015 08:57:59 +0000 (10:57 +0200)]
Refactoring for implementing smoke tests

Tests will requires running multiple installations in one process.
Changes:
 - removing singleton on PkgmgrInterface as it is not needed,
 - adding step will accept extra parameters so that step instance
   can be customized,
 - wgt static library extracted for linking with tests.

Change-Id: I4c97c9484972f09d49ddf99e8c87d9a4fa447df0

9 years agoPackage upversion, changelog added 88/46088/1 accepted/tizen/mobile/20150814.112914 accepted/tizen/tv/20150814.113024 accepted/tizen/wearable/20150814.112938 submit/tizen/20150814.111536
Pawel Sikorski [Fri, 14 Aug 2015 11:06:26 +0000 (13:06 +0200)]
Package upversion, changelog added

Change-Id: I39b27920b832bed6ac231c28b4db8e95e94c2a91

9 years agoRemoval of not needed step for WGT. 52/45952/2
Pawel Sikorski [Wed, 12 Aug 2015 12:49:54 +0000 (14:49 +0200)]
Removal of not needed step for WGT.

Common StepCreateStorageDirectories is not needed for installation,
as StepWgtCreateStorageDirectories is responsible for that logic.

Change-Id: I9fae701d74ac5b52946b281f27e6eb0fcb02baf8

9 years agoRemoving unused functions from step_create_symbolic_link, step_parse, task 05/45905/3
Anna Niznik [Wed, 8 Jul 2015 10:50:06 +0000 (12:50 +0200)]
Removing unused functions from step_create_symbolic_link, step_parse, task

Change-Id: Ib7ff457956ce32316ef6bbf8f835f94a3c41b995

9 years agoStep::undo can also return ERROR. 79/45879/3
Pawel Sikorski [Tue, 11 Aug 2015 12:25:10 +0000 (14:25 +0200)]
Step::undo can also return ERROR.

Since AppInstaller is calling all "undo()" even if one of them returns
ERROR, Step::undo can return ERROR.

Commit adds returning ERROR from some of the Step::undo methods.

Change-Id: I989521c43ed6a603e24c06adb58c35fb1e0ed6c9

9 years agonullptr initialization in security_registration 84/45884/2
Anna Niznik [Tue, 7 Jul 2015 14:05:11 +0000 (16:05 +0200)]
nullptr initialization in security_registration

The pointer was not initialized, so it had random value.

Change-Id: I57e2fa2c176ff208682e5f41bf135c6c25ff4dde

9 years agoRemoving unused functions and variables. Fixing warnings. 08/45908/1
Anna Niznik [Thu, 9 Jul 2015 11:07:26 +0000 (13:07 +0200)]
Removing unused functions and variables. Fixing warnings.

Change-Id: I097c3eacbc4f67e424c7a340ed4e80806b9cb54e

9 years agoExtract backup paths functions 79/45779/2
Tomasz Iwanek [Fri, 7 Aug 2015 06:36:49 +0000 (08:36 +0200)]
Extract backup paths functions

Change-Id: I0bdfd875ec0cbb52bb653757785171ef4fb2d28f

9 years agoIntroduce WgtInstaller class 78/45778/2
Tomasz Iwanek [Thu, 6 Aug 2015 08:40:17 +0000 (10:40 +0200)]
Introduce WgtInstaller class

Change-Id: Ic54c461319df0ca063a1e02de830c988329608a1

9 years agoRecovery mode for wgt-backend 77/45777/2
Tomasz Iwanek [Tue, 4 Aug 2015 13:23:52 +0000 (15:23 +0200)]
Recovery mode for wgt-backend

This commit composes recovery installation mode
for wgt-backend from previously added steps.

Change-Id: Ibcf219eaf618c8c203be6d192435a8e120e80041

9 years ago[Recovery] StepRecoverSecurity 16/45716/3
Wojciech Kosowicz [Tue, 4 Aug 2015 09:10:04 +0000 (11:10 +0200)]
[Recovery] StepRecoverSecurity

Change-Id: Ibeed82bcafdbe9916a3593cf5e0795a3672d9cf2

9 years ago[Recovery] StepRemoveTemporaryDirectory 15/45715/3
Wojciech Kosowicz [Mon, 3 Aug 2015 09:45:25 +0000 (11:45 +0200)]
[Recovery] StepRemoveTemporaryDirectory

Step deletes all the directories that starts with 'unpack' within
root app directory

Change-Id: I22c5b8a3db9fc370876a47a8193a8f5490b48fb9

9 years ago[Recovery] StepRecoveryApplication 14/45714/3
Wojciech Kosowicz [Tue, 4 Aug 2015 10:11:29 +0000 (12:11 +0200)]
[Recovery] StepRecoveryApplication

Change-Id: I3999889e1d790095c1cd93282b823ea1ae2ca6b2

9 years ago[Recovery] StepRecoverStorageDirectories 13/45713/3
Wojciech Kosowicz [Tue, 4 Aug 2015 08:46:26 +0000 (10:46 +0200)]
[Recovery] StepRecoverStorageDirectories

Change-Id: I7a9c24ca27646d9e285da00bde06b7465b2e9e1c

9 years ago[Recovery] StepRecoverFiles 07/45707/4
Tomasz Iwanek [Mon, 3 Aug 2015 14:24:10 +0000 (16:24 +0200)]
[Recovery] StepRecoverFiles

Change-Id: I879055e3cb7d99c5e3b3169cc30b5f09567896d3

9 years ago[Recovery] StepRecoverIcons 05/45705/4
Tomasz Iwanek [Mon, 3 Aug 2015 14:11:30 +0000 (16:11 +0200)]
[Recovery] StepRecoverIcons

For recovering new installation, any existing icons are removed.
For recovering update installation, all icons are moved to
original locations.

Change-Id: I80e34748a4e753450d8a4cbdf8f81dbbeb5b44ae

9 years ago[Recovery] StepRecoverManifest 04/45704/4
Tomasz Iwanek [Mon, 3 Aug 2015 13:56:15 +0000 (15:56 +0200)]
[Recovery] StepRecoverManifest

Change-Id: I21c480d113ddf6211ad25298c5753f9f5f57f71a

9 years ago[Recovery] StepParseRecovery 03/45703/4
Tomasz Iwanek [Mon, 3 Aug 2015 07:39:36 +0000 (09:39 +0200)]
[Recovery] StepParseRecovery

Change-Id: I4dbe7a22a11d282e35e9c426404a474157663a2e

9 years agoFix icon creation for tpk-backend 19/45719/2 accepted/tizen/mobile/20150812.005346 accepted/tizen/tv/20150812.005408 accepted/tizen/wearable/20150812.005444 submit/tizen/20150811.123928
Tomasz Iwanek [Mon, 10 Aug 2015 14:15:25 +0000 (16:15 +0200)]
Fix icon creation for tpk-backend

Tpk-backend still tried to create icon in StepCreateSymbolicLink

Change-Id: I90bad97635f7869844ab301543fd05498f5052bb

9 years agocert-svc signature validator API changed 53/45353/3 accepted/tizen/mobile/20150811.091449 accepted/tizen/tv/20150811.091458 accepted/tizen/wearable/20150811.091512 submit/tizen/20150811.071205
Kyungwook Tak [Tue, 21 Jul 2015 11:06:39 +0000 (20:06 +0900)]
cert-svc signature validator API changed

Refer cert-svc change : 6cf02b1b3ab453f691f888b929c040ac921dfc54

Change-Id: I4b293c11aef938f5f808cd88286770a847f48f0f
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
9 years agoIntroducing "precheck" method to tpk steps (parse, create_symbolic_link) 85/37985/4
Pawel Sikorski [Wed, 8 Apr 2015 15:00:07 +0000 (17:00 +0200)]
Introducing "precheck" method to tpk steps (parse, create_symbolic_link)

This refactoring unifies input data checking into a separate method.

Change-Id: I100a262fbbcd6b2f128579283f9e67c673afae5b

9 years ago[Recovery] Implement basic recovery classes 83/45483/3
Tomasz Iwanek [Mon, 3 Aug 2015 08:51:43 +0000 (10:51 +0200)]
[Recovery] Implement basic recovery classes

Assumed invocation:
  backend -e recovery_file_ad9823

StepRecovery
 | Common base of all steps that performs recovery. Recover is supported for
 | new and update installation modes. Each step that performs recovery needs
 | to override methods:
 |  - RecoveryNew(),
 |  - RecoveryUpdate(),
 | instead of:
 |  - process().

StepOpenRecoveryFile
 | First step of recovery mode that will set information recovery in
 | installer context.

RecoveryFile
 | Abstraction of scoped file deleter. Class represents the recovery
 | file in fs. Upon destruction of this object the file in fs is removed.
 | File contains information about:
 |  - unpacked directory,
 |  - pkgid.

This commit revert order of step's clean() method call as it is needed here.

Change-Id: Ie36786f8ee1d1b41437f3890e836176178a9c91f

9 years agoRemoving encryption key after application uninstallation. 09/45109/3 accepted/tizen/mobile/20150811.014001 accepted/tizen/tv/20150811.014009 accepted/tizen/wearable/20150811.014019 submit/tizen/20150810.135518
Pawel Sikorski [Fri, 31 Jul 2015 10:17:05 +0000 (12:17 +0200)]
Removing encryption key after application uninstallation.

During deinstallation, wae_remove_app_dek function is called
to remove encryption key from WAE module.
Note: there is no information, if given application is encrypted or
not. So the function is always called. If, WAE_ERROR_NO_KEY error is
returned, it can be assumed, that given application was not encrypted.

Change-Id: I9b7f54bde88ad012249f77784c46aa80c1097ff3

9 years agoEncryption support 94/45094/3
Pawel Sikorski [Wed, 29 Jul 2015 13:58:24 +0000 (15:58 +0200)]
Encryption support

Seperate step introduced to implement WebApp files Encryption feature.

Note: original files are REPLACED by encrypted files

WARNING: not verified - WAE_ERROR_PERMISSION_DENIED returned from
wae_encrypt_web_application

Change-Id: Icbb2e507208629a5c02778e38b836ae866d450e8

9 years agoFix of icon files creation 56/45656/1
Tomasz Iwanek [Fri, 7 Aug 2015 10:28:21 +0000 (12:28 +0200)]
Fix of icon files creation

Additional steps for creating icons.

Change-Id: Ia5949dcef4f08b3941e0e819c2b973054859d788

9 years agoFixture for StepGenerateXml 55/45655/1
Tomasz Iwanek [Fri, 7 Aug 2015 09:37:40 +0000 (11:37 +0200)]
Fixture for StepGenerateXml

Platform manifest should be removed on rollback.

Change-Id: I1e98f76e63306668a2ef7b960f2193d9fdaf2e0b

9 years agoRemove manifest file in deinstallation 54/45654/1
Tomasz Iwanek [Wed, 5 Aug 2015 14:01:07 +0000 (16:01 +0200)]
Remove manifest file in deinstallation

Pkgmgr doesn't remove this file.

Change-Id: I1bc9b9ae6469731468d00ec18f712745d0f90087

9 years agoFixing unzClose and unzCloseCurrent not guarded 92/45092/2 accepted/tizen/mobile/20150804.000145 accepted/tizen/tv/20150804.000155 accepted/tizen/wearable/20150804.000207 submit/tizen/20150803.232230
Pawel Sikorski [Thu, 30 Jul 2015 10:15:52 +0000 (12:15 +0200)]
Fixing unzClose and unzCloseCurrent not guarded

During unzipping, unzClose and unzCloseCurrent is not called
in all possible conditions.

Solution: introducing class that will guard it.

Note: in original implementation, in case of successful unzOpenCurrent
and unzReadCurrentFile, there was no unzCloseCurrent (next call was
to unzGoToNext).
In this implementation, unzCloseCurrent is called.

Change-Id: Idaf883618922177b5ebdf1ae5026ce3db9eaaaa2

9 years agoStepCopyBackup small refactoring 17/45017/2
Pawel Sikorski [Fri, 24 Jul 2015 13:38:50 +0000 (15:38 +0200)]
StepCopyBackup small refactoring

precheck method, methods extractions

Change-Id: Iee94c050e265fcbcdc4ce80cfbb3542d08a3b4a6

9 years agoNamespace for category of steps 69/45069/4
Tomasz Iwanek [Thu, 16 Jul 2015 14:27:46 +0000 (16:27 +0200)]
Namespace for category of steps

Reduce number of namespace in code. Currently, there is
one namespace per step which is a bit too much. This
commit changes this. Steps are put into namespace by
their category (what step does).

commmon|wgt|tpk::
  filesystem - steps that mainly manipulates files on device
  backup - steps that are creating backup files,
        (operates on fs but worth separate namespace)
  rds - steps that handles rds
        (operates on fs but worth separate namespace)
  parse - steps that are processing manifests of packages
  security - steps containing security checks/registation
  pkgrmgr - steps that communicates with pkgrmgr API

Change-Id: Icfbf39b9e23d5ee470e9eb50501b1b8e0f7a6b7c

9 years agoFix in "shared" feature for tizen 3.0. 97/45197/1
Pawel Sikorski [Mon, 3 Aug 2015 11:37:14 +0000 (13:37 +0200)]
Fix in "shared" feature for tizen 3.0.

Instead of required_version, widget version was used to check the platform
version.
But, required_version should be used here.

Change-Id: I30fea9280937bec0759854ef999941b2530f3926

9 years agoCatch exception occured from cert-svc-vcore 97/44797/3 accepted/tizen/mobile/20150803.094133 accepted/tizen/tv/20150803.094145 accepted/tizen/wearable/20150803.094204 submit/tizen/20150803.080426
Kyungwook Tak [Tue, 28 Jul 2015 02:45:16 +0000 (11:45 +0900)]
Catch exception occured from cert-svc-vcore

Change-Id: I04b9d4121ffd213ec1b978de23cbc1bed4989085
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
9 years agoExtending "shared" directory functionality for update installation 01/44901/3
Tomasz Iwanek [Mon, 27 Jul 2015 14:37:36 +0000 (16:37 +0200)]
Extending "shared" directory functionality for update installation

New step implements supplementary logic for update as
the step StepWgtCreateStorageDirectories changes operations
on shared directories for new installation mode.

Change-Id: Ic4078e6a395bcd59e162bfde9a611dc30dd122ed

9 years agoFixture for directory climbing prevention 87/45087/2
Tomasz Iwanek [Fri, 31 Jul 2015 08:43:47 +0000 (10:43 +0200)]
Fixture for directory climbing prevention

boost::filesystem::canonical need file existance.
This broke installation mode.

Change-Id: I1f81bcabd405bc186229dad9b435f16e1d089205

9 years agoPrevent 'directory climbing' attack in unzip step 95/44895/2
Tomasz Iwanek [Tue, 28 Jul 2015 08:43:06 +0000 (10:43 +0200)]
Prevent 'directory climbing' attack in unzip step

This commit prevents directory attack presented by SRK
in installer. Additional check is added to confirm that
zip relative path in input archieve are not pointing
outside of package root.

In general, app-installer should not install files of
widget outside of package directory if widget package
is malformed.

Change-Id: I9703d416d0964a073f45226340a38d11482c949d

9 years agoExtending "shared" directory functionality. 80/44680/2
Pawel Sikorski [Thu, 23 Jul 2015 12:51:56 +0000 (14:51 +0200)]
Extending "shared" directory functionality.

Tizen 3.x defines new requirement, in which resources located
in "res/wgt/shared" folder should be moved to package ./shared directory.
Additionally, symbolic link should be created ./res/wgt/shared -> ./shared

On the other hand, tizen 2.x applications, should follow old policy (no data
movement)

Solution:
Introduction of derived StepWgtCreateStorageDirectories that adds above
functionality.

Change-Id: I3de99339f7d1123d9501f94577b9e2a79383511d

9 years agoRestore 2.x directory structure of package 27/43827/7 accepted/tizen/mobile/20150729.073548 accepted/tizen/tv/20150729.073605 accepted/tizen/wearable/20150729.073624 submit/tizen/20150729.044523
Tomasz Iwanek [Fri, 12 Jun 2015 13:35:18 +0000 (15:35 +0200)]
Restore 2.x directory structure of package

Example:
  $HOME/apps_rw/{PKGID}/bin/{APPID_1}, {APPID_2} (symlink)
  $HOME/apps_rw/{PKGID}/data/
  $HOME/apps_rw/{PKGID}/shared/data/
  $HOME/apps_rw/{PKGID}/shared/res/
  $HOME/apps_rw/{PKGID}/shared/trusted/
  $HOME/apps_rw/{PKGID}/res/wgt/... (all wgt contents)

Installation/Update/Deinstallation/RDS modes should work.

BUT NOTE THAT:
 - runtime requires to known where to look for widget files after
   this change,
 - security-manager should not require app_id,
 - security-manager must not block installation when path without
   app_id is passed,
 - C API must be aware of new paths.

Change-Id: Idc3609ae355389a9df696c85315e5bcd71a9a3ef

9 years agoGardening - cmake 91/44091/2 accepted/tizen/mobile/20150724.090630 accepted/tizen/tv/20150724.090807 accepted/tizen/wearable/20150724.090931 submit/tizen/20150722.045537 submit/tizen/20150724.082436
Tomasz Iwanek [Wed, 15 Jul 2015 12:16:21 +0000 (14:16 +0200)]
Gardening - cmake

Change-Id: I275cee8bdd6be81d002aa1edfb461e26b3ca60ea

9 years agoForbid installation for superuser 85/44085/2
Tomasz Iwanek [Thu, 16 Jul 2015 09:11:58 +0000 (11:11 +0200)]
Forbid installation for superuser

App-installers binaries should be run with
normal user or tizenglobalapp.

Change-Id: I0b13457e6760678fe21843a60bb98f035d5f50f8

9 years agoDoxygen documentation started. 31/44031/2
Pawel Sikorski [Wed, 15 Jul 2015 15:02:10 +0000 (17:02 +0200)]
Doxygen documentation started.

Step, StepConfigure and StepUnzip documentation added

Change-Id: I2730c562602d96b64600d5aa06bbb2fb4ce93eaa

9 years agoCleanup 30/44030/2
Pawel Sikorski [Wed, 15 Jul 2015 12:35:11 +0000 (14:35 +0200)]
Cleanup

* Inline clean/undo/precheck/process if empty
* wgt_backend_data.cc removal as it is empty

Change-Id: Ifd4136230b08225fce4da9eef5415f001763b211

9 years agosmall coding style fix 39/43939/3
Pawel Sikorski [Wed, 15 Jul 2015 08:44:16 +0000 (10:44 +0200)]
small coding style fix

Change-Id: I77d5c37b7003c7d804c09fedacc766ba621fdb7a

9 years agoadd label, author element under manifest element 07/44007/3
Inhwan Lee [Thu, 16 Jul 2015 06:24:16 +0000 (15:24 +0900)]
add label, author element under manifest element

not only <label> in <ui-application> but also <label> in <manifest>
and add <author> in <manifest>

request from pkgmgr team for work their C API

Change-Id: Ic460254662b001598dfe23c75e89cb382895898d

9 years agoRollback for StepUnregisterApp 23/43923/3
Tomasz Iwanek [Tue, 14 Jul 2015 12:25:31 +0000 (14:25 +0200)]
Rollback for StepUnregisterApp

Implement rollback operations for unregistering app.
Package should be fully restored in pkgmgr database
in case of failure of any subsequent step failures.

StepBackupManifest was changed to create copy of manifest
instead of moving it.

Original xml manifest file is used to
unregister application in StepUnregisterApplication and
is removed by uninstallation later.

Backup xml manifest file is used to restore package in
pkgmgr in case of rollback and is removed by StepBackupManifest
(this step is managing lifetime of backup file).

Change-Id: I51a055deb690425151d287262eed73d8b19acbf1

9 years agoRollback for StepRemoveFiles 15/43915/2
Tomasz Iwanek [Tue, 14 Jul 2015 11:23:21 +0000 (13:23 +0200)]
Rollback for StepRemoveFiles

Implement rollback operations for StepRemoveFiles.
If any action after file removal fails then the old
content of package should be restored.

Icons removal was moved to another step.

Change-Id: I532ad5d03bbd99ed29db4db565a6a2ea4d96a7d4

9 years agoAdd samsung copyright to LICENSE file 24/43924/2
Tomasz Iwanek [Mon, 6 Jul 2015 16:12:32 +0000 (18:12 +0200)]
Add samsung copyright to LICENSE file

Change-Id: I27f379f130471f361c0353d842658ed95c1a35d9

9 years agoAuthor signature match check during update installation - fixed 90/42790/3
Tomasz Iwanek [Thu, 11 Jun 2015 13:06:15 +0000 (15:06 +0200)]
Author signature match check during update installation - fixed

Author certificate of updated version of widget must match
the author certificate of already installed version.

This is fixed version of prevoius reverted commit:
 - cc61057fe2021f10fa0408dbb048f7d0f6c1ea92

Change-Id: Ie8e6ae6684efd019f97600196180aa320a04c9a3

9 years agoFix build for g++ without optimalization flags 76/43376/2
Tomasz Iwanek [Tue, 7 Jul 2015 10:58:49 +0000 (12:58 +0200)]
Fix build for g++ without optimalization flags

The problem is that value static field was supposed to be inlined
but it is not. It appears to work only for optimalization flags
 with g++.

Full explanation link:
 - http://stackoverflow.com/questions/8016780/undefined-reference-to-static-constexpr-char

In following code value field appears to be "odr-used" in context
of ostream operator<<. Conversion lvalue-to-rvalue should be
"immediately applied" in LOG marco. Therefore this commit adds
construction of std::string which has implicit constructor of const char*.

Change-Id: I2f8c9c57b14d9f7c6a7581dd5c8aab07f699d04b

9 years agoAdjust to changes in ApplicationIconsHandler 74/43374/3
Tomasz Iwanek [Tue, 7 Jul 2015 08:42:25 +0000 (10:42 +0200)]
Adjust to changes in ApplicationIconsHandler

Must be merged and submitted together with manifest-parser change:
 - https://review.tizen.org/gerrit/#/c/43373/

Change-Id: Ib4395abbe63673bc0f3685b362ab890693869197

9 years agotpk: Replace common StepGenerateXml to new StepCopyManifestXml 69/43369/4 accepted/tizen/mobile/20150710.080317 accepted/tizen/tv/20150710.080329 accepted/tizen/wearable/20150710.080343 submit/tizen/20150710.061944
Youmin Ha [Wed, 8 Jul 2015 07:49:49 +0000 (16:49 +0900)]
tpk: Replace common StepGenerateXml to new StepCopyManifestXml

Current common StepGenerateXml doesn't recover full spec of the original
xml. This commit directly copies the original tizen-manifest.xml to the
destination directory.
This commit fixes the TCT failure, which can't install the TCT apps.

Change-Id: Ic6568509e864c79247c7cc16f5ca9cafc3324d8f
Signed-off-by: Youmin Ha <youmin.ha@msamsung.com>
9 years agoUnifying Backuping of icons, resources, data 99/42899/2
Pawel Sikorski [Fri, 3 Jul 2015 13:22:39 +0000 (15:22 +0200)]
Unifying Backuping of icons, resources, data

During backup, everything will be MOVED (not COPIED).

Change-Id: Ie04a42473769004523a0850f0b46c9500c375291

9 years agoFix issue of icon copy when update and fix logic of select icon file 69/42869/2 accepted/tizen/mobile/20150708.065839 accepted/tizen/tv/20150708.065901 accepted/tizen/wearable/20150708.065915 submit/tizen/20150708.015609
Inhwan Lee [Fri, 3 Jul 2015 09:30:53 +0000 (18:30 +0900)]
Fix issue of icon copy when update and fix logic of select icon file

- fix issue that if icon file is absent, try to copy not exist file when update
- when manifest parser give multiple icon to installer, select first icon to use

Change-Id: I0de521cb454a9d58f3c8a873394a5243e212d44e

9 years agoRemove default icon setting 36/42636/1
sung-su.kim [Wed, 1 Jul 2015 05:15:13 +0000 (14:15 +0900)]
Remove default icon setting

Default icon setting is role of the platform.

Change-Id: I5621566a12144a808a86b3aa4d1dadba677ef60f

9 years agoThere is some problem with retrieving certificate during the update. It will be analysed. 87/42587/3 accepted/tizen/mobile/20150701.001704 accepted/tizen/tv/20150701.001723 accepted/tizen/wearable/20150701.001742 submit/tizen/20150630.131128
Pawel Sikorski [Tue, 30 Jun 2015 10:27:21 +0000 (03:27 -0700)]
There is some problem with retrieving certificate during the update. It will be analysed.

Revert "Author signature match check during update installation"

This reverts commit cc61057fe2021f10fa0408dbb048f7d0f6c1ea92.

Change-Id: Ic9c3aeb64a08c20cfd6edc6307c91a5c1575baba

9 years agoFix install error with pkgs having no privilege 65/42565/1 accepted/tizen/mobile/20150630.195309 accepted/tizen/tv/20150630.195451 accepted/tizen/wearable/20150630.195640 submit/tizen/20150630.105734
Youmin Ha [Tue, 30 Jun 2015 06:11:42 +0000 (15:11 +0900)]
Fix install error with pkgs having no privilege

If a package has no privilege in its manifest, current code assumes it
as an error, and the installation fails.
This commit fixes it, by skipping privilege validation if there is no
privilege in the package.

Change-Id: I6edb38bcbe5ecba497f8478622b361e867327a66
Signed-off-by: Youmin Ha <youmin.ha@samsung.com>
9 years agoSwitch wgt::StepParse to use WidgetConfigParser class 95/42495/4 accepted/tizen/mobile/20150630.002712 accepted/tizen/tv/20150630.002721 accepted/tizen/wearable/20150630.002735 submit/tizen/20150629.144725
Tomasz Iwanek [Wed, 24 Jun 2015 14:52:11 +0000 (16:52 +0200)]
Switch wgt::StepParse to use WidgetConfigParser class

Handlers and rules of parsing will be defined internally
in WidgetConfigParser class.

Requires submitted: https://review.tizen.org/gerrit/#/c/42492/

Change-Id: Iae90067d0d930afc0245cd9264ddbe11bdc8109d

9 years agoAuthor signature match check during update installation 50/41950/2
Tomasz Iwanek [Thu, 11 Jun 2015 13:06:15 +0000 (15:06 +0200)]
Author signature match check during update installation

Author certificate of updated version of widget must match
the author certificate of already installed version.

Change-Id: Id86d2330ecbdb2b22bcfb6154f6f1b350b37c9f1

9 years agoSave author certificate to pkgmgr database 49/41949/3
Tomasz Iwanek [Fri, 12 Jun 2015 09:01:12 +0000 (11:01 +0200)]
Save author certificate to pkgmgr database

Registration and unregistation of package was moved to
pkgmgr_registration.cc.

Change-Id: I80c838983b16302b7bea1d2acfe4d271e8732901

9 years ago[XWALK-214] RDS support 51/42051/4
Wojciech Kosowicz [Fri, 12 Jun 2015 15:24:29 +0000 (17:24 +0200)]
[XWALK-214] RDS support

Implemented:
         * parsing rds_delta file
         * actions(add/delete/modify) on changed files
         * backup of files before modification
         * restoring files in case of failure
         * registering smack labels

Change-Id: Ia0fd00567d50c70588dc6f4af69c5c3f581cc006

9 years agoRemove unused xpk directory 64/42364/2 accepted/tizen/mobile/20150629.021649 accepted/tizen/tv/20150629.021700 accepted/tizen/wearable/20150629.021712 submit/tizen/20150629.014534
Tomasz Iwanek [Wed, 24 Jun 2015 12:32:33 +0000 (14:32 +0200)]
Remove unused xpk directory

Change-Id: I04e3032657684df5576be3374e830d5376f25b02

9 years agoRemove unused dependencies from spec file 63/42363/2
Tomasz Iwanek [Wed, 24 Jun 2015 12:02:21 +0000 (14:02 +0200)]
Remove unused dependencies from spec file

Change-Id: I760c21283ea152dcb10cb80db83e515b793ab82a

9 years agoClean up 56/42356/2
Tomasz Iwanek [Fri, 26 Jun 2015 09:49:06 +0000 (11:49 +0200)]
Clean up

Needless copy.
Future commit will change type returned by get_icon_paths().

Change-Id: If01b152705ada315fdc7150bd510ab555dc21464

9 years agoFix in StepUpdateApplication. 08/42208/2
Pawel Sikorski [Wed, 24 Jun 2015 10:35:17 +0000 (12:35 +0200)]
Fix in StepUpdateApplication.

proper pkgmgr_parser function used in case update is done
for Global user

Change-Id: I8d238804e29724843b3e6e0ae2d867c7dc71f8d7

9 years agoCheck widget settings according to privilege level 48/41948/2
Tomasz Iwanek [Thu, 11 Jun 2015 08:11:12 +0000 (10:11 +0200)]
Check widget settings according to privilege level

Some of widget settings requires certain privilege level
to be accepted by installation process.

In current shape of wrt spec, only one setting is forcing
privilege level: background-vibration

Change-Id: Ie88f415d84421859c250a8c7a55c9102ceed6c4e

9 years agoPrivilege level check 71/41871/4
Tomasz Iwanek [Wed, 10 Jun 2015 14:48:30 +0000 (16:48 +0200)]
Privilege level check

Implementation of privilege level check with use of privilege-checker

Change-Id: Ie2a5c6e8b9c6450580a1700c3e6c339de5e1f217

9 years agoFix tct test - widget02 - br 12/42112/1
Tomasz Iwanek [Fri, 19 Jun 2015 13:14:06 +0000 (15:14 +0200)]
Fix tct test - widget02 - br

Add ContentHandler to wgt::StepParse

Change-Id: Idf6cd44c4c9a752bed63695b7257aa8ddec04f2a

9 years agoFix build error in step_generate_xml.cc 12/42012/1 accepted/tizen/mobile/20150622.041058 accepted/tizen/tv/20150622.041103 accepted/tizen/wearable/20150622.041115 submit/tizen/20150622.015024
WonYoung Choi [Mon, 22 Jun 2015 01:48:53 +0000 (10:48 +0900)]
Fix build error in step_generate_xml.cc

Change-Id: Ic8de16f871b98af400e32e7bb24fcd77498ce39b