Upgrade: Move RW update files 36/108336/5
authorSunmin Lee <sunm.lee@samsung.com>
Wed, 4 Jan 2017 05:29:12 +0000 (14:29 +0900)
committerSunmin Lee <sunm.lee@samsung.com>
Thu, 2 Mar 2017 05:56:39 +0000 (21:56 -0800)
RW update files are moved to separate package:
 system-rw-update

Change-Id: Iee40b4e5d8c07beafdb47f41cffdf2150486edaf
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
packaging/system-plugin.spec
scripts/make_upgrade_image.sh [deleted file]
units/init-update.service [deleted file]
units/offline-update.service [deleted file]
upgrade/update-init.sh [deleted file]
upgrade/update.sh [deleted file]

index 72d6cb68890587a970f829fbfb4ddcec19f283b3..7ad506591c6335db0901c7bda2bc73fa47eb10ed 100644 (file)
@@ -90,13 +90,6 @@ License: Apache-2.0
 %description -n systemd-user-helper
 Systemd user launch helper supports Tizen specific feature like directory compatibility and container.
 
-%package -n system-upgrade
-Summary: System upgrade available patch
-License: Apache-2.0
-
-%description -n system-upgrade
-Systemd offline system update activation package
-
 %package profile_ivi
 Summary: ivi specific system configuration files
 Requires: %{name} = %{version}-%{release}
@@ -193,16 +186,6 @@ install -m 644 units/tizen-fstrim-user.service %{buildroot}%{_unitdir}
 mkdir -p %{buildroot}%{_bindir}
 install -m 755 scripts/tizen-fstrim-on-charge.sh %{buildroot}%{_bindir}
 
-# upgrade
-mkdir -p %{buildroot}%{_datadir}
-cp -r upgrade %{buildroot}%{_datadir}
-mkdir -p %{buildroot}%{_unitdir}/system-update.target.wants
-install -m 644 units/init-update.service %{buildroot}%{_unitdir}
-install -m 644 units/offline-update.service %{buildroot}%{_unitdir}
-ln -s ../init-update.service %{buildroot}%{_unitdir}/system-update.target.wants/init-update.service
-ln -s ../getty.target %{buildroot}%{_unitdir}/system-update.target.wants
-ln -s ../cynara.socket %{buildroot}%{_unitdir}/system-update.target.wants
-
 # ivi
 install -m 755 scripts/usb_net_init.sh %{buildroot}%{_bindir}
 
@@ -328,15 +311,6 @@ mv %{_sysconfdir}/fstab_lazymnt %{_sysconfdir}/fstab
 %{_bindir}/test_lazymount
 %endif
 
