modified install path for auto start in emulator 88/29288/2
authorsungmin ha <sungmin82.ha@samsung.com>
Fri, 24 Oct 2014 05:20:24 +0000 (14:20 +0900)
committersungmin ha <sungmin82.ha@samsung.com>
Tue, 28 Oct 2014 01:39:39 +0000 (10:39 +0900)
Change-Id: I378f83e3137b903164d68bff57648bb6bc8fc384
Signed-off-by: sungmin ha <sungmin82.ha@samsung.com>
README
data/rsyslog.d/spice-vdagentd.conf
data/spice-vdagent
data/spice-vdagent.service
data/spice-vdagentd
data/spice-vdagentd.service
data/tmpfiles.d/spice-vdagentd.conf
packaging/spice-vdagent.spec
src/vdagentd-proto.h
src/vdagentd-xorg-conf.c
src/vdagentd.c

diff --git a/README b/README
index 502e559..577db36 100644 (file)
--- a/README
+++ b/README
@@ -31,7 +31,7 @@ Features:
   Then connect to the vm with the multiple monitor client which you want to
   use it with using: "spicec --full-screen=auto-config" (or the user portal
   equivalent). At this point the agent will write out a:
-  /opt/var/run/spice-vdagentd/xorg.conf.spice file. With all the necessary magic
+  /tmp/spice-vdagentd/xorg.conf.spice file. With all the necessary magic
   to get Xinerama working. Move this file to /etc/X11/xorg.conf, then kill
   Xorg so that it will get restarted and you should be good to go.
 * Limited support for setups with multiple Screens (multiple qxl devices each
index caaf31f..088ecd8 100644 (file)
@@ -1,4 +1,4 @@
 # A template to for higher precision timestamps + severity logging
 $template SpiceTmpl,"%TIMESTAMP%.%TIMESTAMP:::date-subseconds% %syslogtag% %syslogseverity-text%:%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n"
 
-:programname, startswith, "spice-vdagent"      /opt/var/run/log/spice-vdagent.log;SpiceTmpl
+:programname, startswith, "spice-vdagent"      /tmp/log/spice-vdagent.log;SpiceTmpl
index dfb2574..c90a993 100755 (executable)
 exec="/usr/sbin/spice-vdagentd"
 prog="spice-vdagentd"
 port="/dev/virtio-ports/com.redhat.spice.0"
-pid="/opt/var/run/spice-vdagentd/spice-vdagentd.pid"
+pid="/tmp/spice-vdagentd/spice-vdagentd.pid"
 
 [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
 
-lockfile=/opt/var/run/lock/subsys/$prog
+lockfile=/tmp/spice-vdagentd/lock/subsys/$prog
 
 start() {
     [ -x $exec ] || exit 5
     [ -c $port ] || exit 0
     modprobe uinput > /dev/null 2>&1
     # In case the previous running vdagentd crashed
-    rm -f /opt/var/run/spice-vdagentd/spice-vdagent-sock
+    rm -f /tmp/spice-vdagentd/spice-vdagent-sock
 
     echo -n $"Starting $prog: "
     daemon --pidfile $pid $exec $SPICE_VDAGENTD_EXTRA_ARGS
index 6def108..47d5d70 100644 (file)
@@ -1,6 +1,5 @@
 [Unit]
 Description=Agent for Spice guests
-After=xorg.target e17.service
 
 [Service]
 Type=forking
index ab8f8f9..4072862 100755 (executable)
 exec="/usr/sbin/spice-vdagentd"
 prog="spice-vdagentd"
 port="/dev/virtio-ports/com.redhat.spice.0"
-pid="/opt/var/run/spice-vdagentd/spice-vdagentd.pid"
+pid="/tmp/spice-vdagentd/spice-vdagentd.pid"
 
 [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
 
-lockfile=/opt/var/run/lock/subsys/$prog
+lockfile=/tmp/spice-vdagentd/lock/subsys/$prog
 
 start() {
     [ -x $exec ] || exit 5
     [ -c $port ] || exit 0
     modprobe uinput > /dev/null 2>&1
     # In case the previous running vdagentd crashed
-    rm -f /opt/var/run/spice-vdagentd/spice-vdagent-sock
+    rm -f /tmp/spice-vdagentd/spice-vdagent-sock
     echo -n $"Starting $prog: "
     daemon --pidfile $pid $exec $SPICE_VDAGENTD_EXTRA_ARGS
     retval=$?
index 36e1075..91ec247 100644 (file)
@@ -8,9 +8,9 @@ After=dbus.target
 [Service]
 Type=forking
 EnvironmentFile=-/etc/sysconfig/spice-vdagentd
-ExecStartPre=/bin/rm -f /opt/var/run/spice-vdagentd/spice-vdagent-sock
+ExecStartPre=/bin/rm -f /tmp/spice-vdagentd/spice-vdagent-sock
 ExecStart=/usr/sbin/spice-vdagentd $SPICE_VDAGENTD_EXTRA_ARGS;
-PIDFile=/opt/var/run/spice-vdagentd/spice-vdagentd.pid
+PIDFile=/tmp/spice-vdagentd/spice-vdagentd.pid
 PrivateTmp=true
 
 [Install]
index 462cd1f..b558cc6 100644 (file)
@@ -1,2 +1,2 @@
 # spice-vdagentd needs this and does not create it itself
-d /opt/var/run/spice-vdagentd 0755 root root -
+d /tmp/spice-vdagentd 0755 root root -
index adb7978..0c6cef1 100644 (file)
@@ -1,5 +1,5 @@
 Name: spice-vdagent
-Version: 0.15.0
+Version: 0.15.1
 Release: 1
 Summary: This is used for spice input communication
 License: GPL-3.0
@@ -24,21 +24,6 @@ BuildRequires: spice-protocol
 make
 
 %install
-rm -rf %{buildroot}
-
-if [ ! -d %{buildroot}/usr/lib/systemd/system/emulator.target.wants ]; then
-    mkdir -p %{buildroot}/usr/lib/systemd/system/emulator.target.wants
-fi
-cp data/spice-vdagentd.service %{buildroot}/usr/lib/systemd/system/.
-ln -s ../spice-vdagentd.service %{buildroot}/usr/lib/systemd/system/emulator.target.wants/spice-vdagentd.service
-
-if [ ! -d %{buildroot}/usr/lib/systemd/user/core-efl.target.wants ]; then
-    mkdir -p %{buildroot}/usr/lib/systemd/user/core-efl.target.wants
-fi
-cp data/spice-vdagent.service %{buildroot}/usr/lib/systemd/user/.
-ln -s ../spice-vdagent.service %{buildroot}/usr/lib/systemd/user/core-efl.target.wants/spice-vdagent.service
-
-%make_install
 
 %clean
 make clean
@@ -49,16 +34,11 @@ rm -rf Makefile
 rm -rf install_manifest.txt
 
 %post
-mkdir -p /opt/var/run/spice-vdagentd
 
 %postun
 
 %files
 %defattr(-,root,root,-)
-/usr/lib/systemd/user/spice-vdagent.service
-/usr/lib/systemd/system/spice-vdagentd.service
-/usr/lib/systemd/user/core-efl.target.wants/spice-vdagent.service
-/usr/lib/systemd/system/emulator.target.wants/spice-vdagentd.service
 /usr/bin/spice-vdagent
 /usr/etc/rsyslog.d/spice-vdagentd.conf
 /usr/etc/xdg/autostart/spice-vdagent.desktop
index c0fd7d4..129e0cf 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef __VDAGENTD_PROTO_H
 #define __VDAGENTD_PROTO_H
 
-#define VDAGENTD_SOCKET "/opt/var/run/spice-vdagentd/spice-vdagent-sock"
+#define VDAGENTD_SOCKET "/tmp/spice-vdagentd/spice-vdagent-sock"
 
 enum {
     VDAGENTD_GUEST_XORG_RESOLUTION, /* client -> daemon, arg1: overall width,
index 561e6ce..07aa4f3 100644 (file)
@@ -60,8 +60,8 @@ void vdagentd_write_xorg_conf(VDAgentMonitorsConfig *monitor_conf)
         .subvendor_id = PCI_MATCH_ANY,
         .subdevice_id = PCI_MATCH_ANY,
     };
-    const char *xorg_conf = "/opt/var/run/spice-vdagentd/xorg.conf.spice";
-    const char *xorg_conf_old = "/opt/var/run/spice-vdagentd/xorg.conf.spice.old";
+    const char *xorg_conf = "/tmp/spice-vdagentd/xorg.conf.spice";
+    const char *xorg_conf_old = "/tmp/spice-vdagentd/xorg.conf.spice.old";
 
     r = rename(xorg_conf, xorg_conf_old);
     if (r && errno != ENOENT) {
index e47c932..f387d03 100644 (file)
@@ -57,7 +57,7 @@ struct agent_data {
 };
 
 /* variables */
-static const char *pidfilename = "/opt/var/run/spice-vdagentd/spice-vdagentd.pid";
+static const char *pidfilename = "/tmp/spice-vdagentd/spice-vdagentd.pid";
 static const char *portdev = "/dev/virtio-ports/com.redhat.spice.0";
 static const char *vdagentd_socket = VDAGENTD_SOCKET;
 static const char *uinput_device = "/dev/uinput";