Fix .service and install it into dbus system service directory 62/11062/1
authorChengwei Yang <chengwei.yang@intel.com>
Thu, 17 Oct 2013 07:57:06 +0000 (15:57 +0800)
committerChengwei Yang <chengwei.yang@intel.com>
Thu, 17 Oct 2013 08:00:19 +0000 (16:00 +0800)
In Tizen 3.0, dbus will running with an unprivileged user 'dbus' and use
an setuid servicehelper to activate system service, which should be
installed into the system-service directory if it provides system wide
service, and "User=" field is must to have to servicehelper.

Bug: https://bugs.tizen.org/jira/browse/PTREL-124
Change-Id: I954c38e3340b9a77c2776938380641023bcbab55
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
bt-share/CMakeLists.txt
bt-share/src/org.bluetooth.share.service
packaging/bluetooth-share.spec

index 6fa43e6..76f355c 100644 (file)
@@ -47,4 +47,4 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -L${CMAKE_CURRENT_SOURCE_D
 
 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/bluetooth-share.rule DESTINATION /opt/etc/smack/accesses.d)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/org.bluetooth.share.service DESTINATION share/dbus-1/services)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/org.bluetooth.share.service DESTINATION share/dbus-1/system-services)
index 66f26a1..3b098b0 100644 (file)
@@ -1,3 +1,4 @@
 [D-BUS Service]
 Name=org.bluetooth.share
 Exec=/usr/bin/bluetooth-share
+User=root
index 67c4c1d..ac72ea8 100644 (file)
@@ -136,7 +136,7 @@ fi
 /opt/etc/smack/accesses.d/bluetooth-share.rule
 %defattr(-,root,root,-)
 %{_bindir}/bluetooth-share
-%{_datadir}/dbus-1/services/org.bluetooth.share.service
+%{_datadir}/dbus-1/system-services/org.bluetooth.share.service
 %{_optdir}/share/bt-ftp
 
 %files -n libbluetooth-share