From ffa90e95f1e902ee0ddfe3da70b70b57d8a8c515 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 7 May 2019 08:46:54 -0400 Subject: [PATCH] import xdg-utils-1.1.2-5.el8 --- .gitignore | 1 + .xdg-utils.metadata | 1 + SOURCES/0001-bump-version-1.1.2.patch | 25 ++ .../0002-init-1.1.3-ChangeLog-section.patch | 24 ++ ...8e58d51e6fb3f50f59ed2d8265f2f346ac68.patch | 47 +++ .../0004-xdg-mime.1-Add-missing-period.patch | 25 ++ SOURCES/0005-Spelling-fixes-BR103255.patch | 209 ++++++++++ ...ime-awk-script-syntax-error-BR104298.patch | 48 +++ .../0007-xdg-open-Fixes-LXQt-behavior.patch | 53 +++ SOURCES/0008-Changelog-for-prior-commit.patch | 27 ++ SOURCES/CVE-2017-18266.patch | 40 ++ SOURCES/xdg-utils-git_checkout.sh | 17 + SPECS/xdg-utils.spec | 386 ++++++++++++++++++ 13 files changed, 903 insertions(+) create mode 100644 .gitignore create mode 100644 .xdg-utils.metadata create mode 100644 SOURCES/0001-bump-version-1.1.2.patch create mode 100644 SOURCES/0002-init-1.1.3-ChangeLog-section.patch create mode 100644 SOURCES/0003-Fix-tests-for-1f8e58d51e6fb3f50f59ed2d8265f2f346ac68.patch create mode 100644 SOURCES/0004-xdg-mime.1-Add-missing-period.patch create mode 100644 SOURCES/0005-Spelling-fixes-BR103255.patch create mode 100644 SOURCES/0006-xdg-mime-awk-script-syntax-error-BR104298.patch create mode 100644 SOURCES/0007-xdg-open-Fixes-LXQt-behavior.patch create mode 100644 SOURCES/0008-Changelog-for-prior-commit.patch create mode 100644 SOURCES/CVE-2017-18266.patch create mode 100755 SOURCES/xdg-utils-git_checkout.sh create mode 100644 SPECS/xdg-utils.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..78019e8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/xdg-utils-1.1.2.tar.gz diff --git a/.xdg-utils.metadata b/.xdg-utils.metadata new file mode 100644 index 0000000..47ee363 --- /dev/null +++ b/.xdg-utils.metadata @@ -0,0 +1 @@ +20cd4cc5cfaa904b12abf6d584deb568367f4d83 SOURCES/xdg-utils-1.1.2.tar.gz diff --git a/SOURCES/0001-bump-version-1.1.2.patch b/SOURCES/0001-bump-version-1.1.2.patch new file mode 100644 index 0000000..bc261af --- /dev/null +++ b/SOURCES/0001-bump-version-1.1.2.patch @@ -0,0 +1,25 @@ +From 233512d857379115736216392b048c753b5d04b5 Mon Sep 17 00:00:00 2001 +From: Rex Dieter +Date: Mon, 8 May 2017 07:33:56 -0500 +Subject: [PATCH 1/8] bump version: 1.1.2+ + +--- + 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 160e3ca..8b85883 100644 +--- a/scripts/xdg-utils-common.in ++++ b/scripts/xdg-utils-common.in +@@ -245,7 +245,7 @@ check_common_commands() + ;; + + --version) +- echo "@NAME@ 1.1.2" ++ echo "@NAME@ 1.1.2+" + exit_success + ;; + esac +-- +2.14.3 + diff --git a/SOURCES/0002-init-1.1.3-ChangeLog-section.patch b/SOURCES/0002-init-1.1.3-ChangeLog-section.patch new file mode 100644 index 0000000..70e3fda --- /dev/null +++ b/SOURCES/0002-init-1.1.3-ChangeLog-section.patch @@ -0,0 +1,24 @@ +From fb9ee8c69932feb716ad4db793a7941dd06b345c Mon Sep 17 00:00:00 2001 +From: Rex Dieter +Date: Mon, 8 May 2017 07:34:29 -0500 +Subject: [PATCH 2/8] init 1.1.3 ChangeLog section + +--- + ChangeLog | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/ChangeLog b/ChangeLog +index 77e6cef..c819efb 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,4 +1,6 @@ +-=== xdg-utils 1.1.2 (unreleased) === ++=== xdg-utils 1.1.3 === ++ ++=== xdg-utils 1.1.2 === + + 2017-02-28 Rex Dieter + * xdg-open: Add "chromium" to fallback browsers (BR99366) +-- +2.14.3 + diff --git a/SOURCES/0003-Fix-tests-for-1f8e58d51e6fb3f50f59ed2d8265f2f346ac68.patch b/SOURCES/0003-Fix-tests-for-1f8e58d51e6fb3f50f59ed2d8265f2f346ac68.patch new file mode 100644 index 0000000..c78fd12 --- /dev/null +++ b/SOURCES/0003-Fix-tests-for-1f8e58d51e6fb3f50f59ed2d8265f2f346ac68.patch @@ -0,0 +1,47 @@ +From afeedb5c932371482b4ffe7b5e98bc1d619f9594 Mon Sep 17 00:00:00 2001 +From: Nicholas Guriev +Date: Sat, 30 Sep 2017 21:34:18 +0300 +Subject: [PATCH 3/8] Fix tests for 1f8e58d51e6fb3f50f59ed2d8265f2f346ac68e6 + +--- + autotests/t-xdg-mime-query-default.sh | 2 ++ + autotests/t-xdg-settings.sh | 4 ++++ + 2 files changed, 6 insertions(+) + +diff --git a/autotests/t-xdg-mime-query-default.sh b/autotests/t-xdg-mime-query-default.sh +index 66bb8d7..a746b1d 100755 +--- a/autotests/t-xdg-mime-query-default.sh ++++ b/autotests/t-xdg-mime-query-default.sh +@@ -3,6 +3,8 @@ COMMAND_TESTED="xdg-mime query default" + . ./test-lib.sh + + test_that_it reads \$XDG_CONFIG_HOME/mimeapps.list ++mock mosaic # Default app should exist ++mock_desktop_file mosaic + mock_default_app x-scheme-handler/http mosaic + handler=$(run generic xdg-mime query default x-scheme-handler/http) + assert_equal mosaic.desktop "$handler" +diff --git a/autotests/t-xdg-settings.sh b/autotests/t-xdg-settings.sh +index 7b697e4..b8255ab 100755 +--- a/autotests/t-xdg-settings.sh ++++ b/autotests/t-xdg-settings.sh +@@ -12,12 +12,16 @@ assert_run gconftool-2 --get /desktop/gnome/applications/browser/exec + for de in gnome3 cinnamon lxde mate generic; do + test_that_it determines default browser from \ + \$XDG_CONFIG_HOME/mimeapps.list in $de ++ mock mosaic # Default app should exist ++ mock_desktop_file mosaic + mock_default_app x-scheme-handler/http mosaic + assert_equal mosaic.desktop \ + "$(run $de xdg-settings get default-web-browser)" + + test_that_it determines default URL handler from \ + \$XDG_CONFIG_HOME/mimeapps.list in $de ++ mock footorrent # Default app should exist ++ mock_desktop_file footorrent + mock_default_app x-scheme-handler/magnet footorrent + assert_equal \ + footorrent.desktop \ +-- +2.14.3 + diff --git a/SOURCES/0004-xdg-mime.1-Add-missing-period.patch b/SOURCES/0004-xdg-mime.1-Add-missing-period.patch new file mode 100644 index 0000000..0b607b3 --- /dev/null +++ b/SOURCES/0004-xdg-mime.1-Add-missing-period.patch @@ -0,0 +1,25 @@ +From 186b6d7839ae8528d845c977fb680a46bd1c6123 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Fri, 13 Oct 2017 11:40:05 +0300 +Subject: [PATCH 4/8] xdg-mime.1: Add missing period + +--- + scripts/desc/xdg-mime.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/desc/xdg-mime.xml b/scripts/desc/xdg-mime.xml +index 04d1e17..64bfc85 100644 +--- a/scripts/desc/xdg-mime.xml ++++ b/scripts/desc/xdg-mime.xml +@@ -119,7 +119,7 @@ and adding descriptions for new file types + + + application is the desktop file +- id of the application and has the form vendor-name.desktop ++ id of the application and has the form vendor-name.desktop. + application must already be installed + in the desktop menu before it can be made the default handler. + The application's desktop file must list support for all the +-- +2.14.3 + diff --git a/SOURCES/0005-Spelling-fixes-BR103255.patch b/SOURCES/0005-Spelling-fixes-BR103255.patch new file mode 100644 index 0000000..e81987e --- /dev/null +++ b/SOURCES/0005-Spelling-fixes-BR103255.patch @@ -0,0 +1,209 @@ +From fa5805559ad27382ef62110cb23e67d6eb649030 Mon Sep 17 00:00:00 2001 +From: Rex Dieter +Date: Wed, 29 Nov 2017 14:07:24 -0600 +Subject: [PATCH 5/8] Spelling fixes (BR103255) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Credit to Ville Skyttä +--- + ChangeLog | 4 ++-- + scripts/desc/xdg-settings.xml | 2 +- + scripts/xdg-desktop-menu.in | 2 +- + scripts/xdg-screensaver.in | 2 +- + tests/README | 4 ++-- + tests/debug/t.extraout | 2 +- + tests/debug/t.interactive | 2 +- + tests/doc_gen.pl | 2 +- + tests/include/testassertions.sh | 10 +++++----- + tests/testrun | 2 +- + 10 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index c819efb..292915f 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -541,7 +541,7 @@ + + 2006-04-24 Kevin Krammer + * Applied patch provided by Benedikt Meurer +- to improve the compatability of the Makefile ++ to improve the compatibility of the Makefile + * Added --title option to xdg-file-dialog + * Applied another path by Benedikt to let xdg-file-dialog use + zenity on GNOME and XFCE +@@ -564,7 +564,7 @@ + Currently only used in xdg-mime to gather feedback + + 2006-04-08 Kevin Krammer +- * In case of $BROWSER being not avialable or empty, try a fixed list of well ++ * In case of $BROWSER being not available or empty, try a fixed list of well + known browsers instead + + 2006-04-06 Kevin Krammer +diff --git a/scripts/desc/xdg-settings.xml b/scripts/desc/xdg-settings.xml +index 56055b7..255d712 100644 +--- a/scripts/desc/xdg-settings.xml ++++ b/scripts/desc/xdg-settings.xml +@@ -114,7 +114,7 @@ + + Properties + +- When using xdg-settings to get, check or set a destkop setting, properties ++ When using xdg-settings to get, check or set a desktop setting, properties + and possibly sub-properties are used to specify the setting to be changed. + + +diff --git a/scripts/xdg-desktop-menu.in b/scripts/xdg-desktop-menu.in +index 13159cb..9d837e1 100644 +--- a/scripts/xdg-desktop-menu.in ++++ b/scripts/xdg-desktop-menu.in +@@ -394,7 +394,7 @@ while [ $# -gt 0 ] ; do + case "$parm" in + *.directory) + if [ -n "$desktop_files" ] ; then +- exit_failure_syntax "'$parm' must preceed any *.desktop file" ++ exit_failure_syntax "'$parm' must precede any *.desktop file" + fi + directory_files="$directory_files $parm" + ;; +diff --git a/scripts/xdg-screensaver.in b/scripts/xdg-screensaver.in +index aecd8e3..9e68196 100644 +--- a/scripts/xdg-screensaver.in ++++ b/scripts/xdg-screensaver.in +@@ -583,7 +583,7 @@ screensaver_mate_screensaver() + { + # DBUS interface for mate-screensaver + # This is same as gnome's for now but may change in the future as MATE +-# does not follow gnome's developement necessarily. ++# does not follow gnome's development necessarily. + case "$1" in + suspend) + screensaver_suspend_loop \ +diff --git a/tests/README b/tests/README +index 26469f2..8ebcfef 100644 +--- a/tests/README ++++ b/tests/README +@@ -18,7 +18,7 @@ NORESULT: test_system_mime_install + See xdg-test.log for details. + NOT OK! + +-FAIL indicates (not suprisingly) a test failure. ++FAIL indicates (not surprisingly) a test failure. + NORESULT indicates that the test prerequisites failed for some reason. + (e.g. the install phase of an uninstall test failed) + UNTESTED means that something needed was not found. This is fine and should +@@ -26,7 +26,7 @@ UNTESTED means that something needed was not found. This is fine and should + (e.g. test requires root, but we are not running as root) + + NOTE: The test runner makes guesses about appropriate values of XDG_TEST_DIR +- and PATH. These values can be overriden explicitly. ++ and PATH. These values can be overridden explicitly. + + To run tests individually, or as smaller groups do something like + +diff --git a/tests/debug/t.extraout b/tests/debug/t.extraout +index ea84b33..4946673 100755 +--- a/tests/debug/t.extraout ++++ b/tests/debug/t.extraout +@@ -4,7 +4,7 @@ + . "$XDG_TEST_DIR/include/testcontrol.sh" + + test_extraout() { +-test_start "$FUNCNAME: verify functionallity of assert_nostdout" ++test_start "$FUNCNAME: verify functionality of assert_nostdout" + + test_procedure + +diff --git a/tests/debug/t.interactive b/tests/debug/t.interactive +index fa203c2..6f6f858 100755 +--- a/tests/debug/t.interactive ++++ b/tests/debug/t.interactive +@@ -4,7 +4,7 @@ + . "$XDG_TEST_DIR/include/testcontrol.sh" + + test_interactive() { +-test_start "$FUNCNAME: verify functionallity of assert_interactive" ++test_start "$FUNCNAME: verify functionality of assert_interactive" + + test_procedure + +diff --git a/tests/doc_gen.pl b/tests/doc_gen.pl +index ed29d94..50d134d 100755 +--- a/tests/doc_gen.pl ++++ b/tests/doc_gen.pl +@@ -102,7 +102,7 @@ for $f ( @test_files ) { + } + #find initilization + elsif ( m/test_init/ ) { +- print HTM "

