diff options
author | Sunmin Lee <sunm.lee@samsung.com> | 2017-01-04 14:29:12 +0900 |
---|---|---|
committer | Sunmin Lee <sunm.lee@samsung.com> | 2017-03-01 21:56:39 -0800 |
commit | 383e6d3cd574a40f58634f5064ab8619cfae7789 (patch) | |
tree | 6e0958f1b9ed9819779bab4132f80a360d102783 | |
parent | a3ddca89de27fadbd04c076d730db787d8de7b8b (diff) | |
download | system-plugin-383e6d3cd574a40f58634f5064ab8619cfae7789.tar.gz system-plugin-383e6d3cd574a40f58634f5064ab8619cfae7789.tar.bz2 system-plugin-383e6d3cd574a40f58634f5064ab8619cfae7789.zip |
Upgrade: Move RW update files
RW update files are moved to separate package:
system-rw-update
Change-Id: Iee40b4e5d8c07beafdb47f41cffdf2150486edaf
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
-rw-r--r-- | packaging/system-plugin.spec | 26 | ||||
-rw-r--r-- | scripts/make_upgrade_image.sh | 88 | ||||
-rw-r--r-- | units/init-update.service | 10 | ||||
-rw-r--r-- | units/offline-update.service | 9 | ||||
-rwxr-xr-x | upgrade/update-init.sh | 26 | ||||
-rwxr-xr-x | upgrade/update.sh | 32 |
6 files changed, 0 insertions, 191 deletions
diff --git a/packaging/system-plugin.spec b/packaging/system-plugin.spec index 72d6cb6..7ad5065 100644 --- a/packaging/system-plugin.spec +++ b/packaging/system-plugin.spec @@ -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 index b6f1433..0000000 --- a/scripts/make_upgrade_image.sh +++ /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 index 672a76a..0000000 --- a/units/init-update.service +++ /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 index adc8f12..0000000 --- a/units/offline-update.service +++ /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 index 371abfe..0000000 --- a/upgrade/update-init.sh +++ /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 index 0985749..0000000 --- a/upgrade/update.sh +++ /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 |