From d689dda54be25fb1a72a19e5d5f7ccda2f39bb350e917dfbe32bc3fb15ce9fc2 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Tue, 3 Nov 2015 11:58:02 +0000 Subject: [PATCH] Accepting request 342244 from home:jirislaby:branches:X11:common:Factory update to 20151005 OBS-URL: https://build.opensuse.org/request/show/342244 OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/xdg-utils?expand=0&rev=43 --- fix-enlightenment-support.patch | 41 +++-- ...-do-not-return-more-than-one-default.patch | 36 ---- xdg-screensaver-gnome-perl.diff | 70 -------- xdg-utils-20150119.tar.xz | 3 - xdg-utils-20151005.tar.xz | 3 + xdg-utils.changes | 155 ++++++++++++++++++ xdg-utils.spec | 8 +- 7 files changed, 183 insertions(+), 133 deletions(-) delete mode 100644 xdg-mime-generic-do-not-return-more-than-one-default.patch delete mode 100644 xdg-screensaver-gnome-perl.diff delete mode 100644 xdg-utils-20150119.tar.xz create mode 100644 xdg-utils-20151005.tar.xz diff --git a/fix-enlightenment-support.patch b/fix-enlightenment-support.patch index ddbf9b5..d6e191a 100644 --- a/fix-enlightenment-support.patch +++ b/fix-enlightenment-support.patch @@ -1,16 +1,23 @@ -Index: xdg-utils-20120916/scripts/xdg-su.in -Patch by Simon Lees simon@simotek.net based off a earlier patch -by Tomas Cech, this patch does 2 things, +From: Simon Lees + +Based off an earlier patch by Tomas Cech. + +This patch does 2 things: 1. In both xdg-su and xdg-terminal enlightenment is detected but then - no action is performed, this patch performs a action in these cases -2. Rather then performing the generic action specific enlightenment - actions have been added to use terminology rather then xterm as it + no action is performed, this patch performs an action in these cases. +2. Rather than performing the generic action, specific enlightenment + actions have been added. They use terminology rather than xterm as it is essientially the enlightenment terminal emulator and matches the - terminology theme -=================================================================== ---- xdg-utils-20120916.orig/scripts/xdg-su.in -+++ xdg-utils-20120916/scripts/xdg-su.in -@@ -525,6 +525,27 @@ + terminology theme. + +--- + scripts/xdg-su.in | 25 +++++++++++++++++++++++++ + scripts/xdg-terminal.in | 17 +++++++++++++++++ + 2 files changed, 42 insertions(+) + +--- a/scripts/xdg-su.in ++++ b/scripts/xdg-su.in +@@ -104,6 +104,27 @@ su_xfce() [ x"$1" != x"" ] || exit_failure_syntax @@ -38,7 +45,7 @@ by Tomas Cech, this patch does 2 things, user= cmd= while [ $# -gt 0 ] ; do -@@ -588,6 +609,10 @@ +@@ -167,6 +188,10 @@ case "$DE" in su_xfce ;; @@ -49,11 +56,9 @@ by Tomas Cech, this patch does 2 things, *) [ x"$user" = x"" ] && user=root exit_failure_operation_impossible "no graphical method available for invoking '$cmd' as '$user'" -Index: xdg-utils-20120916/scripts/xdg-terminal.in -=================================================================== ---- xdg-utils-20120916.orig/scripts/xdg-terminal.in -+++ xdg-utils-20120916/scripts/xdg-terminal.in -@@ -563,6 +563,19 @@ +--- a/scripts/xdg-terminal.in ++++ b/scripts/xdg-terminal.in +@@ -176,6 +176,19 @@ terminal_lxde() fi } @@ -73,7 +78,7 @@ Index: xdg-utils-20120916/scripts/xdg-terminal.in #[ x"$1" != x"" ] || exit_failure_syntax command= -@@ -606,6 +619,10 @@ +@@ -231,6 +244,10 @@ case "$DE" in lxde) terminal_lxde "$command" ;; diff --git a/xdg-mime-generic-do-not-return-more-than-one-default.patch b/xdg-mime-generic-do-not-return-more-than-one-default.patch deleted file mode 100644 index ebebfb7..0000000 --- a/xdg-mime-generic-do-not-return-more-than-one-default.patch +++ /dev/null @@ -1,36 +0,0 @@ -From ea7e2924df069a66423459c00e4e512063720fb1 Mon Sep 17 00:00:00 2001 -From: Jiri Slaby -Date: Thu, 27 Nov 2014 16:31:52 +0100 -Subject: [PATCH 1/1] xdg-mime: generic, do not return more than one default -References: bnc#906625 - -Now, 'xdg-mime query default' can return more than one application: -$ XDG_UTILS_DEBUG_LEVEL=5 xdg-mime query default text/plain -Checking /home/xslaby/.local/share//applications/mimeapps.list -Checking /usr/share/applications/defaults.list and /usr/share/applications/mimeinfo.cache -writer.desktop kde4-active-documentviewer_txt.desktop - -It is due to an unlimited grep in defapp_generic(). So limit the -output by 'head -1'. - -Signed-off-by: Jiri Slaby ---- - scripts/xdg-mime.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/scripts/xdg-mime.in b/scripts/xdg-mime.in -index 0290d7742e45..da472edf267a 100644 ---- a/scripts/xdg-mime.in -+++ b/scripts/xdg-mime.in -@@ -383,7 +383,7 @@ defapp_generic() - for x in `echo "$xdg_system_dirs" | sed 's/:/ /g'`; do - for prefix in "$XDG_MENU_PREFIX" ""; do - DEBUG 2 "Checking $x/applications/${prefix}defaults.list and $x/applications/${prefix}mimeinfo.cache" -- trader_result=`grep "$MIME=" $x/applications/${prefix}defaults.list $x/applications/${prefix}mimeinfo.cache 2> /dev/null | cut -d '=' -f 2 | cut -d ';' -f 1` -+ trader_result=`grep "$MIME=" $x/applications/${prefix}defaults.list $x/applications/${prefix}mimeinfo.cache 2> /dev/null | head -1 | cut -d '=' -f 2 | cut -d ';' -f 1` - if [ -n "$trader_result" ] ; then - echo $trader_result - exit_success --- -2.1.3 - diff --git a/xdg-screensaver-gnome-perl.diff b/xdg-screensaver-gnome-perl.diff deleted file mode 100644 index 34cf3be..0000000 --- a/xdg-screensaver-gnome-perl.diff +++ /dev/null @@ -1,70 +0,0 @@ -Source of the patch: http://patch-tracker.debian.org/patch/series/view/xdg-utils/1.1.0~rc1+git20111210-6/xdg-screensaver-new-gnome.diff ---- - scripts/xdg-screensaver.in | 56 ++++++++++++++++++++++++++++++++++++++------- - 1 file changed, 48 insertions(+), 8 deletions(-) - ---- a/scripts/xdg-screensaver.in -+++ b/scripts/xdg-screensaver.in -@@ -435,14 +435,54 @@ screensaver_gnome_screensaver() - # http://people.gnome.org/~mccann/gnome-screensaver/docs/gnome-screensaver.html - case "$1" in - suspend) -- screensaver_suspend_loop \ -- dbus-send --session \ -- --dest=org.gnome.ScreenSaver \ -- --type=method_call \ -- /org/gnome/ScreenSaver \ -- org.gnome.ScreenSaver.SimulateUserActivity \ -- 2> /dev/null -- result=$? -+ perl -e ' -+use strict; -+use warnings; -+use IO::File; -+use Net::DBus; -+use X11::Protocol; -+ -+my ($window_id, $screensaver_file) = @ARGV; -+ -+# Find window name to pass to session manager. -+my $x = X11::Protocol->new(); -+my $named_window_id = hex($window_id); -+my $window_name; -+while (1) { -+ ($window_name) = $x->GetProperty($named_window_id, $x->atom("WM_NAME"), -+ $x->atom("STRING"), 0, 1000, 0); -+ last if defined($window_name) && $window_name ne ""; -+ (undef, $named_window_id) = $x->QueryTree($named_window_id); -+ if (!defined($named_window_id)) { -+ $window_name = "?"; -+ last; -+ } -+} -+ -+# Inhibit idle detection (flags = 8) with window name and ID. -+# We have no reason so just send the window name again. -+my $bus = Net::DBus->session(); -+my $sm_svc = $bus->get_service("org.gnome.SessionManager"); -+my $sm = $sm_svc->get_object("/org/gnome/SessionManager", -+ "org.gnome.SessionManager"); -+$sm->Inhibit($window_name, hex($window_id), $window_name, 8); -+ -+# Wait until removed from the status file. -+while (1) { -+ sleep(10); -+ my $status = new IO::File($screensaver_file, "r") -+ or exit 0; -+ my $found; -+ while (<$status>) { -+ if (/^$window_id:/) { -+ $found = 1; -+ last; -+ } -+ } -+ exit 0 unless $found; -+} -+' $window_id $screensaver_file & -+ result=0 - ;; - - resume) diff --git a/xdg-utils-20150119.tar.xz b/xdg-utils-20150119.tar.xz deleted file mode 100644 index 67270bb..0000000 --- a/xdg-utils-20150119.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c59a5773253df478c155459f341d22c5a17f0095754b499f09cb8ca5bb03c57d -size 262784 diff --git a/xdg-utils-20151005.tar.xz b/xdg-utils-20151005.tar.xz new file mode 100644 index 0000000..efd14d7 --- /dev/null +++ b/xdg-utils-20151005.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e660c96d5928b27f2ac84b49ea6dcd0c1399cfc9d39adc82b28f2e86ebd70efd +size 268028 diff --git a/xdg-utils.changes b/xdg-utils.changes index 3571ed5..8ab4dd9 100644 --- a/xdg-utils.changes +++ b/xdg-utils.changes @@ -1,3 +1,158 @@ +------------------------------------------------------------------- +Tue Nov 3 10:55:15 UTC 2015 - jslaby@suse.com + +- update to 20151005 + * ChangeLog: add debian bug number + * ChangeLog: add some space + * xdg-open: Add proper quoting so that files with spaces in their names can be opened in generic mode and LXDE + * t-xdg-open: test opening files with spaces in LXDE too + * t-xdg-open: quote file variable properly in mock_xdg_mime() + * xdg-open: Fix regression in generic mode (wrong variable name) + * t-xdg-open: improve mocking of xdg-mime (check all arguments) + * t-xdg-open: can open -> opens + * t-xdg-open: test that it can open files with spaces in their names in generic mode + * t-xdg-open: move generic open file testing to its own function + * t-xdg-open: move xdg-mime mocking to its own function + * t-xdg-open: use the mock script argument instead of writing a mock script manually + * oops, fix spelling of name + * xdg-screensaver: Run 'xset -dpms' and then 'xset +dpms' to reset the DPMS timer + * add .dir-locals.el that switches off change-log-mode in Emacs for ChangeLog + * add t-xdg-screensaver + * xdg-screensaver: handle XDG_CURRENT_DESKTOP=X-Generic + * test-lib: take arbitrary script code as argument to mock + * remove org.freedesktop.ScreenSaver support from TODO + * release xdg-utils 1.1.0 + * xdg-email: Remove obsolete references to http://portland.freedesktop.org/wiki/EmailConfig from the manual + * add releaseinfo element to xdg-settings manual + * Add references to specifications to the manuals + * xdg-open: use sed to remove file URL query strings, the shell will interpret '?' as any character despite escaping + * xdg-open: Only strip queries (?) and fragments (#) from file URLs before decoding them, not from (decoded) paths + * t-xdg-open: test that it can open files with # characters in generic mode + * t-xdg-open: test that it can open files in generic mode + * t-xdg-open: under -> in + * t-xdg-open: separate out proper testcases + * autotests: don't print test filename + * xdg-email: Rewrite open_kde() + * t-xdg-email: update KDE tests + * autotests: Add t-xdg-email.sh with KDE5 test + * Revert "Remove .sh extension from autotests" + * Remove .sh extension from autotests + * +x on t-xdg-settings.sh + * xdg-settings: apply basename to browser desktop file in generic mode + * t-xdg-settings: test $BROWSER in generic mode + * xdg-settings: Add a proper generic mode. + * xdg-settings: Detect generic DE instead of failing. (Debian bug #787791) + * autotests: add t-xdg-settings.sh + * add /failed-tests to autotests/.gitignore + * test-lib: add mock_output() + * xdg-open, xdg-email: Add iceweasel to the list of fallback browsers. (Debian bug #788047) + * add Debian bug number to ChangeLog + * test-lib: better assertion failed message for assert_run + * indentation + * use $LABHOME/.local/share for $XDG_DATA_HOME + * is -> are + * t-xdg-open: also test Cinnamon + * xdg-open: Fall back to generic mode if gvfs-open and gnome-open are missing. Don't try to use gnome-open if running under GNOME 3 or Cinnamon. + * t-xdg-open.sh: test that gnome3 and gnome2 fall back to generic if gvfs-open and gnome-open are missing + * xdg-mime: Check ~/.config/mimeapps.list instead of ~/.config/applications/mimeapps.list when looking for default application. + * test-lib: always mock x-www-browser so we have a fallback + * put default apps in $XDG_CONFIG_HOME/mimeapps.list + * test-lib: add mock_desktop_file and mock_default_app + * test-lib: add XDG_CONFIG_HOME and create it in reset_lab_() + * test-lib: nicer output formatting + * merge t-xdg-open-url and t-xdg-open-file into t-xdg-open + * autotests: set COMMAND_TESTED in each test file and rename test_that to test_that_it which prints the command to be tested. Also remove test file printing from makefile + * test-lib: don't trace which commands are run unless TRACE_RUN=1 + * add test_that invocations before every test + * test-lib: rename setup_lab to reset_lab_ + * test-lib: add test_that function that resets the lab, echoes the argument and records it + * test-lib: add XDG_CONFIG_DIRS to environment + * autotests: add LABHOME directory lab/home and set HOME to LABHOME when running xdg-utils commands + * test-lib: clear $BROWSER in setup_lab + * xdg-utils-common: Add support for GNOME-Flashback:GNOME value X-Generic. + * xdg-open: Percent-decode file:// URLs in open_lxde and add testcase. (BR89654) + * autotests/Makefile.in: use rm -f insted of -rm + * autotests: remove Makefile in distclean target + * speling + * xdg-icon-resouce: Don't try to install anything into empty $icon_dir's. + * add autotests/t-xdg-icon-resource.sh + * test-lib.sh: pass on XDG_UTILS_DEBUG_LEVEL in run() + * autotests: add autotest target to subdir makefile + * test-lib.sh: add assert_file_exists + * test-lib.sh: create hicolor icon directories in lab + * add changelog entry: xdg-open: Try www-browser first of the non-X browsers. + * Merge branch 'feature/try-www-browser-first' into upstream + * add changelog entry: xdg-open: Add support for running without X. + * Merge branch 'feature/no-X' into upstream + * changelog message: xdg-email: Add support for the environment variable. + * Merge branch 'feature/mailer-envvar' into upstream + * thank Ben Hutchings for the gnome-screensaver perl script + * add changelog message for the gnome-screensaver suspend perl code + * Merge branch 'bug/gnome3-screensaver-suspend' into upstream + * use Makefile.in in autotests for consistency + * changelog entry for the new automatic test suite + * check that $BROWSER with %s is safe from shell injection + * use empty default target in autotests/Makefile to avoid running tests as part of the build process + * Merge branch 'bug/prefer-browser-envvar' into feature/autotests + * run tests with sh in case they lack the x-bit + * add extra blank line after test failures output + * add autotests to SUBDIRS in top-level makefile and add clean target + * collect failed assertions instead of aborting + * check that $BROWSER overrides mimeapps.list in generic mode + * add BROWSER to env + * add autotest target to top makefile + * Try $BROWSER first in generic mode if it is set by the user. + * add generic and lxde tests to t-xdg-open-url.sh + * add test t-xdg-mime-query-default.sh + * make applications directories and add assert_equal() function + * Introduce an automated test suite. + * move www-browser to separate feature/patch + * Try www-browser first when running without $DISPLAY. + * Add support for using xdg-open and xdg-email without X. + * Add $MAILER support to xdg-email. + * Use DBus API for GNOME since gnome-screensaver-command --poke has been removed + * xdg-email: Recipients passed to Thunderbird are incorrectly quoted (BR91996) + * xdg-email: generic mode does nothing (BR92008) + * xdg-email: Icedove support (BR91997) + * xdg-email: bashism: relies on bash's echo in run_thunderbird() (BR91990) + * xdg-open shell script contains bash code (BR86028) + * xdg-open: Add support for multi-word $BROWSER commands (BR91989) + * Changelog for previous commit + * xdg-icon-resource: quote var expansions + * xdg-icon-resource: does not support filenames with spaces (BR91758) + * xdg-screensaver support for xautolock (BR89655) + * xdg-screensaver: fix a comment typo + * xdg-mime: remove obsolete workaround for bug #33094 + * amend changelog to be more specific + * add changelog for last batch of commits + * xdg-terminal: add support for GNOME3, Cinnamon, MATE + * xdg-su: add support for Cinnamon + * xdg-settings: add support for all GVfs-based desktops + * xdg-open: use cygstart on Cygwin + * xdg-open: fix operation on Darwin + * xdg-open: add support for Cinnamon + * xdg-mime: add support for all GVfs-based desktops + * xdg-mime: implement Mime Apps Spec + * xdg-file-dialog: use zenity on Cinnamon and MATE + * xdg-email: add support for all GVfs-based desktops + * xdg-copy: add support for all GVfs-based desktops + * Add detection of Cinnamon desktop + * Improve detection of GNOME Classic and Flashback sessions + * followup commit, copy-n-paste fail + * xdg-email: generic check for assigned mailto (BR79929) + * xdg-mime: search mimeinfo.cache in $xdg_user_dir too (BR31629) + * typo from previous commit + * xdg-open: does not exit if it does not recognize the mimetype (BR89902) + * xdg-desktop-menu: does not support filenames with spaces (BR66605) + * xdg-open: fix regression where & gets replaced with \\& in URLs + * xdg-email: thunderbird launch in xdg-email in gnome3 fails (BR61475) + * add ChangeLog entry for previous commit + * xdg-mime: do not report multiple desktop files (BR60329) + * one more s/$arg/$target/ rename fix for prior commit + * xdg-open: safer xdg-open (BR89130) +- Remove: xdg-mime-generic-do-not-return-more-than-one-default.patch +- Remove: xdg-screensaver-gnome-perl.diff + ------------------------------------------------------------------- Tue Jan 20 12:14:38 UTC 2015 - jslaby@suse.com diff --git a/xdg-utils.spec b/xdg-utils.spec index c332dd3..1f9ee7e 100644 --- a/xdg-utils.spec +++ b/xdg-utils.spec @@ -1,7 +1,7 @@ # # spec file for package xdg-utils # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,15 +26,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Utilities to uniformly interface desktop environments License: MIT Group: System/GUI/Other -Version: 20150119 +Version: 20151005 Release: 0 BuildArch: noarch Url: http://portland.freedesktop.org/ # http://portland.freedesktop.org/download/xdg-utils-%%{version}.tgz Source0: xdg-utils-%{version}.tar.xz Patch0: install-some-more-scripts.diff -Patch1: xdg-screensaver-gnome-perl.diff -Patch2: xdg-mime-generic-do-not-return-more-than-one-default.patch Patch3: fix-enlightenment-support.patch Requires: perl Requires: perl-Net-DBus @@ -59,8 +57,6 @@ these utilities work properly in their environment. %prep %setup -q -n %name-%{version} %patch0 -p1 -%patch1 -p1 -%patch2 -p1 %patch3 -p1 %build