1.1.0-0.21.rc2

- .spec housecleaning (remove deprecated stuff)
- pull in latest upstream fixes, including...
- xdg-open does not substitute all field codes in Exec key (#1056431, fdo#49204)
This commit is contained in:
Rex Dieter 2014-03-30 17:40:51 -05:00
parent 57430af22e
commit 82f4a464bd
10 changed files with 3370 additions and 11 deletions

View File

@ -0,0 +1,27 @@
From a983a14293129ea94b634579a46dc69835e88e15 Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter@math.unl.edu>
Date: Fri, 7 Feb 2014 10:31:08 -0600
Subject: [PATCH 1/9] mention xdg-settings
gleaned from 1.1.0-rc1 release announcement
---
RELEASE_NOTES | 3 +++
1 file changed, 3 insertions(+)
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 7f84063..484b2b9 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -4,6 +4,9 @@ Release notes for xdg-utils 1.1.0
This release includes:
* better support for GNOME3, KDE4, LXDE, MATE, XFCE
* initial support for generic methods (non toolkit-specific, experimental)
+* xdg-settings utility, a script to get various settings from the desktop
+ environment
+
Release notes for xdg-utils 1.0.2
=================================
--
1.9.0

View File

@ -0,0 +1,39 @@
From cba39e7a00abe27b3bff49e2d455bb30ad33dde6 Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter@math.unl.edu>
Date: Fri, 7 Feb 2014 10:51:10 -0600
Subject: [PATCH 2/9] Improvement of detecting KDE session (BR63157)
---
ChangeLog | 3 +++
scripts/xdg-utils-common.in | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 8b35df0..b7fcf86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
=== xdg-utils 1.1.x ===
+2014-02-07 Rex Dieter <rdieter@fedoraproject.org>
+ * Improvement of detecting KDE session (BR63157)
+
2013-10-24 Rex Dieter <rdieter@fedoraproject.org>
* xdg-desktop-menu: improperly check for vendor prefix on Estonian locale (BR70742)
diff --git a/scripts/xdg-utils-common.in b/scripts/xdg-utils-common.in
index 5b50f9b..c365cca 100644
--- a/scripts/xdg-utils-common.in
+++ b/scripts/xdg-utils-common.in
@@ -279,7 +279,7 @@ detectDE()
if [ x"$DE" = x"" ]; then
# classic fallbacks
- if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
+ if [ x"$KDE_FULL_SESSION" != x"" ]; then DE=kde;
elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=mate;
elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
--
1.9.0

View File

@ -0,0 +1,55 @@
From 495fa68306f6f5b0c0bb312e92f0f2a0e35fa567 Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter@math.unl.edu>
Date: Fri, 7 Feb 2014 10:56:17 -0600
Subject: [PATCH 3/9] xdg-terminal incompatible ... (BR44357)
fix harder! put the code in the right place this time.
---
scripts/xdg-terminal.in | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/scripts/xdg-terminal.in b/scripts/xdg-terminal.in
index 614dacf..21d8309 100644
--- a/scripts/xdg-terminal.in
+++ b/scripts/xdg-terminal.in
@@ -38,17 +38,7 @@ terminal_kde()
if [ x"$1" = x"" ]; then
$terminal_exec
else
- # screen and urxvt won't do their own parsing of quoted arguments
- if [ x"$TERM" = x"screen" ]; then
- # screen has an incompatible meaning for -e
- sh -c "exec $terminal_exec $1"
- elif [ x"$TERM" = x"urxvt" ] || [ x"$TERM" = x"rxvt-unicode" ] || [ x"$TERM" = x"rxvt" ]; then
- #TODO: Use whatever mechanism dash supports to test for
- # rxvt-* to match things like rxvt-unicode-256color
- sh -c "exec $terminal_exec -e $1"
- else
- $terminal_exec -e "$1"
- fi
+ $terminal_exec -e "$1"
fi
if [ $? -eq 0 ]; then
@@ -120,7 +110,17 @@ terminal_generic()
if [ x"$1" = x"" ]; then
$terminal_exec
else
- $terminal_exec -e "$1"
+ # screen and urxvt won't do their own parsing of quoted arguments
+ if [ x"$TERM" = x"screen" ]; then
+ # screen has an incompatible meaning for -e
+ sh -c "exec $terminal_exec $1"
+ elif [ x"$TERM" = x"urxvt" ] || [ x"$TERM" = x"rxvt-unicode" ] || [ x"$TERM" = x"rxvt" ]; then
+ #TODO: Use whatever mechanism dash supports to test for
+ # rxvt-* to match things like rxvt-unicode-256color
+ sh -c "exec $terminal_exec -e $1"
+ else
+ $terminal_exec -e "$1"
+ fi
fi
if [ $? -eq 0 ]; then
--
1.9.0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
From 6da906f59933133612d006e1bff9918a2b8c5a60 Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter@math.unl.edu>
Date: Fri, 7 Feb 2014 12:31:40 -0600
Subject: [PATCH 6/9] all: (re)generate html/man too
---
scripts/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index f93dfd6..9a772bc 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -30,7 +30,7 @@ MANPAGES= $(SCRIPTS:%=man/%.1)
WEBPAGES= $(SCRIPTS:%=%.html)
XMLFILES= $(SCRIPTS:%=desc/%.xml)
-all: scripts
+all: html man scripts
html: index.html $(WEBPAGES)
--
1.9.0

View File

@ -0,0 +1,70 @@
From 50254545a0d2c181bf9bce4c7723044ee7186cb5 Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter@math.unl.edu>
Date: Sat, 8 Feb 2014 12:39:43 -0600
Subject: [PATCH 7/9] drop references to Value=1.0 key (BR74688)
Can't find this decomented anywhere in current fdo specs.
---
scripts/desc/xdg-desktop-icon.xml | 9 ---------
scripts/desc/xdg-desktop-menu.xml | 18 ------------------
2 files changed, 27 deletions(-)
diff --git a/scripts/desc/xdg-desktop-icon.xml b/scripts/desc/xdg-desktop-icon.xml
index a886d5c..273045d 100644
--- a/scripts/desc/xdg-desktop-icon.xml
+++ b/scripts/desc/xdg-desktop-icon.xml
@@ -164,15 +164,6 @@
The following keys are often used:
</para>
<variablelist>
- <varlistentry>
- <term>Value=1.0</term>
- <listitem>
- <simpara>
- This is a mandatory field to indicate that the *.desktop file
- follows the 1.0 version of the specification.
- </simpara>
- </listitem>
- </varlistentry>
<varlistentry>
<term>Type=Application</term>
diff --git a/scripts/desc/xdg-desktop-menu.xml b/scripts/desc/xdg-desktop-menu.xml
index e7bda35..e3bab7c 100644
--- a/scripts/desc/xdg-desktop-menu.xml
+++ b/scripts/desc/xdg-desktop-menu.xml
@@ -262,15 +262,6 @@
The following keys are often used:
</para>
<variablelist>
- <varlistentry>
- <term>Value=1.0</term>
- <listitem>
- <simpara>
- This is a mandatory field to indicate that the *.desktop file
- follows the 1.0 version of the specification.
- </simpara>
- </listitem>
- </varlistentry>
<varlistentry>
<term>Type=Application</term>
@@ -406,15 +397,6 @@
The following keys are relevant for submenus:
</para>
<variablelist>
- <varlistentry>
- <term>Value=1.0</term>
- <listitem>
- <simpara>
- This is a mandatory field to indicate that the *.directory file
- follows the 1.0 version of the Desktop Entry specification.
- </simpara>
- </listitem>
- </varlistentry>
<varlistentry>
<term>Type=Directory</term>
--
1.9.0

View File

@ -0,0 +1,29 @@
From 3eaf93ab3303e14813885b6b743b48a1c3b5a6ab Mon Sep 17 00:00:00 2001
From: Till Maas <opensource@till.name>
Date: Wed, 26 Feb 2014 15:19:33 +0100
Subject: [PATCH 8/9] xdg-open: Remove first_word, already in common
---
scripts/xdg-open.in | 6 ------
1 file changed, 6 deletions(-)
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index 87e161d..1f768d8 100644
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -30,12 +30,6 @@ _USAGE
#@xdg-utils-common@
# This handles backslashes but not quote marks.
-first_word()
-{
- read first rest
- echo "$first"
-}
-
last_word()
{
read first rest
--
1.9.0

View File

@ -0,0 +1,61 @@
From 316b9adc05c6d871360afb1195939c5fc975ccff Mon Sep 17 00:00:00 2001
From: Till Maas <opensource@till.name>
Date: Wed, 26 Feb 2014 15:26:59 +0100
Subject: [PATCH 9/9] xdg-open: Expand %i and %c from Exec
---
scripts/xdg-open.in | 29 ++++++++++++++++++++++++++---
1 file changed, 26 insertions(+), 3 deletions(-)
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index 1f768d8..e7a15a9 100644
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -36,6 +36,17 @@ last_word()
echo "$rest"
}
+# Get the value of a key in a .desktop file.
+# Example: Use get_key foo.desktop Exec
+# to get the values of the Exec= key
+get_key()
+{
+ local file="${1}"
+ local key="${2}"
+
+ grep -E "^${key}=" "${file}" | cut -d= -f 2-
+}
+
open_darwin()
{
open "$1"
@@ -137,11 +148,23 @@ search_desktop_file()
fi
if [ -r "$file" ] ; then
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
+ command="$(get_key "${file}" "Exec" | first_word)"
command_exec=`which $command 2>/dev/null`
- arguments="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | last_word`"
+ arguments="$(get_key "${file}" "Exec" | last_word)"
arg_one="`echo "$arg" | sed 's/[&*\\]/\\\\&/g'`"
- arguments_exec="`echo "$arguments" | sed -e 's*%[fFuU]*"'"$arg_one"'"*g'`"
+ icon="$(get_key "${file}" "Icon")"
+ if [ "${icon}" != "" ]
+ then
+ icon="--icon '${icon}'"
+ else
+ icon="''"
+ fi
+ # FIXME: Actually LC_MESSAGES should be used as described in
+ # http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s04.html
+ localised_name="'$(get_key "${file}" "Name")'"
+ arguments_exec="$(echo "$arguments" | sed -e 's*%[fFuU]*"'"$arg_one"'"*g' \
+ -e 's*%i*'"$icon"'*g' \
+ -e 's*%c*'"$localised_name"'*g')"
if [ -x "$command_exec" ] ; then
if echo "$arguments" | grep -iq '%[fFuU]' ; then
--
1.9.0

View File

@ -4,7 +4,7 @@
Summary: Basic desktop integration functions
Name: xdg-utils
Version: 1.1.0
Release: 0.20.%{pre}%{?dist}
Release: 0.21.%{pre}%{?dist}
URL: http://portland.freedesktop.org/
%if 0%{?pre:1}
@ -14,10 +14,19 @@ Source1: xdg-utils-git_checkout.sh
Source0: http://portland.freedesktop.org/download/xdg-utils-%{version}%{?pre:-%{pre}}.tar.gz
%endif
License: MIT
Group: System Environment/Base
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
## upstream patches
Patch101: 0001-mention-xdg-settings.patch
Patch102: 0002-Improvement-of-detecting-KDE-session-BR63157.patch
Patch103: 0003-xdg-terminal-incompatible-.-BR44357.patch
Patch104: 0004-remove-generated-html-files.patch
Patch105: 0005-remove-generated-man-pages.patch
Patch106: 0006-all-re-generate-html-man-too.patch
Patch107: 0007-drop-references-to-Value-1.0-key-BR74688.patch
Patch108: 0008-xdg-open-Remove-first_word-already-in-common.patch
Patch109: 0009-xdg-open-Expand-i-and-c-from-Exec.patch
BuildRequires: gawk
BuildRequires: xmlto text-www-browser
@ -49,7 +58,7 @@ The following scripts are provided at this time:
%prep
%setup -q -n %{name}-%{version}%{?pre:-%{pre}}
%autosetup -Sgit -n %{name}-%{version}%{?pre:-%{pre}}
%build
@ -63,13 +72,10 @@ make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
%files
%defattr(-,root,root,-)
%doc ChangeLog LICENSE README TODO
%{_bindir}/xdg-desktop-icon
%{_bindir}/xdg-desktop-menu
@ -89,11 +95,12 @@ make install DESTDIR=%{buildroot}
%{_mandir}/man1/xdg-settings.1*
%clean
rm -rf %{buildroot}
%changelog
* Sun Mar 30 2014 Rex Dieter <rdieter@fedoraproject.org> - 1.1.0-0.21.rc2
- .spec housecleaning (remove deprecated stuff)
- pull in latest upstream fixes, including...
- xdg-open does not substitute all field codes in Exec key (#1056431, fdo#49204)
* Fri Feb 07 2014 Rex Dieter <rdieter@fedoraproject.org> 1.1.0-0.20.rc2
- 1.1.0-rc2