platform/core/appfw/app-installers.git
9 years agoFix appcontrol on parse & generate xml 92/40592/3 accepted/tizen_3.0.2015.q2_common tizen_3.0.2015.q2_common accepted/tizen/3.0.2015.q2/common/20150609.181940 accepted/tizen/3.0.2015.q2/common/20150615.091813 accepted/tizen/common/20150609.084321 accepted/tizen/mobile/20150609.085839 accepted/tizen/tv/20150612.003522 accepted/tizen/wearable/20150609.085900 submit/tizen/20150605.114228 submit/tizen_3.0.2015.q2_common/20150609.170642 submit/tizen_3.0.2015.q2_common/20150615.075539 submit/tizen_tv/20150611.000000
Sangyoon Jang [Fri, 5 Jun 2015 09:05:26 +0000 (18:05 +0900)]
Fix appcontrol on parse & generate xml

this patch is related with:
https://review.tizen.org/gerrit/#/c/40506/

Change-Id: If9e9eb900d688e794a3436e64a4e4c10662adfd2
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
9 years agoCopy icon file instead of move that 63/40363/2 accepted/tizen/common/20150605.073020 accepted/tizen/mobile/20150605.091908 accepted/tizen/tv/20150605.091842 accepted/tizen/wearable/20150605.091854 submit/tizen/20150604.022621
Inhwan Lee [Wed, 3 Jun 2015 04:21:56 +0000 (13:21 +0900)]
Copy icon file instead of move that

