Use systemd service 37/166237/3
authorSangki Park <sangki79.park@samsung.com>
Mon, 8 Jan 2018 09:53:31 +0000 (18:53 +0900)
committerSangki Park <sangki79.park@samsung.com>
Tue, 9 Jan 2018 04:48:28 +0000 (13:48 +0900)
Change-Id: I5d44f6cbddc2518f59c8204e98d0e7c4d9a40862

ag-agent/org.bluez.ag_agent.service
hf-agent/org.bluez.hf_agent.service
hid-agent/org.bluez.hid_agent.service
packaging/bluetooth-ag-agent.service [new file with mode: 0644]
packaging/bluetooth-agent.spec
packaging/bluetooth-hf-agent.service [new file with mode: 0644]
packaging/bluetooth-hid-agent.service [new file with mode: 0644]
packaging/bluetooth-pbap-agent.service

index f32a3a2..6f5210c 100644 (file)
@@ -1,5 +1,4 @@
 [D-BUS Service]
 Name=org.bluez.ag_agent
-Exec=/usr/bin/bluetooth-ag-agent
-User=network_fw
-Group=network_fw
+Exec=/usr/bin/false
+SystemdService=bluetooth-ag-agent.service
index f63552c..909f33b 100644 (file)
@@ -1,4 +1,4 @@
 [D-BUS Service]
 Name=org.bluez.hf_agent
-Exec=/usr/bin/bluetooth-hf-agent
-User=root
+Exec=/usr/bin/false
+SystemdService=bluetooth-hf-agent.service
index e678c59..57e6ea0 100644 (file)
@@ -1,5 +1,4 @@
 [D-BUS Service]
 Name=org.bluez.hid_agent
-Exec=/usr/bin/bluetooth-hid-agent
-User=network_fw
-Group=network_fw
+Exec=/usr/bin/false
+SystemdService=bluetooth-hid-agent.service
diff --git a/packaging/bluetooth-ag-agent.service b/packaging/bluetooth-ag-agent.service
new file mode 100644 (file)
index 0000000..f782923
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Bluetooth AG Agent
+
+[Service]
+User=network_fw
+Group=network_fw
+SupplementaryGroups=system_share
+Type=dbus
+BusName=org.bluez.ag_agent
+SmackProcessLabel=System
+ExecStart=/usr/bin/bluetooth-ag-agent
index 18a49ef..6bb61c1 100644 (file)
@@ -144,12 +144,21 @@ execstack -c %{buildroot}%{_bindir}/bluetooth-map-agent
 #%endif
 install -D -m 0644 packaging/bluetooth-pbap-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-pbap-agent.service
 execstack -c %{buildroot}%{_bindir}/bluetooth-pb-agent
+install -D -m 0644 packaging/bluetooth-hf-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hf-agent.service
+execstack -c %{buildroot}%{_bindir}/bluetooth-hf-agent
+install -D -m 0644 packaging/bluetooth-ag-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-ag-agent.service
+execstack -c %{buildroot}%{_bindir}/bluetooth-ag-agent
+install -D -m 0644 packaging/bluetooth-hid-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hid-agent.service
+execstack -c %{buildroot}%{_bindir}/bluetooth-hid-agent
 
 %post
 %if 0%{?sec_product_feature_bt_map_server_enable}
 ln -sf %{_libdir}/systemd/user/bluetooth-map-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
 %endif
 ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+ln -sf %{_libdir}/systemd/system/bluetooth-ag-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+ln -sf %{_libdir}/systemd/system/bluetooth-hf-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+ln -sf %{_libdir}/systemd/system/bluetooth-hid-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
 
 %files
 %manifest %{name}.manifest
@@ -169,6 +178,9 @@ ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/sys
 %{_datadir}/dbus-1/system-services/org.bluez.hid_agent.service
 %{_sysconfdir}/dbus-1/system.d/bluetooth-ag-agent.conf
 %{_sysconfdir}/dbus-1/system.d/bluetooth-hf-agent.conf
+%{_libdir}/systemd/system/bluetooth-hf-agent.service
+%{_libdir}/systemd/system/bluetooth-ag-agent.service
+%{_libdir}/systemd/system/bluetooth-hid-agent.service
 %exclude %{_libdir}/systemd/system/bluetooth-map-agent.service
 %exclude %{_libdir}/systemd/system/bluetooth-pbap-agent.service
 %endif
@@ -195,6 +207,7 @@ ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/sys
 %{_sysconfdir}/dbus-1/system.d/bluetooth-ag-agent.conf
 %{_libdir}/systemd/system/bluetooth-map-agent.service
 %{_libdir}/systemd/system/bluetooth-pbap-agent.service
+%{_libdir}/systemd/system/bluetooth-ag-agent.service
 %endif
 
 %files ipsp
diff --git a/packaging/bluetooth-hf-agent.service b/packaging/bluetooth-hf-agent.service
new file mode 100644 (file)
index 0000000..a258e39
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Bluetooth HF Agent
+
+[Service]
+User=network_fw
+Group=network_fw
+SupplementaryGroups=system_share
+Type=dbus
+BusName=org.bluez.hf_agent
+SmackProcessLabel=System
+ExecStart=/usr/bin/bluetooth-hf-agent
diff --git a/packaging/bluetooth-hid-agent.service b/packaging/bluetooth-hid-agent.service
new file mode 100644 (file)
index 0000000..5e2afff
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Bluetooth HID Agent
+
+[Service]
+User=network_fw
+Group=network_fw
+SupplementaryGroups=system_share
+Type=dbus
+BusName=org.bluez.hid_agent
+SmackProcessLabel=System
+ExecStart=/usr/bin/bluetooth-hid-agent
index 60460c2..f937cfb 100644 (file)
@@ -4,8 +4,8 @@ Description=Bluetooth PBAP Agent
 [Service]
 User=network_fw
 Group=network_fw
-SmackProcessLabel=System
-SupplementaryGroups=priv_message_read
+SupplementaryGroups=system_share
 Type=dbus
 BusName=org.bluez.pb_agent
+SmackProcessLabel=System
 ExecStart=/usr/bin/bluetooth-pb-agent