[X2Go-Commits] [x2goserver] 04/13: x2goserver.spec: backport dangling symlink check for /etc/x2go/applications.
git-admin at x2go.org
git-admin at x2go.org
Fri Jul 27 01:52:10 CEST 2018
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goserver.
commit 4b5d2aab2a7d762835317eb1aec8e92c0a76250d
Author: Mihai Moldovan <ionic at ionic.de>
Date: Fri Jul 27 00:43:26 2018 +0200
x2goserver.spec: backport dangling symlink check for /etc/x2go/applications.
---
debian/changelog | 1 +
x2goserver.spec | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index d9e9ceb..f30cba5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -147,6 +147,7 @@ x2goserver (4.1.0.1-0x2go1) UNRELEASED; urgency=medium
+ Move references from etc/tmpfiles.d to %{_prefix}/lib/tmpfiles.d.
+ Depend upon perl(DBD::mysql) for MySQL/MariaDB support in perl DBD.
+ Comment out perl(DBD::mysql) dependency for now.
+ + Backport dangling symlink check for /etc/x2go/applications.
* debian/copyright.in:
+ Remove reference to rgb file.
+ Remove reference to x2goagent wrapper script.
diff --git a/x2goserver.spec b/x2goserver.spec
index 174b594..2fa9117 100644
--- a/x2goserver.spec
+++ b/x2goserver.spec
@@ -658,8 +658,12 @@ fi
# 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
+# N.B.: dangling symlinks will lead to test -e FAILING, because the symlink is dereferenced.
+# This means that without the explicit symlink check (which doesn't dereference the last
+# element), the ln call would be executed and fail, since the file/symlink already exists,
+# leading to this scriptlet failing and hence leading to the installation failing.
+if ! [ -e "%{_sysconfdir}/x2go/applications" ] && ! [ -L "%{_sysconfdir}/x2go/applications" ]; then
+ ln -s "%{_datadir}/applications" "%{_sysconfdir}/x2go/applications"
fi
%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
More information about the x2go-commits
mailing list