poweroff: fix poweroff popup launch problem 22/63822/1
authorTaeyoung Kim <ty317.kim@samsung.com>
Mon, 28 Mar 2016 03:24:09 +0000 (12:24 +0900)
committerTaeyoung Kim <ty317.kim@samsung.com>
Mon, 28 Mar 2016 03:26:39 +0000 (12:26 +0900)
- For dbus activation, dbus conf file is added.
- Files are installed at the directory according
  to the Tizen directory policy.

Change-Id: Ia261c504e3e3464314ddf6e42f7d10fa082b2854
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
CMakeLists.txt
packaging/org.tizen.poweroff-syspopup.manifest
packaging/system-servant.spec
src/launcher/CMakeLists.txt
src/launcher/launcher.conf [new file with mode: 0644]
src/launcher/org.tizen.system.popup.service
src/poweroff/CMakeLists.txt
src/poweroff/org.tizen.poweroff-syspopup.xml

index 660920d..19c1f86 100644 (file)
@@ -2,9 +2,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 PROJECT(${PKGNAME} C)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-SET(LICENSE_DIR "${TZ_SYS_SHARE}/license")
-SET(DBUS_SERVICE_DIR "${TZ_SYS_SHARE}/dbus-1/system-services")
-SET(LOCALE_DIR "${TZ_SYS_SHARE}/locale")
+SET(LICENSE_DIR "${TZ_SYS_RO_SHARE}/license")
+SET(DBUS_SERVICE_DIR "${TZ_SYS_RO_SHARE}/dbus-1/system-services")
+SET(LOCALE_DIR "${TZ_SYS_RO_SHARE}/locale")
 SET(LANG_DOMAIN "${PKGNAME}")
 
 ADD_DEFINITIONS("-DPKGNAME=\"${PKGNAME}\"")
index 5834fd5..75b0fa5 100644 (file)
@@ -1,8 +1,5 @@
 <manifest>
-    <define>
-        <domain name="org.tizen.poweroff-syspopup"/>
-    </define>
     <request>
-        <domain name="org.tizen.poweroff-syspopup"/>
+        <domain name="_"/>
     </request>
 </manifest>
index 2c64f9b..bdc3270 100755 (executable)
@@ -94,6 +94,7 @@ cp %{SOURCE1001} .
                -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} \
                -DTZ_SYS_SMACK=%{TZ_SYS_SMACK} \
                -DTZ_SYS_SHARE=%{TZ_SYS_SHARE} \
+               -DTZ_SYS_RO_SHARE=%{TZ_SYS_RO_SHARE} \
                -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
                -DPOWEROFF_POPUP=%{poweroff_popup} \
 
@@ -109,6 +110,7 @@ rm -rf %{buildroot}
 %{_bindir}/sysapp-launcher
 %{_datadir}/license/sysapp-launcher
 %{_datadir}/dbus-1/system-services/org.tizen.system.popup.service
+%config %{_sysconfdir}/dbus-1/system.d/launcher.conf
 
 #po files to support multi-languages
 %lang(ar) %{_datadir}/locale/ar/LC_MESSAGES/system-servant.mo
@@ -179,5 +181,5 @@ rm -rf %{buildroot}
 %license LICENSE
 %defattr(-,root,root,-)
 %{TZ_SYS_RO_APP}/org.tizen.poweroff-syspopup/bin/poweroff-popup
-%{TZ_SYS_SHARE}/packages/org.tizen.poweroff-syspopup.xml
+%{TZ_SYS_RO_SHARE}/packages/org.tizen.poweroff-syspopup.xml
 %endif
index 1a0fe0d..57e0219 100755 (executable)
@@ -36,4 +36,5 @@ TARGET_LINK_LIBRARIES(${APPNAME} ${launcher_pkgs_LDFLAGS} "-ldl")
 
 INSTALL(TARGETS ${APPNAME} DESTINATION bin)
 INSTALL(FILES ${LAUNCHER_DIR}/org.tizen.system.popup.service DESTINATION ${DBUS_SERVICE_DIR})
+INSTALL(FILES ${LAUNCHER_DIR}/launcher.conf DESTINATION /etc/dbus-1/system.d)
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION ${LICENSE_DIR} RENAME ${APPNAME})
diff --git a/src/launcher/launcher.conf b/src/launcher/launcher.conf
new file mode 100644 (file)
index 0000000..fa915e0
--- /dev/null
@@ -0,0 +1,12 @@
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+    <policy user="root">
+        <allow own="org.tizen.system.popup"/>
+        <allow send_destination="org.tizen.system.popup"/>
+    </policy>
+
+    <policy context="default">
+        <deny send_destination="org.tizen.system.popup"/>
+    </policy>
+</busconfig>
index f7c326a..ac9fd2f 100644 (file)
@@ -1,4 +1,4 @@
 [D-BUS Service]
 Name=org.tizen.system.popup
-Exec=/usr/bin/popup-launcher
+Exec=/usr/bin/sysapp-launcher
 User=system
index e811d80..f7cec3e 100755 (executable)
@@ -16,7 +16,7 @@ SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
 SET(POWEROFF_PREFIX "${TZ_SYS_RO_APP}/${PKGNAME}")
 SET(BINDIR "${POWEROFF_PREFIX}/bin")
 SET(RESDIR "${POWEROFF_PREFIX}/res")
-SET(MANIFESTDIR "${TZ_SYS_SHARE}/packages")
+SET(MANIFESTDIR "${TZ_SYS_RO_SHARE}/packages")
 
 SET(PKG_MODULES
                appcore-efl
index 6cdba27..2b2eb09 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.poweroff-syspopup" version="0.2.0" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.poweroff-syspopup" api-version="3.0" version="0.2.0" install-location="internal-only">
        <label>Power off system popup</label>
        <author email="ty317.kim@samsung.com" href="www.samsung.com">Taeyoung Kim</author>
        <description>System popup application (power off system popup)</description>