From a6ff43f836d62bfa383c8cda625fc6283242ef72 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Thu, 18 Apr 2019 11:16:49 +0900 Subject: [PATCH 01/16] Release version 0.12.1 Changes: - Fix double free - Do not call Init() for initialize steps Change-Id: I24802f28ff828fa6d9944d80714d377b4dca8d89 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 abd8c79..118957c 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.12.0 +Version: 0.12.1 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 22d083ab8899b7a6b143985e40f80284ac63b37a Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Thu, 18 Apr 2019 13:51:30 +0900 Subject: [PATCH 02/16] Fix build error on hybrid backend Change-Id: I78e6da2e672a2a903dc09cb4897c76a739807603 Signed-off-by: Sangyoon Jang --- src/hybrid/hybrid_installer.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index 4a258a2..d87ba82 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -119,7 +119,6 @@ namespace hybrid { HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr) : AppInstaller("wgt", pkgmgr) { - Init(); context_->cross_app_rules.set(true); context_->backend_data.set(new HybridBackendData()); } -- 2.7.4 From 646bf7a8490e90f1adc9bacd53825495b19b98ab Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Thu, 18 Apr 2019 14:44:45 +0900 Subject: [PATCH 03/16] Release version 0.12.2 Changes: - Fix build error on hybrid backend Change-Id: I9cdbb2ec99f10c7f1c72ca12b0159cbb1837582a 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 118957c..104f5f7 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.12.1 +Version: 0.12.2 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 345270807279bd0e9d07e48c6c4c2eca441fb171 Mon Sep 17 00:00:00 2001 From: ilho Date: Mon, 15 Apr 2019 18:41:10 +0900 Subject: [PATCH 04/16] Combine Signature Steps StepCheckSignature and StepSaveSignature are combined Related changes [app-installers] https://review.tizen.org/gerrit/#/c/platform/core/appfw/app-installers/+/203140/ [tpk-backend] https://review.tizen.org/gerrit/#/c/platform/core/appfw/tpk-backend/+/203141/ [wgt-backend] https://review.tizen.org/gerrit/#/c/platform/core/appfw/wgt-backend/+/203513/ Change-Id: I5385c1503e3d55eb291f0c7d6455c21a07fe4301 Signed-off-by: ilho --- src/hybrid/hybrid_installer.cc | 35 +++++++------------- .../step_direct_manifest_check_signature.h | 28 ---------------- ...nature.cc => step_direct_manifest_signature.cc} | 8 ++--- .../step/security/step_direct_manifest_signature.h | 34 +++++++++++++++++++ src/wgt/wgt_installer.cc | 38 ++++++++-------------- 5 files changed, 63 insertions(+), 80 deletions(-) delete mode 100644 src/wgt/step/security/step_direct_manifest_check_signature.h rename src/wgt/step/security/{step_direct_manifest_check_signature.cc => step_direct_manifest_signature.cc} (53%) create mode 100644 src/wgt/step/security/step_direct_manifest_signature.h diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index d87ba82..424b3cb 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -70,7 +70,6 @@ #include #include #include -#include #include #include #include @@ -80,7 +79,7 @@ #include #include #include -#include +#include #include #include #include @@ -137,8 +136,7 @@ void HybridInstaller::InstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -193,8 +191,7 @@ void HybridInstaller::UpdateSteps() { wgt::configuration::StepParse::ConfigLocation::RESOURCE_WGT, true); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -296,8 +293,7 @@ void HybridInstaller::DeltaSteps() { wgt::configuration::StepParse::ConfigLocation::RESOURCE_WGT, true); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -378,8 +374,7 @@ void HybridInstaller::MountInstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -434,8 +429,7 @@ void HybridInstaller::MountUpdateSteps() { wgt::configuration::StepParse::ConfigLocation::RESOURCE_WGT, true); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -493,8 +487,7 @@ void HybridInstaller::ManifestDirectInstallSteps() { wgt::configuration::StepParse::ConfigLocation::INSTALLED, true); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -535,8 +528,7 @@ void HybridInstaller::ManifestDirectUpdateSteps() { wgt::configuration::StepParse::ConfigLocation::INSTALLED, true); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -579,8 +571,7 @@ void HybridInstaller::ManifestPartialInstallSteps() { AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::OVERWRITE); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep(); AddStep(); AddStep( @@ -607,8 +598,7 @@ void HybridInstaller::ManifestPartialUpdateSteps() { AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::OVERWRITE); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep( ci::configuration::StepParseManifest::ManifestLocation::INSTALLED, ci::configuration::StepParseManifest::StoreLocation::BACKUP); @@ -661,8 +651,7 @@ void HybridInstaller::ReadonlyUpdateInstallSteps() { wgt::configuration::StepParse::ConfigLocation::RESOURCE_WGT, true); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep(); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::BOTH); @@ -721,7 +710,7 @@ void HybridInstaller::ReadonlyUpdateUninstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(false); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); diff --git a/src/wgt/step/security/step_direct_manifest_check_signature.h b/src/wgt/step/security/step_direct_manifest_check_signature.h deleted file mode 100644 index a56a998..0000000 --- a/src/wgt/step/security/step_direct_manifest_check_signature.h +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved -// Use of this source code is governed by an apache-2.0 license that can be -// found in the LICENSE file. - -#ifndef WGT_STEP_SECURITY_STEP_DIRECT_MANIFEST_CHECK_SIGNATURE_H_ -#define WGT_STEP_SECURITY_STEP_DIRECT_MANIFEST_CHECK_SIGNATURE_H_ - -#include -#include - -namespace wgt { -namespace security { - -class StepDirectManifestCheckSignature - : public common_installer::security::StepCheckSignature { - public: - using StepCheckSignature::StepCheckSignature; - - private: - boost::filesystem::path GetSignatureRoot() const override; - - STEP_NAME(StepDirectManifestCheckSignature) -}; - -} // namespace security -} // namespace wgt - -#endif // WGT_STEP_SECURITY_STEP_DIRECT_MANIFEST_CHECK_SIGNATURE_H_ diff --git a/src/wgt/step/security/step_direct_manifest_check_signature.cc b/src/wgt/step/security/step_direct_manifest_signature.cc similarity index 53% rename from src/wgt/step/security/step_direct_manifest_check_signature.cc rename to src/wgt/step/security/step_direct_manifest_signature.cc index 469a490..8d3e646 100644 --- a/src/wgt/step/security/step_direct_manifest_check_signature.cc +++ b/src/wgt/step/security/step_direct_manifest_signature.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved +// Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved // Use of this source code is governed by an apache-2.0 license that can be // found in the LICENSE file. -#include "wgt/step/security/step_direct_manifest_check_signature.h" +#include "wgt/step/security/step_direct_manifest_signature.h" namespace bf = boost::filesystem; @@ -15,8 +15,8 @@ const char kResWgt[] = "res/wgt"; namespace wgt { namespace security { -bf::path StepDirectManifestCheckSignature::GetSignatureRoot() const { - return StepCheckSignature::GetSignatureRoot() / kResWgt; +bf::path StepDirectManifestSignature::GetSignatureRoot() const { + return StepSignature::GetSignatureRoot() / kResWgt; } } // namespace security diff --git a/src/wgt/step/security/step_direct_manifest_signature.h b/src/wgt/step/security/step_direct_manifest_signature.h new file mode 100644 index 0000000..d7910f2 --- /dev/null +++ b/src/wgt/step/security/step_direct_manifest_signature.h @@ -0,0 +1,34 @@ +// Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved +// Use of this source code is governed by an apache-2.0 license that can be +// found in the LICENSE file. + +#ifndef WGT_STEP_SECURITY_STEP_DIRECT_MANIFEST_SIGNATURE_H_ +#define WGT_STEP_SECURITY_STEP_DIRECT_MANIFEST_SIGNATURE_H_ + +#include +#include + +namespace ci = common_installer; + +namespace wgt { +namespace security { + +class StepDirectManifestSignature + : public ci::security::StepSignature { + public: + using StepSignature::StepSignature; + + StepDirectManifestSignature(ci::InstallerContext* context, + bool save_signature) : + ci::security::StepSignature(context, save_signature) {} + + private: + boost::filesystem::path GetSignatureRoot() const override; + + STEP_NAME(StepDirectManifestSignature) +}; + +} // namespace security +} // namespace wgt + +#endif // WGT_STEP_SECURITY_STEP_DIRECT_MANIFEST_SIGNATURE_H_ diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index 285bf57..885353a 100644 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -80,7 +80,6 @@ #include #include #include -#include #include #include #include @@ -93,7 +92,7 @@ #include #include #include -#include +#include #include #include @@ -119,7 +118,7 @@ #include "wgt/step/security/step_check_wgt_background_category.h" #include "wgt/step/security/step_check_wgt_notification_category.h" #include "wgt/step/security/step_check_wgt_ime_privilege.h" -#include "wgt/step/security/step_direct_manifest_check_signature.h" +#include "wgt/step/security/step_direct_manifest_signature.h" #include "wgt/step/security/step_check_extension_privileges.h" #include "wgt/step/security/step_wgt_recover_signature.h" @@ -143,8 +142,7 @@ void WgtInstaller::InstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -191,8 +189,7 @@ void WgtInstaller::UpdateSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -315,8 +312,7 @@ void WgtInstaller::DeltaSteps() { AddStep("res/wgt/"); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -394,8 +390,7 @@ void WgtInstaller::MountInstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -441,8 +436,7 @@ void WgtInstaller::MountUpdateSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -492,8 +486,7 @@ void WgtInstaller::ManifestDirectInstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -526,8 +519,7 @@ void WgtInstaller::ManifestDirectUpdateSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -565,8 +557,7 @@ void WgtInstaller::ReadonlyUpdateInstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -619,8 +610,7 @@ void WgtInstaller::ReadonlyUpdateUninstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -648,8 +638,7 @@ void WgtInstaller::ManifestPartialInstallSteps() { AddStep( wgt::configuration::StepParse::ConfigLocation::INSTALLED, true); AddStep(); - AddStep(); - AddStep(); + AddStep(true); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); @@ -675,8 +664,7 @@ void WgtInstaller::ManifestPartialUpdateSteps() { AddStep( ci::configuration::StepParseManifest::ManifestLocation::INSTALLED, ci::configuration::StepParseManifest::StoreLocation::BACKUP); - AddStep(); - AddStep(); + AddStep(true); AddStep( ci::security::StepPrivilegeCompatibility::InternalPrivType::WGT); AddStep(); -- 2.7.4 From fd0d702e912fb81e31e5dd46655e1c51bd4e3a83 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Thu, 16 May 2019 12:01:04 +0900 Subject: [PATCH 05/16] Standardize use of STEP_NAME() In case class name is StepExampleClass, Pass "ExampleClass" to STEP_NAME() Change-Id: I94effc1c0d26e1498483bf941d2bf0d0af6f84ba Signed-off-by: Ilho Kim --- src/hybrid/hybrid_installer.cc | 18 +++++++++--------- .../pkgmgr/{step_generate_xml.cc => step_merge_xml.cc} | 14 +++++++------- .../pkgmgr/{step_generate_xml.h => step_merge_xml.h} | 12 ++++++------ src/wgt/step/filesystem/step_create_symbolic_link.h | 2 +- .../filesystem/step_wgt_patch_storage_directories.h | 2 +- src/wgt/step/filesystem/step_wgt_resource_directory.h | 2 +- .../step_wgt_undo_patch_storage_directories.h | 2 +- src/wgt/step/security/step_direct_manifest_signature.h | 2 +- 8 files changed, 27 insertions(+), 27 deletions(-) rename src/hybrid/step/pkgmgr/{step_generate_xml.cc => step_merge_xml.cc} (93%) rename src/hybrid/step/pkgmgr/{step_generate_xml.h => step_merge_xml.h} (79%) diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index 424b3cb..520fada 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -97,7 +97,7 @@ #include "hybrid/step/configuration/step_merge_tpk_privileges.h" #include "hybrid/step/configuration/step_stash_tpk_config.h" #include "hybrid/step/encryption/step_encrypt_resources.h" -#include "hybrid/step/pkgmgr/step_generate_xml.h" +#include "hybrid/step/pkgmgr/step_merge_xml.h" #include "wgt/step/configuration/step_parse.h" #include "wgt/step/configuration/step_set_old_signature_files_location.h" #include "wgt/step/encryption/step_remove_encryption_data.h" @@ -157,7 +157,7 @@ void HybridInstaller::InstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT); @@ -219,7 +219,7 @@ void HybridInstaller::UpdateSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT); @@ -318,7 +318,7 @@ void HybridInstaller::DeltaSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT); @@ -395,7 +395,7 @@ void HybridInstaller::MountInstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT); @@ -456,7 +456,7 @@ void HybridInstaller::MountUpdateSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT); @@ -498,7 +498,7 @@ void HybridInstaller::ManifestDirectInstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::OVERWRITE); @@ -542,7 +542,7 @@ void HybridInstaller::ManifestDirectUpdateSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::OVERWRITE); @@ -676,7 +676,7 @@ void HybridInstaller::ReadonlyUpdateInstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); + AddStep(); AddStep(); AddStep( hybrid::configuration::StepMergeTpkConfig::MergeType::CONCAT); diff --git a/src/hybrid/step/pkgmgr/step_generate_xml.cc b/src/hybrid/step/pkgmgr/step_merge_xml.cc similarity index 93% rename from src/hybrid/step/pkgmgr/step_generate_xml.cc rename to src/hybrid/step/pkgmgr/step_merge_xml.cc index 10246e9..0c87c0d 100644 --- a/src/hybrid/step/pkgmgr/step_generate_xml.cc +++ b/src/hybrid/step/pkgmgr/step_merge_xml.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by an apache-2.0 license that can be // found in the LICENSE file. -#include "hybrid/step/pkgmgr/step_generate_xml.h" +#include "hybrid/step/pkgmgr/step_merge_xml.h" #include #include @@ -51,7 +51,7 @@ const std::vector> kApplicationNodeNames = { namespace hybrid { namespace pkgmgr { -bool StepGenerateXml::LoadXmlDocument(const bf::path& wgt_xml_path, +bool StepMergeXml::LoadXmlDocument(const bf::path& wgt_xml_path, const bf::path& tpk_xml_path) { // trim blanks int keep_blanks = xmlKeepBlanksDefault(0); @@ -71,7 +71,7 @@ bool StepGenerateXml::LoadXmlDocument(const bf::path& wgt_xml_path, return true; } -xmlNodePtr StepGenerateXml::GetXmlNode(const xmlDocPtr doc, +xmlNodePtr StepMergeXml::GetXmlNode(const xmlDocPtr doc, const std::string& name, const std::string& attr, const std::string& attr_val) { xmlXPathContextPtr ctxt = xmlXPathNewContext(doc); @@ -98,7 +98,7 @@ xmlNodePtr StepGenerateXml::GetXmlNode(const xmlDocPtr doc, return node; } -void StepGenerateXml::MergeXmlNode(xmlNodePtr node1, xmlNodePtr node2) { +void StepMergeXml::MergeXmlNode(xmlNodePtr node1, xmlNodePtr node2) { xmlNodePtr last = xmlGetLastChild(node1); xmlNodePtr next; // merge node2's child into node1 @@ -116,13 +116,13 @@ void StepGenerateXml::MergeXmlNode(xmlNodePtr node1, xmlNodePtr node2) { } } -void StepGenerateXml::SetXmlNodeAttribute(xmlNodePtr node, +void StepMergeXml::SetXmlNodeAttribute(xmlNodePtr node, const std::string& attr, const std::string& attr_val) { xmlSetProp(node, reinterpret_cast(attr.c_str()), reinterpret_cast(attr_val.c_str())); } -ci::Step::Status StepGenerateXml::process() { +ci::Step::Status StepMergeXml::process() { bf::path wgt_xml_path = context_->xml_path.get(); bf::path tpk_xml_path = context_->GetPkgPath() / "tizen-manifest.xml"; @@ -172,7 +172,7 @@ ci::Step::Status StepGenerateXml::process() { return Status::OK; } -ci::Step::Status StepGenerateXml::precheck() { +ci::Step::Status StepMergeXml::precheck() { bf::path wgt_xml_path = context_->xml_path.get(); if (!bf::exists(wgt_xml_path)) { LOG(ERROR) << "Converted config file not found: " << wgt_xml_path; diff --git a/src/hybrid/step/pkgmgr/step_generate_xml.h b/src/hybrid/step/pkgmgr/step_merge_xml.h similarity index 79% rename from src/hybrid/step/pkgmgr/step_generate_xml.h rename to src/hybrid/step/pkgmgr/step_merge_xml.h index 8fce64d..7f75295 100644 --- a/src/hybrid/step/pkgmgr/step_generate_xml.h +++ b/src/hybrid/step/pkgmgr/step_merge_xml.h @@ -2,8 +2,8 @@ // Use of this source code is governed by an apache-2.0 license that can be // found in the LICENSE file. -#ifndef HYBRID_STEP_PKGMGR_STEP_GENERATE_XML_H_ -#define HYBRID_STEP_PKGMGR_STEP_GENERATE_XML_H_ +#ifndef HYBRID_STEP_PKGMGR_STEP_MERGE_XML_H_ +#define HYBRID_STEP_PKGMGR_STEP_MERGE_XML_H_ #include @@ -16,10 +16,10 @@ namespace hybrid { namespace pkgmgr { -class StepGenerateXml : public common_installer::Step { +class StepMergeXml : public common_installer::Step { public: using Step::Step; - explicit StepGenerateXml(common_installer::InstallerContext* context) + explicit StepMergeXml(common_installer::InstallerContext* context) : Step(context), wgt_doc_(nullptr), tpk_doc_(nullptr) {} Status process() override; Status clean() override { return Status::OK; } @@ -38,10 +38,10 @@ class StepGenerateXml : public common_installer::Step { xmlDocPtr wgt_doc_; xmlDocPtr tpk_doc_; - STEP_NAME(GenerateXml2); + STEP_NAME(MergeXml); }; } // namespace pkgmgr } // namespace hybrid -#endif // HYBRID_STEP_PKGMGR_STEP_GENERATE_XML_H_ +#endif // HYBRID_STEP_PKGMGR_STEP_MERGE_XML_H_ diff --git a/src/wgt/step/filesystem/step_create_symbolic_link.h b/src/wgt/step/filesystem/step_create_symbolic_link.h index 048c759..c1129e7 100644 --- a/src/wgt/step/filesystem/step_create_symbolic_link.h +++ b/src/wgt/step/filesystem/step_create_symbolic_link.h @@ -55,7 +55,7 @@ class StepCreateSymbolicLink : public common_installer::Step { private: bool CreateSymlinksForApps(); - STEP_NAME(SymbolicLink) + STEP_NAME(CreateSymbolicLink) }; } // namespace filesystem diff --git a/src/wgt/step/filesystem/step_wgt_patch_storage_directories.h b/src/wgt/step/filesystem/step_wgt_patch_storage_directories.h index 96c5da6..f6692c6 100644 --- a/src/wgt/step/filesystem/step_wgt_patch_storage_directories.h +++ b/src/wgt/step/filesystem/step_wgt_patch_storage_directories.h @@ -31,7 +31,7 @@ class StepWgtPatchStorageDirectories : bool ShareDirFor3x(); bool CreatePrivateTmpDir(); - STEP_NAME(PatchWgtStorageDirectories) + STEP_NAME(WgtPatchStorageDirectories) }; } // namespace filesystem diff --git a/src/wgt/step/filesystem/step_wgt_resource_directory.h b/src/wgt/step/filesystem/step_wgt_resource_directory.h index f5437fd..f81ebd5 100644 --- a/src/wgt/step/filesystem/step_wgt_resource_directory.h +++ b/src/wgt/step/filesystem/step_wgt_resource_directory.h @@ -53,7 +53,7 @@ class StepWgtResourceDirectory : public common_installer::Step { */ Status precheck() override { return Status::OK; } - STEP_NAME(CreateWgtResourceDirectory) + STEP_NAME(WgtResourceDirectory) }; } // namespace filesystem diff --git a/src/wgt/step/filesystem/step_wgt_undo_patch_storage_directories.h b/src/wgt/step/filesystem/step_wgt_undo_patch_storage_directories.h index e8494ad..00c1dcd 100644 --- a/src/wgt/step/filesystem/step_wgt_undo_patch_storage_directories.h +++ b/src/wgt/step/filesystem/step_wgt_undo_patch_storage_directories.h @@ -31,7 +31,7 @@ class StepWgtUndoPatchStorageDirectories : bool UndoShareDirFor3x(); boost::filesystem::path backup_dir_; - STEP_NAME(UndoPatchWgtStorageDirectories) + STEP_NAME(WgtUndoPatchStorageDirectories) }; } // namespace filesystem diff --git a/src/wgt/step/security/step_direct_manifest_signature.h b/src/wgt/step/security/step_direct_manifest_signature.h index d7910f2..df8c7e8 100644 --- a/src/wgt/step/security/step_direct_manifest_signature.h +++ b/src/wgt/step/security/step_direct_manifest_signature.h @@ -25,7 +25,7 @@ class StepDirectManifestSignature private: boost::filesystem::path GetSignatureRoot() const override; - STEP_NAME(StepDirectManifestSignature) + STEP_NAME(DirectManifestSignature) }; } // namespace security -- 2.7.4 From 12851bebf160c185040b18babb4d89eee8372023 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Fri, 26 Apr 2019 15:32:57 +0900 Subject: [PATCH 06/16] Combine Plugin Steps StepRunParserPlugin combines below steps - StepRegisterPluginInfo - StepUpdatePluginInfo - StepUnregisterPluginInfo Related changes [app-installers] https://review.tizen.org/gerrit/#/c/platform/core/appfw/app-installers/+/204652/ [tpk-backend] https://review.tizen.org/gerrit/#/c/platform/core/appfw/tpk-backend/+/204757/ [wgt-backend] https://review.tizen.org/gerrit/#/c/platform/core/appfw/wgt-backend/+/205385/ Change-Id: Ib430c9b0c71c82fc2ccf73e4af8bd1f3db66a470 Signed-off-by: Ilho Kim --- src/hybrid/hybrid_installer.cc | 17 ----------------- src/wgt/wgt_installer.cc | 19 ++----------------- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index 520fada..0e6841c 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -60,14 +60,11 @@ #include #include #include -#include #include #include #include -#include #include #include -#include #include #include #include @@ -171,7 +168,6 @@ void HybridInstaller::InstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Install); - AddStep(); AddStep( wgt::filesystem::HybridAdditionalSharedDirs); AddStep(); @@ -233,7 +229,6 @@ void HybridInstaller::UpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -264,7 +259,6 @@ void HybridInstaller::UninstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Uninstall); - AddStep(); AddStep(); } @@ -332,7 +326,6 @@ void HybridInstaller::DeltaSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -409,7 +402,6 @@ void HybridInstaller::MountInstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Install); - AddStep(); AddStep( wgt::filesystem::HybridAdditionalSharedDirs); AddStep(true); @@ -470,7 +462,6 @@ void HybridInstaller::MountUpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); AddStep(); AddStep(true); AddStep(); @@ -510,7 +501,6 @@ void HybridInstaller::ManifestDirectInstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Install); - AddStep(); AddStep( wgt::filesystem::HybridAdditionalSharedDirs); AddStep(); @@ -554,7 +544,6 @@ void HybridInstaller::ManifestDirectUpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -581,7 +570,6 @@ void HybridInstaller::ManifestPartialInstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Install); - AddStep(); AddStep( wgt::filesystem::HybridAdditionalSharedDirs); AddStep(); @@ -612,7 +600,6 @@ void HybridInstaller::ManifestPartialUpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); AddStep(); AddStep(); } @@ -690,7 +677,6 @@ void HybridInstaller::ReadonlyUpdateInstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -730,7 +716,6 @@ void HybridInstaller::ReadonlyUpdateUninstallSteps() { AddStep(); AddStep(); AddStep(ci::Plugin::ActionType::Upgrade); - AddStep(); } void HybridInstaller::EnablePkgSteps() { @@ -743,7 +728,6 @@ void HybridInstaller::EnablePkgSteps() { ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Enable); AddStep( ci::Plugin::ActionType::Install); - AddStep(); } void HybridInstaller::DisablePkgSteps() { @@ -756,7 +740,6 @@ void HybridInstaller::DisablePkgSteps() { ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Disable); AddStep( ci::Plugin::ActionType::Uninstall); - AddStep(); } void HybridInstaller::MigrateExtImgSteps() { diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index 885353a..2ea02b0 100644 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -67,14 +67,11 @@ #include #include #include -#include #include #include #include -#include #include #include -#include #include #include #include @@ -172,7 +169,6 @@ void WgtInstaller::InstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Install); - AddStep(); AddStep( wgt::filesystem::WgtAdditionalSharedDirs); AddStep(); @@ -228,7 +224,6 @@ void WgtInstaller::UpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -260,7 +255,6 @@ void WgtInstaller::UninstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Uninstall); - AddStep(); AddStep(); } @@ -286,7 +280,8 @@ void WgtInstaller::ReinstallSteps() { AddStep(); AddStep( ci::security::StepRegisterTrustAnchor::RegisterType::UPDATE); - AddStep(); + AddStep( + ci::Plugin::ActionType::Upgrade); AddStep( ci::security::StepPrivacyPrivilege::ActionType::Update); AddStep(); @@ -348,7 +343,6 @@ void WgtInstaller::DeltaSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -419,7 +413,6 @@ void WgtInstaller::MountInstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Install); - AddStep(); AddStep( wgt::filesystem::WgtAdditionalSharedDirs); AddStep(true); @@ -472,7 +465,6 @@ void WgtInstaller::MountUpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); AddStep(); AddStep(true); AddStep(); @@ -504,7 +496,6 @@ void WgtInstaller::ManifestDirectInstallSteps() { ci::security::StepPrivacyPrivilege::ActionType::Install); AddStep(); AddStep(ci::Plugin::ActionType::Install); - AddStep(); AddStep( wgt::filesystem::WgtAdditionalSharedDirs); AddStep(); @@ -542,7 +533,6 @@ void WgtInstaller::ManifestDirectUpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -591,7 +581,6 @@ void WgtInstaller::ReadonlyUpdateInstallSteps() { ci::security::StepPrivacyPrivilege::ActionType::Update); AddStep(); AddStep(ci::Plugin::ActionType::Upgrade); - AddStep(); AddStep(); AddStep(); } @@ -630,7 +619,6 @@ void WgtInstaller::ReadonlyUpdateUninstallSteps() { AddStep(); AddStep(); AddStep(ci::Plugin::ActionType::Upgrade); - AddStep(); } void WgtInstaller::ManifestPartialInstallSteps() { @@ -650,7 +638,6 @@ void WgtInstaller::ManifestPartialInstallSteps() { ci::security::StepPrivacyPrivilege::ActionType::Install); AddStep(); AddStep(ci::Plugin::ActionType::Install); - AddStep(); AddStep( wgt::filesystem::WgtAdditionalSharedDirs); AddStep(); @@ -678,7 +665,6 @@ void WgtInstaller::ManifestPartialUpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); AddStep(); AddStep(); } @@ -737,7 +723,6 @@ void WgtInstaller::DisablePkgSteps() { ci::pkgmgr::StepUpdatePkgDisableInfo::ActionType::Disable); AddStep( ci::Plugin::ActionType::Uninstall); - AddStep(); } void WgtInstaller::MigrateExtImgSteps() { -- 2.7.4 From 685cda0812ce778ac9b4281e9fa2931c87f15b84 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Fri, 26 Apr 2019 14:55:58 +0900 Subject: [PATCH 07/16] Fix ManifestDirectInstall mode of hybrid installer Installer should parse modified (tpk & wgt combined) manifest. (Some information such as preload are needed) Change-Id: Iefee0992f526de4fa2d5f5cbc56e1a78bfd80782 Signed-off-by: Sangyoon Jang --- src/hybrid/hybrid_installer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index 0e6841c..281c9f4 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -510,7 +510,7 @@ void HybridInstaller::ManifestDirectInstallSteps() { void HybridInstaller::ManifestDirectUpdateSteps() { AddStep(pkgmgr_); AddStep( - ci::configuration::StepParseManifest::ManifestLocation::PACKAGE, + ci::configuration::StepParseManifest::ManifestLocation::INSTALLED, ci::configuration::StepParseManifest::StoreLocation::NORMAL); AddStep(); AddStep(); @@ -578,7 +578,7 @@ void HybridInstaller::ManifestPartialInstallSteps() { void HybridInstaller::ManifestPartialUpdateSteps() { AddStep(pkgmgr_); AddStep( - ci::configuration::StepParseManifest::ManifestLocation::PACKAGE, + ci::configuration::StepParseManifest::ManifestLocation::INSTALLED, ci::configuration::StepParseManifest::StoreLocation::NORMAL); AddStep(); AddStep( -- 2.7.4 From f5fc65127fb15f77c4e2a55031509ec0e7bd9087 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Fri, 31 May 2019 15:28:22 +0900 Subject: [PATCH 08/16] Release version 0.12.3 Changes: - Combine Signature Steps - Standardize use of STEP_NAME() - Combine Plugin Steps - Fix ManifestDirectInstall mode of hybrid installer Change-Id: Ib440faba650a08e45f7f4b20299fb7914c936aa1 Signed-off-by: Ilho Kim --- 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 104f5f7..e0a3a76 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.12.2 +Version: 0.12.3 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From a6692a0341532dd823af0759bc710e8d75558ccc Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Wed, 29 May 2019 19:08:21 +0900 Subject: [PATCH 09/16] Fix namespace of StepCreateRecoveryFile Requires: - https://review.tizen.org/gerrit/c/platform/core/appfw/app-installers/+/206959 Change-Id: Ib2f20b2e44b97136349be85a2edfcafc95a63fd0 Signed-off-by: Sangyoon Jang --- src/hybrid/hybrid_installer.cc | 12 ++++++------ src/wgt/wgt_installer.cc | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index 281c9f4..05bb788 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -121,7 +121,7 @@ HybridInstaller::HybridInstaller(common_installer::PkgMgrPtr pkgmgr) void HybridInstaller::InstallSteps() { AddStep(pkgmgr_); - AddStep(); + AddStep(); AddStep(); AddStep( ci::configuration::StepParseManifest::ManifestLocation::PACKAGE, @@ -176,7 +176,7 @@ void HybridInstaller::InstallSteps() { void HybridInstaller::UpdateSteps() { AddStep(pkgmgr_); - AddStep(); + AddStep(); AddStep(); AddStep( ci::configuration::StepParseManifest::ManifestLocation::PACKAGE, @@ -269,7 +269,7 @@ void HybridInstaller::ReinstallSteps() { void HybridInstaller::DeltaSteps() { AddStep(pkgmgr_); - AddStep(); + AddStep(); AddStep(); AddStep( ci::configuration::StepParseManifest::ManifestLocation::PACKAGE, @@ -355,7 +355,7 @@ void HybridInstaller::RecoverySteps() { void HybridInstaller::MountInstallSteps() { AddStep(pkgmgr_); - AddStep(); + AddStep(); AddStep(); AddStep( ci::configuration::StepParseManifest::ManifestLocation::PACKAGE, @@ -410,7 +410,7 @@ void HybridInstaller::MountInstallSteps() { void HybridInstaller::MountUpdateSteps() { AddStep(pkgmgr_); - AddStep(); + AddStep(); AddStep(); AddStep( ci::configuration::StepParseManifest::ManifestLocation::PACKAGE, @@ -627,7 +627,7 @@ void HybridInstaller::PartialUninstallSteps() { void HybridInstaller::ReadonlyUpdateInstallSteps() { AddStep(pkgmgr_); - AddStep(); + AddStep(); AddStep(); AddStep( ci::configuration::StepParseManifest::ManifestLocation::PACKAGE, diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index 2ea02b0..f1daad4 100644 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -130,7 +130,7 @@ WgtInstaller::WgtInstaller(ci::PkgMgrPtr pkgrmgr) void WgtInstaller::InstallSteps() { AddStep(pkgmgr_); - AddStep(); + AddStep(); AddStep(); AddStep( wgt::configuration::StepParse::ConfigLocation::PACKAGE, true); @@ -177,7 +177,7 @@ void WgtInstaller::InstallSteps() { void WgtInstaller::UpdateSteps() { AddStep(pkgmgr_); - AddStep(); + AddStep(); AddStep(); AddStep( wgt::configuration::StepParse::ConfigLocation::PACKAGE, true); @@ -291,7 +291,7 @@ void WgtInstaller::ReinstallSteps() { void WgtInstaller::DeltaSteps() { AddStep(pkgmgr_); - AddStep(); + AddStep(); AddStep(); AddStep( wgt::configuration::StepParse::ConfigLocation::PACKAGE, false); @@ -375,7 +375,7 @@ void WgtInstaller::RecoverySteps() { void WgtInstaller::MountInstallSteps() { AddStep(pkgmgr_); - AddStep(); + AddStep(); AddStep(); AddStep( wgt::configuration::StepParse::ConfigLocation::PACKAGE, true); @@ -421,7 +421,7 @@ void WgtInstaller::MountInstallSteps() { void WgtInstaller::MountUpdateSteps() { AddStep(pkgmgr_); - AddStep(); + AddStep(); AddStep(); AddStep( wgt::configuration::StepParse::ConfigLocation::PACKAGE, true); @@ -540,7 +540,7 @@ void WgtInstaller::ManifestDirectUpdateSteps() { void WgtInstaller::ReadonlyUpdateInstallSteps() { AddStep(pkgmgr_); - AddStep(); + AddStep(); AddStep(); AddStep( wgt::configuration::StepParse::ConfigLocation::PACKAGE, true); -- 2.7.4 From 04822105b65526314a775b1e7f969673f6d47705 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Tue, 23 Apr 2019 19:06:30 +0900 Subject: [PATCH 10/16] Fix smoke test helper To use custom step, we need to derive a new class. (refer: https://review.tizen.org/gerrit/c/platform/core/appfw/app-installers/+/203760) Change-Id: I5d4eff6403f22b2ee081df5e412d073d27827944 Signed-off-by: Sangyoon Jang --- src/unit_tests/smoke_test_helper.cc | 46 ++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/src/unit_tests/smoke_test_helper.cc b/src/unit_tests/smoke_test_helper.cc index d767cdb..8ddf3df 100644 --- a/src/unit_tests/smoke_test_helper.cc +++ b/src/unit_tests/smoke_test_helper.cc @@ -27,6 +27,45 @@ class StepCrash : public ci::Step { STEP_NAME(Crash) }; +#define OVERRIDE_STEPS_BLOCK(STEPS) \ + void STEPS() override { \ + wgt::WgtInstaller::STEPS(); \ + if (crash_at_ > -1) \ + AddStepAtIndex(crash_at_); \ + else \ + AddStep(); \ + } \ + +class CrashWgtInstaller : public wgt::WgtInstaller { + public: + explicit CrashWgtInstaller(ci::PkgMgrPtr pkgmgr, int crash_at) + : wgt::WgtInstaller(pkgmgr), crash_at_(crash_at) { } + + private: + OVERRIDE_STEPS_BLOCK(InstallSteps) + OVERRIDE_STEPS_BLOCK(UpdateSteps) + OVERRIDE_STEPS_BLOCK(UninstallSteps) + OVERRIDE_STEPS_BLOCK(ReinstallSteps) + OVERRIDE_STEPS_BLOCK(DeltaSteps) + OVERRIDE_STEPS_BLOCK(MoveSteps) + OVERRIDE_STEPS_BLOCK(RecoverySteps) + OVERRIDE_STEPS_BLOCK(MountInstallSteps) + OVERRIDE_STEPS_BLOCK(MountUpdateSteps) + OVERRIDE_STEPS_BLOCK(ManifestDirectInstallSteps) + OVERRIDE_STEPS_BLOCK(ManifestDirectUpdateSteps) + OVERRIDE_STEPS_BLOCK(ManifestPartialInstallSteps) + OVERRIDE_STEPS_BLOCK(ManifestPartialUpdateSteps) + OVERRIDE_STEPS_BLOCK(PartialUninstallSteps) + OVERRIDE_STEPS_BLOCK(ReadonlyUpdateInstallSteps) + OVERRIDE_STEPS_BLOCK(ReadonlyUpdateUninstallSteps) + OVERRIDE_STEPS_BLOCK(DisablePkgSteps) + OVERRIDE_STEPS_BLOCK(EnablePkgSteps) + OVERRIDE_STEPS_BLOCK(MigrateExtImgSteps) + OVERRIDE_STEPS_BLOCK(RecoverDBSteps) + + int crash_at_; +}; + } // namespace // this main of test binay in done purely for recovery smoke test. @@ -48,12 +87,7 @@ int main(int argc, char** argv) { return EINVAL; } - wgt::WgtInstaller installer(pkgmgr); - if (index != -1) { - installer.AddStepAtIndex(index); - } else { - installer.AddStep(); - } + ::CrashWgtInstaller installer(pkgmgr, index); return (installer.Run() == ci::AppInstaller::Result::OK) ? 0 : 1; } -- 2.7.4 From 0becaef30f1a5009d540a98e2c50a3ecf547a61e Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Tue, 11 Jun 2019 17:37:07 +0900 Subject: [PATCH 11/16] Fix name of some steps The name of class StepExampleClass should be "ExampleClass" Change-Id: I4aac55bf8fc15e8c41a4542865d1888a7f408c07 Signed-off-by: Sangyoon Jang --- src/wgt/step/pkgmgr/step_generate_xml.h | 2 +- src/wgt/step/security/step_check_wgt_background_category.h | 2 ++ src/wgt/step/security/step_wgt_recover_signature.h | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wgt/step/pkgmgr/step_generate_xml.h b/src/wgt/step/pkgmgr/step_generate_xml.h index f9a893f..d531226 100644 --- a/src/wgt/step/pkgmgr/step_generate_xml.h +++ b/src/wgt/step/pkgmgr/step_generate_xml.h @@ -51,7 +51,7 @@ class StepGenerateXml : public common_installer::Step { void GenerateShortcuts(xmlTextWriterPtr writer); void GenerateTrustAnchor(xmlTextWriterPtr writer); - STEP_NAME(GenerateXML) + STEP_NAME(GenerateXml) }; } // namespace pkgmgr diff --git a/src/wgt/step/security/step_check_wgt_background_category.h b/src/wgt/step/security/step_check_wgt_background_category.h index dd21574..dc05769 100644 --- a/src/wgt/step/security/step_check_wgt_background_category.h +++ b/src/wgt/step/security/step_check_wgt_background_category.h @@ -23,6 +23,8 @@ class StepCheckWgtBackgroundCategory : protected: bool GetBackgroundSupport() override; + + STEP_NAME(CheckWgtBackgroundCategory) }; } // namespace security diff --git a/src/wgt/step/security/step_wgt_recover_signature.h b/src/wgt/step/security/step_wgt_recover_signature.h index 66545d7..8f37c4d 100644 --- a/src/wgt/step/security/step_wgt_recover_signature.h +++ b/src/wgt/step/security/step_wgt_recover_signature.h @@ -19,6 +19,8 @@ class StepWgtRecoverSignature private: boost::filesystem::path GetSignatureRoot() override; + + STEP_NAME(WgtRecoverSignature) }; } // namespace security -- 2.7.4 From 3182b3bb890161b475ad6117025e17f6089f9068 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Wed, 26 Jun 2019 10:51:06 +0900 Subject: [PATCH 12/16] Release version 0.12.4 Changes: - Fix namespace of StepCreateRecoveryFile - Fix smoke test helper - Fix name of some steps Change-Id: Idccf26c9ac8fe5f08e49dab2ca1dc9338e46d8c1 Signed-off-by: Ilho Kim --- 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 e0a3a76..7cb928e 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.12.3 +Version: 0.12.4 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From a770189844fb60344d0703ad12f29c54da2d2304 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Tue, 14 May 2019 17:13:32 +0900 Subject: [PATCH 13/16] Combine StorageDirectories Steps Combined step : - StepCreateStorageDirectories and StepCreatePerUserStorageDirectories - StepUpdateStorageDirectories and StepUpdatePerUserStorageDirectories - StepRecoverStorageDirectories and StepRecoverPerUserStorageDirectories Related changes [app-installers] https://review.tizen.org/gerrit/#/c/platform/core/appfw/app-installers/+/206075/ [tpk-backend] https://review.tizen.org/gerrit/#/c/platform/core/appfw/tpk-backend/+/206194/ [wgt-backend] https://review.tizen.org/gerrit/#/c/platform/core/appfw/wgt-backend/+/206193/ Change-Id: I2a23cede0e634a844868c8910e2440c0f34fd552 Signed-off-by: Ilho Kim --- src/hybrid/hybrid_installer.cc | 29 ++++++++++------------------- src/wgt/wgt_installer.cc | 27 +++++++++------------------ 2 files changed, 19 insertions(+), 37 deletions(-) diff --git a/src/hybrid/hybrid_installer.cc b/src/hybrid/hybrid_installer.cc index 05bb788..373a984 100644 --- a/src/hybrid/hybrid_installer.cc +++ b/src/hybrid/hybrid_installer.cc @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -34,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -45,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -152,7 +149,6 @@ void HybridInstaller::InstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -168,7 +164,7 @@ void HybridInstaller::InstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Install); - AddStep( + AddStep( wgt::filesystem::HybridAdditionalSharedDirs); AddStep(); AddStep(); @@ -207,7 +203,6 @@ void HybridInstaller::UpdateSteps() { AddStep(true); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -229,7 +224,7 @@ void HybridInstaller::UpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); + AddStep(); AddStep(); AddStep(); } @@ -304,7 +299,6 @@ void HybridInstaller::DeltaSteps() { AddStep(true); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -326,7 +320,7 @@ void HybridInstaller::DeltaSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); + AddStep(); AddStep(); AddStep(); } @@ -341,7 +335,6 @@ void HybridInstaller::RecoverySteps() { AddStep(); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -386,7 +379,6 @@ void HybridInstaller::MountInstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -402,7 +394,7 @@ void HybridInstaller::MountInstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Install); - AddStep( + AddStep( wgt::filesystem::HybridAdditionalSharedDirs); AddStep(true); AddStep(); @@ -441,7 +433,6 @@ void HybridInstaller::MountUpdateSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -462,7 +453,7 @@ void HybridInstaller::MountUpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); + AddStep(); AddStep(true); AddStep(); } @@ -501,7 +492,7 @@ void HybridInstaller::ManifestDirectInstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Install); - AddStep( + AddStep( wgt::filesystem::HybridAdditionalSharedDirs); AddStep(); AddStep(); @@ -544,7 +535,7 @@ void HybridInstaller::ManifestDirectUpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); + AddStep(); AddStep(); AddStep(); } @@ -570,7 +561,7 @@ void HybridInstaller::ManifestPartialInstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Install); - AddStep( + AddStep( wgt::filesystem::HybridAdditionalSharedDirs); AddStep(); } @@ -600,7 +591,7 @@ void HybridInstaller::ManifestPartialUpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); + AddStep(); AddStep(); } @@ -677,7 +668,7 @@ void HybridInstaller::ReadonlyUpdateInstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); + AddStep(); AddStep(); AddStep(); } diff --git a/src/wgt/wgt_installer.cc b/src/wgt/wgt_installer.cc index f1daad4..32d0539 100644 --- a/src/wgt/wgt_installer.cc +++ b/src/wgt/wgt_installer.cc @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -40,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -50,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -154,7 +151,6 @@ void WgtInstaller::InstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -169,7 +165,7 @@ void WgtInstaller::InstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Install); - AddStep( + AddStep( wgt::filesystem::WgtAdditionalSharedDirs); AddStep(); AddStep(); @@ -207,7 +203,6 @@ void WgtInstaller::UpdateSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -224,7 +219,7 @@ void WgtInstaller::UpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); + AddStep(); AddStep(); AddStep(); } @@ -326,7 +321,6 @@ void WgtInstaller::DeltaSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -343,7 +337,7 @@ void WgtInstaller::DeltaSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); + AddStep(); AddStep(); AddStep(); } @@ -360,7 +354,6 @@ void WgtInstaller::RecoverySteps() { AddStep(); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -398,7 +391,6 @@ void WgtInstaller::MountInstallSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -413,7 +405,7 @@ void WgtInstaller::MountInstallSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Install); - AddStep( + AddStep( wgt::filesystem::WgtAdditionalSharedDirs); AddStep(true); AddStep(); @@ -449,7 +441,6 @@ void WgtInstaller::MountUpdateSteps() { AddStep(); AddStep(); AddStep(); - AddStep(); AddStep(); AddStep(); AddStep(); @@ -465,7 +456,7 @@ void WgtInstaller::MountUpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); + AddStep(); AddStep(true); AddStep(); } @@ -496,7 +487,7 @@ void WgtInstaller::ManifestDirectInstallSteps() { ci::security::StepPrivacyPrivilege::ActionType::Install); AddStep(); AddStep(ci::Plugin::ActionType::Install); - AddStep( + AddStep( wgt::filesystem::WgtAdditionalSharedDirs); AddStep(); AddStep(); @@ -533,7 +524,7 @@ void WgtInstaller::ManifestDirectUpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); + AddStep(); AddStep(); AddStep(); } @@ -638,7 +629,7 @@ void WgtInstaller::ManifestPartialInstallSteps() { ci::security::StepPrivacyPrivilege::ActionType::Install); AddStep(); AddStep(ci::Plugin::ActionType::Install); - AddStep( + AddStep( wgt::filesystem::WgtAdditionalSharedDirs); AddStep(); } @@ -665,7 +656,7 @@ void WgtInstaller::ManifestPartialUpdateSteps() { AddStep(); AddStep( ci::Plugin::ActionType::Upgrade); - AddStep(); + AddStep(); AddStep(); } -- 2.7.4 From ced1d2ec391f3fe01ad8612446ccd820a50d5430 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Fri, 12 Jul 2019 15:48:06 +0900 Subject: [PATCH 14/16] Release version 0.12.5 Changes: - Combine StorageDirectories Steps Change-Id: I722ee780dd90927abca44a69c2a564bbc5f2c171 Signed-off-by: Ilho Kim --- 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 7cb928e..7f5f962 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.12.4 +Version: 0.12.5 Release: 1 Group: Application Framework/Package Management License: Apache-2.0 -- 2.7.4 From 1f7868218392268ec8c4b102f0a1c59f2dbc1a58 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Wed, 17 Jul 2019 17:04:16 +0900 Subject: [PATCH 15/16] Fix smoke test Add process to initialize DB for test Requires: - https://review.tizen.org/gerrit/#/c/platform/core/appfw/app-installers/+/210253/ Change-Id: I492d2fe68b2c50c7adffb000442d6f6be0f08ac3 Signed-off-by: Ilho Kim --- src/unit_tests/extensive_smoke_test.cc | 1 + src/unit_tests/smoke_test.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/src/unit_tests/extensive_smoke_test.cc b/src/unit_tests/extensive_smoke_test.cc index 1f0a8ab..e35c2fc 100644 --- a/src/unit_tests/extensive_smoke_test.cc +++ b/src/unit_tests/extensive_smoke_test.cc @@ -27,6 +27,7 @@ class SmokeEnvironment : public testing::Environment { backups_ = SetupBackupDirectories(test_user.uid); for (auto& path : backups_) ASSERT_TRUE(BackupPath(path)); + ASSERT_TRUE(InitTestDB(test_user.uid)); } void TearDown() override { ASSERT_TRUE(request_mode_ == ci::RequestMode::GLOBAL || diff --git a/src/unit_tests/smoke_test.cc b/src/unit_tests/smoke_test.cc index d61b444..a271059 100644 --- a/src/unit_tests/smoke_test.cc +++ b/src/unit_tests/smoke_test.cc @@ -32,6 +32,7 @@ class SmokeEnvironment : public testing::Environment { backups_ = SetupBackupDirectories(test_user.uid); for (auto& path : backups_) ASSERT_TRUE(BackupPath(path)); + ASSERT_TRUE(InitTestDB(test_user.uid)); } void TearDown() override { ASSERT_TRUE(request_mode_ == ci::RequestMode::GLOBAL || -- 2.7.4 From 69f89f4169a9a785b152a8668203ecbb0af1f5c4 Mon Sep 17 00:00:00 2001 From: ilho kim Date: Mon, 22 Jul 2019 05:35:02 +0000 Subject: [PATCH 16/16] Revert "Fix smoke test" This reverts commit 1f7868218392268ec8c4b102f0a1c59f2dbc1a58. Change-Id: I0d442b650f0d8eab06e197ec34f7d09164076968 --- src/unit_tests/extensive_smoke_test.cc | 1 - src/unit_tests/smoke_test.cc | 1 - 2 files changed, 2 deletions(-) diff --git a/src/unit_tests/extensive_smoke_test.cc b/src/unit_tests/extensive_smoke_test.cc index e35c2fc..1f0a8ab 100644 --- a/src/unit_tests/extensive_smoke_test.cc +++ b/src/unit_tests/extensive_smoke_test.cc @@ -27,7 +27,6 @@ class SmokeEnvironment : public testing::Environment { backups_ = SetupBackupDirectories(test_user.uid); for (auto& path : backups_) ASSERT_TRUE(BackupPath(path)); - ASSERT_TRUE(InitTestDB(test_user.uid)); } void TearDown() override { ASSERT_TRUE(request_mode_ == ci::RequestMode::GLOBAL || diff --git a/src/unit_tests/smoke_test.cc b/src/unit_tests/smoke_test.cc index a271059..d61b444 100644 --- a/src/unit_tests/smoke_test.cc +++ b/src/unit_tests/smoke_test.cc @@ -32,7 +32,6 @@ class SmokeEnvironment : public testing::Environment { backups_ = SetupBackupDirectories(test_user.uid); for (auto& path : backups_) ASSERT_TRUE(BackupPath(path)); - ASSERT_TRUE(InitTestDB(test_user.uid)); } void TearDown() override { ASSERT_TRUE(request_mode_ == ci::RequestMode::GLOBAL || -- 2.7.4