platform/core/appfw/app-installers.git
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

9 years agoMerge "Create '.applications/manifest/' if not exist" into tizen
WonYoung Choi [Mon, 22 Jun 2015 01:19:27 +0000 (18:19 -0700)]
Merge "Create '.applications/manifest/' if not exist" into tizen

9 years agoMerge "Fix stylecheck and warnings" into tizen
WonYoung Choi [Mon, 22 Jun 2015 01:18:43 +0000 (18:18 -0700)]
Merge "Fix stylecheck and warnings" into tizen

9 years agoSimplify repository structure (remove utils lib target) 12/41812/3
Tomasz Iwanek [Wed, 10 Jun 2015 14:14:32 +0000 (16:14 +0200)]
Simplify repository structure (remove utils lib target)

Utils library was extracted to separate code imported from
crosswalk. As there is no more crosswalk code (signature was removed)
this structure could be simplified.

Before:
  utils <- signature <- common <- wgt/tpk

After:
  common (with utils) <- wgt/tpk

Additionally removed unused "native" directory.

Change-Id: I533f7d8864bd07766c2d488f952fb6a3e108de3d

9 years agoReimplement signature validation with cert-svc/vcore 11/41811/3
Tomasz Iwanek [Fri, 29 May 2015 14:53:17 +0000 (16:53 +0200)]
Reimplement signature validation with cert-svc/vcore

This commit does not introduce any new feature in app-installer.
Signature is reimplemented only. Prililege level check and
other check will be implemented afterwards.

Removed dependencies to openssl and xmlsec as we are using
cert-svc now.

Reworked basic tests about signature:
  "signature_unittest.cc"

Removed LICENSE-xwalk as it was not used anymore. All crosswalk
code was removed/moved to manifest-parser or rewritten.

Change-Id: I59462fd0e0082f5c2ec648caedebba8874e69ddf

9 years agoFix stylecheck and warnings 51/41951/1
Tomasz Iwanek [Wed, 17 Jun 2015 15:28:48 +0000 (17:28 +0200)]
Fix stylecheck and warnings

Change-Id: I65b18a60db3dfad37a9dd90fff1824531d0e99a7

9 years agoCreate '.applications/manifest/' if not exist 53/41953/1
Tomasz Iwanek [Thu, 18 Jun 2015 14:00:11 +0000 (16:00 +0200)]
Create '.applications/manifest/' if not exist

Change-Id: I5fc8e03e7dbd92a3581a38ad9c5f2834f809f6be

9 years agoMerge "Fix update detection in app-installers" into tizen
WonYoung Choi [Fri, 19 Jun 2015 02:06:06 +0000 (19:06 -0700)]
Merge "Fix update detection in app-installers" into tizen

9 years agoMerge "Set <label> of manifest file is depend by long name instead of short name...
WonYoung Choi [Fri, 19 Jun 2015 00:52:59 +0000 (17:52 -0700)]
Merge "Set <label> of manifest file is depend by long name instead of short name" into tizen

9 years agoFix update detection in app-installers 07/41807/3
Tomasz Iwanek [Wed, 10 Jun 2015 12:49:03 +0000 (14:49 +0200)]
Fix update detection in app-installers

app-installers will need to detect update by itself to set
correct step for installation process. Therefore this patch
integrates previous workaround into common library code.

This will not requires changes in pkgmgr.

Introducing AppQueryInterface for each backend to provide.
This class will decide if update installation flow should
be forced or not. If pkgmgr backendlib would be developed
then this interface will require refactoring probably.

Please, note that tpk will need to provide own
AppQueryInterface instance.

Change-Id: Ic8d09b72227310fa4eb76bce882302c4291495d8

9 years agoCleanup - GetBackupPathForPackagePath 06/41806/2
Tomasz Iwanek [Fri, 29 May 2015 13:50:42 +0000 (15:50 +0200)]
Cleanup - GetBackupPathForPackagePath

Backup directory in update installation is created per package
not per application (becuase we just copy whole content).

There should be one place which defines how this path is constructed.

Change-Id: I694d4641088acbeccd0cdab04d9e510b16415bf1

9 years agoCreate storage directories in widget 05/41805/2
Tomasz Iwanek [Fri, 29 May 2015 10:29:17 +0000 (12:29 +0200)]
Create storage directories in widget

