From f9ce222fb8ab2644230667a849744f28e25ce69c Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 19 Jan 2015 05:41:03 -0600 Subject: [PATCH] pull in upstream performance improvement (fdo#88524) --- ...rove-performance-of-get_key-function.patch | 30 +++++++++++++++++++ 0007-Add-changelog-for-prior-commit.patch | 24 +++++++++++++++ xdg-utils.spec | 7 ++++- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 0006-xdg-open-Improve-performance-of-get_key-function.patch create mode 100644 0007-Add-changelog-for-prior-commit.patch diff --git a/0006-xdg-open-Improve-performance-of-get_key-function.patch b/0006-xdg-open-Improve-performance-of-get_key-function.patch new file mode 100644 index 0000000..a7d4890 --- /dev/null +++ b/0006-xdg-open-Improve-performance-of-get_key-function.patch @@ -0,0 +1,30 @@ +From 46e8421a238640d0a18d3fe856466c1d22aeadbf Mon Sep 17 00:00:00 2001 +From: Alex Henrie +Date: Sat, 17 Jan 2015 01:15:19 -0700 +Subject: [PATCH 6/7] xdg-open: Improve performance of get_key function + +--- + scripts/xdg-open.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in +index b6045f8..ee2889e 100644 +--- a/scripts/xdg-open.in ++++ b/scripts/xdg-open.in +@@ -57,11 +57,11 @@ get_key() + "["*) + desktop_entry="" + ;; +- *) ++ "${key}="*) + # Only match Desktop Entry group + if [ -n "${desktop_entry}" ] + then +- echo "${line}" | grep -E "^${key}=" | cut -d= -f 2- ++ echo "${line}" | cut -d= -f 2- + fi + esac + done < "${file}" +-- +2.1.0 + diff --git a/0007-Add-changelog-for-prior-commit.patch b/0007-Add-changelog-for-prior-commit.patch new file mode 100644 index 0000000..31b2953 --- /dev/null +++ b/0007-Add-changelog-for-prior-commit.patch @@ -0,0 +1,24 @@ +From e8ee3b18d16e41b95148111b920a0c8beed3ac6c Mon Sep 17 00:00:00 2001 +From: Rex Dieter +Date: Mon, 19 Jan 2015 05:37:34 -0600 +Subject: [PATCH 7/7] Add changelog for prior commit + +--- + ChangeLog | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/ChangeLog b/ChangeLog +index 627df21..9a01f82 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -2,6 +2,7 @@ + + 2015-01-19 Rex Dieter + * xdg-open: better fix for command injection vulnerability (BR66670) ++ * xdg-open is extremely slow because get_key executes grep unnecessarily (BR88524) + + 2015-01-15 Reuben Thomas + * xdg-mime: dereference symlinks when using mimetype or file (BR39923) +-- +2.1.0 + diff --git a/xdg-utils.spec b/xdg-utils.spec index bb7dc50..8eb0a4d 100644 --- a/xdg-utils.spec +++ b/xdg-utils.spec @@ -4,7 +4,7 @@ Summary: Basic desktop integration functions Name: xdg-utils Version: 1.1.0 -Release: 0.35.%{pre}%{?dist} +Release: 0.36.%{pre}%{?dist} URL: http://portland.freedesktop.org/ %if 0%{?pre:1} @@ -21,6 +21,8 @@ Patch2: 0002-xdg-open-command-injection-vulnerability-BR66670.patch Patch3: 0003-xdg-mime-dereference-symlinks-when-using-mimetype-or.patch Patch4: 0004-xdg-screensaver-Change-screensaver_freedesktop-s-int.patch Patch5: 0005-xdg-open-better-fix-for-command-injection-vulnerabil.patch +Patch6: 0006-xdg-open-Improve-performance-of-get_key-function.patch +Patch7: 0007-Add-changelog-for-prior-commit.patch # make sure BuildArch comes *after* patches, to ensure %%autosetup works right # http://bugzilla.redhat.com/1084309 @@ -95,6 +97,9 @@ make install DESTDIR=%{buildroot} %changelog +* Mon Jan 19 2015 Rex Dieter 1.1.0-0.36.rc3 +- pull in upstream performance improvement (fdo#88524) + * Mon Jan 19 2015 Rex Dieter 1.1.0-0.35.rc3 - pull in latest commits, notably more fdo screensaver fixes