pull in latest upstream fixes

This commit is contained in:
Rex Dieter 2016-04-15 08:51:43 -05:00
parent 3b64f1a05a
commit c67bdb806b
10 changed files with 506 additions and 1 deletions

View File

@ -0,0 +1,115 @@
From e6db37b89d90c10b31474ee8fbe4b24f77bb7c99 Mon Sep 17 00:00:00 2001
From: Per Olofsson <pelle@debian.org>
Date: Tue, 3 Nov 2015 20:34:44 +0100
Subject: [PATCH 1/9] Check for $WAYLAND_DISPLAY as well as $DISPLAY.
---
ChangeLog | 6 ++++++
scripts/xdg-email.in | 2 +-
scripts/xdg-mime.in | 2 +-
scripts/xdg-open.in | 8 ++++----
scripts/xdg-utils-common.in | 12 ++++++++++++
5 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2682c71..b0d8e2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+=== xdg-utils 1.1.2 ===
+
+2015-11-03 Per Olofsson <pelle@debian.org>
+ * Check for $WAYLAND_DISPLAY as well as $DISPLAY. Move display checking
+ to a common has_display() function. Thanks to Pasi Sjöholm for reporting.
+
=== xdg-utils 1.1.1 ===
2015-10-05 Per Olofsson <pelle@debian.org>
diff --git a/scripts/xdg-email.in b/scripts/xdg-email.in
index 2819e28..9d1701d 100644
--- a/scripts/xdg-email.in
+++ b/scripts/xdg-email.in
@@ -433,7 +433,7 @@ fi
# if BROWSER variable is not set, check some well known browsers instead
if [ x"$BROWSER" = x"" ]; then
BROWSER=www-browser:links2:elinks:links:lynx:w3m
- if [ -n "$DISPLAY" ]; then
+ if has_display; then
BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
fi
fi
diff --git a/scripts/xdg-mime.in b/scripts/xdg-mime.in
index 074256c..129850f 100644
--- a/scripts/xdg-mime.in
+++ b/scripts/xdg-mime.in
@@ -32,7 +32,7 @@ _USAGE
update_mime_database()
{
- if [ x"$mode" = x"user" -a -n "$DISPLAY" ] ; then
+ if [ "$mode" = user ] && has_display; then
detectDE
if [ x"$DE" = x"kde" ] ; then
DEBUG 1 "Running kbuildsycoca"
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index 0fbd63d..92a5912 100644
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -348,7 +348,7 @@ open_generic()
check_input_file "$file"
- if [ -n "$DISPLAY" ]; then
+ if has_display; then
filetype=`xdg-mime query filetype "$file" | sed "s/;.*//"`
open_generic_xdg_mime "$file" "$filetype"
fi
@@ -360,7 +360,7 @@ open_generic()
fi
fi
- if [ -n "$DISPLAY" ] && mimeopen -v 2>/dev/null 1>&2; then
+ if has_display && mimeopen -v 2>/dev/null 1>&2; then
mimeopen -L -n "$file"
if [ $? -eq 0 ]; then
exit_success
@@ -372,14 +372,14 @@ open_generic()
open_envvar "$1"
fi
- if [ -n "$DISPLAY" ]; then
+ if has_display; then
open_generic_xdg_x_scheme_handler "$1"
fi
# if BROWSER variable is not set, check some well known browsers instead
if [ x"$BROWSER" = x"" ]; then
BROWSER=www-browser:links2:elinks:links:lynx:w3m
- if [ -n "$DISPLAY" ]; then
+ if has_display; then
BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER
fi
fi
diff --git a/scripts/xdg-utils-common.in b/scripts/xdg-utils-common.in
index f920799..cb70875 100644
--- a/scripts/xdg-utils-common.in
+++ b/scripts/xdg-utils-common.in
@@ -350,3 +350,15 @@ kfmclient_fix_exit_code()
test "$release" -gt 4 && return $1
return 0
}
+
+#----------------------------------------------------------------------------
+# Returns true if there is a graphical display attached.
+
+has_display()
+{
+ if [ -n "$DISPLAY" ] || [ -n "$WAYLAND_DISPLAY" ]; then
+ return 0
+ else
+ return 1
+ fi
+}
--
2.7.3

View File

