summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoungHun Kim <yh8004.kim@samsung.com>2018-07-10 15:41:09 +0900
committerYoungHun Kim <yh8004.kim@samsung.com>2018-10-25 17:05:26 +0900
commitc186ed323c939b76478cae6c8cca85efcc4b97c0 (patch)
tree43660ee9017dac9fcc24324a7862afff6a205aff
parentc8aa740ca763b0d375ab705b7f8ade92607d634a (diff)
downloadmurphy-c186ed323c939b76478cae6c8cca85efcc4b97c0.tar.gz
murphy-c186ed323c939b76478cae6c8cca85efcc4b97c0.tar.bz2
murphy-c186ed323c939b76478cae6c8cca85efcc4b97c0.zip
Merge branch 'tizen' to 'tizen_4.0'
- Launch as a daemon and set systemd service type to forking - Diable the dependency of dbus because not related actally with dbus (core) - Enable the dlog of murphy - Change to daemonize after stream flush Change-Id: If9dc2d9542e773c844961eedf8249759a2a5b6ae
-rw-r--r--packaging/murphy.spec11
-rw-r--r--packaging/murphyd.service3
-rw-r--r--packaging/org.Murphy.conf.in8
-rw-r--r--src/daemon/daemon.c2
4 files changed, 17 insertions, 7 deletions
diff --git a/packaging/murphy.spec b/packaging/murphy.spec
index b58e7c3..0706b1c 100644
--- a/packaging/murphy.spec
+++ b/packaging/murphy.spec
@@ -3,11 +3,11 @@
%bcond_without pulse
%bcond_without ecore
%bcond_without glib
-%bcond_without dbus
+%bcond_with dbus
%bcond_without telephony
%bcond_without websockets
%bcond_without smack
-%bcond_without sysmon
+%bcond_with sysmon
# These are off by default, unless explicitly enabled.
#
@@ -29,7 +29,7 @@
Summary: Resource policy framework
Name: murphy
Version: 0.0.74
-Release: 10
+Release: 14
License: BSD-3-Clause
Group: System/Service
URL: http://01.org/murphy/
@@ -247,9 +247,12 @@ CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-websockets"
CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-smack"
#%endif
-# relro
+#relro
CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-relro"
+#dlog
+CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-dlog"
+
./bootstrap
%configure $CONFIG_OPTIONS --with-dynamic-plugins=$DYNAMIC_PLUGINS
%__make clean
diff --git a/packaging/murphyd.service b/packaging/murphyd.service
index f99297b..324a2eb 100644
--- a/packaging/murphyd.service
+++ b/packaging/murphyd.service
@@ -2,7 +2,8 @@
Description=Murphy Resource Policy Daemon
[Service]
-ExecStart=/usr/bin/murphyd -t dlog -vvv -f
+ExecStart=/usr/bin/murphyd -t dlog -vvv
+Type=forking
KillMode=process
KillSignal=SIGKILL
Restart=always
diff --git a/packaging/org.Murphy.conf.in b/packaging/org.Murphy.conf.in
index 643df47..d20d5c6 100644
--- a/packaging/org.Murphy.conf.in
+++ b/packaging/org.Murphy.conf.in
@@ -3,8 +3,14 @@
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
- <policy context="default">
+ <policy group="multimedia_fw">
+ <allow own="org.Murphy"/>
<allow receive_sender="org.Murphy"/>
<allow send_destination="org.Murphy"/>
</policy>
+ <policy context="default">
+ <deny own="org.Murphy"/>
+ <deny receive_sender="org.Murphy"/>
+ <deny send_destination="org.Murphy"/>
+ </policy>
</busconfig>
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
index 65dee9b..8df12b0 100644
--- a/src/daemon/daemon.c
+++ b/src/daemon/daemon.c
@@ -291,9 +291,9 @@ int main(int argc, char *argv[], char *envp[])
load_ruleset(ctx);
prepare_ruleset(ctx);
setup_logging(ctx);
- daemonize(ctx);
set_linebuffered(stdout);
set_nonbuffered(stderr);
+ daemonize(ctx);
run_mainloop(ctx);
stop_plugins(ctx);