summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhyunuktak <hyunuk.tak@samsung.com>2016-08-29 04:13:35 (GMT)
committerhyunuktak <hyunuk.tak@samsung.com>2016-08-29 04:13:37 (GMT)
commit69a8bedfd37134ac85430482e1e0c0fad22a6c6d (patch)
treedc9eda3d371bfd729902fd13662d351765fc17ff
parentd42a852c982ca8493d97a4f477b96cbe5aa614a6 (diff)
downloadconnman-69a8bedfd37134ac85430482e1e0c0fad22a6c6d.zip
connman-69a8bedfd37134ac85430482e1e0c0fad22a6c6d.tar.gz
connman-69a8bedfd37134ac85430482e1e0c0fad22a6c6d.tar.bz2
Change-Id: I67fbc8121de8e928ff16c3bd05b7a8f56133a616 Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
-rwxr-xr-xpackaging/connman.spec9
-rwxr-xr-xscripts/connman_upgrade.sh12
2 files changed, 20 insertions, 1 deletions
diff --git a/packaging/connman.spec b/packaging/connman.spec
index 39690e6..064fec4 100755
--- a/packaging/connman.spec
+++ b/packaging/connman.spec
@@ -4,7 +4,7 @@
Name: connman
Version: 1.29
-Release: 16
+Release: 17
License: GPL-2.0+
Summary: Connection Manager
Url: http://connman.net
@@ -34,6 +34,8 @@ Requires(preun): systemd
Requires(postun): systemd
Requires: net-config
+%define upgrade_script_path /usr/share/upgrade/scripts
+
%description
Connection Manager provides a daemon for managing Internet connections
within embedded devices running the Linux operating system.
@@ -184,6 +186,10 @@ cp COPYING %{buildroot}%{_datadir}/license/connman
cp vpn/vpn-dbus.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/connman-vpn-dbus.conf
%endif
+#OS Upgrade
+mkdir -p %{buildroot}%{upgrade_script_path}
+cp -f scripts/connman_upgrade.sh %{buildroot}%{upgrade_script_path}
+
%post
chsmack -a 'System' /%{_localstatedir}/lib/connman
chsmack -a 'System' /%{_localstatedir}/lib/connman/settings
@@ -220,6 +226,7 @@ systemctl daemon-reload
%attr(644,root,root) %{_libdir}/systemd/system/sockets.target.wants/connman.socket
%endif
%{_datadir}/license/connman
+%{upgrade_script_path}/connman_upgrade.sh
%files test
%manifest connman.manifest
diff --git a/scripts/connman_upgrade.sh b/scripts/connman_upgrade.sh
new file mode 100755
index 0000000..83f222b
--- /dev/null
+++ b/scripts/connman_upgrade.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+#-----------------------------------------------#
+# connman patch script for upgrade (2.4 -> 3.0) #
+#-----------------------------------------------#
+
+#/%{_localstatedir} = /opt/var
+
+chsmack -a 'System' /opt/var/lib/connman
+chsmack -a 'System' /opt/var/lib/connman/settings
+