@ -0,0 +1,25 @@
From 68edecd130b29cd8678c4e6faa338afaa281a614 Mon Sep 17 00:00:00 2001
From: Per Olofsson <pelle@debian.org>
Date: Thu, 12 Nov 2015 08:00:43 +0100
Subject: [PATCH 2/9] xdg-utils-common: bump version number
---
scripts/xdg-utils-common.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/xdg-utils-common.in b/scripts/xdg-utils-common.in
index cb70875..cf08cd3 100644
--- a/scripts/xdg-utils-common.in
+++ b/scripts/xdg-utils-common.in
@@ -227,7 +227,7 @@ check_common_commands()
;;
--version)
- echo "@NAME@ 1.1.0 rc3"
+ echo "@NAME@ 1.1.1+"
exit_success
;;
esac
--
2.7.3

View File

@ -0,0 +1,22 @@
From b110b3555959c3aabd9484ad5c3b0c3abe8c5914 Mon Sep 17 00:00:00 2001
From: Per Olofsson <pelle@debian.org>
Date: Thu, 12 Nov 2015 08:01:03 +0100
Subject: [PATCH 3/9] ChangeLog: tag current version as unreleased
---
ChangeLog | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index b0d8e2a..deaa86e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-=== xdg-utils 1.1.2 ===
+=== xdg-utils 1.1.2 (unreleased) ===
2015-11-03 Per Olofsson <pelle@debian.org>
* Check for $WAYLAND_DISPLAY as well as $DISPLAY. Move display checking
--
2.7.3

View File

