Refactoring csr.service and csr-OOO.socket 40/210240/3 accepted/tizen/unified/20190814.065142 submit/tizen/20190813.005155 submit/trunk/20190812.110839
authorINSUN PYO <insun.pyo@samsung.com>
Wed, 17 Jul 2019 06:34:50 +0000 (15:34 +0900)
committerINSUN PYO <insun.pyo@samsung.com>
Tue, 23 Jul 2019 10:59:06 +0000 (19:59 +0900)
 - Using "Wants=csr.service" in csr-OOO.socket is replaced by putting csr.service in multi-user.target.wants.
 - Using "After=csr.service" in csr-OOO.socket is not requires because there is an explicit dependency between socket and service.
 - All four sockets are required for csr.service. So, "Requires=OOO.socket" must be in csr.service.
 - "Sockets=" in the csr.service is replaced by "Requires=OOO.socket". ("Sockets=" includes "After=" and "Wants=")

Change-Id: If6303fcf17f16c70b4c5b67cca897f0c650b4b85

packaging/csr-framework.spec
systemd/csr-admin.socket.in
systemd/csr-cs.socket.in
systemd/csr-wp.socket.in
systemd/csr.service.in

index 3b69b24..439fed3 100644 (file)
@@ -204,6 +204,7 @@ find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
 %install_service sockets.target.wants %{service_name}-cs.socket
 %install_service sockets.target.wants %{service_name}-wp.socket
 %install_service sockets.target.wants %{service_name}-admin.socket
+%install_service multi-user.target.wants %{service_name}.service
 %install_service ../user/sockets.target.wants %{service_name}-popup.socket
 %install_service ../system/user-sockets@.target.wants %{service_name}-popup@.socket
 
@@ -296,6 +297,7 @@ su - owner -c %{bin_dir}/%{service_name}-test
 %{bin_dir}/%{service_name}-server
 %{bin_dir}/%{service_name}-popup
 %{_unitdir}/%{service_name}.service
+%{_unitdir}/multi-user.target.wants/%{service_name}.service
 %{_unitdir}/sockets.target.wants/%{service_name}-cs.socket
 %{_unitdir}/sockets.target.wants/%{service_name}-wp.socket
 %{_unitdir}/sockets.target.wants/%{service_name}-admin.socket
index 8d78425..a68c7c0 100644 (file)
@@ -1,7 +1,5 @@
 [Unit]
 Description=Csr admin socket
-Wants=@SERVICE_NAME@.service
-Before=@SERVICE_NAME@.service
 
 [Socket]
 ListenStream=/tmp/.@SERVICE_NAME@-admin.socket
index ee30304..802ee50 100644 (file)
@@ -1,7 +1,5 @@
 [Unit]
 Description=Csr content screening socket
-Wants=@SERVICE_NAME@.service
-Before=@SERVICE_NAME@.service
 
 [Socket]
 ListenStream=/tmp/.@SERVICE_NAME@-cs.socket
index 97665c3..eb8756d 100644 (file)
@@ -1,7 +1,5 @@
 [Unit]
 Description=Csr web protection socket
-Wants=@SERVICE_NAME@.service
-Before=@SERVICE_NAME@.service
 
 [Socket]
 ListenStream=/tmp/.@SERVICE_NAME@-wp.socket
index 7fbf21d..f1db438 100644 (file)
@@ -9,6 +9,3 @@ SmackProcessLabel=@SMACK_DOMAIN_NAME@
 SecureBits=keep-caps
 Capabilities=cap_dac_override,cap_fowner=i
 ExecStart=@BIN_DIR@/@SERVICE_NAME@-server
-Sockets=@SERVICE_NAME@-cs.socket
-Sockets=@SERVICE_NAME@-wp.socket
-Sockets=@SERVICE_NAME@-admin.socket