From: Kévin THIERRY Date: Mon, 20 Jan 2014 14:25:52 +0000 (+0100) Subject: Add multi-user support X-Git-Tag: accepted/tizen/generic/20140220.133014^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_3.0.m14.2_ivi;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-tools.git Add multi-user support Bug-Tizen: PTREL-371 Change-Id: Id96c88b2d5384e197ee74fdffa711f7c6120e462 Signed-off-by: Kévin THIERRY --- diff --git a/packaging/bluetooth-tools.spec b/packaging/bluetooth-tools.spec index 84779c2..6495f86 100644 --- a/packaging/bluetooth-tools.spec +++ b/packaging/bluetooth-tools.spec @@ -1,14 +1,15 @@ Name: bluetooth-tools Summary: Bluetooth-tools Version: 0.2.35 -Release: 3 +Release: 0 Group: Network & Connectivity/Bluetooth License: Apache-2.0 Source0: %{name}-%{version}.tar.gz -Source1001: bluetooth-address.service +Source1001: bluetooth-address.service BuildRequires: cmake -Requires: bluetooth-tools-no-firmware Suggests: bluetooth-share +Requires: tizen-platform-config-tools +Requires : bluetooth-tools-no-firmware %description Tools fo bluetooth run/stop and set address @@ -17,7 +18,7 @@ Tools fo bluetooth run/stop and set address Summary: On/Off Bluetooth adapter Group: Network & Connectivity/Bluetooth Requires: %{name} = %{version}-%{release} -Requires: rfkill +Requires: rfkill Conflicts: bluetooth-firmware-bcm %description no-firmware @@ -30,7 +31,7 @@ On/Off bluetooth device export CFLAGS+=" -fpie -fvisibility=hidden" export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie" -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} +%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} make %{?jobs:-j%jobs} %install diff --git a/scripts/bt-dev-start.sh b/scripts/bt-dev-start.sh index dcd72f7..a0e513a 100755 --- a/scripts/bt-dev-start.sh +++ b/scripts/bt-dev-start.sh @@ -3,7 +3,7 @@ # Script for registering BT device BT_PLATFORM_DEFAULT_HCI_NAME="Tizen" -# Trun-on Bluetooth Chip +# Turn-on Bluetooth Chip /usr/sbin/rfkill unblock bluetooth diff --git a/scripts/bt-reset-env.sh b/scripts/bt-reset-env.sh index 4532357..1ce9fa9 100755 --- a/scripts/bt-reset-env.sh +++ b/scripts/bt-reset-env.sh @@ -6,7 +6,8 @@ killall -9 hciattach # Remove BT files and setting -rm -rf /opt/data/bluetooth/.bt_paired +eval $(tzplatform-get TZ_SYS_DATA) +rm -rf $TZ_SYS_DATA/bluetooth/.bt_paired rm -rf /var/lib/bluetooth/* # Initialize BT vconf values diff --git a/scripts/bt-stack-up.sh b/scripts/bt-stack-up.sh index 1e934a1..b48d955 100644 --- a/scripts/bt-stack-up.sh +++ b/scripts/bt-stack-up.sh @@ -8,7 +8,7 @@ /usr/etc/bluetooth/bt-dev-start.sh if !(/usr/bin/hciconfig | grep hci); then - echo "Registering BT device is failed." + echo "Registering BT device failed." exit 1 fi @@ -17,9 +17,9 @@ echo "Run bluetoothd" # We have to handle both systemd and sysvinit cases differently if [ -d /sys/fs/cgroup/systemd ]; then - # bt-service changes USER to 'app' via libprivilege-control, so it needs + # bt-service changes USER via libprivilege-control, so it needs # to know where the session bus is located under systemd - export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket + export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/dbus/user_bus_socket else # Under systemd, bluetoothd is dbus activated. sysvinit requires it to be # launched explicitly