@ -0,0 +1,71 @@
From abd6cef36874f73c5c1c4a734d83eba9d340afe4 Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter@math.unl.edu>
Date: Sat, 19 Dec 2015 11:08:59 -0600
Subject: [PATCH 4/9] xdg-open: improve fallbacks, add open_generic (almost)
everywhere (BR93442)
---
ChangeLog | 3 +++
scripts/xdg-open.in | 18 +++++++++++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index deaa86e..e8a6e40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
=== xdg-utils 1.1.2 (unreleased) ===
+2015-12-19 Rex Dieter <rdieter@fedoraproject.org>
+ * xdg-open: improve fallbacks, add open_generic (almost) everywhere (BR93442)
+
2015-11-03 Per Olofsson <pelle@debian.org>
* Check for $WAYLAND_DISPLAY as well as $DISPLAY. Move display checking
to a common has_display() function. Thanks to Pasi Sjöholm for reporting.
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index 92a5912..4578753 100644
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -178,8 +178,10 @@ open_mate()
{
if gvfs-open --help 2>/dev/null 1>&2; then
gvfs-open "$1"
- else
+ elif mate-open --help >/dev/null 2>&1; then
mate-open "$1"
+ else
+ open_generic "$1"
fi
if [ $? -eq 0 ]; then
@@ -191,7 +193,13 @@ open_mate()
open_xfce()
{
- exo-open "$1"
+ if exo-open --help 2>/dev/null 1>&2; then
+ exo-open "$1"
+ elif gvfs-open --help 2>/dev/null 1>&2; then
+ gvfs-open "$1"
+ else
+ open_generic "$1"
+ fi
if [ $? -eq 0 ]; then
exit_success
@@ -202,7 +210,11 @@ open_xfce()
open_enlightenment()
{
- enlightenment_open "$1"
+ if enlightenment_open --help 2>/dev/null 1>&2; then
+ enlightenment_open "$1"
+ else
+ open_generic "$1"
+ fi
if [ $? -eq 0 ]; then
exit_success
--
2.7.3

View File

@ -0,0 +1,47 @@
From c913d96a56899ca2873a8fb51ab1b0f1d095199a Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter@math.unl.edu>
Date: Sat, 19 Dec 2015 20:48:55 -0600
Subject: [PATCH 5/9] xdg-open: standardize output redirection style
using 2>/dev/null 1>&2 everywhere
---
scripts/xdg-open.in | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index 4578753..fccb9bd 100644
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -144,7 +144,7 @@ open_kde()
open_gnome3()
{
- if gvfs-open --help >/dev/null 2>&1; then
+ if gvfs-open --help 2>/dev/null 1>&2; then
gvfs-open "$1"
else
open_generic "$1"
@@ -159,9 +159,9 @@ open_gnome3()
open_gnome()
{
- if gvfs-open --help >/dev/null 2>&1; then
+ if gvfs-open --help 2>/dev/null 1>&2; then
gvfs-open "$1"
- elif gnome-open --help >/dev/null 2>&1; then
+ elif gnome-open --help 2>/dev/null 1>&2; then
gnome-open "$1"
else
open_generic "$1"
@@ -178,7 +178,7 @@ open_mate()
{
if gvfs-open --help 2>/dev/null 1>&2; then
gvfs-open "$1"
- elif mate-open --help >/dev/null 2>&1; then
+ elif mate-open --help 2>/dev/null 1>&2; then
mate-open "$1"
else
open_generic "$1"
--
2.7.3

View File

@ -0,0 +1,117 @@
From 066b46418f454c0b7e1b5e1478f5f94d91276c14 Mon Sep 17 00:00:00 2001
From: Eric Slenk <lucid.machine@gmail.com>
Date: Mon, 15 Feb 2016 15:50:16 -0500
Subject: [PATCH 6/9] xdg-screensaver: Add cinnamon-screensaver D-Bus API
support.
---
scripts/xdg-screensaver.in | 86 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+)
diff --git a/scripts/xdg-screensaver.in b/scripts/xdg-screensaver.in
index 1dd7bf7..50ef916 100644
--- a/scripts/xdg-screensaver.in
+++ b/scripts/xdg-screensaver.in
@@ -102,6 +102,10 @@ perform_action()
screensaver_mate_screensaver "$1"
;;
+ cinnamon)
+ screensaver_cinnamon_screensaver "$1"
+ ;;
+
xscreensaver)
screensaver_xscreensaver "$1"
;;
@@ -638,6 +642,88 @@ screensaver_mate_screensaver()
esac
}
+screensaver_cinnamon_screensaver()
+{
+# DBUS interface for cinnamon-screensaver
+# https://raw.githubusercontent.com/linuxmint/cinnamon-screensaver/master/doc/dbus-interface.html
+ case "$1" in
+ suspend)
+ screensaver_suspend_loop \
+ dbus-send --session \
+ --dest=org.cinnamon.ScreenSaver \
+ --type=method_call \
+ /org/cinnamon/ScreenSaver \
+ org.cinnamon.ScreenSaver.SimulateUserActivity \
+ 2> /dev/null
+ result=$?
+ ;;
+
+ resume)
+ # Automatic resume when $screensaver_file disappears
+ result=0
+ ;;
+
+ activate)
+ dbus-send --session \
+ --dest=org.cinnamon.ScreenSaver \
+ --type=method_call \
+ /org/cinnamon/ScreenSaver \
+ org.cinnamon.ScreenSaver.SetActive \
+ boolean:true \
+ 2> /dev/null
+ result=$?
+ ;;
+
+ lock)
+ dbus-send --session \
+ --dest=org.cinnamon.ScreenSaver \
+ --type=method_call \
+ /org/cinnamon/ScreenSaver \
+ org.cinnamon.ScreenSaver.Lock \
+ string:"" \
+ 2> /dev/null
+
+ result=$?
+ ;;
+
+ reset)
+ # Turns the screensaver off right now
+ dbus-send --session \
+ --dest=org.cinnamon.ScreenSaver \
+ --type=method_call \
+ /org/cinnamon/ScreenSaver \
+ org.cinnamon.ScreenSaver.SimulateUserActivity \
+ 2> /dev/null
+ result=$?
+ ;;
+
+ status)
+ status=`dbus-send --session \
+ --dest=org.cinnamon.ScreenSaver \
+ --type=method_call \
+ --print-reply \
+ --reply-timeout=2000 \
+ /org/cinnamon/ScreenSaver \
+ org.cinnamon.ScreenSaver.GetActive \
+ | grep boolean | cut -d ' ' -f 5`
+ result=$?
+ if [ x"$status" = "xtrue" ]; then
+ echo "enabled"
+ elif [ x"$status" = "xfalse" ]; then
+ echo "disabled"
+ else
+ echo "ERROR: dbus org.cinnamon.ScreenSaver.GetActive returned '$status'" >&2
+ return 1
+ fi
+ ;;
+
+ *)
+ echo "ERROR: Unknown command '$1" >&2
+ return 1
+ ;;
+ esac
+}
+
screensaver_xscreensaver()
{
case "$1" in
--
2.7.3

View File

@ -0,0 +1,25 @@
From c7ecf26e036c7a5f8a921d12c7efe1435f3e996b Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter@math.unl.edu>
Date: Tue, 16 Feb 2016 11:32:18 -0600
Subject: [PATCH 7/9] add changelog for prior commit
---
ChangeLog | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index e8a6e40..a43ae3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
=== xdg-utils 1.1.2 (unreleased) ===
+2016-02-16 Rex Dieter <rdieter@fedoraproject.org>
+ * xdg-screensaver: support cinnamon-screensaver (BR92966)
+
2015-12-19 Rex Dieter <rdieter@fedoraproject.org>
* xdg-open: improve fallbacks, add open_generic (almost) everywhere (BR93442)
--
2.7.3

View File

@ -0,0 +1,46 @@
From 31db8136bdf61e7f9cb866f9d47c99c63343558d Mon Sep 17 00:00:00 2001
From: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
Date: Fri, 15 Apr 2016 11:17:37 +0200
Subject: [PATCH 8/9] xdg-mime: support for KDE Frameworks 5.6
---
scripts/xdg-mime.in | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/scripts/xdg-mime.in b/scripts/xdg-mime.in
index 129850f..63b8a82 100644
--- a/scripts/xdg-mime.in
+++ b/scripts/xdg-mime.in
@@ -428,13 +428,9 @@ defapp_kde()
case "${KDE_SESSION_VERSION}" in
4)
KTRADER=`which ktraderclient 2> /dev/null`
- MIMETYPE="--mimetype"
- SERVICETYPE="--servicetype"
;;
5)
KTRADER=`which ktraderclient${KDE_SESSION_VERSION} 2> /dev/null`
- MIMETYPE="--mimetype"
- SERVICETYPE="--servicetype"
;;
esac
else
@@ -442,8 +438,8 @@ defapp_kde()
fi
if [ -n "$KTRADER" ] ; then
DEBUG 1 "Running KDE trader query \"$MIME\" mimetype and \"Application\" servicetype"
- trader_result=`$KTRADER $MIMETYPE "$MIME" $SERVICETYPE Application 2>/dev/null \
- | grep DesktopEntryPath | head -n 1 | cut -d ':' -f 2 | cut -d \' -f 2`
+ trader_result=`$KTRADER --mimetype "$MIME" --servicetype Application 2>/dev/null \
+ | grep -E "^DesktopEntryPath : |\.desktop$" | head -n1 | sed "s/^DesktopEntryPath : '\(.*\.desktop\)'\$/\1/"`
if [ -n "$trader_result" ] ; then
basename "$trader_result"
exit_success
@@ -954,4 +950,3 @@ esac
update_mime_database $xdg_base_dir
exit_success
-
--
2.7.3

