Fix xresource fail to start 62/9062/1 accepted/tizen/20130910.110920 accepted/tizen/20130910.183658 accepted/tizen/20130910.195312 accepted/tizen/20130910.203531 submit/tizen/20130910.024724
authorChengwei Yang <chengwei.yang@intel.com>
Thu, 1 Aug 2013 02:44:36 +0000 (10:44 +0800)
committerBoram Park <boram1288.park@samsung.com>
Mon, 2 Sep 2013 08:05:04 +0000 (17:05 +0900)
Change-Id: Ifc3c0281a80a3c50ea74830d13a8d41d586a3d89
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
packaging/xorg-x11-misc-exynos.spec
packaging/xresources.path [new file with mode: 0644]
packaging/xresources.service

index 7c03f1c..f29f00f 100644 (file)
@@ -8,6 +8,7 @@ Group:      System/X11
 License:    MIT
 Source0:    %{name}-%{version}.tar.gz
 Source1:    xresources.service
+Source2:    xresources.path
 
 Requires:   xserver-xorg-core
 Requires:   xorg-x11-drv-evdev-multitouch
@@ -57,9 +58,10 @@ ln -s /etc/rc.d/init.d/xserver %{buildroot}/etc/rc.d/rc3.d/S02xserver
 ln -s /etc/rc.d/init.d/xserver %{buildroot}/etc/rc.d/rc4.d/S02xserver
 ln -s /etc/rc.d/init.d/xresources %{buildroot}/etc/rc.d/rc4.d/S80xresources
 cp -af arm-common/Xorg.sh %{buildroot}/etc/profile.d/
-mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
+mkdir -p %{buildroot}%{_libdir}/systemd/system/graphical.target.wants
 install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/xresources.service
-ln -s ../xresources.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/xresources.service
+install -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/system/xresources.path
+ln -s ../xresources.path %{buildroot}%{_libdir}/systemd/system/graphical.target.wants/
 
 cp -rf arm-e4412/* %{buildroot}/etc/X11/
 
@@ -83,5 +85,6 @@ mkdir -p /opt/var/log
 /etc/X11/xorg.conf.d/*.conf
 %{_bindir}/startx
 %{_libdir}/systemd/system/xresources.service
-%{_libdir}/systemd/system/multi-user.target.wants/xresources.service
+%{_libdir}/systemd/system/xresources.path
+%{_libdir}/systemd/system/graphical.target.wants/xresources.path
 
diff --git a/packaging/xresources.path b/packaging/xresources.path
new file mode 100644 (file)
index 0000000..1eca71c
--- /dev/null
@@ -0,0 +1,16 @@
+[Unit]
+Description=Path-activation for xresources.service
+
+[Path]
+# This is somehow a not good solution giving that we're
+# depends on Xorg in fact.
+# However, there isn't a stable way let us to *After* Xorg
+# currently, Xorg start finished isn't mean it's ready and
+# even /tmp/.X0-lock was found not stable.
+# Finally, we need change Xorg to sd_notify(3), so the others
+# can rely on *After* it.
+# Also see: https://bugs.tizen.org/jira/browse/TDIST-290
+PathExists=/tmp/.wm_ready
+
+[Install]
+WantedBy=graphical.target
index a9cdf3d..fa0269d 100644 (file)
@@ -1,13 +1,11 @@
 [Unit]
 Description=Xresources
-After=tizen-runtime.target
-Requires=tizen-runtime.target
 
 [Service]
-Type=forking
-EnvironmentFile=/run/tizen-mobile-env
+Type=oneshot
+EnvironmentFile=/etc/sysconfig/tizen-mobile-ui
 ExecStart=/etc/rc.d/init.d/xresources start
-ExecStop=/etc/rc.d/init.d/xresources stop
+RemainAfterExit=yes
 
 [Install]
-WantedBy=multi-user.target
+WantedBy=graphical.target