+++ /dev/null
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-CONFIGURE_FILE(scripts/fota-init.sh.in scripts/fota-init.sh @ONLY)
-CONFIGURE_FILE(scripts/fus_rw-init.sh.in scripts/fus_rw-init.sh @ONLY)
-CONFIGURE_FILE(scripts/restore-passwd.sh.in scripts/restore-passwd.sh @ONLY)
Name: initrd-fota
Summary: package for building ramdisk-recovery.img
-Version: 1.1.2
+Version: 1.1.3
Release: 0
Group: System/Utilities
License: Apache-2.0
ExclusiveArch: %{arm}
BuildRequires: cmake
BuildRequires: gettext-tools
-BuildRequires: pkgconfig(libtzplatform-config)
Requires: util-linux
Requires: grep
%setup -q
%build
-%cmake . -DTZ_SYS_UPGRADE_DATA=%TZ_SYS_UPGRADE_DATA \
- -DTZ_SYS_UPGRADE=%TZ_SYS_UPGRADE
-%__make %{?jobs:-j%jobs}
+
%install
%define init_script_dir %{_libdir}/initrd-recovery/fota
-%define upgrade_dir %TZ_SYS_UPGRADE
+%define upgrade_dir %{_datadir}/upgrade
+
+mkdir -p %{buildroot}/opt/data/update
mkdir -p %{buildroot}%{init_script_dir}
cp ./scripts/fota-init.sh %{buildroot}%{init_script_dir}/fota-init.sh
%attr(700,root,root) %{init_script_dir}/*.sh
%attr(700,root,root) %{upgrade_dir}/restore-passwd.sh
%attr(700,root,root) %{_datadir}/initrd-recovery/initrd.list.d/*.list
+%attr(777,system,system) /opt/data/update
UPI_NO_DELTA_ERROR=fb15
UPI_NO_UA_ERROR=fa17
-STATUS_DIR=${FAKE_ROOT}@TZ_SYS_UPGRADE_DATA@
+STATUS_DIR=${FAKE_ROOT}/opt/data/update
STATUS_FILE=${STATUS_DIR}/RW.STATUS
DELTA_PATH_FILE=${STATUS_DIR}/DELTA.PATH
INT_LOG_DIR=${STATUS_DIR}
INT_LOG_FILE=${INT_LOG_DIR}/fota_internal.log
-FOTA_LOG_DIR=@TZ_SYS_UPGRADE_DATA@
+FOTA_LOG_DIR=/opt/data/update
FOTA_RESULT_DIR=${FOTA_LOG_DIR}
FOTA_TEMP_DIR=${FOTA_LOG_DIR}
SYNC="/bin/sync"
REBOOT="/sbin/reboot"
-INT_LOG_DIR=${FAKE_ROOT}@TZ_SYS_UPGRADE_DATA@
+INT_LOG_DIR=${FAKE_ROOT}/opt/data/update
INT_LOG_FILE=${INT_LOG_DIR}/fota_internal.log
-RESTORE_PASSWD_SCRIPT=@TZ_SYS_UPGRADE@/restore-passwd.sh
-
CAT="/bin/cat"
MOUNT="/bin/mount"
UMOUNT="/bin/umount"
echo "Change into rw update mode" >> ${INT_LOG_FILE}
# Pre-patches
- /bin/chroot ${FAKE_ROOT} /bin/sh -c ${RESTORE_PASSWD_SCRIPT}
+ /bin/chroot ${FAKE_ROOT} /bin/sh -c /usr/share/upgrade/restore-passwd.sh
# Go to system-update.target
if [ $$ = 1 ]; then
#!/bin/sh
-BACKUP_HELPER="@TZ_SYS_UPGRADE@/rw-update-macro.inc"
+BACKUP_HELPER="/usr/share/upgrade/rw-update-macro.inc"
ETC_DIR="/opt/etc"
UID_REGULAR_USER_MIN=5001
UID_REGULAR_USER_MAX=10000