From: Hyotaek Shim Date: Thu, 16 May 2019 04:46:21 +0000 (+0000) Subject: Revert "tizen: Add additional unit for "unified" user session" X-Git-Tag: accepted/tizen/unified/20190517.071532^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f31bbf9e92e51a95463037f753424936001eda0;p=platform%2Fcore%2Fpim%2Fcalendar-service.git Revert "tizen: Add additional unit for "unified" user session" This reverts commit 73a871fa2688a0f74933dad5df0e38df1dcd704d. Change-Id: If485d8a9520a5a8875d919197f2d3ad2958b283f --- diff --git a/packaging/calendar-service.spec b/packaging/calendar-service.spec index 773574b..f9b6100 100644 --- a/packaging/calendar-service.spec +++ b/packaging/calendar-service.spec @@ -7,8 +7,7 @@ License: Apache-2.0 Source0: %{name}-%{version}.tar.gz Source1: %{name}d.service Source2: org.tizen.CalendarService.dbus.service -Source5: tv.conf -Source6: %{name}d@.service +Source5: %{name}d.service.tv Source1001: %{name}.manifest Source1002: %{name}.conf.in Source2001: ALARM.a%{name}.service @@ -35,10 +34,7 @@ BuildRequires: pkgconfig(contacts-service2) %endif Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig -Requires(post): %{_sbindir}/update-alternatives -Requires(preun): %{_sbindir}/update-alternatives Provides: %{name}-compat = %{version}-%{release} -Requires: %{name}-units %description Calendar Service for using Calendar DB @@ -47,10 +43,10 @@ Calendar Service for using Calendar DB Summary: for TV Provides: %{name}-compat = %{version}-%{release} Conflicts: %{name} -Requires: %{name}-units %description profile_tv for TV + %package -n lib%{name} Summary: client library %if "%{?profile}" != "tv" @@ -62,11 +58,9 @@ Requires: %{name}-profile_tv = %{version}-%{release} %description -n lib%{name} client library for calendar -%package units -Summary: systemd and dbus-daemon units for %{name} -%description units -. + +%define _dbus_interface org.tizen.CalendarService.dbus %package devel Summary: DB library for calendar @@ -92,8 +86,6 @@ cp %SOURCE1001 . %endif %build -%define _dbus_interface org.tizen.CalendarService.dbus - CXXFLAGS="$CXXFLAGS -DU_USING_ICU_NAMESPACE=1" MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` %cmake . -DMAJORVER=${MAJORVER} -DFULLVER=%{version} -DBIN_INSTALL_DIR:PATH=%{_bindir} \ @@ -105,15 +97,9 @@ make %{?jobs:-j%jobs} rm -rf %{buildroot} %make_install -mkdir -p %{buildroot}%{_unitdir_user}/%{name}d.service.d +mkdir -p %{buildroot}%{_unitdir_user}/default.target.wants install -m 0644 %SOURCE1 %{buildroot}%{_unitdir_user} -install -m 0644 %SOURCE5 %{buildroot}%{_unitdir_user}/%{name}d.service.d/ - -mkdir -p %{buildroot}%{_unitdir}/user-default@.target.wants -mkdir -p %{buildroot}%{_unitdir}/%{name}d@.service.d/ -install -m 0644 %SOURCE6 %{buildroot}%{_unitdir} -install -m 0644 %SOURCE5 %{buildroot}%{_unitdir}/%{name}d@.service.d/ -ln -s ../calendar-serviced@.service %{buildroot}%{_unitdir}/user-default@.target.wants/calendar-serviced@.service +install -m 0644 %SOURCE5 %{buildroot}%{_unitdir_user} mkdir -p %{buildroot}%{_datadir}/dbus-1/services install -m 0644 %SOURCE2 %{buildroot}%{_datadir}/dbus-1/services @@ -126,44 +112,41 @@ install -m 0644 %SOURCE1002 %{buildroot}%{_sysconfdir}/dbus-1/session.d/%{name}. mkdir -p %{buildroot}%{_datadir}/dbus-1/services install -m 0644 %SOURCE2001 %{buildroot}%{_datadir}/dbus-1/services + %post -n lib%{name} -p /sbin/ldconfig %postun -n lib%{name} -p /sbin/ldconfig -%post -%{_sbindir}/update-alternatives --install %{_bindir}/calendar-serviced %{name} %{_bindir}/calendar-serviced-common 100 -%pre -%{_sbindir}/update-alternatives --remove %{name} %{_bindir}/calendar-serviced-common - %post profile_tv -%{_sbindir}/update-alternatives --install %{_bindir}/calendar-serviced %{name} %{_bindir}/calendar-serviced-tv 200 -%pre profile_tv -%{_sbindir}/update-alternatives --remove %{name} %{_bindir}/calendar-serviced-tv +mv %{_unitdir_user}/calendar-serviced.service.tv %{_unitdir_user}/calendar-serviced.service + +%preun profile_tv +mv %{_unitdir_user}/calendar-serviced.service %{_unitdir_user}/calendar-serviced.service.tv -%files units -%config %{_sysconfdir}/dbus-1/session.d/%{name}.conf -%{_datadir}/dbus-1/services/%{_dbus_interface}.service -%{_datadir}/dbus-1/services/ALARM.acalendar-service.service -%{_unitdir_user}/%{name}d.service -%{_unitdir}/%{name}d@.service -%{_unitdir}/user-default@.target.wants/calendar-serviced@.service %files -%manifest %{name}.manifest -%defattr(-,root,root,-) +%{_unitdir_user}/%{name}d.service # This is for backward-compatibility. This does not deteriorate 4.0 Configurability # TV profile does not have contacts-service2. # if wearable, ivi, common, mobile ||"undefined" %if "%{?profile}" != "tv" -%{_bindir}/calendar-serviced-common +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_bindir}/calendar-serviced +%{_datadir}/dbus-1/services/%{_dbus_interface}.service +%config %{_sysconfdir}/dbus-1/session.d/%{name}.conf +%{_datadir}/dbus-1/services/ALARM.acalendar-service.service %license LICENSE.APLv2 %endif + %files profile_tv %manifest %{name}.manifest %defattr(-,root,root,-) %{_bindir}/calendar-serviced-tv -%{_unitdir_user}/%{name}d.service.d/tv.conf -%{_unitdir}/%{name}d@.service.d/tv.conf +%{_unitdir_user}/%{name}d.service.tv +%{_datadir}/dbus-1/services/%{_dbus_interface}.service +%config %{_sysconfdir}/dbus-1/session.d/%{name}.conf +%{_datadir}/dbus-1/services/ALARM.acalendar-service.service %license LICENSE.APLv2 %files -n lib%{name} diff --git a/packaging/calendar-serviced.service b/packaging/calendar-serviced.service index 53ac6f7..caffb63 100644 --- a/packaging/calendar-serviced.service +++ b/packaging/calendar-serviced.service @@ -6,5 +6,5 @@ Requires=contacts-service.service [Service] Type=dbus BusName=org.tizen.CalendarService.dbus -Environment=TIMEOUT=90 +Environment="TIMEOUT=90" ExecStart=/usr/bin/calendar-serviced $TIMEOUT diff --git a/packaging/calendar-serviced.service.tv b/packaging/calendar-serviced.service.tv new file mode 100644 index 0000000..57dfb0d --- /dev/null +++ b/packaging/calendar-serviced.service.tv @@ -0,0 +1,8 @@ +[Unit] +Description=Calendar Service daemon + +[Service] +Type=dbus +BusName=org.tizen.CalendarService.dbus +Environment="TIMEOUT=90" +ExecStart=/usr/bin/calendar-serviced-tv $TIMEOUT diff --git a/packaging/calendar-serviced@.service b/packaging/calendar-serviced@.service deleted file mode 100644 index 658160b..0000000 --- a/packaging/calendar-serviced@.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -PartOf=userlogin@%i.target -Description=Calendar Service daemon -After=contacts-service@%i.service -Requires=contacts-service@%i.service - -[Service] -User=%i -Environment=DBUS_SESSION_BUS_ADDRESS=kernel:path=/sys/fs/kdbus/%i-user/bus;unix:path=/run/user/%i/bus -Environment=XDG_RUNTIME_DIR=/run/user/%i -SmackProcessLabel=User -Type=dbus -BusName=org.tizen.CalendarService.dbus -Environment=TIMEOUT=90 -ExecStart=/usr/bin/calendar-serviced $TIMEOUT diff --git a/packaging/tv.conf b/packaging/tv.conf deleted file mode 100644 index e1477bf..0000000 --- a/packaging/tv.conf +++ /dev/null @@ -1,3 +0,0 @@ -[Unit] -After= -Requires= diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 106725e..abd8e7a 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -40,10 +40,10 @@ SET(CONTACTS_CFLAGS "${CONTACTS_CFLAGS} -I${INCLUDE_DIR}") ENDFOREACH(INCLUDE_DIR) IF(${TIZEN_PROFILE_TV} EQUAL 0) -ADD_EXECUTABLE(${DAEMON}-common ${DAEMON_SRCS}) -ADD_DEPENDENCIES(${DAEMON}-common GENERATED_DBUS_CODE) -SET_TARGET_PROPERTIES(${DAEMON}-common PROPERTIES COMPILE_FLAGS ${CONTACTS_CFLAGS}) -TARGET_LINK_LIBRARIES(${DAEMON}-common ${daemon_pkgs_LIBRARIES} ${daemon_contacts_pkgs_LIBRARIES}) +ADD_EXECUTABLE(${DAEMON} ${DAEMON_SRCS}) +ADD_DEPENDENCIES(${DAEMON} GENERATED_DBUS_CODE) +SET_TARGET_PROPERTIES(${DAEMON} PROPERTIES COMPILE_FLAGS ${CONTACTS_CFLAGS}) +TARGET_LINK_LIBRARIES(${DAEMON} ${daemon_pkgs_LIBRARIES} ${daemon_contacts_pkgs_LIBRARIES}) ENDIF() @@ -53,6 +53,6 @@ SET_TARGET_PROPERTIES(${DAEMON}-tv PROPERTIES COMPILE_FLAGS "-I${CMAKE_CURRENT_S TARGET_LINK_LIBRARIES(${DAEMON}-tv ${daemon_pkgs_LIBRARIES}) IF(${TIZEN_PROFILE_TV} EQUAL 0) -INSTALL(TARGETS ${DAEMON}-common DESTINATION ${BIN_INSTALL_DIR}) +INSTALL(TARGETS ${DAEMON} DESTINATION ${BIN_INSTALL_DIR}) ENDIF() INSTALL(TARGETS ${DAEMON}-tv DESTINATION ${BIN_INSTALL_DIR})