orion pushed to x2goserver (f21). "Install applications symlink by default so that "Published (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Mon Apr 27 17:35:48 UTC 2015


>From c7dd45c627121f9e83309e86e4e5ff5e64198abf Mon Sep 17 00:00:00 2001
From: Orion Poplawski <orion at gandalf.local>
Date: Sun, 26 Apr 2015 21:25:00 -0600
Subject: Install applications symlink by default so that "Published

  Applications" is populated (bug #1215474)

diff --git a/x2goserver.spec b/x2goserver.spec
index 3532fd2..ad8e4a6 100644
--- a/x2goserver.spec
+++ b/x2goserver.spec
@@ -1,7 +1,7 @@
 #global checkout 20130722git65169c9
 Name:           x2goserver
 Version:        4.0.1.19
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        X2Go Server
 
 Group:          Applications/Communications
@@ -47,6 +47,7 @@ Requires:       x2goagent >= 3.5.0.25
 Requires:       xorg-x11-fonts-misc
 Requires:       xorg-x11-xauth
 Requires(pre):  shadow-utils
+Requires(post): coreutils
 Requires(post): grep
 Requires(post): perl(DBD::SQLite)
 %if 0%{?fedora} || 0%{?rhel} >= 7
@@ -192,6 +193,9 @@ install -pm0755 %SOURCE2 %{buildroot}%{_initddir}/x2gocleansessions
 
 desktop-file-validate %{buildroot}%{_datadir}/applications/x2gofm.desktop
 
+# applications link
+ln -s ../..%{_datadir}/applications %{buildroot}%{_sysconfdir}/x2go/applications
+
 
 %pre
 getent group x2gouser >/dev/null || groupadd -r x2gouser
@@ -203,30 +207,45 @@ exit 0
 %post
 # Initialize the session database
 [ ! -s %{_sharedstatedir}/x2go/x2go_sessions ] &&
-  egrep "^backend=sqlite.*" /etc/x2go/x2gosql/sql >/dev/null 2>&1 &&
-  %{_sbindir}/x2godbadmin --createdb >/dev/null 2>&1 || :
+    grep -E "^backend=sqlite.*" /etc/x2go/x2gosql/sql >/dev/null 2>&1 &&
+    %{_sbindir}/x2godbadmin --createdb >/dev/null 2>&1 || :
+
+# create /etc/x2go/applications symlink if not already there
+# as a regular file, as a symlink, as a special file or as a directory
+if ! [ -e %{_sysconfdir}/x2go/applications ]; then
+    ln -s ../..%{_datadir}/applications %{_sysconfdir}/x2go/applications
+fi
 
 %if 0%{?fedora} || 0%{?rhel} >= 7
 %systemd_post x2gocleansessions.service
+%else
+/sbin/chkconfig --add x2gocleansessions
+%endif
 
 %preun
+if [ "$1" = 0 ]; then
+    if [ -L %{_sysconfdir}/x2go/applications ]; then
+        rm -f %{_sysconfdir}/x2go/applications
+    fi
+fi
+
+%if 0%{?fedora} || 0%{?rhel} >= 7
 %systemd_preun x2gocleansessions.service
+%else
+if [ "$1" = 0 ]; then
+    /sbin/service x2gocleansessions stop >/dev/null 2>&1
+    /sbin/chkconfig --del x2gocleansessions
+fi
+%endif
+
 
 %postun
+%if 0%{?fedora} || 0%{?rhel} >= 7
 %systemd_postun x2gocleansessions.service
 %else
-/sbin/chkconfig --add x2gocleansessions
-
-%postun
 if [ "$1" -ge "1" ] ; then
     /sbin/service x2gocleansessions condrestart >/dev/null 2>&1 || :
 fi
-
-%preun
-if [ "$1" = 0 ]; then
-        /sbin/service x2gocleansessions stop >/dev/null 2>&1
-        /sbin/chkconfig --del x2gocleansessions
-fi
 %endif
 
 %post fmbindings
@@ -236,8 +255,8 @@ touch --no-create %{_datadir}/mime/packages &> /dev/null || :
 %postun fmbindings
 /usr/bin/update-desktop-database &>/dev/null || :
 if [ $1 -eq 0 ] ; then
-        /bin/touch --no-create %{_datadir}/mime/packages &> /dev/null || :
-        /usr/bin/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
+    /bin/touch --no-create %{_datadir}/mime/packages &> /dev/null || :
+    /usr/bin/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
 fi
 
 %posttrans fmbindings
@@ -256,6 +275,7 @@ exit 0
 %config(noreplace) %{_sysconfdir}/logcheck
 %config(noreplace) %{_sysconfdir}/sudoers.d/x2goserver
 %dir %{_sysconfdir}/x2go/
+%ghost %config(noreplace) %{_sysconfdir}/x2go/applications
 %config(noreplace) %{_sysconfdir}/x2go/x2go_logout
 %config(noreplace) %{_sysconfdir}/x2go/x2go_logout.d/
 %config(noreplace) %{_sysconfdir}/x2go/x2goagent.options
@@ -332,6 +352,10 @@ exit 0
 
 
 %changelog
+* Sun Apr 26 2015 Orion Poplawski <orion at cora.nwra.com> - 4.0.1.19-3
+- Install applications symlink by default so that "Published
+  Applications" is populated (bug #1215474)
+
 * Wed Mar 18 2015 Orion Poplawski <orion at cora.nwra.com> - 4.0.1.19-2
 - Provide x2goserver-extensions for upstream compatibility
 
@@ -455,7 +479,7 @@ exit 0
 
 * Mon Jul 22 2013 Rok Mandeljc <rok.mandeljc at gmail.com> - 4.1.0.0-0.4.20130722git65169c9
 - Update to latest git
-- Use PREFIX=%{_prefix} when building, not just when installing.
+- Use PREFIX=%%{_prefix} when building, not just when installing.
 - Use pwgen instead of makepasswd, which is not available on Fedora.
 - Fixed a missing function import in x2golistsessions.
 - Added dependencies for xorg-x11-fonts-misc
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/x2goserver.git/commit/?h=f21&id=c7dd45c627121f9e83309e86e4e5ff5e64198abf


More information about the scm-commits mailing list