change dbus service to systemd service 18/227018/1 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20200310.151243 accepted/tizen/5.5/unified/wearable/hotfix/20201027.115033 submit/tizen_5.5/20200309.060219 submit/tizen_5.5_wearable_hotfix/20201026.184303
authorJihoon Jung <jh8801.jung@samsung.com>
Mon, 9 Mar 2020 05:59:20 +0000 (14:59 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Mon, 9 Mar 2020 06:00:06 +0000 (15:00 +0900)
Change-Id: I06d10b96a70c77e75f2059d64fa63ecb31daf0eb
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
packaging/smartcard-service.service [new file with mode: 0644]
packaging/smartcard-service.spec
server/org.tizen.SmartcardService.service

diff --git a/packaging/smartcard-service.service b/packaging/smartcard-service.service
new file mode 100644 (file)
index 0000000..d205d27
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=Smartcard service daemon
+
+[Service]
+Type=dbus
+BusName=org.tizen.SmartcardService
+ExecStart=/usr/bin/smartcard-daemon
+User=network_fw
+Group=network_fw
+SmackProcessLabel=System
index ab1a2e2..d996701 100755 (executable)
@@ -5,6 +5,7 @@ Release:    0
 Group:      Network & Connectivity
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
+Source1:    smartcard-service.service
 BuildRequires: cmake
 BuildRequires: pkgconfig(glib-2.0)
 BuildRequires: pkgconfig(gio-unix-2.0)
@@ -66,6 +67,9 @@ export LDFLAGS+=" -lgcov "
 %install
 %make_install
 
+mkdir -p %{buildroot}/usr/lib/systemd/system/
+cp -af %{SOURCE1} %{buildroot}/usr/lib/systemd/system/
+
 mkdir -p %{buildroot}/etc/dbus-1/system.d/
 cp -af %{_builddir}/%{name}-%{version}/packaging/org.tizen.SmartcardService.conf %{buildroot}/etc/dbus-1/system.d/
 
@@ -75,6 +79,7 @@ cp -af %{_builddir}/%{name}-%{version}/packaging/org.tizen.SmartcardService.conf
 %{_bindir}/smartcard-daemon
 %{_sysconfdir}/dbus-1/system.d/org.tizen.SmartcardService.conf
 %{_datadir}/dbus-1/system-services/org.tizen.SmartcardService.service
+/usr/lib/systemd/system/%{name}.service
 %if 0%{?gtests:1}
 %{_bindir}/gtest*
 %endif
index e55882e..c54d7fe 100644 (file)
@@ -1,6 +1,4 @@
 [D-BUS Service]
 Name=org.tizen.SmartcardService
-Exec=/usr/bin/smartcard-daemon
-MemoryLimit=10M
-User=network_fw
-Group=network_fw
+Exec=/bin/false
+SystemdService=smartcard-service.service