View File

@ -0,0 +1,25 @@
From 6acfbbe3fc5fa545db9089da4448091ce598de4c Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter@math.unl.edu>
Date: Fri, 15 Apr 2016 08:43:53 -0500
Subject: [PATCH 9/9] +changelog for prior commit
---
ChangeLog | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index a43ae3a..e50ad3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
=== xdg-utils 1.1.2 (unreleased) ===
+2016-04-15 Rex Dieter <rdieter@fedoraproject.org>
+ * xdg-mime: properly handle varied ktraderclient5 output (BR94946)
+
2016-02-16 Rex Dieter <rdieter@fedoraproject.org>
* xdg-screensaver: support cinnamon-screensaver (BR92966)
--
2.7.3

View File

@ -5,7 +5,7 @@
Summary: Basic desktop integration functions
Name: xdg-utils
Version: 1.1.1
Release: 2%{?dist}
Release: 3%{?dist}
URL: http://portland.freedesktop.org/
%if 0%{?snap:1}
@ -17,6 +17,15 @@ Source1: xdg-utils-git_checkout.sh
License: MIT
## upstream patches
Patch1: 0001-Check-for-WAYLAND_DISPLAY-as-well-as-DISPLAY.patch
Patch2: 0002-xdg-utils-common-bump-version-number.patch
Patch3: 0003-ChangeLog-tag-current-version-as-unreleased.patch
Patch4: 0004-xdg-open-improve-fallbacks-add-open_generic-almost-e.patch
Patch5: 0005-xdg-open-standardize-output-redirection-style.patch
Patch6: 0006-xdg-screensaver-Add-cinnamon-screensaver-D-Bus-API-s.patch
Patch7: 0007-add-changelog-for-prior-commit.patch
Patch8: 0008-xdg-mime-support-for-KDE-Frameworks-5.6.patch
Patch9: 0009-changelog-for-prior-commit.patch
# make sure BuildArch comes *after* patches, to ensure %%autosetup works right
# http://bugzilla.redhat.com/1084309
@ -91,6 +100,9 @@ make install DESTDIR=%{buildroot}
%changelog
* Fri Apr 15 2016 Rex Dieter <rdieter@fedoraproject.org> - 1.1.1-3
- pull in latest upstream fixes
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild