Migrate bluez-start.service from tools 09/252709/1
authorWootak Jung <wootak.jung@samsung.com>
Mon, 1 Feb 2021 23:29:51 +0000 (08:29 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Mon, 1 Feb 2021 23:29:51 +0000 (08:29 +0900)
Change-Id: Ib0ddea5514ebbd7c6853d6eec81810f04c37d800
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
packaging/bluez.spec
src/bluetooth.service.in

index c68bcd6..1f91ec4 100755 (executable)
@@ -402,13 +402,6 @@ install -D -m 0644 mesh/mesh-main.conf %{buildroot}%{_sysconfdir}/bluetooth/mesh
 
 install -D -m 0755 tools/obexctl %{buildroot}%{_bindir}/obexctl
 
-#test
-#if "tv"
-mkdir -p %{buildroot}%{_libpath}/systemd/system/multi-user.target.wants/
-ln -sf bluetooth.service %{buildroot}%{_libpath}/systemd/system/dbus-org.bluez.service
-ln -sf ../bluetooth.service %{buildroot}%{_libpath}/systemd/system/multi-user.target.wants/bluetooth.service
-#endif
-
 install -D -m 0644 obexd/src/obex.service %{buildroot}%{_libpath}/systemd/system/
 
 %post -n bluez-extension-bredr
@@ -423,6 +416,9 @@ for FILE in bluetoothd.le; do mv "$FILE" "${FILE%.le}"; done
 popd
 /sbin/ldconfig
 
+%post
+ln -s %{_unitdir}/bluetooth.service %{_unitdir}/bluez-start.service
+
 %files
 %manifest %{name}.manifest
 %defattr(-, root, root)
@@ -454,6 +450,7 @@ popd
 #%{_sbindir}/hid2hci
 %dir /usr/lib/udev
 /usr/lib/udev/*
+%{_unitdir}/bluetooth.service
 
 %files -n bluez-extension-bredr
 %manifest %{name}.manifest
@@ -464,17 +461,11 @@ popd
 %manifest %{name}.manifest
 %defattr(-, root, root)
 %{_libexecdir}/bluetooth/bluetoothd.le
-
-#test -2
-%exclude /%{_libpath}/systemd/system/bluetooth.service
-%exclude %{_libpath}/systemd/system/multi-user.target.wants/bluetooth.service
-%exclude /%{_datadir}/dbus-1/system-services/org.bluez.service
 %config %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
 %dir /var/lib/bluetooth
 %dir %{_sysconfdir}/modprobe.d
 %config(noreplace) %{_sysconfdir}/modprobe.d/50-bluetooth.conf
 
-
 %files mesh
 %manifest %{name}.manifest
 %defattr(-, root, root)
@@ -533,9 +524,6 @@ rm %{_sysconfdir}/bluetooth/main.conf
 %files profile_tv
 %manifest %{name}.manifest
 %{_sysconfdir}/bluetooth/main.conf
-%exclude %{_libpath}/systemd/system/bluetooth.service
-%exclude %{_libpath}/systemd/system/multi-user.target.wants/bluetooth.service
-%exclude %{_libpath}/systemd/system/dbus-org.bluez.service
 %exclude %{_datadir}/dbus-1/system-services/org.bluez.service
 
 %files profile_common
index 11de4cb..1034949 100755 (executable)
@@ -7,11 +7,12 @@ User=network_fw
 Group=network_fw
 Type=dbus
 BusName=org.bluez
-ExecStart=@pkglibexecdir@/bluetoothd -d -C
+ExecStart=/usr/libexec/bluetooth/bluetoothd -d -C
 Capabilities=cap_net_admin,cap_net_raw,cap_net_bind_service,cap_dac_override=i
 SecureBits=keep-caps
 SmackProcessLabel=System
 KillMode=process
+NotifyAccess=main
 
 [Install]
 WantedBy=multi-user.target