This commit adds creation of directories inside widget path:
 ${widget_dir}/data/
 ${widget_dir}/shared/
during installation.

Those directories should be preserved during update.

Change-Id: I37dca9e02304d7bde1c64c6dd459421d8c6ead79

9 years agoAdd metadata information to the manifest file 10/41810/2
Tomasz Iwanek [Fri, 12 Jun 2015 12:19:13 +0000 (14:19 +0200)]
Add metadata information to the manifest file

Change-Id: I38c19667042f40c1629ff1886ceeaba67108b065

9 years agoFix unexpected error when no value of <name> tag in config.xml 46/41646/2 accepted/tizen/mobile/20150618.040522 accepted/tizen/tv/20150618.040537 accepted/tizen/wearable/20150618.040552 submit/tizen/20150618.021950
Inhwan Lee [Wed, 17 Jun 2015 07:26:43 +0000 (16:26 +0900)]
Fix unexpected error when no value of <name> tag in config.xml

When there is no  <name> tag in config.xml,
installer occur error unexpected because of empty string of manifest->uiapplication->label

Fix there are no <name> tag in config.xml, no <label> in manifest file

JIRA issue : http://168.219.209.56/jira/browse/XWALK-384

Change-Id: I236217e262faaaff6af3f2931568121ede51bbe8

9 years agoSet <label> of manifest file is depend by long name instead of short name 37/41637/1
Inhwan Lee [Wed, 17 Jun 2015 05:14:54 +0000 (14:14 +0900)]
Set <label> of manifest file is depend by long name instead of short name

There is not define with spec, but for backward competibility
And for pass tizen complience.

It's discripted by JIRA :
http://168.219.209.56/jira/browse/XWALK-409

Change-Id: I5f6df4dbc0f45b531ed0b5f6c7e79f2c9e4da331

9 years agoStepParse must run before StepCheckSignature 17/41417/2
Tomasz Iwanek [Tue, 9 Jun 2015 09:40:03 +0000 (11:40 +0200)]
StepParse must run before StepCheckSignature

The step_parse must be run before the step_signature in both
2 installers(wgt and tpk), in order to get several required
information(api-version, package type and privilege list)
from tizen-manifest.xml or config.xml.

Change-Id: Ifb89639af908d824738232620653861fd65e372b

9 years agoAdd field for backend specific data in installer context 16/41416/2
Tomasz Iwanek [Thu, 11 Jun 2015 08:11:12 +0000 (10:11 +0200)]
Add field for backend specific data in installer context

There will be additional field in context just to store
backend specific data - "backend_data".

Each backend should set this to own instance of BackendData
implementation.

Settings field will be used in next commits.

Change-Id: Idf500cbac8d96c2dd10eb87113529f297fa3bcff

9 years agoCmake fixes 15/41415/2
Tomasz Iwanek [Tue, 9 Jun 2015 08:47:21 +0000 (10:47 +0200)]
Cmake fixes

1) Spec should declare depenedency to pkgconfig package
2) Options should not be passed as string in cmake (ApplyPkgConfig.cmake)
   (this causes problems in next commits)

Change-Id: I8c79143e2f224f819df0cbbffc26d35819975904

9 years agoCleanup of application_path 30/41430/1
Tomasz Iwanek [Fri, 29 May 2015 12:17:01 +0000 (14:17 +0200)]
Cleanup of application_path

Change-Id: Ibcce5a9c7440bbf2e9c4f41ee01bd7010f14ae59

9 years agoExtract macro PKGMGR_LIST_MOVE_NODE_TO_HEAD to separate header 14/41414/1
Tomasz Iwanek [Fri, 29 May 2015 12:17:01 +0000 (14:17 +0200)]
Extract macro PKGMGR_LIST_MOVE_NODE_TO_HEAD to separate header

Change-Id: I630a4b554196fd3dee5a5ac59c69e64a3784a659

9 years agoSmall license fixes 77/40377/2
Pawel Sikorski [Fri, 24 Apr 2015 10:32:40 +0000 (12:32 +0200)]
Small license fixes

Change-Id: Ib3ac72c277f80e6a93697f74aa7fb5058d102960

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