-%files -n system-upgrade
-%{_datadir}/upgrade/*
-%{_unitdir}/offline-update.service
-%{_unitdir}/init-update.service
-#%{_unitdir}/system-update.target.wants/offline-update.service
-%{_unitdir}/system-update.target.wants/init-update.service
-%{_unitdir}/system-update.target.wants/getty.target
-%{_unitdir}/system-update.target.wants/cynara.socket
-
 %files -n systemd-user-helper
 %manifest systemd-user-helper.manifest
 %caps(cap_sys_admin,cap_mac_admin,cap_mac_override,cap_dac_override,cap_setgid=ei) %{_bindir}/systemd_user_helper
diff --git a/scripts/make_upgrade_image.sh b/scripts/make_upgrade_image.sh
deleted file mode 100644 (file)
index b6f1433..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/sh
-#
-# make_upgrade_image.sh
-#
-#  Convert Tizen 3.0 platform image to upgrade image (2.4 -> 3.0)
-
-# For sdb debugging
-
-sdb_debugging=0
-sdb_rule='SUBSYSTEM=="switch", ATTR{name}=="usb_cable", ATTR{state}=="1", RUN+="/usr/bin/direct_set_debug.sh --sdb-set"\nSUBSYSTEM=="switch", ATTR{name}=="usb_cable", ATTR{state}=="0", RUN+="/usr/bin/direct_set_debug.sh --sdb-unset"'
-
-# Back up /home/owner & rpm db
-backup () {
-       echo "Back up home & rpm db"
-
-       local tmp_path=$1
-
-       umount ${tmp_path}
-       e2fsck -f rootfs.img
-       resize2fs rootfs.img 1G
-       mount rootfs.img ${tmp_path}
-
-       mount system-data.img ${tmp_path}/opt
-       mount user.img ${tmp_path}/opt/usr
-
-       mkdir ${tmp_path}/usr/share/upgrade/data/home
-       cp -af ${tmp_path}/opt/usr/home/owner ${tmp_path}/usr/share/upgrade/data/home
-
-       mkdir ${tmp_path}/usr/share/upgrade/data/rpm
-       cp -af ${tmp_path}/opt/var/lib/rpm/* ${tmp_path}/usr/share/upgrade/data/rpm
-
-       sync
-
-       umount -l ${tmp_path}/opt/usr
-       umount -l ${tmp_path}/opt
-
-       umount ${tmp_path}
-       e2fsck -f rootfs.img
-       resize2fs -M rootfs.img
-       mount rootfs.img ${tmp_path}
-}
-
-if [ `id -u` -ne 0 ]
-then
-       echo "make_upgrade_image.sh should be executed as root"
-       exit
-fi
-
-if [ ! $1 ]
-then
-       echo "usage: $0 [tizen-3.0-image(tar.gz)]"
-       exit
-fi
-
-echo "Decompressing $1"
-imgs=`tar zxvf $1`
-
-tmp_root=`mktemp -d system.XXX`
-echo "Mount rootfs.img"
-mount rootfs.img ${tmp_root}
-
-cwd=`pwd`
-backup ${cwd}/${tmp_root}
-
-echo "Make /system-update"
-ln -s /usr/share/upgrade/ ${tmp_root}/system-update
-
-# For sdb debugging
-if [ ${sdb_debugging} -eq 1 ]
-then
-       echo "Install sdb rule file"
-       rule_file="99-sdb-switch.rules"
-       echo ${sdb_rule} > ${rule_file}
-       install -m 644 ${rule_file} ${tmp_root}/usr/lib/udev/rules.d
-       rm ${rule_file}
-fi
-
-sync
-umount ${tmp_root}
-
-upgrade_img=`echo $1 | sed -e 's/\.tar\.gz//'`-upgrade.tar.gz
-echo "Compressing upgrade image ${upgrade_img}"
-tar zcf ${upgrade_img} dzImage modules.img rootfs.img
-
-echo "Remove dummies"
-rm -rf ${imgs} ${tmp_root}
-
-echo "Done"
diff --git a/units/init-update.service b/units/init-update.service
deleted file mode 100644 (file)
index 672a76a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=System update initialize service
-DefaultDependencies=no
-Requires=sysinit.target
-After=sysinit.target
-Before=sdbd.service
-
-[Service]
-Type=oneshot
-ExecStart=/system-update/update-init.sh
diff --git a/units/offline-update.service b/units/offline-update.service
deleted file mode 100644 (file)
index adc8f12..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=System update script service
-DefaultDependencies=no
-Requires=sysinit.target
-After=sysinit.target init-update.service
-
-[Service]
-Type=simple
-ExecStart=/system-update/update.sh
diff --git a/upgrade/update-init.sh b/upgrade/update-init.sh
deleted file mode 100755 (executable)
index 371abfe..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-#
-# RW update initialize script
-#
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-OWNER_HOME=/opt/usr/home/owner
-
-USER_DISK=`ls /dev/disk/by-partlabel/ | grep -i user`
-USER_MNT=/opt/usr
-
-# Mount user partition (specific to lazy mount)
-mount | grep "$USER_MNT" > /dev/null
-
-if [ $? != "0" ]
-then
-       /usr/bin/mount PARTLABEL=$USER_DISK $USER_MNT
-fi
-
-# Create home directory
-test ! -e /opt/usr/home && mkdir -p /opt/usr/home
-chsmack -a "_" /opt/usr/home
-cp -af /usr/share/upgrade/data/home/owner /opt/usr/home
-
-# Copy 3.0 rpm db
-rm -rf /var/lib/rpm/*
-cp -af /usr/share/upgrade/data/rpm/* /var/lib/rpm
diff --git a/upgrade/update.sh b/upgrade/update.sh
deleted file mode 100755 (executable)
index 0985749..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-#
-# RW update script
-#
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-
-PATCH_DIR=/usr/share/upgrade/scripts
-RESULT_FILE=/upgrade_result
-RUN=/bin/sh
-
-# Change to normal mode from next booting
-rm /system-update
-rm /usr/lib/udev/rules.d/99-sdb-switch.rules
-
-# Execute update scripts
-if [ ! -d ${PATCH_DIR} ]
-then
-       echo "FAIL: Upgrade directory does not exist" > ${RESULT_FILE}
-else
-       PATCHES=`/bin/ls ${PATCH_DIR}`
-
-       for PATCH in ${PATCHES}; do
-               ${RUN} ${PATCH_DIR}/${PATCH}
-       done
-
-       sync
-
-       echo "SUCCESS: Upgrade successfully finished" > ${RESULT_FILE}
-fi
-
-# Reboot
-reboot -f