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
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
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
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
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
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
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>
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
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
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
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
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>
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
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
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
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
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
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>
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
Baptiste DURAND [Mon, 23 Mar 2015 13:56:58 +0000 (06:56 -0700)]
Merge "Allow optional elements in tpk manifest xml" into tizen
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
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
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>
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
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
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
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>
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>
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
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
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>
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>
Tomasz Iwanek [Mon, 2 Mar 2015 14:48:14 +0000 (15:48 +0100)]
Add 'app-control' manifest handler
Change-Id: Ib06a69de03eddbac768c8ada921dfed60b33e006
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>
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
Tomasz Iwanek [Mon, 23 Feb 2015 10:35:33 +0000 (11:35 +0100)]
Move file_util.cc to utils
Change-Id: Ida4e0c8c922549165f318b7ca3292d1a4fd381ba
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
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
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
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
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
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
Tomasz Iwanek [Mon, 16 Feb 2015 15:37:54 +0000 (16:37 +0100)]
Stylecheck fix
Change-Id: I9efb79ec07d84a6366c6f75307218d8a195ce5cf
Tomasz Iwanek [Fri, 20 Feb 2015 08:43:28 +0000 (09:43 +0100)]
Remove compiler's warnings
Change-Id: I86fe2db1d6a947d9d8f5bcc1dad82698821024b4
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
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
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
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>
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>
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>
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
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
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
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
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>
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>
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>
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
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
Tomasz Iwanek [Tue, 3 Feb 2015 10:11:30 +0000 (11:11 +0100)]
Add parser's handler: appwidget
Change-Id: I3d4009960593e319abc9034e5c6e27b34e064e25
Tomasz Iwanek [Mon, 2 Feb 2015 14:22:19 +0000 (15:22 +0100)]
Add parser's handlers: metadata, navigation, splash screen
Change-Id: Idad70b51377d8020a4cc71ae44e382a869ff4a3c
Tomasz Iwanek [Mon, 2 Feb 2015 13:34:03 +0000 (14:34 +0100)]
Add setting parser's handler
Change-Id: I2063f0aa5046f5981b2abbb41576d3d1150e9009
Tomasz Iwanek [Mon, 2 Feb 2015 12:31:00 +0000 (13:31 +0100)]
Add IME parser's handlers
Change-Id: I8b316d4ce04f05397e05903cd3a921cd05013637
Tomasz Iwanek [Fri, 30 Jan 2015 16:21:56 +0000 (17:21 +0100)]
Escape encoded character in URLs in manifest
Change-Id: I30667246ca44bd66ca80953ac9f54555a2564c34
Tomasz Iwanek [Thu, 5 Feb 2015 15:49:05 +0000 (16:49 +0100)]
DISALLOW_COPY_AND_ASSIGN(AppInstaller)
Change-Id: I641fa3bf29ec3147e54430259eb6a6d87596c202
Tomasz Iwanek [Thu, 5 Feb 2015 11:44:33 +0000 (12:44 +0100)]
Logging unification
Because of existing idea of tagging step in logs,
this commit introduces one more macro:
SCOPE_LOG_TAG(TAG)
Defining this macro in given scope will change log tag of that
scope.
Example:
class StepXYZ : public Step {
void func() {
LOG(DEBUG) << "Status is ...";
}
SCOPE_LOG_TAG(XYZ)
};
Every log from class StepXYZ will be place with "XYZ" tag.
Change-Id: I8a8e192b0a746dae19a961e238a798b9b2c0c4b9
Tomasz Iwanek [Fri, 30 Jan 2015 13:21:01 +0000 (14:21 +0100)]
Remove utf16 handling
This code is not needed.
There is no need for utf16 error codes of parser.
value.h make no longer assumtions on string
encoding - there is no check.
Change-Id: I2d22b8683b27a659c237c0fd1bf167e37c15db70
Jakub Izydorczyk [Wed, 28 Jan 2015 13:23:53 +0000 (14:23 +0100)]
[Widget-manifest-parser] Added parser's base
Change-Id: Ic7325a08d9ed1359a6e6be77e0d62b3dbe046e7f
Jakub Izydorczyk [Mon, 26 Jan 2015 12:30:24 +0000 (13:30 +0100)]
[Widget-manifest-parser] Add manifest class and manifest constants
This change adds Manifest class, which is internal representation
of manifest file in widget-manifest-parser.
Change-Id: Icf9a53398fe3941cb19e36d9bacad721ffa0b057
Tomasz Iwanek [Thu, 29 Jan 2015 09:17:10 +0000 (10:17 +0100)]
Move logging and macros to utils
Just moves code. I will think about appling this.
Change-Id: I6e6e21a9144f548697acc0f959e7aa2338831121
Pawel Sikorski [Tue, 10 Feb 2015 15:06:07 +0000 (07:06 -0800)]
Merge "Add utils library." into tizen
Tomasz Iwanek [Wed, 4 Feb 2015 12:22:44 +0000 (13:22 +0100)]
Send pkgmgr signal always
Zip or config.xml can be malformed.
This fixes handling signalling in those cases.
Code which handles pkgmgr signal was extracted into
- src/common/pkgmgr_signal.*
Change-Id: I46b96f6ba8cd2c41110f2fefbceb6dc1b2969216
Pawel Sikorski [Tue, 10 Feb 2015 15:03:16 +0000 (07:03 -0800)]
Merge "Add url decoding for 'uri' attribute of signatures" into tizen
sung-su.kim [Wed, 4 Feb 2015 02:08:46 +0000 (11:08 +0900)]
Add url decoding for 'uri' attribute of signatures
The value of URI attribute of signature files can be encoded uri.
But, SignatureValidator can't recongize encoded 'uri'.
Add url decoding routine to SignatureParser.
Change-Id: Ifec7b04b2a591bddca15fbe3cdafa90d2a0964c5
Jakub Izydorczyk [Fri, 23 Jan 2015 13:09:51 +0000 (14:09 +0100)]
Add utils library.
It is supposed to contain common utilities, which can be used by
other parts of code. This commit contains utf_converter code,
which allows convertions between std::u16string and std::string.
There is also DictionaryValue class added, which is needed for
saving nodes of widget manifest.
Change-Id: Ibe4265e6dc3a7f78637d0103222d87d16b70bc2a
Tomasz Iwanek [Wed, 4 Feb 2015 15:04:05 +0000 (16:04 +0100)]
Remove double installer creation
Change-Id: Id8842d3dcb471a00437f3d620229a6c45a97989f
Tomasz Iwanek [Fri, 30 Jan 2015 08:47:04 +0000 (09:47 +0100)]
Manifest generation fix
xmlTextWriterEndDocument closes all not closed elements (nodes).
Therefore it faked that manifest is ok.
Some elements were not closed properly.
Change-Id: I0b4e1a0051c25dff10a67a7ac8809295d44d5c5b
Baptiste DURAND [Wed, 28 Jan 2015 17:45:44 +0000 (18:45 +0100)]
Fix Name field in case of widget label
If the short name is empty use the long name instead
Change-Id: Id7f6bd3fa54a9801c0f93e510ae6f723241185e4
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
Baptiste DURAND [Wed, 28 Jan 2015 17:07:41 +0000 (18:07 +0100)]
Fix Description field in Tizen Manifest
This permits to avoid to have this
<label>(null)</label> instead of <label></label> in the manifest
Change-Id: Iddaedf33940358cd52590487f6a7c6febda809c1
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
Baptiste DURAND [Wed, 28 Jan 2015 15:52:19 +0000 (16:52 +0100)]
Fix Application type in Generate XML Manifest step.
The application should depends of the original type set in the original manifest.
Now, use the one provided by step parser
Change-Id: I6aa34cf1dc2ebc9733f6239125aa12f441de47c0
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
Baptiste DURAND [Wed, 28 Jan 2015 15:38:13 +0000 (16:38 +0100)]
Add new specific step to create symbolic link for WebApp
Remove this operation from generate xml step, create a new one
Add a spec file option for set the WRT binary path used for symbolic link
Change-Id: Ife93a10b830fd093dc9c02184dd2490ce99d67a0
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
Baptiste DURAND [Wed, 28 Jan 2015 14:26:30 +0000 (15:26 +0100)]
Add manifest to wgt-backend package.
This is needed to assign the "User" smack label to wgt-backend
Change-Id: Icea7b182c89a7e8ff631f6f6ce9f188d180c8fd7
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
Tomasz Iwanek [Tue, 20 Jan 2015 14:39:20 +0000 (15:39 +0100)]
StepSecurity
Adds security manager API calls to apply correct security context
during installation and uninstallation process.
Change-Id: Ieceb1126edfe65f1f1f438e9c4dea7907e9f3e27
Tomasz Iwanek [Wed, 7 Jan 2015 12:34:24 +0000 (13:34 +0100)]
Step class design issues
- lack of virtual destructor
It is obligatory in classes that are extended.
This case may lead to memory leak or undefined behaviour.
- unnecessary argument passing to each function,
We have 'class' to keep information within.
- memory management in AppInstaller class of allocated Steps,
Most reliable way is to use smart pointers.
Use new/delete only if it is really neccesary.
- fixes errorcodes to some understandable ones,
Any function should not return int that cannot be interpreted
what it actually represents.
- catching int,
There was some mistake (?). Use std::exception derived classes in
exception handling if needed.
Change-Id: Iba8ea02dde503ec1b2f043ed5965a537d6a58f51
Baptiste DURAND [Fri, 23 Jan 2015 14:18:50 +0000 (15:18 +0100)]
Fix error Management
If Undo method fails the Error's signal is not sent to pkgmgr-server
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
Change-Id: Ib867d1a0f488787b2408f914e66ab561d225d65a
Baptiste DURAND [Fri, 23 Jan 2015 11:29:43 +0000 (12:29 +0100)]
Add Send signal Step
Change-Id: I3cf119442f2d231ebd4aab84790e2af12c792182
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
Baptiste DURAND [Thu, 22 Jan 2015 14:27:06 +0000 (15:27 +0100)]
Add manifest for wgt-backend
Change-Id: I8221bed3fd57e653745293d82df6ab181fddf8f6
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
Tomasz Iwanek [Thu, 15 Jan 2015 10:33:18 +0000 (11:33 +0100)]
Assign pkgid in installation context
Fixes installation process
Change-Id: I7cc7ae9d8f7e09c98fb5eb007abb33dd1c194beb
Baptiste DURAND [Mon, 19 Jan 2015 10:23:48 +0000 (02:23 -0800)]
Merge "Get rid of cmake's CMP0023 warning" into tizen
Pawel Sikorski [Thu, 15 Jan 2015 23:25:12 +0000 (00:25 +0100)]
Adding Uninstallation features
Adding Methods to get Root Applications path and Application path
Adding Step remove to remove files of 1 package
Adding Step to unregister a package
Signed-off-by: Sabera Djelti (sdi2) <sabera.djelti@open.eurogiciel.org>
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
Signed-off-by: Pawel Sikorski <p.sikorski@samsung.com>
Change-Id: I3d7bd76a75b413e310b0804b3856b021d4115e13
Sabera Djelti (sdi2) [Fri, 16 Jan 2015 10:29:17 +0000 (11:29 +0100)]
Add StepParse::fillManifest method
The purpose of this method is to fill the Context structure with the information
retreived from config.xml file
Change-Id: Ia0777a0251d967611a4b332337d651cfee3ef830
Signed-off-by: Pawel Sikorski <p.sikorski@samsung.com>
Signed-off-by: Sabera Djelti (sdi2) <sabera.djelti@open.eurogiciel.org>
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
Sabera Djelti (sdi2) [Fri, 16 Jan 2015 10:21:17 +0000 (11:21 +0100)]
Fix Manifest generation step
-> Align Privileges section generation with the specs
-> Add robustness when there is neither svc app information nor ui app information
Change-Id: I76de58d65a67b508c7777d0b964c00a4b74fc501
Signed-off-by: Sabera Djelti (sdi2) <sabera.djelti@open.eurogiciel.org>
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
Sabera Djelti (sdi2) [Thu, 8 Jan 2015 15:33:54 +0000 (16:33 +0100)]
add step_generate_xml & step_record
step_generate_xml creates the manifest pkgid.xml
step_record stores app data in database and creates desktop file
Change-Id: Ie7920417c71f17fbf6deff19935d9d95b7debfa0
Signed-off-by: Sabera Djelti (sdi2) <sabera.djelti@open.eurogiciel.org>
Tomasz Iwanek [Thu, 15 Jan 2015 10:15:20 +0000 (11:15 +0100)]
Get rid of cmake's CMP0023 warning
http://www.cmake.org/cmake/help/v3.0/policy/CMP0023.html
Change-Id: Icb3bd90104b50b9f498f9e9911d479a67e682c72
Maciej Piotrowski [Thu, 8 Jan 2015 13:37:55 +0000 (14:37 +0100)]
Add step-parse
- compile successfully
- widget-manifest-parser library added
- widget-manifest-parser library works correct
- storing data from widget-manifest-parser proposed
Change-Id: I317554abbf19c72c6c1a77b28218c7008d58cb44
Tomasz Iwanek [Wed, 7 Jan 2015 11:20:19 +0000 (12:20 +0100)]
[Cpplint] Stylecheck error - other
Fixes the rest of errors (about 10)
Change-Id: Icfd9147e6615154a688cd7e773b2d679865cf073
Tomasz Iwanek [Wed, 7 Jan 2015 11:13:31 +0000 (12:13 +0100)]
[Cpplint] Spacing comments in code
Rules:
- [whitespace/comments]
Change-Id: I9eb4c1683d7077989b7c50a459596fd3598f8ca1
Tomasz Iwanek [Wed, 7 Jan 2015 11:07:08 +0000 (12:07 +0100)]
[Cpplint] Line length limit - 80 characters
Rules:
- [whitespace/line_length]
Change-Id: I87f5bcad992628250bcd5b92d736379d08159ac8
Tomasz Iwanek [Wed, 7 Jan 2015 10:57:21 +0000 (11:57 +0100)]
[Cpplint] Fix whitespaces
Rules:
- [whitespace/tab]
- [whitespace/blank_line]
Change-Id: I14868ec04e0416bea8d98b4c4604439c8484d245
Tomasz Iwanek [Fri, 19 Dec 2014 13:04:54 +0000 (14:04 +0100)]
[Cpplint] Fix header guards
Rules:
- [build/header_guard]
Change-Id: I4160f4899fd00cf64fa1cdd6e4ace137b1b256f4