install -D -m 0644 src/main_w.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf.wearable
install -D -m 0644 src/main_m.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf
+install -D -m 0644 src/org.bluez.service %{buildroot}%{_datadir}/dbus-1/system-services/org.bluez.service
-#install -D -m 0644 src/bluetooth.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
+install -D -m 0644 src/bluetooth.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
#install -D -m 0644 profiles/audio/audio.conf %{buildroot}%{_sysconfdir}/bluetooth/audio.conf
#install -D -m 0644 profiles/network/network.conf %{buildroot}%{_sysconfdir}/bluetooth/network.conf
mkdir -p %{buildroot}%{upgrade_script_path}
cp -f packaging/500.bluez_upgrade.sh %{buildroot}%{upgrade_script_path}
+%post
+ln -sf %{_libdir}/systemd/system/bluetooth.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+
%post -n libbluetooth -p /sbin/ldconfig
%postun -n libbluetooth -p /sbin/ldconfig
#%{_sysconfdir}/bluetooth/audio.conf
#%{_sysconfdir}/bluetooth/network.conf
#%{_sysconfdir}/bluetooth/rfcomm.conf
-#%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
+%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
#%{_datadir}/man/*/*
%{_bindir}/hcitool
%{_bindir}/l2ping
%{_bindir}/sdptool
%{_bindir}/ciptool
#%{_bindir}/dfutool
-%{_bindir}/hciattach
-%{_bindir}/hciconfig
-%{_libexecdir}/bluetooth/bluetoothd
+%attr(755, network_fw, network_fw)%{_bindir}/hciattach
+%attr(755, network_fw, network_fw)%{_bindir}/hciconfig
+%attr(755, network_fw, network_fw)%{_libexecdir}/bluetooth/bluetoothd
%exclude %{_libexecdir}/bluetooth/bluetoothd.bredr
%exclude %{_libexecdir}/bluetooth/bluetoothd.le
%{_bindir}/bccmd
%files profile_common
%manifest %{name}.manifest
%{_sysconfdir}/bluetooth/main.conf
+%{_libpath}/systemd/system/bluetooth.service
+%{_libpath}/systemd/system/multi-user.target.wants/bluetooth.service
+%{_datadir}/dbus-1/system-services/org.bluez.service
+
%changelog
[Unit]
Description=Bluetooth service
Documentation=man:bluetoothd(8)
-DefaultDependencies=no
+After=multi-user.target
[Service]
+User=network_fw
+Group=network_fw
Type=dbus
BusName=org.bluez
ExecStart=/usr/libexec/bluetooth/bluetoothd -d -C
-CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
-LimitNPROC=1
+Capabilities=cap_net_admin,cap_net_bind_service,cap_dac_override=eip
+SecureBits=keep-caps
SmackProcessLabel=System
-Restart=on-failure
+KillMode=process
[Install]
WantedBy=multi-user.target
-Alias=dbus-org.bluez.service