+++ /dev/null
-<manifest>
- <request>
- <domain name="_" />
- </request>
- <assign>
- <filesystem path="/usr/bin/wgt-backend-ut/smoke-test" exec_label="System" />
- <filesystem path="/usr/bin/wgt-backend-ut/smoke-test-helper" exec_label="System" />
- <filesystem path="/usr/bin/wgt-backend-ut/extensive-smoke-test" exec_label="System" />
- </assign>
-</manifest>
Source0: %{name}-%{version}.tar.gz
Source1000: wgt-backend.manifest
-Source1001: wgt-backend-tests.manifest
+Source1001: wgt-installer.manifest
+Source1002: wgt-installer-tests.manifest
+Requires: wgt-installer = %{version}
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: gtest-devel
%description
This is a package that installs the WGT backend of pkgmgr.
-%package tests
-Summary: Unit tests for wgt-backend
-Requires: %{name} = %{version}
+%package -n wgt-installer
+Summary: Wgt-installer library
+Group: Application Framework/Package Management
-%description tests
-Unit tests for wgt-backend
+%description -n wgt-installer
+This package contains wgt-installer library
+
+%package -n wgt-installer-devel
+Summary: Wgt-installer development files
+Group: Application Framework/Package Management
+Requires: wgt-installer = %{version}
+
+%description -n wgt-installer-devel
+This package contains header files of wgt-installer library
+
+%package -n wgt-installer-tests
+Summary: Unit tests for wgt-installer
+Requires: wgt-installer = %{version}
+
+%description -n wgt-installer-tests
+Unit tests for wgt-installer
%prep
%setup -q
cp %{SOURCE1000} .
cp %{SOURCE1001} .
+cp %{SOURCE1002} .
%build
%cmake . -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}
mkdir -p %{buildroot}/etc/package-manager/backend
ln -s %{_bindir}/wgt-backend %{buildroot}%{_sysconfdir}/package-manager/backend/wgt
-%post tests
-/usr/sbin/setcap cap_chown,cap_dac_override,cap_fowner=eip %{_bindir}/wgt-backend-ut/smoke-test
-/usr/sbin/setcap cap_chown,cap_dac_override,cap_fowner=eip %{_bindir}/wgt-backend-ut/smoke-test-helper
+%post -n wgt-installer-tests
+/usr/sbin/setcap cap_chown,cap_dac_override,cap_fowner=eip %{_bindir}/wgt-installer-ut/smoke-test
+/usr/sbin/setcap cap_chown,cap_dac_override,cap_fowner=eip %{_bindir}/wgt-installer-ut/smoke-test-helper
%files
%manifest wgt-backend.manifest
%license LICENSE
%{_sysconfdir}/package-manager/backend/wgt
-%{_sysconfdir}/package-manager/backendlib/libwgt.so
%{_bindir}/wgt-backend
%{_datadir}/wgt-backend/default.png
-%files tests
-%manifest wgt-backend-tests.manifest
-%{_bindir}/wgt-backend-ut/*
-%{_datadir}/wgt-backend-ut/*
+%files -n wgt-installer
+%manifest wgt-installer.manifest
+%{_sysconfdir}/package-manager/backendlib/libwgt.so
+%{_libdir}/libwgt-installer.so*
+%{_libdir}/libhybrid-installer.so*
+
+%files -n wgt-installer-devel
+%{_includedir}/app-installers/wgt/*.h
+%{_includedir}/app-installers/wgt/*/*.h
+%{_includedir}/app-installers/wgt/*/*/*.h
+%{_includedir}/app-installers/hybrid/*.h
+%{_includedir}/app-installers/hybrid/*/*/*.h
+%{_libdir}/pkgconfig/wgt-installer.pc
+
+%files -n wgt-installer-tests
+%manifest wgt-installer-tests.manifest
+%{_bindir}/wgt-installer-ut/*
+%{_datadir}/wgt-installer-ut/*
%changelog
* Thu Dec 18 2015 Pawel Sikorski <p.sikorski@samsung.com> 0.1-1
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_" />
+ </request>
+ <assign>
+ <filesystem path="/usr/bin/wgt-installer-ut/smoke-test" exec_label="System" />
+ <filesystem path="/usr/bin/wgt-installer-ut/smoke-test-helper" exec_label="System" />
+ <filesystem path="/usr/bin/wgt-installer-ut/extensive-smoke-test" exec_label="System" />
+ </assign>
+</manifest>
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_" />
+ </request>
+</manifest>
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/step/configuration HYBRID_STEP_CONFIGURATION_SRCS)
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/step/encryption HYBRID_STEP_ENCRYPTION_SRCS)
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/step/pkgmgr HYBRID_STEP_PKGMGR_SRCS)
-ADD_LIBRARY(${TARGET_LIBNAME_HYBRID} STATIC
+ADD_LIBRARY(${TARGET_LIBNAME_HYBRID} SHARED
${HYBRID_SRCS}
${HYBRID_STEP_CONFIGURATION_SRCS}
${HYBRID_STEP_ENCRYPTION_SRCS}
# Target - in-package deps
TARGET_LINK_LIBRARIES(${TARGET_LIBNAME_HYBRID} PRIVATE ${TARGET_LIBNAME_WGT})
SET_TARGET_PROPERTIES(${TARGET_LIBNAME_HYBRID} PROPERTIES COMPILE_FLAGS "-fPIC")
+
+INSTALL(TARGETS ${TARGET_LIBNAME_HYBRID} DESTINATION ${LIB_INSTALL_DIR})
+INSTALL(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/app-installers/hybrid/
+ FILES_MATCHING PATTERN "*.h")
-SET(DESTINATION_DIR wgt-backend-ut)
+SET(DESTINATION_DIR wgt-installer-ut)
SET(TARGET_SMOKE_UTILS smoke-utils)
# Executables
namespace {
const char kManifestTestcaseData[] =
- "/usr/share/wgt-backend-ut/test_samples/manifest/";
+ "/usr/share/wgt-installer-ut/test_samples/manifest/";
template<typename T>
gint Size(GListRange<T>* range) {
TEST_F(SmokeTest, RecoveryMode_ForInstallation) {
bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForInstallation.wgt";
- ci::Subprocess backend_crash("/usr/bin/wgt-backend-ut/smoke-test-helper");
+ ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
std::string test_uid_str = std::to_string(params.test_user.uid);
backend_crash.Run("-i", path.string(), "-u", test_uid_str.c_str());
ASSERT_NE(backend_crash.Wait(), 0);
std::string pkgid = "smokewgt10";
std::string appid = "smokewgt10.RecoveryModeForUpdate";
AddDataFiles(pkgid, params.test_user.uid);
- ci::Subprocess backend_crash("/usr/bin/wgt-backend-ut/smoke-test-helper");
+ ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
std::string test_uid_str = std::to_string(params.test_user.uid);
backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
ASSERT_NE(backend_crash.Wait(), 0);
bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
ASSERT_EQ(backend.InstallSuccess(path_old), ci::AppInstaller::Result::OK);
- ci::Subprocess backend_crash("/usr/bin/wgt-backend-ut/smoke-test-helper");
+ ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
std::string test_uid_str = std::to_string(params.test_user.uid);
backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
ASSERT_NE(backend_crash.Wait(), 0);
TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForMountInstall.wgt";
RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- ci::Subprocess backend_crash("/usr/bin/wgt-backend-ut/smoke-test-helper");
+ ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
std::string test_uid_str = std::to_string(params.test_user.uid);
backend_crash.Run("-w", path.string(), "-u", test_uid_str.c_str());
ASSERT_NE(backend_crash.Wait(), 0);
ASSERT_EQ(backend.MountInstallSuccess(path_old),
ci::AppInstaller::Result::OK);
AddDataFiles(pkgid, params.test_user.uid);
- ci::Subprocess backend_crash("/usr/bin/wgt-backend-ut/smoke-test-helper");
+ ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
std::string test_uid_str = std::to_string(params.test_user.uid);
backend_crash.Run("-w", path_new.string(), "-u", test_uid_str.c_str());
ASSERT_NE(backend_crash.Wait(), 0);
TEST_F(SmokeTest, RecoveryMode_CrashAfterUnzip) {
bf::path path = kSmokePackagesDirectory / "RecoveryMode_CrashAfterUnzip.wgt";
RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- ci::Subprocess backend_crash("/usr/bin/wgt-backend-ut/smoke-test-helper");
+ ci::Subprocess backend_crash("/usr/bin/wgt-installer-ut/smoke-test-helper");
std::string test_uid_str = std::to_string(params.test_user.uid);
backend_crash.Run("-i", path.string(), "-u", test_uid_str.c_str(),
"-step_name", "Unzip");
namespace smoke_test {
const bf::path kSmokePackagesDirectory =
- "/usr/share/wgt-backend-ut/test_samples/smoke/";
+ "/usr/share/wgt-installer-ut/test_samples/smoke/";
bool ValidatePackage(const std::string& pkgid,
const std::vector<std::string>& appids,
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/utils WGT_UTILS_SRCS)
# Target - definition
-ADD_LIBRARY(${TARGET_LIBNAME_WGT} STATIC
+ADD_LIBRARY(${TARGET_LIBNAME_WGT} SHARED
${WGT_SRCS}
${WGT_STEP_CONFIGURATION_SRCS}
${WGT_STEP_ENCRYPTION_SRCS}
Boost
)
SET_TARGET_PROPERTIES(${TARGET_LIBNAME_WGT} PROPERTIES COMPILE_FLAGS "-fPIC")
+
+INSTALL(TARGETS ${TARGET_LIBNAME_WGT} DESTINATION ${LIB_INSTALL_DIR})
+
+# Export devel package
+CONFIGURE_FILE(wgt-installer.pc.in wgt-installer.pc @ONLY)
+INSTALL(FILES wgt-installer.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+INSTALL(DIRECTORY ./ DESTINATION ${INCLUDEDIR}/app-installers/wgt/
+ FILES_MATCHING PATTERN "*.h")
--- /dev/null
+prefix=@PREFIX@
+exec_prefix=@PREFIX@
+libdir=@LIBDIR@
+includedir=@INCLUDEDIR@
+
+Name: wgt-installer
+Description: Wgt-installer library
+Version: @FULLVER@
+Requires: app-installers pkgmgr wgt-manifest-handlers manifest-parser
+Libs: -L${libdir} -lwgt-installer -lhybrid-installer
+Cflags: -I${includedir}/app-installers/