Revert "Apply TZ_SYS_UPGRADE path to libtota" 26/202126/1 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix tizen_5.5_tv accepted/tizen/5.5/unified/20191031.022921 accepted/tizen/5.5/unified/mobile/hotfix/20201027.090604 accepted/tizen/unified/20190326.024530 submit/tizen/20190325.064448 submit/tizen_5.5/20191031.000004 submit/tizen_5.5_mobile_hotfix/20201026.185104 tizen_5.5.m2_release
authorSunmin Lee <sunm.lee@samsung.com>
Mon, 18 Mar 2019 06:31:51 +0000 (15:31 +0900)
committerSunmin Lee <sunm.lee@samsung.com>
Mon, 18 Mar 2019 06:31:51 +0000 (15:31 +0900)
This reverts commit 51ac92fd026376df3e83cce93568c3f5f1f27379.

Change-Id: I147572bea17c1fd57aa97ffb7a13408f2144dd26

CMakeLists.txt
packaging/libtota.spec
ss_engine/fota_common.h [moved from ss_engine/fota_common.h.in with 95% similarity]
ss_engine/fota_log.c

index 09abc70..325ee98 100755 (executable)
@@ -1,12 +1,6 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 PROJECT(tota C)
 
-CONFIGURE_FILE(
-       ${CMAKE_CURRENT_SOURCE_DIR}/ss_engine/fota_common.h.in
-       ${CMAKE_CURRENT_SOURCE_DIR}/ss_engine/fota_common.h
-       @ONLY
-)
-
 SET(SRCS
        ss_engine/SS_Common.c
        ss_engine/sha1.c
index 9e8abcd..9e34d36 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          libtota
 Summary:       fota update library
-Version:       1.2.6
+Version:       1.2.7
 Release:       0
 Group:         System
 License:       Apache-2.0 and BSD-2-Clause and BSD-3-Clause and PD
@@ -8,7 +8,6 @@ Source0:        %{name}-%{version}.tar.gz
 
 BuildRequires: cmake
 BuildRequires: pkgconfig(liblzma-tool)
-BuildRequires: pkgconfig(libtzplatform-config)
 
 %description
 Fota update agent which update firmware using delta files
@@ -32,8 +31,7 @@ mkdir cmake_tmp
 cd cmake_tmp
 LDFLAGS="$LDFLAGS"
 %cmake .. \
-       -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-       -DTZ_SYS_UPGRADE_DATA=%TZ_SYS_UPGRADE_DATA
+       -DCMAKE_INSTALL_PREFIX=%{_prefix}
 
 make %{?jobs:-j%jobs}
 
@@ -42,8 +40,12 @@ cd cmake_tmp
 %make_install
 #mkdir -p %{buildroot}/usr/lib/
 cp libtota.a %{buildroot}%{_libdir}/libtota.a
-%define tota_dir %TZ_SYS_UPGRADE_DATA
-mkdir -p %{buildroot}%{tota_dir}
+%post
+
+%posttrans
+if [ ! -e /opt/data/recovery ]; then
+       ln -sf /opt/data/update /opt/data/recovery
+fi
 
 
 %files
@@ -52,7 +54,7 @@ mkdir -p %{buildroot}%{tota_dir}
 %license LICENSE.BSD-2-Clause
 %license LICENSE.BSD-3-Clause
 %{_libdir}/libtota.so.*
-%{tota_dir}
+#%manifest fota.manifest
 
 %files devel
 %defattr(-,root,root,-)
similarity index 95%
rename from ss_engine/fota_common.h.in
rename to ss_engine/fota_common.h
index 8e6bbe6..8213546 100755 (executable)
@@ -64,8 +64,7 @@ typedef unsigned long long u64;
 #define SECTOR_SIZE                    512
 #define SS_KERNEL_DELTA_HEADER         128
 
-#define SS_COMMON_FOTA_PATH            "@TZ_SYS_UPGRADE_DATA@"
-#define SS_COMMON_WORKSPACE            "/system/" SS_COMMON_FOTA_PATH
+#define SS_COMMON_WORKSPACE                    "/system/opt/usr/data/fota"
 #define SS_KERNEL_UNPACK_SCRIPT                "unpack.sh"
 #define SS_KERN_UNPK_SCRIPT_PATH       SS_COMMON_WORKSPACE "/" SS_KERNEL_UNPACK_SCRIPT
 #define SS_BACKUP_SOURCE               SS_COMMON_WORKSPACE "/saved.file"       //How to make sure there is SPACE
@@ -77,7 +76,7 @@ typedef unsigned long long u64;
 #define SS_STAT_TARGET                 SS_KERNEL_WORKSPACE "/stat"
 #define SS_DD_TARGET                   SS_KERNEL_WORKSPACE "/dd"
 //#define SS_UPDATE_STATUR_PATH                SS_COMMON_WORKSPACE "/UP.STATUS"
-#define SS_UPDATE_STATUR_PATH          SS_COMMON_WORKSPACE "/UP.STATUS"
+#define SS_UPDATE_STATUR_PATH          "/system/opt/data/recovery/UP.STATUS"
 
 #define SS_GZIP_SOURCE                 "system/bin/gzip"
 #define SS_STAT_SOURCE                 "system/usr/bin/stat"
index c044381..348dba0 100755 (executable)
@@ -25,9 +25,8 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
-#include "fota_common.h"
 
-#define LOG_SIZE_OPT_PATH              SS_COMMON_FOTA_PATH"/.ua_log_size"
+#define LOG_SIZE_OPT_PATH              "/opt/data/recovery/.ua_log_size"
 #define DEF_MAX_LOG_SIZE               (2*1024*1024)
 #define MAX_FILE_PATH                  512