From e63f2ab771ff3eabc8526ac5bdfe744ebf5ec05a Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Thu, 1 Aug 2013 10:44:36 +0800 Subject: [PATCH] Fix xresource fail to start Change-Id: Ifc3c0281a80a3c50ea74830d13a8d41d586a3d89 Signed-off-by: Chengwei Yang --- packaging/xorg-x11-misc-exynos.spec | 9 ++++++--- packaging/xresources.path | 16 ++++++++++++++++ packaging/xresources.service | 10 ++++------ 3 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 packaging/xresources.path diff --git a/packaging/xorg-x11-misc-exynos.spec b/packaging/xorg-x11-misc-exynos.spec index 7c03f1c..f29f00f 100644 --- a/packaging/xorg-x11-misc-exynos.spec +++ b/packaging/xorg-x11-misc-exynos.spec @@ -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 index 0000000..1eca71c --- /dev/null +++ b/packaging/xresources.path @@ -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 diff --git a/packaging/xresources.service b/packaging/xresources.service index a9cdf3d..fa0269d 100644 --- a/packaging/xresources.service +++ b/packaging/xresources.service @@ -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 -- 2.7.4