Fix to enable bluetooth adapter 97/43597/1 accepted/tizen/tv/20150713.110959 submit/tizen_tv/20150713.054057
authorseungku kim <seungku.kim@samsung.com>
Fri, 10 Jul 2015 09:43:54 +0000 (18:43 +0900)
committerseungku kim <seungku.kim@samsung.com>
Fri, 10 Jul 2015 10:59:57 +0000 (19:59 +0900)
bt-service privilege is guest.

Change-Id: I0b0921500571bd40c8f36c2d24629df576ca1bbf

bt-service/bluetooth-frwk-service.service [deleted file]
bt-service/org.projectx.bt.service
bt-service/org.projectx.bt.service.in
packaging/bluetooth-frwk-tv.service [new file with mode: 0644]
packaging/bluetooth-frwk.spec

diff --git a/bt-service/bluetooth-frwk-service.service b/bt-service/bluetooth-frwk-service.service
deleted file mode 100644 (file)
index 248b842..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# bt-service check previous BT-connection status and re-activate BT when boot.
-
-[Unit]
-Description=Bluetooth Framework Service
-
-[Service]
-Type=dbus
-BusName=org.projectx.bt
-ExecStart=/usr/bin/bt-service
-RemainAfterExit=yes
-
-[Install]
-WantedBy=tizen-middleware.target
index 7444ab5..d43d517 100644 (file)
@@ -1,5 +1,5 @@
 [D-BUS Service]
 Name=org.projectx.bt
 Exec=/bin/false
-User=root
+User=guest
 SystemdService=bluetooth-frwk.service
index bf43821..799c82b 100644 (file)
@@ -1,4 +1,4 @@
 [D-BUS Service]
 Name=org.projectx.bt
 Exec=/bin/sh -c 'export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$UID/dbus/user_bus_socket; exec /usr/bin/bt-service'
-User=@TZ_SYS_DEFAULT_USER@
+User=guest
diff --git a/packaging/bluetooth-frwk-tv.service b/packaging/bluetooth-frwk-tv.service
new file mode 100644 (file)
index 0000000..2311bcc
--- /dev/null
@@ -0,0 +1,12 @@
+[Unit]
+Description=Bluetooth service
+After=multi-user.target
+
+[Service]
+Type=dbus
+BusName=org.projectx.bt
+ExecStart=/usr/bin/bt-service
+KillMode=process
+
+[Install]
+WantedBy=starter.target
index 21c120f..e2ab053 100644 (file)
@@ -110,19 +110,25 @@ export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
 
+%define _servicefile packaging/bluetooth-frwk-common.service
+%define _servicedir starter.target.wants
+
 %if "%{?profile}" == "mobile"
-echo mobile
 export CFLAGS="$CFLAGS -DTIZEN_NETWORK_TETHERING_ENABLE -DTIZEN_BT_FLIGHTMODE_ENABLED -D__TIZEN_MOBILE__ -DTIZEN_TELEPHONY_ENABLED"
+%define _servicefile packaging/bluetooth-frwk-mobile.service
+%define _servicedir multi-user.target.wants
 %endif
 
 %if "%{?profile}" == "wearable"
-echo wearable
 export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
+%define _servicefile packaging/bluetooth-frwk-wearable.service
+%define _servicedir multi-user.target.wants
 %endif
 
 %if "%{?profile}" == "tv"
-echo tv
 export CFLAGS="$CFLAGS -DUSB_BLUETOOTH -DTIZEN_TV"
+#%define _servicefile packaging/bluetooth-frwk-tv.service
+#%define _servicedir starter.target.wants
 %endif
 
 %ifarch x86_64
@@ -170,8 +176,11 @@ install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk
 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-service
 install -D -m 0644 LICENSE %{buildroot}%{_datadir}/license/bluetooth-frwk-devel
 
-mkdir -p %{buildroot}%{_libdir}/systemd/user
-install -m 0644 bt-service/bluetooth-frwk-service.service %{buildroot}%{_libdir}/systemd/user
+#mkdir -p %{buildroot}%{_libdir}/systemd/user
+#install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_libdir}/systemd/user
+mkdir -p %{buildroot}%{_libdir}/systemd/system/%{_servicedir}
+install -m 0644 %{_servicefile} %{buildroot}%{_libdir}/systemd/system/bluetooth-frwk.service
+ln -s ../bluetooth-frwk.service %{buildroot}%{_libdir}/systemd/system/%{_servicedir}/bluetooth-frwk.service
 
 %if %{with bluetooth_frwk_libnotify} || %{with bluetooth_frwk_libnotification}
 mkdir -p %{buildroot}%{_datadir}/icons/default
@@ -218,8 +227,8 @@ vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
 %defattr(-, root, root)
 %{_libdir}/libbluetooth-api.so.*
 %{_datadir}/license/bluetooth-frwk
-#%{_libdir}/systemd/system/%{_servicedir}/bluetooth-frwk.service
-#%{_libdir}/systemd/system/bluetooth-frwk.service
+%{_libdir}/systemd/system/%{_servicedir}/bluetooth-frwk.service
+%{_libdir}/systemd/system/bluetooth-frwk.service
 
 %files devel
 %defattr(-, root, root)
@@ -239,7 +248,8 @@ vconftool set -f -t bool memory/bluetooth/dutmode "0" -g 6520 -i
 %{_datadir}/dbus-1/system-services/org.projectx.bt.service
 
 %{_bindir}/bt-service
-%{_libdir}/systemd/user/bluetooth-frwk-service.service
+#%{_libdir}/systemd/user/bluetooth-frwk-tv.service
+%{_libdir}/systemd/system/%{_servicedir}/bluetooth-frwk.service
 %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-service.conf
 %{_bindir}/bluetooth-frwk-test
 #%{_bindir}/bluetooth-gatt-test