From dab87da27ad5a1a876444a3ff38ea07da5d18343 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Thu, 8 Mar 2018 15:03:36 +0900 Subject: [PATCH 01/16] Release version 0.9.5 Changes: - Add codes to enable ManifestDirectInstall for mount intalled pkg - Fix smoke test - Remove user data when ReadonlyUpdateUninstall mode Change-Id: I615e6db7f24d8e0c886865366b19675071508050 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 dce227b..59730c4 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.9.4 +Version: 0.9.5 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 61253ab27c9ca904349107aa444d68ec4f101379 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Thu, 22 Mar 2018 17:06:20 +0900 Subject: [PATCH 02/16] Fix extensive smoke test Cast global environment object just once when allocating. Use static_cast for downcasting, because we know obviously that SmokeEnvironment class is derived from testing::Environment class. Change-Id: I89629f81453235f7dfc526a1e796bf7396cafe89 Signed-off-by: Sangyoon Jang --- src/unit_tests/extensive_smoke_test.cc | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/unit_tests/extensive_smoke_test.cc b/src/unit_tests/extensive_smoke_test.cc index ed51023..5c88971 100644 --- a/src/unit_tests/extensive_smoke_test.cc +++ b/src/unit_tests/extensive_smoke_test.cc @@ -50,26 +50,22 @@ class SmokeEnvironment : public testing::Environment { namespace { -testing::Environment *env = nullptr; +smoke_test::SmokeEnvironment *env = nullptr; void signalHandler(int signum) { env->TearDown(); exit(signum); } -smoke_test::SmokeEnvironment *dcast(testing::Environment* _env) { - return dynamic_cast(_env); -} - } // namespace namespace smoke_test { class SmokeTest : public testing::Test { public: - SmokeTest() : backend(std::to_string(dcast(env)->test_user.uid)), + SmokeTest() : backend(std::to_string(env->test_user.uid)), params{PackageType::WGT, false} { - params.test_user.uid = dcast(env)->test_user.uid; - params.test_user.gid = dcast(env)->test_user.gid; + params.test_user.uid = env->test_user.uid; + params.test_user.gid = env->test_user.gid; } protected: WgtBackendInterface backend; @@ -78,10 +74,10 @@ class SmokeTest : public testing::Test { class HybridSmokeTest : public testing::Test { public: - HybridSmokeTest() : backend(std::to_string(dcast(env)->test_user.uid)), + HybridSmokeTest() : backend(std::to_string(env->test_user.uid)), params{PackageType::HYBRID, false} { - params.test_user.uid = dcast(env)->test_user.uid; - params.test_user.gid = dcast(env)->test_user.gid; + params.test_user.uid = env->test_user.uid; + params.test_user.gid = env->test_user.gid; } protected: HybridBackendInterface backend; @@ -429,8 +425,9 @@ int main(int argc, char** argv) { ::testing::GTEST_FLAG(filter) = "SmokeTest.*"; } testing::InitGoogleTest(&argc, argv); - ::env = testing::AddGlobalTestEnvironment( - new smoke_test::SmokeEnvironment(request_mode)); + ::env = static_cast( + testing::AddGlobalTestEnvironment( + new smoke_test::SmokeEnvironment(request_mode))); signal(SIGINT, ::signalHandler); signal(SIGSEGV, ::signalHandler); return RUN_ALL_TESTS(); -- 2.7.4 From 80fb8bdc3b0d501411c263a19a609546711b9510 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Thu, 22 Mar 2018 15:52:28 +0900 Subject: [PATCH 03/16] Fix static analyzer issues - Fix memory leak - Fix using uninitialized variables - Fix dereferencing before null check Change-Id: I119e803a3e9acb9e63abc1f28c2fbd93f7e92699 Signed-off-by: Sangyoon Jang --- src/hybrid/step/pkgmgr/step_generate_xml.h | 2 ++ src/unit_tests/extensive_smoke_test.cc | 27 ++++++++++++++---------- src/wgt/step/configuration/step_parse.cc | 2 ++ src/wgt/step/encryption/step_encrypt_resources.h | 3 +++ src/wgt/step/filesystem/step_wgt_patch_icons.cc | 2 ++ 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/hybrid/step/pkgmgr/step_generate_xml.h b/src/hybrid/step/pkgmgr/step_generate_xml.h index b2a0f6e..8fce64d 100644 --- a/src/hybrid/step/pkgmgr/step_generate_xml.h +++ b/src/hybrid/step/pkgmgr/step_generate_xml.h @@ -19,6 +19,8 @@ namespace pkgmgr { class StepGenerateXml : public common_installer::Step { public: using Step::Step; + explicit StepGenerateXml(common_installer::InstallerContext* context) + : Step(context), wgt_doc_(nullptr), tpk_doc_(nullptr) {} Status process() override; Status clean() override { return Status::OK; } Status undo() override { return Status::OK; } diff --git a/src/unit_tests/extensive_smoke_test.cc b/src/unit_tests/extensive_smoke_test.cc index 5c88971..1f0a8ab 100644 --- a/src/unit_tests/extensive_smoke_test.cc +++ b/src/unit_tests/extensive_smoke_test.cc @@ -419,16 +419,21 @@ TEST_F(SmokeTest, MountUpdateMode_Rollback) { } // namespace smoke_test int main(int argc, char** argv) { - ci::RequestMode request_mode = smoke_test::ParseRequestMode(argc, argv); - if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) { - std::cout << "Skip tests for preload request" << std::endl; - ::testing::GTEST_FLAG(filter) = "SmokeTest.*"; + try { + ci::RequestMode request_mode = smoke_test::ParseRequestMode(argc, argv); + if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) { + std::cout << "Skip tests for preload request" << std::endl; + ::testing::GTEST_FLAG(filter) = "SmokeTest.*"; + } + testing::InitGoogleTest(&argc, argv); + ::env = static_cast( + testing::AddGlobalTestEnvironment( + new smoke_test::SmokeEnvironment(request_mode))); + signal(SIGINT, ::signalHandler); + signal(SIGSEGV, ::signalHandler); + return RUN_ALL_TESTS(); + } catch (...) { + std::cout << "Exception occurred during testing"; + return 1; } - testing::InitGoogleTest(&argc, argv); - ::env = static_cast( - testing::AddGlobalTestEnvironment( - new smoke_test::SmokeEnvironment(request_mode))); - signal(SIGINT, ::signalHandler); - signal(SIGSEGV, ::signalHandler); - return RUN_ALL_TESTS(); } diff --git a/src/wgt/step/configuration/step_parse.cc b/src/wgt/step/configuration/step_parse.cc index 4447368..1637c54 100644 --- a/src/wgt/step/configuration/step_parse.cc +++ b/src/wgt/step/configuration/step_parse.cc @@ -490,6 +490,7 @@ bool StepParse::FillServiceApplicationInfo(manifest_x* manifest) { calloc(1, sizeof(metadata_x))); if (!item) { LOG(ERROR) << "Out of memory"; + pkgmgrinfo_basic_free_application(application); return false; } item->key = strdup(pair.first.c_str()); @@ -943,6 +944,7 @@ common_installer::Step::Status StepParse::process() { if (!FillManifestX(manifest)) { LOG(ERROR) << "[Parse] Storing manifest_x failed. " << parser_->GetErrorMessage(); + pkgmgr_parser_free_manifest_xml(manifest); return common_installer::Step::Status::PARSE_ERROR; } diff --git a/src/wgt/step/encryption/step_encrypt_resources.h b/src/wgt/step/encryption/step_encrypt_resources.h index 27e4d02..6b420fd 100644 --- a/src/wgt/step/encryption/step_encrypt_resources.h +++ b/src/wgt/step/encryption/step_encrypt_resources.h @@ -22,6 +22,9 @@ class StepEncryptResources : public common_installer::Step { public: using Step::Step; + explicit StepEncryptResources(common_installer::InstallerContext* context) + : Step(context), backend_data_(nullptr) {} + /** * \brief Encrypt files * diff --git a/src/wgt/step/filesystem/step_wgt_patch_icons.cc b/src/wgt/step/filesystem/step_wgt_patch_icons.cc index e0a1be0..b80263a 100644 --- a/src/wgt/step/filesystem/step_wgt_patch_icons.cc +++ b/src/wgt/step/filesystem/step_wgt_patch_icons.cc @@ -18,6 +18,8 @@ namespace { const char kDefaultIconPath[] = "/usr/share/wgt-backend/default.png"; bool PatchIcon(icon_x* icon, const bf::path& dst_path) { + if (!icon) + return false; bs::error_code error; bf::path icon_text(icon->text); bf::path icon_path = dst_path; -- 2.7.4 From 11f6699a2c0a332fd41ea8b1d449e684467863f2 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Tue, 27 Mar 2018 17:50:14 +0900 Subject: [PATCH 04/16] Release version 0.9.6 Changes: - Fix extensive smoke test - Fix static analyzer issues Change-Id: I1de6a3d07816cb0aca0fcc69c1b308ae19635729 Signed-off-by: Junghyun Yeon --- 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 59730c4..d2021c6 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.9.5 +Version: 0.9.6 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From a7551797b2b5503b347c3df89ba127e3afeaca5a Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Thu, 8 Mar 2018 17:01:56 +0900 Subject: [PATCH 05/16] Add StepSaveSignature step - Add new step to store distributor signatures into separate files. - Existing distributor signature files will be removed to prevent extract package and re-packaging it. Related changes: [app-installers] : https://review.tizen.org/gerrit/#/c/171653/ Change-Id: I01b3c9882db400203470595bc3c0950544312e69 Signed-off-by: Junghyun Yeon --- 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 c4b8988..96c9494 100755 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -85,6 +85,7 @@ #include #include #include +#include #include #include @@ -136,6 +137,7 @@ void WgtInstaller::InstallSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -181,6 +183,7 @@ void WgtInstaller::UpdateSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -298,6 +301,7 @@ void WgtInstaller::DeltaSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -464,6 +468,7 @@ void WgtInstaller::ManifestDirectInstallSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -495,6 +500,7 @@ void WgtInstaller::ManifestDirectUpdateSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -531,6 +537,7 @@ void WgtInstaller::ReadonlyUpdateInstallSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -582,6 +589,7 @@ void WgtInstaller::ReadonlyUpdateUninstallSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -608,6 +616,7 @@ void WgtInstaller::ManifestPartialInstallSteps() { wgt::configuration::StepParse::ConfigLocation::INSTALLED, true); AddStep(); AddStep(); + AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -633,6 +642,7 @@ void WgtInstaller::ManifestPartialUpdateSteps() { ci::configuration::StepParseManifest::ManifestLocation::INSTALLED, ci::configuration::StepParseManifest::StoreLocation::BACKUP); AddStep(); + AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); -- 2.7.4 From 9a5e02d7eca30a94e0aa222a84018448f0290c52 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Fri, 30 Mar 2018 17:14:03 +0900 Subject: [PATCH 06/16] Release version 0.10.0 Changes: - Add StepSaveSignature step Change-Id: I9a34653ed2a30bd7d6ee86fccd0dbff23e4f4aea Signed-off-by: Junghyun Yeon --- 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 d2021c6..40a266c 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.9.6 +Version: 0.10.0 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 98f73621730e4b3d5844deda5391fc4d8442ff16 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Mon, 2 Apr 2018 20:08:08 +0900 Subject: [PATCH 07/16] Fix static analyzer issues - Fix uncaught exception. Change-Id: Ica139ffdff375bbbaf9345787744f167dc79c788 Signed-off-by: Sangyoon Jang --- src/unit_tests/smoke_test.cc | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/unit_tests/smoke_test.cc b/src/unit_tests/smoke_test.cc index b5bf24d..d61b444 100644 --- a/src/unit_tests/smoke_test.cc +++ b/src/unit_tests/smoke_test.cc @@ -867,16 +867,21 @@ TEST_F(SmokeTest, InstallExtendedMode) { } // namespace smoke_test int main(int argc, char** argv) { - ci::RequestMode request_mode = st::ParseRequestMode(argc, argv); - if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) { - std::cout << "Skip tests for preload request" << std::endl; - ::testing::GTEST_FLAG(filter) = "SmokeTest.*"; + try { + ci::RequestMode request_mode = st::ParseRequestMode(argc, argv); + if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) { + std::cout << "Skip tests for preload request" << std::endl; + ::testing::GTEST_FLAG(filter) = "SmokeTest.*"; + } + testing::InitGoogleTest(&argc, argv); + ::env = static_cast( + testing::AddGlobalTestEnvironment( + new smoke_test::SmokeEnvironment(request_mode))); + signal(SIGINT, ::signalHandler); + signal(SIGSEGV, ::signalHandler); + return RUN_ALL_TESTS(); + } catch (...) { + std::cout << "Exception occurred during testing" << std::endl; + return 1; } - testing::InitGoogleTest(&argc, argv); - ::env = static_cast( - testing::AddGlobalTestEnvironment( - new smoke_test::SmokeEnvironment(request_mode))); - signal(SIGINT, ::signalHandler); - signal(SIGSEGV, ::signalHandler); - return RUN_ALL_TESTS(); } -- 2.7.4 From 84a3125bad9480e6353579223558791e3c8ce3da Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Tue, 3 Apr 2018 19:57:39 +0900 Subject: [PATCH 08/16] Release version 0.10.1 Changes: - Fix static analyzer issues Change-Id: I095a9771cac2e8386c42f087a650f9dd62321742 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 40a266c..27edded 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.10.0 +Version: 0.10.1 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 2d518b823d320676893b75869c9e9f2f00b8a6c7 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Fri, 6 Apr 2018 13:17:17 +0900 Subject: [PATCH 09/16] Add StepSaveSignature at mount install or update - Distributor signature don't have to be extracted because its value will be stored at separated directory. Related changes: [app-installers] : https://review.tizen.org/gerrit/174993 Change-Id: I132f25356912e7f34894c1761f8a1bac2ac27303 --- src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc | 2 -- src/wgt/wgt_installer.cc | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc b/src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc index 10c44a7..7275621 100644 --- a/src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc +++ b/src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc @@ -23,8 +23,6 @@ const std::vector kExtractEntries = { "config.xml", "index.html", "author-signature.xml", - "signature1.xml", - "signature2.xml" }; const std::vector& GetExtractEntries() { diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index 96c9494..2ccdd6f 100755 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -376,6 +376,7 @@ void WgtInstaller::MountInstallSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -420,6 +421,7 @@ void WgtInstaller::MountUpdateSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); -- 2.7.4 From 7da7343d758dc64435da6e89c86dc0e2e7252b1b Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Tue, 10 Apr 2018 19:34:36 +0900 Subject: [PATCH 10/16] Add signature removal process for hybrid pkg Change-Id: I748d38a05f91822df41d692ace94981eb732f3a2 Signed-off-by: Junghyun Yeon --- src/hybrid/hybrid_installer.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index 9be075e..b0e4e17 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -72,6 +72,7 @@ #include #include #include +#include #include #include #include @@ -129,6 +130,7 @@ void HybridInstaller::InstallSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -181,6 +183,7 @@ void HybridInstaller::UpdateSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -279,6 +282,7 @@ void HybridInstaller::DeltaSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -358,6 +362,7 @@ void HybridInstaller::MountInstallSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -410,6 +415,7 @@ void HybridInstaller::MountUpdateSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -466,6 +472,7 @@ void HybridInstaller::ManifestDirectInstallSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -504,6 +511,7 @@ void HybridInstaller::ManifestDirectUpdateSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -544,6 +552,7 @@ void HybridInstaller::ManifestPartialInstallSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep(); AddStep(); AddStep( @@ -569,6 +578,7 @@ void HybridInstaller::ManifestPartialUpdateSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep( ci::configuration::StepParseManifest::ManifestLocation::INSTALLED, ci::configuration::StepParseManifest::StoreLocation::BACKUP); -- 2.7.4 From 4c092ba40e1945e99382516de319d4cc4aa3581a Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Thu, 12 Apr 2018 13:22:40 +0900 Subject: [PATCH 11/16] Fix coding rule by including header Change-Id: Ia2e3f0ff6e31c3be0a7a134b707e7579f0a6f9f5 Signed-off-by: Junghyun Yeon --- src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc b/src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc index 7275621..3ac814c 100644 --- a/src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc +++ b/src/wgt/step/filesystem/step_wgt_prepare_package_directory.cc @@ -11,6 +11,8 @@ #include #include +#include + namespace bf = boost::filesystem; namespace bs = boost::system; namespace ci = common_installer; -- 2.7.4 From d09f3884e60f2de0cf96c664d1c63e1acf6dc2c2 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Mon, 11 Dec 2017 11:11:47 +0900 Subject: [PATCH 12/16] Add StepRevokeTrustAnchor steps for several installation cases. - When updating pkg has failed, trust anchor should be revoked. Related changes: [app-installers] : https://review.tizen.org/gerrit/#/c/158351/ Change-Id: Ifaf443083b8ba4b3130cc6db3d145f7e5386e334 Signed-off-by: Junghyun Yeon --- src/wgt/wgt_installer.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index 2ccdd6f..4119763 100755 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -85,6 +85,7 @@ #include #include #include +#include #include #include @@ -202,6 +203,7 @@ void WgtInstaller::UpdateSteps() { AddStep(); AddStep(); AddStep(true); + AddStep(); AddStep(); AddStep(); AddStep(); @@ -270,6 +272,7 @@ void WgtInstaller::ReinstallSteps() { ci::configuration::StepParseManifest::StoreLocation::BACKUP); AddStep(); AddStep(); + AddStep(); AddStep(); AddStep(); AddStep(); @@ -317,6 +320,7 @@ void WgtInstaller::DeltaSteps() { AddStep(); AddStep(); AddStep(true); + AddStep(); AddStep(); AddStep(); AddStep(); @@ -362,6 +366,8 @@ void WgtInstaller::RecoverySteps() { AddStep(); AddStep(); AddStep(); + AddStep( + ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE); } void WgtInstaller::MountInstallSteps() { @@ -433,6 +439,7 @@ void WgtInstaller::MountUpdateSteps() { ci::configuration::StepParseManifest::ManifestLocation::INSTALLED, ci::configuration::StepParseManifest::StoreLocation::BACKUP); AddStep(); + AddStep(); AddStep(); AddStep(); AddStep(); @@ -603,6 +610,7 @@ void WgtInstaller::ReadonlyUpdateUninstallSteps() { AddStep(); AddStep(); AddStep(); + AddStep(); AddStep( ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE); AddStep( -- 2.7.4 From fdf2ef6333ea07eaaba1e538018e97edd620ef58 Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Fri, 11 May 2018 15:45:57 +0900 Subject: [PATCH 13/16] Release version 0.10.2 Changes: - Add StepSaveSignature at mount install or update - Add signature removal process for hybrid pkg - Fix coding rule by including header - Add StepRevokeTrustAnchor steps for several installation cases. Change-Id: I5f87775ba01b93d8cd8fb47534bf5e03b01be9c4 Signed-off-by: Junghyun Yeon --- 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 27edded..067c743 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.10.1 +Version: 0.10.2 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From c5d7db16d58d929d1f3dcc983c1002204578f35d Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Thu, 17 May 2018 20:06:49 +0900 Subject: [PATCH 14/16] Set default value of app-control visibility attribute Change-Id: I1567d0e729f3c47cfdf30fae003799198e9dc9ed Signed-off-by: Sangyoon Jang --- src/wgt/step/configuration/step_parse.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wgt/step/configuration/step_parse.cc b/src/wgt/step/configuration/step_parse.cc index 1637c54..58b5baf 100644 --- a/src/wgt/step/configuration/step_parse.cc +++ b/src/wgt/step/configuration/step_parse.cc @@ -625,6 +625,7 @@ bool StepParse::FillAppControl(manifest_x* manifest) { app_control->operation = strdup(control.operation().c_str()); app_control->mime = strdup(control.mime().c_str()); app_control->uri = strdup(control.uri().c_str()); + app_control->visibility = strdup("local-only"); app->appcontrol = g_list_append(app->appcontrol, app_control); } } -- 2.7.4 From 0001d423317ec8808343ffbc819d34bcd26956c9 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Thu, 17 May 2018 20:19:31 +0900 Subject: [PATCH 15/16] Release version 0.10.3 Changes: - Set default value of app-control visibility attribute Change-Id: I5c9987ab8c7efefaae6d9c3866551bf46025b07e 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 067c743..b8f1734 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.10.2 +Version: 0.10.3 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 192eddd5a83d207a760c025c328e3096f8debdca Mon Sep 17 00:00:00 2001 From: Junghyun Yeon Date: Tue, 15 May 2018 20:29:49 +0900 Subject: [PATCH 16/16] Supplement ParserPlugin - Adjust order of steps. - Add StepRecoverParserPlugin. Related changes: [app-installers] : https://review.tizen.org/gerrit/178962 Change-Id: I1754f5b733b02da58135f40817dcbd8dac51eb0a Signed-off-by: Junghyun Yeon --- src/hybrid/hybrid_installer.cc | 4 ++-- src/wgt/wgt_installer.cc | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) mode change 100755 => 100644 src/wgt/wgt_installer.cc diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index b0e4e17..0789366 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -237,8 +237,6 @@ void HybridInstaller::UninstallSteps() { AddStep( ci::configuration::StepParseManifest::ManifestLocation::INSTALLED, ci::configuration::StepParseManifest::StoreLocation::NORMAL); - AddStep( - ci::Plugin::ActionType::Uninstall); AddStep(); AddStep(); AddStep(); @@ -254,6 +252,8 @@ void HybridInstaller::UninstallSteps() { ci::security::StepPrivacyPrivilege::ActionType::Uninstall); AddStep(); AddStep(); + AddStep( + ci::Plugin::ActionType::Uninstall); AddStep(); } diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc old mode 100755 new mode 100644 index 4119763..9fdf8df --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include @@ -240,8 +241,6 @@ void WgtInstaller::UninstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep( - ci::Plugin::ActionType::Uninstall); AddStep(); AddStep(); AddStep(); @@ -254,6 +253,8 @@ void WgtInstaller::UninstallSteps() { ci::security::StepPrivacyPrivilege::ActionType::Uninstall); AddStep(); AddStep(); + AddStep( + ci::Plugin::ActionType::Uninstall); AddStep(); } @@ -353,6 +354,7 @@ void WgtInstaller::RecoverySteps() { ci::configuration::StepParseManifest::ManifestLocation::RECOVERY, ci::configuration::StepParseManifest::StoreLocation::NORMAL); AddStep(); + AddStep(); AddStep(); AddStep(); AddStep(); -- 2.7.4