Icon file should copy at location of icon path, not move.
Original icon can  use some test suite. (eg. web-tct-sp02-wrt-tests)
The issue can find in JIRA system (http://168.219.209.56/jira/browse/XWALK-320)

Change-Id: I18c4b4966fda497f2339526865864c13a856b053

9 years agoFix step_generate_xml 64/40364/1
Sangyoon Jang [Wed, 3 Jun 2015 04:48:09 +0000 (13:48 +0900)]
Fix step_generate_xml

add null check

Change-Id: Ic164b0975d0894e2c8b67f7b96d860fa33b6e019
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
9 years agoWorkaround for update installation detection 11/40011/2 accepted/tizen/common/20150529.082356 accepted/tizen/mobile/20150529.101113 accepted/tizen/tv/20150529.101058 submit/tizen/20150529.052307
Tomasz Iwanek [Tue, 26 May 2015 13:31:41 +0000 (15:31 +0200)]
Workaround for update installation detection

This workaround is provided as pkgmgr requested.

This should be removed as soon as pkgmgr will handle
update detection and be passing correct options.

Removal of this should be easy as it is not modifing any flow
in installer.

Depends on pkgmgr: https://review.tizen.org/gerrit/#/c/38771/

Change-Id: Idae3b4ffd7842babc555c717986fe9beac39fece

9 years agoExtracting unzipping to file utils 02/40002/1
Tomasz Iwanek [Tue, 26 May 2015 13:41:45 +0000 (15:41 +0200)]
Extracting unzipping to file utils

Change-Id: I7175e87bcecc6dd3463d1c80704f72e509e037c5

9 years agoSingle app package support including service app 68/39968/1
Youmin Ha [Wed, 27 May 2015 05:36:38 +0000 (14:36 +0900)]
Single app package support including service app

To run Tizen TCT packages, single-app packages having only service apps
must be able to be installed. This commit enables installing app packages
having only service apps.
  - Removed mandatory ui-application app checking routine.
  - Added a routine checking the existance of at least 1 ui or service app.
  - Additional code for <service-application> attributes in
    step_generate_xml.cc.

Change-Id: Iaac04f6fb20055fe06ca6b3a67294c9354695ec0
Signed-off-by: Youmin Ha <youmin.ha@samsung.com>
9 years agoFix a log tag in step_register_app module 67/39967/1
Youmin Ha [Wed, 6 May 2015 04:52:47 +0000 (13:52 +0900)]
Fix a log tag in step_register_app module

Even after renaming the module, still the log tag was not changed.
This small fix changes the tag name to make clear where the log is
from.

Change-Id: Iabeace9462e33716c6c0d7109eccb20617eceeea

9 years agoElement-based localization for name, short_name, description 45/39245/2 accepted/tizen/common/20150528.081131 accepted/tizen/mobile/20150528.114807 accepted/tizen/tv/20150528.114754 submit/tizen/20150526.142430
Tomasz Iwanek [Tue, 28 Apr 2015 11:48:43 +0000 (13:48 +0200)]
Element-based localization for name, short_name, description

Value of name, short_name and description should affect platform
manifest fields: label and description.

Change-Id: Icf8fde530bb533f24d64810e46eb5608367aeac8

9 years ago[AppInstaller] Added definition of profile in spec 88/39188/1 accepted/tizen/common/20150522.093900 accepted/tizen/mobile/20150526.000931 accepted/tizen/tv/20150522.070935 submit/tizen_common/20150522.999999 submit/tizen_mobile/20150522.061520 submit/tizen_mobile/20150525.122912 submit/tizen_tv/20150522.061310
Wojciech Kosowicz [Thu, 7 May 2015 13:48:50 +0000 (15:48 +0200)]
[AppInstaller] Added definition of profile in spec

Change-Id: I4115f82847de3ab9a0c54361035c58f60982d1d7
Signed-off-by: Wojciech Kosowicz <w.kosowicz@samsung.com>
9 years agoCorrections related to API changes of manifest parser 88/38688/4 accepted/tizen/common/20150506.154039 accepted/tizen/common/20150507.063715 accepted/tizen/mobile/20150506.234716 accepted/tizen/tv/20150506.233504 accepted/tizen/wearable/20150506.234526 submit/tizen/20150506.143702 submit/tizen/20150506.144342
Jakub Izydorczyk [Tue, 21 Apr 2015 10:10:38 +0000 (12:10 +0200)]
Corrections related to API changes of manifest parser

Corrections related to API changes in WidgetInfo
manifest data class.

Relies on chang3s introduced in: https://review.tizen.org/gerrit/#/c/38685/

Change-Id: I181ddaff894c8b64b71380d845bd7db8a1768ba9

9 years agoSkeloton for update installation 27/38927/1
Tomasz Iwanek [Wed, 25 Mar 2015 15:24:11 +0000 (16:24 +0100)]
Skeloton for update installation

Tizen-JIRA: TC-2482

Change-Id: I8d0c0b18f8732360c32e99dbb03c0088436ff854

9 years ago[CopyBackup] Added step for update installation 26/38926/1
Tomasz Iwanek [Wed, 25 Mar 2015 12:34:45 +0000 (13:34 +0100)]
[CopyBackup] Added step for update installation

Tizen-JIRA: TC-2482

Change-Id: I8c366e911b218ec363959812db7b0e268b8da4ae

9 years agoFix StepBackupManifest::precheck 25/38925/1
Tomasz Iwanek [Thu, 30 Apr 2015 11:19:12 +0000 (13:19 +0200)]
Fix StepBackupManifest::precheck

Change-Id: Ia6c0c0b82c0a71afb6275ccc19fb0e091802f5e7

9 years agoFix uninstallation - StepRevokeSecurity - remove check of context_->application_path 43/38843/2 accepted/tizen/common/20150430.095307 accepted/tizen/mobile/20150430.124908 accepted/tizen/tv/20150430.124108 accepted/tizen/wearable/20150430.124539 submit/tizen/20150430.084041
Tomasz Iwanek [Tue, 28 Apr 2015 10:23:03 +0000 (12:23 +0200)]
Fix uninstallation - StepRevokeSecurity - remove check of context_->application_path

This path doesn't exist because files are removed before
security is revoked (otherwise they couldn't be).

Change-Id: I54136e38a4b4bc5ccdfa2804eb7162b80fc05487

9 years ago[Gardening] Several fixes 70/38770/1
Tomasz Iwanek [Thu, 2 Apr 2015 09:28:50 +0000 (11:28 +0200)]
[Gardening] Several fixes

 - Byte size literals,
 - use nullptr,
 - some TODOs solved or removed,

Change-Id: I50517cf4c54b1d3134a7d6bbe98b556e15432f23

9 years ago[Unit tests] Add script run-unit-tests.sh 35/38635/2
Jakub Izydorczyk [Thu, 2 Apr 2015 10:12:55 +0000 (12:12 +0200)]
[Unit tests] Add script run-unit-tests.sh

Script runs all unit tests for app-installer.
After all the results are available in xml files in
/usr/bin/app-installers-ut/ directory.

Change-Id: Ibe8ecd349b272cd00ad1761d906f548ca7ce4321

9 years ago[BackupIcons] Added step for update installation 18/38518/2
Tomasz Iwanek [Wed, 25 Mar 2015 11:19:08 +0000 (12:19 +0100)]
[BackupIcons] Added step for update installation

Tizen-JIRA: TC-2482

Change-Id: I76870b774aac8f7cb81624de8c66a09bd8b8eee9

9 years ago[UpdateApplication] Added step for update installation 17/38517/2
Tomasz Iwanek [Tue, 24 Mar 2015 17:16:57 +0000 (18:16 +0100)]
[UpdateApplication] Added step for update installation

Tizen-JIRA: TC-2482

Change-Id: Ib0b2a60ba003fa81c9eaeb7c4df16fb97bdf7c21

9 years agoRefactoring StepRecord 16/38516/2
Tomasz Iwanek [Tue, 24 Mar 2015 17:05:48 +0000 (18:05 +0100)]
Refactoring StepRecord

Initialization of user/global databases should not
be done in rollback of one step.

Tizen-JIRA: TC-2482

Change-Id: Ia0cd64a993d08a4781b642c75993d7a268e38f2f

9 years agoCreating root directory if not existing 23/38523/3
Wojciech Kosowicz [Tue, 21 Apr 2015 13:53:09 +0000 (15:53 +0200)]
Creating root directory if not existing

Change-Id: I7e6e6039ec9db1ab8e6bbcd52722a65479533786
Signed-off-by: Wojciech Kosowicz <w.kosowicz@samsung.com>
9 years agoFix result checking 63/38563/2
Sangyoon Jang [Wed, 22 Apr 2015 06:39:09 +0000 (15:39 +0900)]
Fix result checking

pkgmgr_installer_receive_request returns 0 when complete successfully

Change-Id: I367292b035e79ee1860a07b9b83c3efed0bffa2d
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
9 years ago[BackupManifest] Added step for update installation 15/38515/1
Tomasz Iwanek [Tue, 24 Mar 2015 16:12:12 +0000 (17:12 +0100)]
[BackupManifest] Added step for update installation

Tizen-JIRA: TC-2482

Change-Id: I09cfd57bf0edb9d2851fe49f02b4fdc11202e854

9 years ago[UpdateSecurity] Added step for update installation 14/38514/1
Tomasz Iwanek [Tue, 24 Mar 2015 15:52:28 +0000 (16:52 +0100)]
[UpdateSecurity] Added step for update installation

Tizen-JIRA: TC-2482

Change-Id: I2c2a60be64df60ad9d20f6cfce0733aecfd0eac5

9 years ago[OldManifest] Added step for update installation 13/38513/1
Tomasz Iwanek [Tue, 24 Mar 2015 15:35:34 +0000 (16:35 +0100)]
[OldManifest] Added step for update installation

Tizen-JIRA: TC-2482

Change-Id: I37848449f6a6e199d796c2f01edbee422471591c

9 years agoAdd old_manifest_data property to context for update 12/38512/1
Tomasz Iwanek [Tue, 24 Mar 2015 15:22:00 +0000 (16:22 +0100)]
Add old_manifest_data property to context for update

Update installation will use this value to
restore security context if needed on rollback
operation.

For now, I'm leaving one context per all installation
types.

Tizen-JIRA: TC-2482

Change-Id: If0143e9036bd2149a0a1ba1d2aa359441785540e

9 years agoBuildbreak fix. 02/38402/1
Pawel Sikorski [Mon, 20 Apr 2015 11:54:19 +0000 (13:54 +0200)]
Buildbreak fix.

Empty overriden "precheck" method added to StepConfigure

Change-Id: Ic107c38be8b3d8d71b1f2c66e5b2623d3f0471dd

9 years agoStepConfigure - new step responsible for the InstallerContext 11/38311/2
Pawel Sikorski [Tue, 14 Apr 2015 09:37:30 +0000 (11:37 +0200)]
StepConfigure - new step responsible for the InstallerContext
configuration.

Previously, AppInstaller included the general logic and some setup of
InstallerContext. However, InstallerContext should be only used within steps
(AppInstaller) should not mix the data and the logic.

Hence, Almost all context setup was moved to separate, new step - Configure

Change-Id: I508d2383bd6fca66326aa18df1bedb6f52fae3a6

9 years agoremoval of not needed method call. 07/38207/5
Pawel Sikorski [Tue, 14 Apr 2015 10:00:25 +0000 (12:00 +0200)]
removal of not needed method call.

PkgmgrSingal::SendProgress method will just return false, if
state != Statue::Started.
This condition is always true in the beginning of Run() method.
Hence, this method will not perform anything.

Change-Id: I2ff46b156c931e9259fb434179a2a687a7ba93fa

9 years agoMerge "Adding Samsung License to files modified by Samsung engineers Adding Samsung...
Baptiste DURAND [Thu, 16 Apr 2015 12:10:12 +0000 (05:10 -0700)]
Merge "Adding Samsung License to files modified by Samsung engineers Adding Samsung engineers to AUTHORS files" into tizen

9 years agoIntroducing "precheck" method for each step. 84/37984/5
Pawel Sikorski [Wed, 8 Apr 2015 12:28:58 +0000 (14:28 +0200)]
Introducing "precheck" method for each step.

Precheck method should verify, if all necessary input data has been provided.
It returns OK on success (all necessary data has been provided to perform
"process" method).

Appinstaller, for each step, calls these methods in following order:
for(step: steps) {
  ...
  if (step->precheck() != Step::Status::OK)
    break;
  step->process();
  ...
}

TODO:
* step_parse for WGT and TPK should introduce it
* step_create_symbolic_link for WGT and TPK should introduce it

Change-Id: Ibd506603bfb5c152723bae13e56301b517e94b2b

9 years agoAdding Samsung License to files modified by Samsung engineers 13/38313/1
Pawel Sikorski [Wed, 15 Apr 2015 16:15:39 +0000 (18:15 +0200)]
Adding Samsung License to files modified by Samsung engineers
Adding Samsung engineers to AUTHORS files

Change-Id: I58001e73e7d9605cf92ae6a50e161bb18a8616f4

9 years agoExtract MoveDir() to utils 56/38256/1
Tomasz Iwanek [Fri, 27 Mar 2015 08:26:38 +0000 (09:26 +0100)]
Extract MoveDir() to utils

Change-Id: Iae4d60d42b9c90003de4ed23070c9e34d358991d

9 years agoQuickfix context->application_path 55/38255/1
Tomasz Iwanek [Tue, 14 Apr 2015 10:19:41 +0000 (12:19 +0200)]
Quickfix context->application_path

This field was set in context installer constructor where pkgid is
not yet available in installation case.

Change-Id: Ida6f97c763a2f3eec780d0c73fef08562de7547b

9 years agoContext paths types changed to boost::filesystem::path 54/38254/1
Tomasz Iwanek [Wed, 1 Apr 2015 14:41:31 +0000 (16:41 +0200)]
Context paths types changed to boost::filesystem::path

Change-Id: Ic82ebf53ecbae4029c39332e6fd057719d93a78d

9 years ago[Manifest parser] Remove manifest parser 96/38196/1 accepted/tizen/common/20150416.084921 accepted/tizen/mobile/20150416.085628 accepted/tizen/tv/20150416.085448 accepted/tizen/wearable/20150416.085552 submit/manif/20150414.123915 submit/tizen/20150414.124003 submit/tizen/20150415.080223
Jakub Izydorczyk [Fri, 10 Apr 2015 10:01:41 +0000 (12:01 +0200)]
[Manifest parser] Remove manifest parser

Remove manifest-parser due to moving it to
separate repository.

Change-Id: I99dc8f7f363f0fed98a97a172643914b159aed04

9 years agoRevert "Xml manifest path in InstallerContext" 93/38193/1
Wojciech Kosowicz [Mon, 13 Apr 2015 13:32:12 +0000 (15:32 +0200)]
Revert "Xml manifest path in InstallerContext"

This commit needs to be reverted as it is removing setting up
variable which is later used in generating xml. Therefore
widgets do not install as crash occurs when calling function
on empty variable

Change-Id: Ic91a94851e00c35e4fa5bcd77c90b4dc556b7562
Signed-off-by: Wojciech Kosowicz <w.kosowicz@samsung.com>
9 years agoFix rollback for installation mode 26/37426/4
Tomasz Iwanek [Mon, 30 Mar 2015 10:18:59 +0000 (12:18 +0200)]
Fix rollback for installation mode

There is an issue when we rollback an operation after appling
SMACK labels to widgets files.

In rollback security context is revoked before removing files
of widget. This will cause failure on rollback because
installer will try to remove files that it has no access to.

Bug-Tizen: TC-2484

Change-Id: Ic171732de546a62dd451be0ae39abdae18e76628

9 years agoXml manifest path in InstallerContext 45/37945/2
Tomasz Iwanek [Fri, 27 Mar 2015 13:26:55 +0000 (14:26 +0100)]
Xml manifest path in InstallerContext

This commit changes xml_path type to fs::type.
It also removes unnecessary setting from step_generate_xml

Change-Id: I2bc99da823959a4968802ca47367b6b1f2fca57c
Signed-off-by: Pawel Sikorski <p.sikorski@samsung.com>
9 years agoRemove hardcoded library path from PC files 15/38015/1
Baptiste DURAND [Thu, 9 Apr 2015 13:07:48 +0000 (15:07 +0200)]
Remove hardcoded library path from PC files

BUG-Tizen:https://bugs.tizen.org/jira/browse/TC-2492

Change-Id: I5e69865c214b63401658d4602af080bb9b5bb190
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
9 years ago[Manifest parser] Create devel package, add new rpm 16/37916/4
Jakub Izydorczyk [Tue, 7 Apr 2015 08:40:53 +0000 (10:40 +0200)]
[Manifest parser] Create devel package, add new rpm

Create manifest-parser devel package,
add manifest-parser.pc pkgconfig file.
This also creates new rpm package for manifest parser
from, which app-installers should be dependant.

Change-Id: I70a744d138bce12eccb90705f80a2d1665cf91f4

9 years ago[Manifest parser] Separate filling manifest_x into few steps 89/37989/2
Jakub Izydorczyk [Fri, 3 Apr 2015 12:44:39 +0000 (14:44 +0200)]
[Manifest parser] Separate filling manifest_x into few steps

Separate filling manifest_x structure into steps:
- filling widget info
- filling application info
- filling icon paths
- filling privileges
- filling app control

Change-Id: Ie4ea566bb797d2b7af196899663ff74342a1b493

9 years agoRemove assert checking for existance of widget package file 88/37988/3
Jakub Izydorczyk [Fri, 6 Mar 2015 12:12:53 +0000 (13:12 +0100)]
Remove assert checking for existance of widget package file

Remove assert, which checks if widget package file exsits
and replace it with checks from boost lib for file existence and
return error on failure.

Change-Id: I75dd117d85bef0fe1313da8a2510fe5bd6673dc7

9 years ago[Unit tests] Add unit tests for signature 32/37932/3
Jakub Izydorczyk [Mon, 16 Feb 2015 08:33:20 +0000 (09:33 +0100)]
[Unit tests] Add unit tests for signature

3/3 tests PASS

Change-Id: I45e1e41b8e94ac171e75ad4e047cbd0d5379bb3b

9 years agoAllowing multiple instances of PkgmgrSignal. 25/37925/2
Pawel Sikorski [Fri, 3 Apr 2015 12:41:32 +0000 (14:41 +0200)]
Allowing multiple instances of PkgmgrSignal.

This commit unifies states between multiple instances of
PkgmgrSignal objects (using static variable).

Change-Id: I698c509c60533534c49ba29f537aca0e56ae63a9

9 years agoRemoval of request_type property from InstallerContext. 24/37924/2
Pawel Sikorski [Fri, 3 Apr 2015 11:56:37 +0000 (13:56 +0200)]
Removal of request_type property from InstallerContext.

It is not used anywhere.

Change-Id: I6efd669e8b1827bb37659db0f13543029283aa31

9 years agoIntroducing PkgMgrInterface to separate app-installer from 23/37923/2
Pawel Sikorski [Fri, 3 Apr 2015 11:36:27 +0000 (13:36 +0200)]
Introducing PkgMgrInterface to separate app-installer from
external library.

TODO:
* PkgMgrSignal should be refactor. Possibly, it could inherit from
  PkgMgrInterface

Change-Id: I3f934674aec54c69073a122fcb4b71e16a94565f

9 years ago[Signal] Sending progess to pkgmgr 67/37767/2
Tomasz Iwanek [Thu, 19 Mar 2015 15:20:34 +0000 (16:20 +0100)]
[Signal] Sending progess to pkgmgr

Simple approach, calculate progress:

  progress = numberOfStepExecuted * 100 / totalNumberOfSteps

No point to make it harder by now, IMO.

Change-Id: If20174e3756e1c087d8cac8fd4704bb82c1d5d13

9 years ago[Signal] Send 'error' code to pkgcmd 66/37766/2
Tomasz Iwanek [Thu, 19 Mar 2015 10:41:56 +0000 (11:41 +0100)]
[Signal] Send 'error' code to pkgcmd

All logic calling SignalPkgmgr class was moved to
AppInstaller class.

Change-Id: Ic99423abab4eaf5f239a27104b653e1dd12a8ad2
Signed-off-by: Pawel Sikorski <p.sikorski@samsung.com>
9 years agoFix for not closed app-control element during xml generation 10/37910/1
Jakub Izydorczyk [Wed, 8 Apr 2015 08:38:56 +0000 (10:38 +0200)]
Fix for not closed app-control element during xml generation

Commit https://review.tizen.org/gerrit/#/c/36834/ introduced
bug related to not closing app-control element and as a result
privilege element is inserted into ui-application element and
manifest don't pass validation.

Change-Id: If6e50fe196ffe783d307d80fb48821eb87a2da94

9 years agoBring to common xml generation code 34/36834/3
Jakub Izydorczyk [Thu, 5 Mar 2015 12:48:33 +0000 (13:48 +0100)]
Bring to common xml generation code

Make template function for generating common xml code
for uiapplication_x and serviceapplication_x

Make template funct

Change-Id: Iface15d6aed7055da0b42ba04ca374c8964cb880

9 years agoIntroducing "Property" for ContextInstaller. 32/37632/3
Pawel Sikorski [Wed, 1 Apr 2015 09:21:51 +0000 (11:21 +0200)]
Introducing "Property" for ContextInstaller.

Currently, ContextInstaller contains attributes (declared as private).
And each attribute has its setter and getter defined.

Property hides declaration of these setters/getters.

TODO:
* Pi (PkgmgrSignal)

Change-Id: Iba6e8a796b54468798b35e708a8ecee03ec53988

9 years agoUnification of manfiest parser 79/37679/3
Jakub Izydorczyk [Tue, 17 Mar 2015 13:30:12 +0000 (14:30 +0100)]
Unification of manfiest parser

This change includes changes according to architecture
planned in https://bugs.tizen.org/jira/browse/TC-2472
Further changes will be made later in next commits.

Change-Id: I9b3f2c9d340994b0248ba002d06effc70f30bffd

9 years agoadd manifest for tpk backend 26/37526/2 accepted/tizen/common/20150331.085109 accepted/tizen/tv/20150402.041725 submit/tizen_common/20150330.150902 submit/tizen_tv/20150401.112323
Baptiste DURAND [Mon, 30 Mar 2015 12:17:34 +0000 (14:17 +0200)]
add manifest for tpk backend

Change-Id: I5d632d00f86619111f222923c82f1d39da735621
Signed-off-by: Baptiste DURAND <baptiste.durand@gmail.com>
9 years agoRename: 20/37520/1
Pawel Sikorski [Fri, 27 Mar 2015 13:54:08 +0000 (14:54 +0100)]
Rename:
* StepSecurity -> StepRegisterSecurity
* StepSignature -> StepCheckSignature
* StepRemove -> StepRemoveFiles
* StepSymbolicLink -> StepCreateSymbolicLink
* StepRecord -> StepRegisterApplication
* StepUnregister -> StepUnregisterApplication

Most of the steps contain verb and noun in their names.
Hence, commit unifies all steps to follow this rule.

Change-Id: I59114dc41385b16e4661e23cd38fcb65637289a3

9 years ago[Unittest] service_handler_unittests 41/37441/2
Tomasz Iwanek [Mon, 23 Mar 2015 10:05:19 +0000 (11:05 +0100)]
[Unittest] service_handler_unittests

This commit removes checks on GetManifestData()
as it ws used for multithreading purpose in crosswalk.

Change-Id: I2c3a19f834bb2af02f9319008ed813d427b2460c

9 years ago[Parser] Add tizen:service handler 40/37440/2
Tomasz Iwanek [Fri, 20 Mar 2015 15:29:36 +0000 (16:29 +0100)]
[Parser] Add tizen:service handler

Spec: #1730

https://source.tizen.org/sites/default/files/page/tizen-2.3-wrt-core-spec.pdf

ValidateTizenApplicationId() was extracted due to use in multiple handlers.

Change-Id: I2c86d6a8f3e73709c57447781f96d62cb3cb8029

9 years agoAvailable Storage Check 56/37256/3
Tomasz Iwanek [Mon, 16 Mar 2015 13:38:57 +0000 (14:38 +0100)]
Available Storage Check

Solution calculates space needed for files.
This will ignore space for directories/icons/manifests but
in overall will prevent unneccesary unzipping the archive
in most cases.

Change-Id: Ib8e81c4cb56e771347a128021ece53e4cf2c9fce

9 years ago[Copy] Move files instead of copy if possible 55/37255/2
Tomasz Iwanek [Thu, 12 Mar 2015 14:25:06 +0000 (15:25 +0100)]
[Copy] Move files instead of copy if possible

If move is not possible then fall back to copy/remove.

Change-Id: Icf2dbbf63b772ae6eccb4682a4295b397ca91548

9 years agoSupport full spec of tpk manifest xml 47/37247/3
Youmin Ha [Mon, 23 Mar 2015 10:19:17 +0000 (19:19 +0900)]
Support full spec of tpk manifest xml

With this commit, the tpk backend parses the full spec of the
tizen-manifest.xml.

* Multiple children having same name are parsed well.
* <author>, <service-application> are parsed.
* More attributes which are in the spec but not parsed are
  supported.

Change-Id: I67689841125bb97048fa10accddab8e7e3839984
Singed-Off-By: Youmin Ha <youmin.ha@samsung.com>
9 years agoFix UTF8CharLength 87/37387/1
Tomasz Iwanek [Wed, 25 Mar 2015 12:53:16 +0000 (13:53 +0100)]
Fix UTF8CharLength

This function is wrong because of char's 'signness' is
implementation defined.

C++ standard doesn't define char as unsigned char.
Basically,
  char != signed char
  char != unsigned char

This was ok for arm architeture but not for x86.
This overlook caused calculated length of character
to be wrong.

Change-Id: Ifd826ae38098e78da8de858fd5720a6a3dc46a38

9 years agoMerge "Allow optional elements in tpk manifest xml" into tizen
Baptiste DURAND [Mon, 23 Mar 2015 13:56:58 +0000 (06:56 -0700)]
Merge "Allow optional elements in tpk manifest xml" into tizen

9 years agoMove/rename widget-manifest-parser 69/36869/5
Tomasz Iwanek [Fri, 20 Feb 2015 09:36:39 +0000 (10:36 +0100)]
Move/rename widget-manifest-parser

Simplify naming and remove underscores in directory name.

Change-Id: I3df8b3212c70e6456e8cc47c0e3f263c1ebdc514

9 years ago[Security] Fix passing path in StepRevokeSecurity::undo() 80/37180/1
Tomasz Iwanek [Tue, 17 Mar 2015 13:48:55 +0000 (14:48 +0100)]
[Security] Fix passing path in StepRevokeSecurity::undo()

RegisterSecurityContextForApps() takes path to the root of
application (where the index.html is located).

Same as in: https://review.tizen.org/gerrit/#/c/36757/

Change-Id: Id46a569e4d140951edeecf7e7fba1c377c2b2daf

9 years agoAllow optional elements in tpk manifest xml 11/36911/4
Youmin Ha [Tue, 17 Mar 2015 04:47:33 +0000 (13:47 +0900)]
Allow optional elements in tpk manifest xml

Some xml elements are optional, thus they can be omitted in the
tizen-manifest.xml.
This patch allows those elements to be omitted.
In addition, null checking routine in common/step/step_generate_xml.cc
is added, because if there is no description in tizen-manifest.xml,
manifest_x->description will be nullptr.

Change-Id: Ie37236b472011c9d516840cc9cda86b777a6a474
Signed-Off-By: Youmin Ha <youmin.ha@samsung.com>
9 years agoFix parser handlers 22/37122/2 accepted/tizen_3.0.2015.q1_common tizen_3.0.2015.q1_common accepted/tizen/3.0.2015.q1/common/20150320.110440 accepted/tizen/common/20150319.155422 accepted/tizen/mobile/20150326.005122 accepted/tizen/tv/20150324.014504 accepted/tizen/wearable/20150323.005717 submit/tizen_3.0.2015.q1_common/20150320.103259 submit/tizen_common/20150319.154254 submit/tizen_mobile/20150325.000000 submit/tizen_tv/20150320.000001 submit/tizen_wearable/20150320.000000
Tomasz Iwanek [Wed, 18 Mar 2015 15:10:39 +0000 (16:10 +0100)]
Fix parser handlers

In current execution flow, there is call of Parse() function
for each handler. Handler should be prepared for situation that
there is no value it expects.

Change-Id: Ib17ed3e4bbb5600397c9bf23cf140d0d064b8d29

9 years agoFix manfiest_util parsing localized text nodes 42/36842/3
Jakub Izydorczyk [Fri, 13 Mar 2015 13:03:44 +0000 (14:03 +0100)]
Fix manfiest_util parsing localized text nodes

manifest_util was was adding bidi control characters in front and
in the back twice, when dir attribute was specified.

Manifest util test results:
12/12 tests PASS

Change-Id: Ic83a766508f871607849c298d335e813b4484db7

9 years ago[Unitttests] string_utils_unittest 09/36109/5
Tomasz Iwanek [Fri, 20 Feb 2015 15:16:39 +0000 (16:16 +0100)]
[Unitttests] string_utils_unittest

This commit adds unit tests for 'src/utils/string_util.*'

Change-Id: I237ebe67f7f761afb5f6dfa5d6d648206e8f7d13

9 years agoFix tpk parser bug 37/36837/2
Youmin Ha [Mon, 16 Mar 2015 08:29:46 +0000 (17:29 +0900)]
Fix tpk parser bug

Fixed condition of judging children count of an element

Change-Id: I9547294a2c1b1018a0bed87e4eab656a61ed2e2e
Signed-Off-By: Youmin Ha <youmin.ha@samsung.com>
9 years agoPerform StepRevokeSecurity after StepRemove 46/37046/1
Rafal Krypa [Wed, 18 Mar 2015 11:07:19 +0000 (12:07 +0100)]
Perform StepRevokeSecurity after StepRemove

Revoking security configuration causes StepRemove to fail.
Application files are labeled with per-app Smack label.
Access to that label is part of security configuration which shouldn't
be revoked before files are uninstalled.

Change-Id: Ib41ca3b04324f307954c64fa93cdefaf9da0325b
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
9 years agoAdd missing unit tests for manifest util 41/36841/2
Jakub Izydorczyk [Fri, 13 Mar 2015 06:35:45 +0000 (07:35 +0100)]
Add missing unit tests for manifest util

10/12 tests PASSES

GetNodeText tests fails due to double addition
of bidi control characters

Change-Id: I766827bd7b61da469fd38376bdee1c6715034e2f

9 years agoRemove Manifest::Type from parser 35/36835/2
Jakub Izydorczyk [Fri, 6 Mar 2015 13:53:54 +0000 (14:53 +0100)]
Remove Manifest::Type from parser

Remove Manifest::Type, as this parser was supposed to be
only for config.xml from *.wgt applications.

Change-Id: Ie465f45c40d2c59492e3f9503132af8e47a4ccd0

9 years agoFix the path of each application passed to security manager 57/36757/4
Youmin Ha [Fri, 13 Mar 2015 05:14:46 +0000 (14:14 +0900)]
Fix the path of each application passed to security manager

Wrong path of each application was passed to the security manager. It
causes installation failure.
This commit fixes the installed application path.

Change-Id: I0b95e528ef2f4c41091b4e60bb9f42e1dce02333
Signed-Off-By: Youmin Ha <youmin.ha@samsung.com>
Signed-Off-By: Sangyoon Jang <s89.jang@samsung.com>
9 years agoReplace tpk manifest parser to XmlParser 04/36404/5
Youmin Ha [Thu, 5 Mar 2015 08:05:41 +0000 (17:05 +0900)]
Replace tpk manifest parser to XmlParser

Old manifest parser is replaced with the new general-purpose XmlParser.
With the XmlParser, the element hierarchy is fully preserved.
In addition, all exceptions are removed in this commit.

Change-Id: Id03384dc0b3c661bd876966bfbb3883b631cc68d
Signed-Off-By: Youmin Ha <youmin.ha@samsung.com>
9 years agoAdd 'app-control' manifest handler 74/36374/2
Tomasz Iwanek [Mon, 2 Mar 2015 14:48:14 +0000 (15:48 +0100)]
Add 'app-control' manifest handler

Change-Id: Ib06a69de03eddbac768c8ada921dfed60b33e006

9 years agoFix build break by applying new file_util namespace 56/36756/1
Youmin Ha [Fri, 13 Mar 2015 05:11:08 +0000 (14:11 +0900)]
Fix build break by applying new file_util namespace

With the commit f2251075, src/common/utils.h is moved to
src/utils/file_util.h, and the corresponding namespace is changed too.
But the commit did not fix the tpk source, and it causes build break.
This commit fixed the build break, and make the tpk installer work as
well.

Change-Id: Ibd55bdcb7dfcc460233c8f0bfcc7de5cdf8e236c
Signed-Off-By: Youmin Ha <youmin.ha@samsung.com>
9 years agoFix for passing compile flags correctly in cmake 11/36111/3
Tomasz Iwanek [Thu, 19 Feb 2015 15:11:24 +0000 (16:11 +0100)]
Fix for passing compile flags correctly in cmake

This fixes ApplyPkgConfig.cmake module.
Flags should be passed to target if there are present
in pkg-config. Skipping them, as it was done, may
lead to hidden errors in code.

Change-Id: I41c25b04e329d6379efb5736eea1973ce68d674c

9 years agoMove file_util.cc to utils 10/36110/2
Tomasz Iwanek [Mon, 23 Feb 2015 10:35:33 +0000 (11:35 +0100)]
Move file_util.cc to utils

Change-Id: Ida4e0c8c922549165f318b7ca3292d1a4fd381ba

9 years agoRemove version check in ApplicationData 79/36379/2
Jakub Izydorczyk [Thu, 5 Mar 2015 14:17:56 +0000 (15:17 +0100)]
Remove version check in ApplicationData

Remove getting manifest version attribute error code, as
according to w3c specification version attribute is optional
and can be any string.

Links to spec:
http://www.w3.org/TR/widgets/#the-version-attribute and
http://www.w3.org/TR/widgets/#version-attribute

Change-Id: I5d8192a34721d8e7c9ac08af70e98af9fd011dda

9 years agoFix issues with icon 78/36378/2
Jakub Izydorczyk [Thu, 5 Mar 2015 08:51:24 +0000 (09:51 +0100)]
Fix issues with icon

Fix generation of xml manifest when there is no icon defined in
config.xml. Fix checking if icon exists during fill manifest_x
structure.

Change-Id: I1c1700fc7918eb16a6c94fde77bf5b33818208d5

9 years agoFix string buffer overwrite 16/36216/2
Jakub Izydorczyk [Tue, 3 Mar 2015 13:15:29 +0000 (14:15 +0100)]
Fix string buffer overwrite

std::string uses static buffer for empty string values. When
std::transform iterates over initialized std::string elements
and copies their changed values to empty std::string by using
its random access iterator, the buffer which is used by
std::string for empty strings is overriden, what later makes
all strings, that are supposed to be empty, not empty.

Change-Id: I5acb9e038febabbf4b1e1d56d736f75dc227c0af

9 years agoFix string_utils.cc 65/35965/5
Tomasz Iwanek [Fri, 20 Feb 2015 15:16:39 +0000 (16:16 +0100)]
Fix string_utils.cc

This commit fixes mistake in EqualsUTF8Char function and
removes not needed parameter from CollapseWhitespaceUTF8

Change-Id: Idee35b3df00da7dd4938d0151bbd6c9a3ca6132c

9 years agoMerge "Fix generating app-control xml node in platform manifest" into tizen
Baptiste DURAND [Fri, 6 Mar 2015 10:16:38 +0000 (02:16 -0800)]
Merge "Fix generating app-control xml node in platform manifest" into tizen

9 years agoFix generating app-control xml node in platform manifest 80/36180/1
Tomasz Iwanek [Tue, 3 Mar 2015 08:19:29 +0000 (09:19 +0100)]
Fix generating app-control xml node in platform manifest

Change-Id: Ib6d6c2965f8b63e27c9455915c0f859fa200112a

9 years agoStylecheck fix 95/35995/2
Tomasz Iwanek [Mon, 16 Feb 2015 15:37:54 +0000 (16:37 +0100)]
Stylecheck fix

Change-Id: I9efb79ec07d84a6366c6f75307218d8a195ce5cf

9 years agoRemove compiler's warnings 06/36006/3
Tomasz Iwanek [Fri, 20 Feb 2015 08:43:28 +0000 (09:43 +0100)]
Remove compiler's warnings

Change-Id: I86fe2db1d6a947d9d8f5bcc1dad82698821024b4

9 years ago[Unit tests] Add unit test target and few unit tests. 63/35663/3
Jakub Izydorczyk [Thu, 5 Feb 2015 15:18:21 +0000 (16:18 +0100)]
[Unit tests] Add unit test target and few unit tests.

This patch adds tests target which includes unit tests executables:
- manifest_handler_unittest (3/3 tests PASS)
- manifest_unittest (2/2 tests PASS)
- manifest_util_unittest(2/2 tests PASS)
- values_unittest (20/20 tests PASS)
- widget_manifest_parser_unittest (2/2 tests PASS)

Tests are installed in /usr/bin/app-installers-ut directory.
Resources for tests are installed in /usr/share/app-installers-ut
directory.

Change-Id: I4883a1d4d6499cad3cde5e0b635467cfa042c513

9 years ago[Widget manifest parser] Remove C API from parser 70/35670/7 accepted/tizen/mobile/20150226.042759 accepted/tizen/tv/20150226.042103 accepted/tizen/wearable/20150226.042547 submit/tizen_mobile/20150226.015302 submit/tizen_tv/20150226.015241 submit/tizen_wearable/20150226.015251
Jakub Izydorczyk [Wed, 18 Feb 2015 08:57:12 +0000 (09:57 +0100)]
[Widget manifest parser] Remove C API from parser

Change C API functions into class containing ParseManifest,
GetShortName and GetRequiredAPIVersion methods, which allow
removal of additional data structure used for containing
config.xml data which are not part of manifest_x

Change-Id: I56ea88500de2a5a9838326f7c432276c02d18095

9 years agoAdd TPK backend 86/35086/11
Youmin Ha [Fri, 30 Jan 2015 04:38:00 +0000 (13:38 +0900)]
Add TPK backend

Native tpk backend implementation: First version.
Only simple tizen-manifest.xml format can be parsed for now.

Signed-Off-By: Youmin Ha <youmin.ha@samsung.com>
Change-Id: I95037fa6b08639c6dd008d0ffb796cfd375c8060

9 years agoFix bug in traversing pkgmgr-info lists again 45/35845/1
Youmin Ha [Wed, 25 Feb 2015 09:42:58 +0000 (18:42 +0900)]
Fix bug in traversing pkgmgr-info lists again

Same issue to a5cb75ca.
This commit prevents segfault from accessing null pointer.

Change-Id: I0aac62923a5948f067c54b05b3edb88d39736c0e
Signed-Off-By: Youmin Ha <youmin.ha@samsung.com>
9 years agoFix bug in traversing pkgmgr-info lists 25/35825/2
Youmin Ha [Wed, 25 Feb 2015 06:42:24 +0000 (15:42 +0900)]
Fix bug in traversing pkgmgr-info lists

When the list is null, the LISTADD macro raises segfault.
Added null check routine on the macro in app-installer.

Basically this bug must be fixed in the pkgmgr-info, not here.

Change-Id: I8aa557c59c5771a817899e8fdb21349fd88ba511
Signed-Off-By: Youmin Ha <youmin.ha@samsung.com>
9 years agoFix build error in wgt 88/35788/3
Youmin Ha [Tue, 24 Feb 2015 14:12:42 +0000 (23:12 +0900)]
Fix build error in wgt

ReleaseData() method returns nothing, but the current code tries to
get a return value from it. This patch removes the return value
cheching.
If the return value checking is really needed, the definition of
the method must be modified.

Change-Id: I22975cb10c64cef114a4ece58aafbec5257ec373
Signed-Off-By: Youmin Ha <youmin.ha@samsung.com>
9 years ago[Signature] Fix double log 71/35671/5
Jakub Izydorczyk [Wed, 18 Feb 2015 15:12:03 +0000 (16:12 +0100)]
[Signature] Fix double log

In case of invalid signature there was double log:
"Signature * is INVALID
 Signature * is OK"
This fix this bug.

Change-Id: Ief1f119f8317c36b3ed0b230081a633431c01e69

9 years ago[Widget-manifest-parser] Remove LocalManifestData 69/35669/2 submit/tizen_mobile/20150224.012613 submit/tizen_tv/20150224.012600 submit/tizen_wearable/20150224.012608
Jakub Izydorczyk [Wed, 4 Feb 2015 15:21:07 +0000 (16:21 +0100)]
[Widget-manifest-parser] Remove LocalManifestData

Clean up in widget_manifest_parser.cc file, which
includes removal of LocalStorage and LocalManifestData.

Change-Id: Ie09349504fe014ac807253f4de87c19dc98e2522

9 years ago[Signature] Add XMLSEC_NO_SIZE_T flag to cmake 64/35664/2
Jakub Izydorczyk [Thu, 19 Feb 2015 15:04:02 +0000 (16:04 +0100)]
[Signature] Add XMLSEC_NO_SIZE_T flag to cmake

This flag is needed, because otherwise _xmlSecDSigCtx structure
will use size_t in app-installers and unsigned int in xmlsec1 for sizes
As a result structure size in function from xmlsec1 will differ from
size in app-installers

Change-Id: I241d04d95ef6297f982bd95d6220b1782e6f7981

9 years agoRemove label element under manifest 14/35514/4
Youmin Ha [Tue, 17 Feb 2015 04:39:25 +0000 (13:39 +0900)]
Remove label element under manifest

'manifest' element doesn't have 'label' child element. This commit
removes unnecessary label element.

Change-Id: I6d8a68ea702c2ea30ec0c5ed316873e503e632be

9 years agoAdd error logs on revoke_security step 13/35513/4
Youmin Ha [Tue, 17 Feb 2015 03:47:30 +0000 (12:47 +0900)]
Add error logs on revoke_security step

In addition, an error message is printed as an error, not a debug
message.

Change-Id: I1adb4fe8615a33652d3b00875adad52a6c9627d4
Signed-Off-By: Youmin Ha <youmin.ha@samsung.com>
9 years agoFix wrong manifest xml file name 11/35511/4
Youmin Ha [Tue, 17 Feb 2015 02:52:55 +0000 (11:52 +0900)]
Fix wrong manifest xml file name

The manifest file name is wrong. Desired xml filename is
'org.tizen.hello.xml', but the current implementation removes last
extension and put '.xml' at the end.
This commit fixes the name of the generated manifest xml file.
For wgt packages, '*.wgt.xml' is present, but that's not the issue.

Change-Id: I57e2506898f17c0853fa42f3172225b69cd9819c
Signed-Off-By: Youmin Ha <youmin.ha@samsung.com>
9 years agoFix bugs in common steps 10/35510/4
Youmin Ha [Mon, 16 Feb 2015 12:52:17 +0000 (21:52 +0900)]
Fix bugs in common steps

* Fixed generating xml routine, that each privilege have its value
  as a data, not a 'name' attribute.
* Changed the iteration routine, from the first item of the privilege
  list.
* Excluded routine removing xml file, from the 'undo' phase of the
  step_record.

Change-Id: Ied4ff4a48ab0a62f93fbb4fac40faa00952eaefe
Signed-Off-By: Youmin Ha <youmin.ha@samsung.com>
9 years agoRefactor name unpack_directory() 85/35085/6
Youmin Ha [Wed, 4 Feb 2015 13:45:47 +0000 (22:45 +0900)]
Refactor name unpack_directory()

The method unpack_directory() just returns the unpack_directory string,
    but its name implies for class users to "Unpack the directory".
    This commit changes the name from unpack_directory to
    unpacked_dir_path, of the getter, setter, and private variables.

Change-Id: I7259bbb3c8630d7464a98707162d955de45c9432

9 years agoGive the package type as a AppInstaller object 05/34805/6
Youmin Ha [Tue, 3 Feb 2015 04:55:58 +0000 (13:55 +0900)]
Give the package type as a AppInstaller object

To send a start/end/progress DBUS signal, client needs to know the
package type as a string. This patch adds an argument package_type on
the AppInstaller constructor, and stores it into the ContextInstaller.

Change-Id: I18a7770dbb706a6ab72cce6010d348fda4d47137