Add OS upgrade script 65/87965/2 accepted/tizen/common/20160912.181839 accepted/tizen/ivi/20160912.215654 accepted/tizen/mobile/20160912.215603 accepted/tizen/tv/20160912.215618 accepted/tizen/wearable/20160912.215637 submit/tizen/20160912.103710
authorJihoon Jung <jh8801.jung@samsung.com>
Mon, 12 Sep 2016 10:26:39 +0000 (19:26 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Mon, 12 Sep 2016 10:35:51 +0000 (19:35 +0900)
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
Change-Id: I4f967960b351178af67dd073ee04a99ca60e47b1

packaging/mtp-responder.spec
scripts/mtp-responder-upgrade.sh [new file with mode: 0755]

index 2f951f5..d21811b 100755 (executable)
@@ -5,7 +5,7 @@ ExcludeArch: %arm aarch64
 
 Name:       mtp-responder
 Summary:    Media Transfer Protocol daemon (responder)
-Version:    0.0.12
+Version:    0.0.13
 Release:    1
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
@@ -23,6 +23,7 @@ BuildRequires: pkgconfig(capi-system-info)
 Buildrequires: pkgconfig(storage)
 Requires(post): /usr/bin/vconftool
 
+%define upgrade_script_path /usr/share/upgrade/scripts
 
 %description
 This package includes a daemon which processes Media Transper Protocol(MTP) commands as MTP responder role.
@@ -45,6 +46,9 @@ make %{?jobs:-j%jobs}
 mkdir -p %{buildroot}%{_libdir}/udev/rules.d
 cp packaging/99-mtp-responder.rules %{buildroot}%{_libdir}/udev/rules.d/99-mtp-responder.rules
 
+mkdir -p %{buildroot}%{upgrade_script_path}
+cp -f scripts/%{name}-upgrade.sh %{buildroot}%{upgrade_script_path}
+
 install -D -m 0644 mtp-responder.service %{buildroot}%{_libdir}/systemd/system/mtp-responder.service
 
 %post
@@ -58,4 +62,5 @@ ln -sf %{_libdir}/systemd/system/mtp-responder.service %{_sysconfdir}/systemd/de
 %{_libdir}/systemd/system/mtp-responder.service
 %{_libdir}/udev/rules.d/99-mtp-responder.rules
 /opt/var/lib/misc/mtp-responder.conf
+%{upgrade_script_path}/%{name}-upgrade.sh
 #%license LICENSE.APLv2
diff --git a/scripts/mtp-responder-upgrade.sh b/scripts/mtp-responder-upgrade.sh
new file mode 100755 (executable)
index 0000000..468d41d
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+#----------------------------------------------#
+# mtp-responder patch for upgrade (2.4 -> 3.0) #
+#----------------------------------------------#
+
+# Macro
+MTP_RESPONDER_CONF=/opt/var/lib/misc/mtp-responder.conf
+
+chown owner:users $MTP_RESPONDER_CONF
+chsmack -a "_" $MTP_RESPONDER_CONF