Depencencies

\n"; ++ print HTM "

Dependencies

\n"; + $state = 'INIT'; + next; + } +diff --git a/tests/include/testassertions.sh b/tests/include/testassertions.sh +index 1ba026d..142c0de 100644 +--- a/tests/include/testassertions.sh ++++ b/tests/include/testassertions.sh +@@ -5,7 +5,7 @@ + . "$XDG_TEST_DIR/include/testfuncs.sh" + + ## NOTE: Documentation is generated AUTOMATICALLY from this file +-## Function usage must immediately follow function delcaration ++## Function usage must immediately follow function declaration + + assert_exit() { + # execute command (saving output) and check exit code +@@ -41,7 +41,7 @@ assert_interactive_notroot() { + } + + assert_interactive() { +-# Useage: ++# Usage: + # assert_interactive {msg} [y|n|C|s varname] + # + # msg is the text to print. +@@ -122,7 +122,7 @@ assert_file_not_in_path() { + + + assert_file() { +-# Assert the existance of an exact filename ++# Assert the existence of an exact filename + # Usage: assert_file FILE + if [ ! -e "$1" ] ; then + test_fail "'$1' does not exist" +@@ -140,7 +140,7 @@ assert_file() { + } + + assert_nofile() { +-# Assert the non existance of an exact filename. ++# Assert the non existence of an exact filename. + # Opposite of 'assert_file' + if [ -e "$1" ] ; then + test_fail "'$1' exists." +@@ -339,7 +339,7 @@ get_unique_name() { + varname="$1" + file="$2" + if [ -z "$varname" ] ; then +- echo "TEST SYNAX ERROR: get_unique_name requries a variable name" ++ echo "TEST SYNAX ERROR: get_unique_name requires a variable name" + exit 255 + fi + +diff --git a/tests/testrun b/tests/testrun +index 822fc69..4a9f748 100755 +--- a/tests/testrun ++++ b/tests/testrun +@@ -123,7 +123,7 @@ if [ -z "$XDG_TEST_SELF_LAUNCH" ] ; then # not self launched + else + SUCMD=`which sudo 2>/dev/null` + echo "Running ${SUCMD-su} for system tests." +- echo "Please enter an apropriate password if requested." ++ echo "Please enter an appropriate password if requested." + fi + # Note if sudo is not found, $SUCMD will be blank, so run su directly. + # We cannot assume su works since systems like Ubuntu require sudo +-- +2.14.3 + diff --git a/SOURCES/0006-xdg-mime-awk-script-syntax-error-BR104298.patch b/SOURCES/0006-xdg-mime-awk-script-syntax-error-BR104298.patch new file mode 100644 index 0000000..8fa8dc7 --- /dev/null +++ b/SOURCES/0006-xdg-mime-awk-script-syntax-error-BR104298.patch @@ -0,0 +1,48 @@ +From eda08ef065adac7cfa46f296d378cc06a3131d3e Mon Sep 17 00:00:00 2001 +From: Rex Dieter +Date: Mon, 18 Dec 2017 15:50:45 -0600 +Subject: [PATCH 6/8] xdg-mime awk script syntax error (BR104298) + +--- + ChangeLog | 3 +++ + scripts/xdg-mime.in | 4 ++-- + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 292915f..964006c 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,5 +1,8 @@ + === xdg-utils 1.1.3 === + ++2017-1218 ++ * xdg-mime awk script syntax error (BR104298) ++ + === xdg-utils 1.1.2 === + + 2017-02-28 Rex Dieter +diff --git a/scripts/xdg-mime.in b/scripts/xdg-mime.in +index b67581c..0e567c7 100644 +--- a/scripts/xdg-mime.in ++++ b/scripts/xdg-mime.in +@@ -171,7 +171,7 @@ make_default_kde() + blanks++ + suppress=1 + } else if (associations && index($0, prefix) == 1) { +- value=substr($0, length(prefix) + 1, length) ++ value=substr($0, length(prefix) + 1, length()) + split(value, apps, ";") + value=application ";" + count=0 +@@ -369,7 +369,7 @@ check_mimeapps_list() + } else if (index($0, "[") == 1) { + indefault=0 + } else if (!found && indefault && index($0, prefix) == 1) { +- print substr($0, length(prefix) +1, length) ++ print substr($0, length(prefix) +1, length()) + found=1 + } + } +-- +2.14.3 + diff --git a/SOURCES/0007-xdg-open-Fixes-LXQt-behavior.patch b/SOURCES/0007-xdg-open-Fixes-LXQt-behavior.patch new file mode 100644 index 0000000..b745b78 --- /dev/null +++ b/SOURCES/0007-xdg-open-Fixes-LXQt-behavior.patch @@ -0,0 +1,53 @@ +From 7d4360c64d94de53d907f13ca99837285e972ec6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lu=C3=ADs=20Pereira?= +Date: Wed, 17 May 2017 14:33:30 +0100 +Subject: [PATCH 7/8] xdg-open: Fixes LXQt behavior + +Commit 6387086e4938d568c2bab185632f60e1619b3f68 introduced LXQt support. +In xdg-open it assumed that LXQt and LXDE are the same. They aren't. LXQt +does not have pcmanfm, it has pcmanfm-qt. +LXQt doesn't want to rely on pcmamfm-qt to handle it: LXQt is very modular +and can be deployed without pcmanfm-qt. + +open_generic() works for LXQt but it depends on mimeopen and mimetype. In +the future we will want, for sure, to drop those dependencies. That's the +reason for the existence of open_lxqt(). +--- + scripts/xdg-open.in | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in +index 9817c5f..2972257 100644 +--- a/scripts/xdg-open.in ++++ b/scripts/xdg-open.in +@@ -447,6 +447,11 @@ open_lxde() + fi + } + ++open_lxqt() ++{ ++ open_generic "$1" ++} ++ + [ x"$1" != x"" ] || exit_failure_syntax + + url= +@@ -511,10 +516,14 @@ case "$DE" in + open_xfce "$url" + ;; + +- lxde|lxqt) ++ lxde) + open_lxde "$url" + ;; + ++ lxqt) ++ open_lxqt "$url" ++ ;; ++ + enlightenment) + open_enlightenment "$url" + ;; +-- +2.14.3 + diff --git a/SOURCES/0008-Changelog-for-prior-commit.patch b/SOURCES/0008-Changelog-for-prior-commit.patch new file mode 100644 index 0000000..0d83dfc --- /dev/null +++ b/SOURCES/0008-Changelog-for-prior-commit.patch @@ -0,0 +1,27 @@ +From 13963edddcad55438f03aefd4db1538cc8f68f14 Mon Sep 17 00:00:00 2001 +From: Rex Dieter +Date: Tue, 27 Feb 2018 15:58:42 -0600 +Subject: [PATCH 8/8] Changelog for prior commit + +--- + ChangeLog | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/ChangeLog b/ChangeLog +index 964006c..8060d47 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,9 @@ + === xdg-utils 1.1.3 === + +-2017-1218 ++2018-02-27 ++ * xdg-open: Fixes LXQt behavior (BR81674,BR103146) ++ ++2017-12-18 + * xdg-mime awk script syntax error (BR104298) + + === xdg-utils 1.1.2 === +-- +2.14.3 + diff --git a/SOURCES/CVE-2017-18266.patch b/SOURCES/CVE-2017-18266.patch new file mode 100644 index 0000000..d326307 --- /dev/null +++ b/SOURCES/CVE-2017-18266.patch @@ -0,0 +1,40 @@ +From ce802d71c3466d1dbb24f2fe9b6db82a1f899bcb Mon Sep 17 00:00:00 2001 +From: Gabriel Corona +Date: Mon, 19 Mar 2018 22:09:00 +0100 +Subject: [PATCH] Avoid argument injection vulnerability in open_envvar() + +--- + scripts/xdg-open.in | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in +index 2972257..021524b 100644 +--- a/scripts/xdg-open.in ++++ b/scripts/xdg-open.in +@@ -351,6 +351,11 @@ open_generic_xdg_x_scheme_handler() + fi + } + ++has_single_argument() ++{ ++ test $# = 1 ++} ++ + open_envvar() + { + local oldifs="$IFS" +@@ -365,7 +370,10 @@ open_envvar() + fi + + if echo "$browser" | grep -q %s; then +- $(printf "$browser" "$1") ++ # Avoid argument injection. ++ # See https://bugs.freedesktop.org/show_bug.cgi?id=103807 ++ # URIs don't have IFS characters spaces anyway. ++ has_single_argument $1 && $(printf "$browser" "$1") + else + $browser "$1" + fi +-- +2.17.1 + diff --git a/SOURCES/xdg-utils-git_checkout.sh b/SOURCES/xdg-utils-git_checkout.sh new file mode 100755 index 0000000..b00452a --- /dev/null +++ b/SOURCES/xdg-utils-git_checkout.sh @@ -0,0 +1,17 @@ +#!/bin/bash + + +MODULE=xdg-utils +VERSION=1.1.0 +DATE=$(date +%Y%m%d)git + +set -x + +rm -rf $MODULE + +git clone git://anongit.freedesktop.org/git/xdg/xdg-utils $MODULE/ +pushd $MODULE +git archive master --format tar --prefix=${MODULE}-${VERSION}/ | gzip -9 > ../${MODULE}-${VERSION}-${DATE}.tar.gz +popd + +rm -rf $MODULE diff --git a/SPECS/xdg-utils.spec b/SPECS/xdg-utils.spec new file mode 100644 index 0000000..5222bcc --- /dev/null +++ b/SPECS/xdg-utils.spec @@ -0,0 +1,386 @@ +#global prerelease rc3 +#global snap 20150927git + +Summary: Basic desktop integration functions +Name: xdg-utils +Version: 1.1.2 +Release: 5%{?dist} + +URL: http://portland.freedesktop.org/ +%if 0%{?snap:1} +Source0: xdg-utils-1.1.0-%{snap}.tar.gz +%else +# at least until freedesktop folks move over to release dir +Source0: https://people.freedesktop.org/~rdieter/xdg-utils/xdg-utils-%{version}.tar.gz +#Source0: http://portland.freedesktop.org/download/xdg-utils-%{version}%{?prerelease:-%{prerelease}}.tar.gz +%endif +Source1: xdg-utils-git_checkout.sh +License: MIT + +## upstream patches (treat as sources in lookaside cache) +Patch1: 0001-bump-version-1.1.2.patch +Patch2: 0002-init-1.1.3-ChangeLog-section.patch +Patch3: 0003-Fix-tests-for-1f8e58d51e6fb3f50f59ed2d8265f2f346ac68.patch +Patch4: 0004-xdg-mime.1-Add-missing-period.patch +Patch5: 0005-Spelling-fixes-BR103255.patch +Patch6: 0006-xdg-mime-awk-script-syntax-error-BR104298.patch +Patch7: 0007-xdg-open-Fixes-LXQt-behavior.patch +Patch8: 0008-Changelog-for-prior-commit.patch +Patch9: CVE-2017-18266.patch + +# make sure BuildArch comes *after* patches, to ensure %%autosetup works right +# http://bugzilla.redhat.com/1084309 +BuildArch: noarch + +BuildRequires: gawk +BuildRequires: xmlto lynx + +Requires: coreutils +Requires: desktop-file-utils +Requires: which + +%description +The %{name} package is a set of simple scripts that provide basic +desktop integration functions for any Free Desktop, such as Linux. +They are intended to provide a set of defacto standards. +This means that: +* Third party software developers can rely on these xdg-utils + for all of their simple integration needs. +* Developers of desktop environments can make sure that their + environments are well supported +* Distribution vendors can provide custom versions of these utilities + +The following scripts are provided at this time: +* xdg-desktop-icon Install icons to the desktop +* xdg-desktop-menu Install desktop menu items +* xdg-email Send mail using the user's preferred e-mail composer +* xdg-icon-resource Install icon resources +* xdg-mime Query information about file type handling and + install descriptions for new file types +* xdg-open Open a file or URL in the user's preferred application +* xdg-screensaver Control the screensaver +* xdg-settings Get various settings from the desktop environment + + +%prep +%autosetup -n %{name}-%{version}%{?pre:-%{pre}} -p1 + + +%build +%configure + +%if 0%{?snap:1} +make scripts-clean -C scripts +make man scripts %{?_smp_mflags} -C scripts +%endif +make %{?_smp_mflags} + + +%install +make install DESTDIR=%{buildroot} + + +%files +%doc ChangeLog LICENSE README TODO +%{_bindir}/xdg-desktop-icon +%{_bindir}/xdg-desktop-menu +%{_bindir}/xdg-email +%{_bindir}/xdg-icon-resource +%{_bindir}/xdg-mime +%{_bindir}/xdg-open +%{_bindir}/xdg-screensaver +%{_bindir}/xdg-settings +%{_mandir}/man1/xdg-desktop-icon.1* +%{_mandir}/man1/xdg-desktop-menu.1* +%{_mandir}/man1/xdg-email.1* +%{_mandir}/man1/xdg-icon-resource.1* +%{_mandir}/man1/xdg-mime.1* +%{_mandir}/man1/xdg-open.1* +%{_mandir}/man1/xdg-screensaver.1* +%{_mandir}/man1/xdg-settings.1* + + +%changelog +* Thu Sep 20 2018 Alexander Larsson - 1.1.2-5 +- Add patch for CVE-2017-18266 + Resolves: #1578769 + +* Tue Feb 27 2018 Rex Dieter - 1.1.2-4 +- pull in upstream fixes + +* Fri Feb 09 2018 Fedora Release Engineering - 1.1.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.1.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon May 08 2017 Rex Dieter - 1.1.2-1 +- xdg-utils-1.1.2 + +* Mon Feb 06 2017 Rex Dieter - 1.1.1-5 +- pull in upstream fixes + +* Thu May 05 2016 Rex Dieter 1.1.1-4 +- save mimetype defaults to ~/.config/mimeapps.list + (instead of ~/.local/share/applications/mimeapps.list) + +* Fri Apr 15 2016 Rex Dieter - 1.1.1-3 +- pull in latest upstream fixes + +* Fri Feb 05 2016 Fedora Release Engineering - 1.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Oct 05 2015 Rex Dieter 1.1.1-1 +- 1.1.1 + +* Mon Oct 05 2015 Rex Dieter 1.1.0-1 +- 1.1.0 (final) + +* Wed Sep 30 2015 Rex Dieter 1.1.0-0.42.20150927git +- 20150927git snapshot + +* Wed Jul 15 2015 Rex Dieter 1.1.0-0.41.20150715git +- 20150715git snapshot + +* Fri Jun 19 2015 Fedora Release Engineering - 1.1.0-0.40.rc3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Feb 24 2015 Rex Dieter 1.1.0-0.39.rc3 +- 'xdg-mime query default' return multiple .desktop entries (fdo#60329,#1195718) + +* Sat Feb 21 2015 Rex Dieter 1.1.0-0.38.rc3 +- minor s/$arg/$target/ fix for prior commit + +* Fri Feb 20 2015 Rex Dieter 1.1.0-0.37.rc3 +- xdg-open wrongly passes all command line arguments as one argument to e.g. okular on non Gnome desktops (#1191981) + +* 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 + +* Tue Jan 06 2015 Rex Dieter 1.1.0-0.34.rc3 +- refresh for latest attepmt to fix upstream BR66670 + +* Mon Jan 05 2015 Rex Dieter 1.1.0-0.33.rc3 +- pull in latest commits + +* Sat Jan 03 2015 Rex Dieter 1.1.0-0.32.rc3 +- xdg-utils-1.1.0-rc3 + +* Tue Oct 21 2014 Rex Dieter 1.1.0-0.31.rc2 +- workaround %%autosetup failure harder (#1084309) + +* Mon Oct 20 2014 Rex Dieter 1.1.0-0.30.rc2 +- workaround %%autosetup failure, again (#1084309) + +* Thu Oct 09 2014 Rex Dieter 1.1.0-0.29.rc2 +- xdg-screensaver plasma5 support + +* Mon Sep 22 2014 Rex Dieter 1.1.0-0.28.rc2 +- plasma5: ktraderclient5, kreadconfig5, kwriteconfig5 + +* Mon Sep 22 2014 Rex Dieter 1.1.0-0.27.rc2 +- more upstream goodness, initial plasma5 support + +* Sat Sep 20 2014 Rex Dieter 1.1.0-0.26.rc2 +- pull in latest upstream fixes + +* Sun Jun 08 2014 Fedora Release Engineering - 1.1.0-0.25.rc2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Apr 15 2014 Till Maas - 1.1.0-0.24.rc2 +- Fix patch from 1.1.0-0.23.rc2 (#1086122) + +* Fri Apr 11 2014 Till Maas - 1.1.0-0.23.rc2 +- Fix handling of desktop files with multiple groups (#1086122) + +* Fri Apr 04 2014 Rex Dieter 1.1.0-0.22.rc2 +- drop using %%autosetup (it didn't work?) + +* Sun Mar 30 2014 Rex Dieter - 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 1.1.0-0.20.rc2 +- 1.1.0-rc2 + +* Sat Oct 05 2013 Rex Dieter 1.1.0-0.18.20131005git +- 20131005 snapshot + +* Mon Aug 05 2013 Rex Dieter 1.1.0-0.17.20120809git +- BR: text-www-browser (#992895) + +* Sun Aug 04 2013 Fedora Release Engineering - 1.1.0-0.16.20120809git +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Feb 15 2013 Fedora Release Engineering - 1.1.0-0.15.20120809git +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Aug 09 2012 Rex Dieter 1.1.0-0.14.20120809git +- 20120809 snapshot + +* Sun Jul 22 2012 Fedora Release Engineering - 1.1.0-0.13.20120302git +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Mar 02 2012 Rex Dieter 1.1.0-0.12.20120302git +- 20120302 snapshot +- patches for unknown DE (#769305) + +* Sat Jan 14 2012 Fedora Release Engineering - 1.1.0-0.11.20111207 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Dec 07 2011 Rex Dieter 1.1.0-0.10.20110714git +- fix gnome-screensaver detection bogosity (#702540,#736159) +- xdg-open: x-www-browser: command not found (#755553) +- drop htmlview hackage + +* Thu Jul 14 2011 Rex Dieter 1.1.0-0.9.20110714 +- 20110714 snapshot +- xdg-mime : use 'file --mime-type' instead of 'file -i' + +* Thu Jun 16 2011 Rex Dieter 1.1.0-0.8.20110510 +- rebuild + +* Thu Jun 02 2011 Rex Dieter 1.1.0-0.7.20110510 +- fix gnome3 detection, gnome-default-applications-properties error output + +* Thu May 05 2011 Rex Dieter 1.1.0-0.6.20110505 +- Error in xdg-open script (#702347) + +* Wed May 04 2011 Rex Dieter 1.1.0-0.5.20110504 +- 20110504 snapshot +- xdg-email does not work (#690840) + +* Fri Apr 08 2011 Rex Dieter 1.1.0-0.4.20110408 +- 20110408 snapshot +- Shouldn't use user's defaults.list (#678656) + +* Mon Feb 07 2011 Fedora Release Engineering - 1.1.0-0.3.20110201 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Feb 01 2011 Rex Dieter 1.1.0-0.2.20110201 +- 20110201 snapshot +- add gnome3 support, make default browser work again for xdg-settings (#654746) + +* Mon Jan 03 2011 Rex Dieter - 1.1.0-0.1.rc1 +- xdg-utils-1.1.0-rc1 + +* Thu Oct 28 2010 Rex Dieter - 1.0.2-21.20101028 +- lxde support (#580835, fdo#26058)) + +* Fri Jul 09 2010 Rex Dieter - 1.0.2-20.20100709 +- xdg-screensaver: consider gnome-screensaver a separate DE (fdo#20027) + +* Fri Jul 09 2010 Rex Dieter - 1.0.2-19.20100709 +- xdg-open man page needs updating to include FILE and SEE ALSO (#603841) +- xdg-open should call mimeopen with -L option (#430072) +- xdg-desktop-icon : use localized desktop folder name (fdo#19011) + +* Fri Apr 09 2010 Rex Dieter - 1.0.2-18.20100409 +- xdg-settings fixes (#580715, fdo#26284) + +* Mon Jan 18 2010 Rex Dieter - 1.0.2-17.20100118cvs +- xdg-screensaver resume activates the screensaver on KDE4 (fdo#26085) + +* Thu Dec 17 2009 Rex Dieter - 1.0.2-16.20091217cvs +- xdg-mime: line 531: kde-config: command not found (#545702) +- xdg-email calls gconftool which doesn't exist (#548529) + +* Mon Nov 30 2009 Rex Dieter - 1.0.2-15.20091016cvs +- add Obsoletes: htmlview (#541179, f13+) + +* Fri Oct 16 2009 Rex Dieter - 1.0.2-14.20091016cvs +- prefer gvfs-open over gnome-open (#529287) +- DE=gnome, if org.gnome.SessionManager exists on dbus (#529287) + +* Mon Sep 28 2009 Rex Dieter - 1.0.2-13.20090928cvs +- xdg-open: use kde-open + +* Mon Sep 21 2009 Rex Dieter - 1.0.2-12.20090921cvs +- suppress stderr from kde-config (#524724) + +* Sun Sep 13 2009 Rex Dieter - 1.0.2-11.20090913cvs +- 20090913cvs snapshot +- xdg-open in xdg-utils expects xprop to be available (#506857) + +* Mon Aug 24 2009 Rex Dieter - 1.0.2-10.20090824cvs +- 20090824cvs snapshot + +* Mon Jul 27 2009 Fedora Release Engineering - 1.0.2-9.20081121cvs +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Apr 09 2009 Rex Dieter - 1.0.2-8.20081121cvs +- revert. kfmclient openURL is largely useless + +* Wed Apr 08 2009 Rex Dieter - 1.0.2-7.20081121cvs +- xdg-open: s/kfmclient exec/kfmclient openURL/ (CVE-2009-0068, rh#472010, fdo#19377) + +* Thu Feb 26 2009 Fedora Release Engineering - 1.0.2-6.20081121cvs +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Nov 21 2008 Rex Dieter 1.0.2-5.20081121cvs +- upstreamed a few more patches, rebase to cvs snapshot + +* Fri Jan 25 2008 Lubomir Kundrak 1.0.2-4 +- Fix for CVE-2008-0386 (#429513) + +* Fri Jan 18 2008 Rex Dieter 1.0.2-3 +- fix mimeopen support (#429280) +- spec cosmetics: cleanup macro usage + +* Wed Oct 03 2007 Rex Dieter 1.0.2-2 +- Requires: which (#312601) + +* Sun Jun 24 2007 Rex Dieter 1.0.2-1 +- xdg-utils-1.0.2 + +* Mon Apr 23 2007 Rex Dieter 1.0.1-3 +- add htmlview,links to browser fallbacks + +* Tue Dec 19 2006 Rex Dieter 1.0.1-2 +- fix typo in xdg-icon-resource manpage + +* Mon Nov 06 2006 Rex Dieter 1.0.1-1 +- xdg-utils-1.0.1 + +* Tue Oct 24 2006 Rex Dieter 1.0-2 +- prefer mimeopen as generic default (#210797) + +* Tue Oct 10 2006 Rex Dieter 1.0-1 +- 1.0(final) + +* Mon Oct 02 2006 Rex Dieter 1.0-0.9.rc1 +- update %%description (#208926) + +* Wed Sep 20 2006 Rex Dieter 1.0-0.8.rc1 +- 1.0rc1 + +* Fri Sep 15 2006 Rex Dieter 1.0-0.7.beta4 +- 1.0beta4 + +* Mon Aug 21 2006 Rex Dieter 1.0-0.6.beta3 +- 1.0beta3 + +* Thu Jul 27 2006 Rex Dieter 1.0-0.5.20060721 +- Release: append/use %%{?dist} + +* Wed Jul 26 2006 Rex Dieter 1.0-0.4.20060721 +- specfile cosmetics, tabs -> spaces +- %%makeinstall -> make install DESTDIR=... + +* Mon Jul 24 2006 Rex Dieter 1.0-0.3.20060721 +- 20060721 snapshot +- optgnome.patch + +* Mon Jul 24 2006 Rex Dieter 1.0-0.2.beta1 +- Requires: desktop-file-utils + +* Mon Jul 24 2006 Rex Dieter 1.0-0.1.beta1 +- 1.0beta1 +