From 21c629b678bc7b10df62772870d4d2f95171a062 Mon Sep 17 00:00:00 2001 From: Seungha Son Date: Tue, 24 Oct 2017 16:19:21 +0900 Subject: [PATCH 01/16] Release version 0.7.5 Changes: - Add privacy privilege step for hybrid Signed-off-by: Seungha Son Change-Id: I741802cbd47ad8c7abc77364c47e444a0504a71e --- packaging/wgt-backend.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wgt-backend.spec b/packaging/wgt-backend.spec index 03eb167..3ecc970 100644 --- a/packaging/wgt-backend.spec +++ b/packaging/wgt-backend.spec @@ -1,6 +1,6 @@ Name: wgt-backend Summary: Application installer backend for WGT -Version: 0.7.4 +Version: 0.7.5 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From b7aa5abed22ecef5558332c4df02e858721b1ef7 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Thu, 9 Nov 2017 10:48:06 +0900 Subject: [PATCH 02/16] Change name of extendedsd value - Extendedsd value in tizen-config has changed due to compatibility issue. Change-Id: Ib697e54e4fbaa04fa9281810257acea5e01567ae Signed-off-by: Junghyun Yeon --- src/unit_tests/smoke_utils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unit_tests/smoke_utils.cc b/src/unit_tests/smoke_utils.cc index 3730ad0..956e40e 100644 --- a/src/unit_tests/smoke_utils.cc +++ b/src/unit_tests/smoke_utils.cc @@ -586,7 +586,7 @@ bool CheckAvailableExternalPath() { } bool CheckAvailableExtendedStorage() { - bf::path extended_path = bf::path(tzplatform_getenv(TZ_SYS_EXTENDEDSD)); + bf::path extended_path = bf::path(tzplatform_getenv(TZ_X_SYS_EXTENDEDSD)); LOG(DEBUG) << "extended_path :" << extended_path; // TODO(jeremy.jang): It should be checked by libstorage API. if (!bf::exists(extended_path)) { -- 2.7.4 From 2d0e124fa3808e8d4f8a08a28cfb7a14035dec8a Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Thu, 9 Nov 2017 19:05:46 +0900 Subject: [PATCH 03/16] Release version 0.7.6 Changes: - Change name of extendedsd value Change-Id: I59b2bcb02db44ff93b6fed9dfe26aced7c1f6c29 Signed-off-by: Sangyoon Jang --- packaging/wgt-backend.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wgt-backend.spec b/packaging/wgt-backend.spec index 3ecc970..da8273b 100644 --- a/packaging/wgt-backend.spec +++ b/packaging/wgt-backend.spec @@ -1,6 +1,6 @@ Name: wgt-backend Summary: Application installer backend for WGT -Version: 0.7.5 +Version: 0.7.6 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From ca6c8366e2172d0f39d7cdfaf6e16179ed1005d8 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Tue, 7 Nov 2017 09:45:22 +0900 Subject: [PATCH 04/16] Fix logic to store api version at application structure - Each application could have different api version based on pkg which it belongs to, such as hybrid pkg. - Store api version of each application into application structure to deliver it to security-manager. Related changes: [app-installers] : https://review.tizen.org/gerrit/159061 Change-Id: I80c0faa909d25d23bb152d6a715ebe3e7e832f70 Signed-off-by: Junghyun Yeon --- src/wgt/step/configuration/step_parse.cc | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/wgt/step/configuration/step_parse.cc b/src/wgt/step/configuration/step_parse.cc index 05a3b5d..353cf28 100644 --- a/src/wgt/step/configuration/step_parse.cc +++ b/src/wgt/step/configuration/step_parse.cc @@ -412,6 +412,7 @@ bool StepParse::FillMainApplicationInfo(manifest_x* manifest) { application->autorestart = strdup("false"); application->launch_mode = strdup(app_info->launch_mode().c_str()); + application->api_version = strdup(manifest->api_version); for (auto& icon : GListRange(manifest->icon)) { icon_x* app_icon = reinterpret_cast(calloc(1, sizeof(icon_x))); if (!app_icon) { @@ -460,7 +461,7 @@ bool StepParse::FillServiceApplicationInfo(manifest_x* manifest) { SetApplicationXDefaults(application); application->support_ambient = strdup("false"); application->package = strdup(manifest->package); - + application->api_version = strdup(manifest->api_version); for (auto& pair : service_info.names()) { AppendLabel(application, pair.second, pair.first); } @@ -527,7 +528,7 @@ bool StepParse::FillWidgetApplicationInfo(manifest_x* manifest) { SetApplicationXDefaults(application); application->support_ambient = strdup("false"); application->package = strdup(manifest->package); - + application->api_version = strdup(manifest->api_version); if (!app_widget.label.default_value.empty()) { AppendLabel(application, app_widget.label.default_value, std::string()); } @@ -903,18 +904,6 @@ common_installer::Step::Status StepParse::process() { backend_data->service_list.set(*service_list); } - manifest_x* manifest = - static_cast(calloc(1, sizeof(manifest_x))); - if (!manifest) { - LOG(ERROR) << "Out of memory"; - return common_installer::Step::Status::ERROR; - } - if (!FillManifestX(manifest)) { - LOG(ERROR) << "[Parse] Storing manifest_x failed. " - << parser_->GetErrorMessage(); - return common_installer::Step::Status::PARSE_ERROR; - } - // Copy data from ManifestData to InstallerContext auto info = GetManifestDataForKey( @@ -940,8 +929,20 @@ common_installer::Step::Status StepParse::process() { const std::string& package_version = wgt_info->version(); const std::string& required_api_version = info->required_version(); + manifest_x* manifest = + static_cast(calloc(1, sizeof(manifest_x))); + if (!manifest) { + LOG(ERROR) << "Out of memory"; + return common_installer::Step::Status::ERROR; + } manifest->api_version = strdup(required_api_version.c_str()); + if (!FillManifestX(manifest)) { + LOG(ERROR) << "[Parse] Storing manifest_x failed. " + << parser_->GetErrorMessage(); + return common_installer::Step::Status::PARSE_ERROR; + } + context_->pkgid.set(manifest->package); // write pkgid for recovery file -- 2.7.4 From 83e55defd37b131152eeb3279f0b84ee4a67c6f0 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Thu, 16 Nov 2017 20:35:27 +0900 Subject: [PATCH 05/16] Release version 0.7.7 Changes: - Fix logic to store api version at application structure Change-Id: Ic859fcab2a9afe54285183940f9dd8afdf5e5ffa Signed-off-by: Sangyoon Jang --- packaging/wgt-backend.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wgt-backend.spec b/packaging/wgt-backend.spec index da8273b..4c8f351 100644 --- a/packaging/wgt-backend.spec +++ b/packaging/wgt-backend.spec @@ -1,6 +1,6 @@ Name: wgt-backend Summary: Application installer backend for WGT -Version: 0.7.6 +Version: 0.7.7 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 0e2f7ba2647e9e13ba16e0dd5d9a9e6a276848a1 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Mon, 20 Nov 2017 10:45:40 +0900 Subject: [PATCH 06/16] Add update steps of directories at wgt installer Change-Id: I25c7598b31743d7067f5a13efbb897d667d99531 Signed-off-by: Sangyoon Jang (cherry picked from commit a119d0a15485ed3899d979873adc4f72906f40a5) --- src/wgt/wgt_installer.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index 130c597..05d8dad 100755 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -48,6 +48,8 @@ #include #include #include +#include +#include #include #include #include @@ -274,6 +276,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(true); AddStep(); AddStep(); + AddStep(); AddStep(); AddStep(); AddStep(); @@ -290,6 +293,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); + AddStep(); AddStep(); AddStep(); } @@ -386,6 +390,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(true); AddStep(); AddStep(); + AddStep(); AddStep(); AddStep(); AddStep(); @@ -402,6 +407,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); + AddStep(); AddStep(); AddStep(); } @@ -498,6 +504,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(); AddStep(); AddStep(); + AddStep(); AddStep(); AddStep(); AddStep(); @@ -513,6 +520,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); + AddStep(); AddStep(true); AddStep(); } @@ -577,6 +585,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); + AddStep(); AddStep(); AddStep(); } @@ -701,6 +710,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); + AddStep(); AddStep(); } -- 2.7.4 From b18d1efa8bde74f689a6909cbd2671b927c44f4b Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Mon, 20 Nov 2017 11:10:16 +0900 Subject: [PATCH 07/16] Add patch icon steps at ManifestDirectInstall of hybrid installer Change-Id: I57e351b43aaca6e5429d23b1c92c506e844c64b7 Signed-off-by: Sangyoon Jang (cherry picked from commit fb96ce21bf83a7930d179d639e7b5b677d7dfcee) --- src/hybrid/hybrid_installer.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index 2df59cc..48612d8 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -455,6 +455,8 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr) AddStep(); AddStep(); AddStep(); + AddStep(); + AddStep(); AddStep(); AddStep(); AddStep(); @@ -493,6 +495,8 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr) ci::configuration::StepParseManifest::StoreLocation::BACKUP); AddStep(); AddStep(); + AddStep(); + AddStep(); AddStep(); AddStep(); AddStep(); -- 2.7.4 From eee814e71e94f543f79a7ba68aa0da4ae73a457b Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Fri, 5 Jan 2018 11:14:42 +0900 Subject: [PATCH 08/16] Release version 0.7.8 Changes: - Add update steps of directories at wgt installer - Add patch icon steps at ManifestDirectInstall of hybrid installer Change-Id: Ic3103ccdad18d32656fc5f85b675ae628fb1ccd2 Signed-off-by: Sangyoon Jang --- packaging/wgt-backend.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wgt-backend.spec b/packaging/wgt-backend.spec index 4c8f351..a512a74 100644 --- a/packaging/wgt-backend.spec +++ b/packaging/wgt-backend.spec @@ -1,6 +1,6 @@ Name: wgt-backend Summary: Application installer backend for WGT -Version: 0.7.7 +Version: 0.7.8 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 69e05d5e884d9580938473fb9416a0229bdde0fc Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Wed, 10 Jan 2018 14:33:33 +0900 Subject: [PATCH 09/16] Add a step for recovering ReadonlyUpdateInstall mode Requires: - https://review.tizen.org/gerrit/158844 Change-Id: Id613d4082f866ac5b64d83152aa777bebe7d6988 Signed-off-by: Sangyoon Jang --- src/wgt/wgt_installer.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index 05d8dad..dd2e851 100755 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -424,6 +425,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(); AddStep(); AddStep(); + AddStep(); AddStep(); AddStep(); AddStep(); -- 2.7.4 From 6920ff5b4a2febb36574b7f85f8c35bbf0996162 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Tue, 16 Jan 2018 14:34:52 +0900 Subject: [PATCH 10/16] Add StepPrivilegeCompatibility at RecoverySteps To recover internal privileges, StepPrivilegeCompatibility should be added. Change-Id: I4a162bfc3f2fd00ccbf6724f691e6bf98c4b4262 Signed-off-by: Sangyoon Jang --- src/wgt/wgt_installer.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index dd2e851..b2988b0 100755 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -429,6 +429,8 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(); AddStep(); AddStep(); + AddStep( + ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); AddStep(); AddStep(); -- 2.7.4 From 5a5f711ab6ca1fa0e578a058c75f5d9aac984f69 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Wed, 17 Jan 2018 14:41:45 +0900 Subject: [PATCH 11/16] Add StepPrivilegeCompatibility at ReadonlyUpdateUninstallSteps To install internal privileges, StepPrivilegeCompatibility should be added. Change-Id: I7c6b3042d8729c78906d6982b4ce4d4239c9fa2d Signed-off-by: Sangyoon Jang --- src/wgt/wgt_installer.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index b2988b0..29b9bfd 100755 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -653,6 +653,8 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(); AddStep(); AddStep(); + AddStep( + ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); AddStep(); AddStep(); -- 2.7.4 From 4b5043022d1bdc23e16ebb48e1346e5bad844fb6 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Wed, 17 Jan 2018 21:14:51 +0900 Subject: [PATCH 12/16] Replace StepPrivilegeCompatibility with StepRecoverPrivilegeCompatibility Requires: - https://review.tizen.org/gerrit/167411 Change-Id: I1ba4b0461d42657516584f4c09a68fa7dedae705 Signed-off-by: Sangyoon Jang --- src/wgt/wgt_installer.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index 29b9bfd..e80e3b3 100755 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -75,6 +75,7 @@ #include #include #include +#include #include #include #include @@ -429,7 +430,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) AddStep(); AddStep(); AddStep(); - AddStep( + AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); AddStep(); -- 2.7.4 From 46121a432b166a3920c4822d46b2e864162d314c Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Wed, 24 Jan 2018 14:17:04 +0900 Subject: [PATCH 13/16] Fix RecoverySteps of hybrid backend Add missing steps. Change-Id: Ibaec35c8305543da7a12b05774c5cb18cf66cf04 Signed-off-by: Sangyoon Jang --- src/hybrid/hybrid_installer.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index 48612d8..d0f36aa 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -65,6 +66,7 @@ #include #include #include +#include #include #include #include @@ -322,9 +324,12 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr) AddStep(); AddStep(); AddStep(); + AddStep(); AddStep(); AddStep(); AddStep(); + AddStep( + ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); AddStep(); AddStep(); AddStep(); -- 2.7.4 From 54aaf088551d977cec212158d31bc36eebe1881d Mon Sep 17 00:00:00 2001 From: Seungha Son Date: Mon, 29 Jan 2018 16:08:31 +0900 Subject: [PATCH 14/16] Remove unnecessary step StepRollbackDeinstallationSecurity is meaningless. It is meaningless to rollback in undo() because removing the security is done after uninstall process() steps have been compelted. Signed-off-by: Seungha Son Change-Id: I82d9b45f820e2efdb2275611c7538b78c451779b --- src/hybrid/hybrid_installer.cc | 2 -- src/wgt/wgt_installer.cc | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index d0f36aa..dd776c6 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -70,7 +70,6 @@ #include #include #include -#include #include #include #include @@ -236,7 +235,6 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr) AddStep(); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index e80e3b3..c7edfe5 100755 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -79,7 +79,6 @@ #include #include #include -#include #include #include #include @@ -316,7 +315,6 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) ci::Plugin::ActionType::Uninstall); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); -- 2.7.4 From 9b8ce5d0e54012b31999ad4fc45813344abf82e9 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Fri, 8 Dec 2017 17:07:53 +0900 Subject: [PATCH 15/16] Set nodisplay attribute of widget application as manifest value Change-Id: I8271e692d104325c268a5dc42f229bcb8b700bf9 Signed-off-by: Sangyoon Jang (cherry picked from commit 47eac0f48f9390ecdad5021f906135669a7d2a1c) --- src/wgt/step/configuration/step_parse.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wgt/step/configuration/step_parse.cc b/src/wgt/step/configuration/step_parse.cc index 353cf28..3252489 100644 --- a/src/wgt/step/configuration/step_parse.cc +++ b/src/wgt/step/configuration/step_parse.cc @@ -509,6 +509,12 @@ bool StepParse::FillWidgetApplicationInfo(manifest_x* manifest) { wgt::application_widget_keys::kTizenAppWidgetFullKey); if (!appwidget_info) return true; + + auto settings_info = + GetManifestDataForKey( + wgt::application_widget_keys::kTizenSettingKey); + bool no_display = settings_info ? settings_info->no_display() : false; + for (auto& app_widget : appwidget_info->app_widgets()) { application_x* application = reinterpret_cast (calloc(1, sizeof(application_x))); @@ -523,7 +529,7 @@ bool StepParse::FillWidgetApplicationInfo(manifest_x* manifest) { strdup((context_->root_application_path.get() / manifest->package / "bin" / application->appid).c_str()); application->type = strdup("webapp"); - application->nodisplay = strdup("true"); + application->nodisplay = no_display ? strdup("true") : strdup("false"); application->taskmanage = strdup("false"); SetApplicationXDefaults(application); application->support_ambient = strdup("false"); -- 2.7.4 From a3a94088e86358b8c76d7792c3463b17c46f45c0 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Tue, 6 Feb 2018 17:47:33 +0900 Subject: [PATCH 16/16] Release version 0.7.9 Changes: - Add a step for recovering ReadonlyUpdateInstall mode - Add StepPrivilegeCompatibility at RecoverySteps - Add StepPrivilegeCompatibility at ReadonlyUpdateUninstallSteps - Replace StepPrivilegeCompatibility with StepRecoverPrivilegeCompatibility - Fix RecoverySteps of hybrid backend - Remove unnecessary step - Set nodisplay attribute of widget application as manifest value Change-Id: I8042b5f4a817454e02452f63eb50d5652d940916 Signed-off-by: Sangyoon Jang --- packaging/wgt-backend.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wgt-backend.spec b/packaging/wgt-backend.spec index a512a74..4a5c101 100644 --- a/packaging/wgt-backend.spec +++ b/packaging/wgt-backend.spec @@ -1,6 +1,6 @@ Name: wgt-backend Summary: Application installer backend for WGT -Version: 0.7.8 +Version: 0.7.9 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4