From 826d76c8dbf7291d0534b5ff455521e50e581b38 Mon Sep 17 00:00:00 2001 From: Donghee Ye Date: Wed, 11 Sep 2013 13:37:04 +0900 Subject: Add systemd socket file to gurantee contacts_connect at booting time Change-Id: I964633e555eadaa7546daa4d7a9f243d8d6b3006 --- CMakeLists.txt | 2 +- contacts-service2.manifest | 2 +- packaging/contacts-service.socket | 10 ++++++++++ packaging/contacts-service.spec | 9 ++++++++- 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 packaging/contacts-service.socket diff --git a/CMakeLists.txt b/CMakeLists.txt index d448801..ba0020e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(EXEC_PREFIX "\${prefix}") SET(INCLUDEDIR "\${prefix}/${DEST_INCLUDE_DIR}") SET(VERSION_MAJOR 0) -SET(VERSION "${VERSION_MAJOR}.9.114.4") +SET(VERSION "${VERSION_MAJOR}.9.114.5") EXECUTE_PROCESS(COMMAND build-util/generator.sh) diff --git a/contacts-service2.manifest b/contacts-service2.manifest index de0b3aa..8eff097 100644 --- a/contacts-service2.manifest +++ b/contacts-service2.manifest @@ -18,7 +18,7 @@ - + diff --git a/packaging/contacts-service.socket b/packaging/contacts-service.socket new file mode 100644 index 0000000..b349931 --- /dev/null +++ b/packaging/contacts-service.socket @@ -0,0 +1,10 @@ +[Unit] +Description=Contacts Service socket + +[Socket] +ListenStream=/tmp/.contacts_svc_ipc-monitor +SmackLabelIPIn=* +SmackLabelIPOut=@ + +[Install] +WantedBy=sockets.target diff --git a/packaging/contacts-service.spec b/packaging/contacts-service.spec index 72efb3f..efee9e3 100644 --- a/packaging/contacts-service.spec +++ b/packaging/contacts-service.spec @@ -1,11 +1,12 @@ Name: contacts-service Summary: Contacts Service -Version: 0.9.114.4 +Version: 0.9.114.5 Release: 1 Group: TO_BE/FILLED_IN License: Apache-2.0 Source0: %{name}-%{version}.tar.gz Source1: contacts-service.service +Source2: contacts-service.socket BuildRequires: cmake BuildRequires: vconf-keys-devel BuildRequires: pkgconfig(db-util) @@ -69,6 +70,10 @@ mkdir -p %{buildroot}/usr/lib/systemd/user/tizen-middleware.target.wants install -m 0644 %SOURCE1 %{buildroot}/usr/lib/systemd/user/contacts-service.service ln -s ../contacts-service.service %{buildroot}/usr/lib/systemd/user/tizen-middleware.target.wants/contacts-service.service +mkdir -p %{buildroot}/usr/lib/systemd/user/sockets.target.wants +install -m 0644 %SOURCE2 %{buildroot}/usr/lib/systemd/user/contacts-service.socket +ln -s ../contacts-service.socket %{buildroot}/usr/lib/systemd/user/sockets.target.wants/contacts-service.socket + %post -n contacts-service2 /sbin/ldconfig @@ -102,6 +107,8 @@ vconftool set -t int db/contacts-svc/phonenumber_min_match_digit 8 -g 6005 -s co /opt/usr/data/contacts-svc/img/* /usr/lib/systemd/user/contacts-service.service /usr/lib/systemd/user/tizen-middleware.target.wants/contacts-service.service +/usr/lib/systemd/user/sockets.target.wants/contacts-service.socket +/usr/lib/systemd/user/contacts-service.socket %config(noreplace) /opt/usr/dbspace/.contacts-svc.db* /usr/share/packages/%{name}2.xml /opt/etc/smack/accesses.d/%{name}2.rule -- cgit v1.2.3