Date: Monday, November 11, 2013 @ 16:17:04 Author: foutrelis Revision: 199342
upgpkg: exo 0.10.2-2 Fix handling of magnet URLs (FS#37692). Added: exo/trunk/0001-Fix-exo_str_looks_like_an_uri-bug-10098.patch Modified: exo/trunk/PKGBUILD ----------------------------------------------------+ 0001-Fix-exo_str_looks_like_an_uri-bug-10098.patch | 53 +++++++++++++++++++ PKGBUILD | 15 ++++- 2 files changed, 65 insertions(+), 3 deletions(-) Added: 0001-Fix-exo_str_looks_like_an_uri-bug-10098.patch =================================================================== --- 0001-Fix-exo_str_looks_like_an_uri-bug-10098.patch (rev 0) +++ 0001-Fix-exo_str_looks_like_an_uri-bug-10098.patch 2013-11-11 15:17:04 UTC (rev 199342) @@ -0,0 +1,53 @@ +From 05848bb3cb10ea19ef8cba607bdabcd25560063c Mon Sep 17 00:00:00 2001 +From: Felipe Contreras <[email protected]> +Date: Sat, 18 May 2013 22:50:01 -0500 +Subject: [PATCH] Fix exo_str_looks_like_an_uri() (bug #10098). + +Commit d11199b (Check if uris also contain a slash (bug #9244)) tried to +fix a hang in thunar by properly recognizing that 'http:' is not an URI, +however, while doing so, it broke proper URIs like 'magnet:foo'. + +As the RFC clearly states: + + The following are two example URIs and their component parts: + + foo://example.com:8042/over/there?name=ferret#nose + \_/ \______________/\_________/ \_________/ \__/ + | | | | | + scheme authority path query fragment + | _____________________|__ + / \ / \ + urn:example:animal:ferret:nose + +But even with this succinct example exo_str_looks_like_an_uri() fails. + +There is an easy solution; fail only when component part is missing +('urn:'), but succeed otherwise. + +This solution fixes 'magnet:foo', and doesn't break the current +expectation from thunar that 'http:' should fail, having the best of +both worlds. + +[1] http://www.ietf.org/rfc/rfc3986.txt + +Signed-off-by: Felipe Contreras <[email protected]> +--- + exo/exo-string.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/exo/exo-string.c b/exo/exo-string.c +index 33f86f9..056b36a 100644 +--- a/exo/exo-string.c ++++ b/exo/exo-string.c +@@ -429,7 +429,7 @@ exo_str_looks_like_an_uri (const gchar *str) + for (++s; g_ascii_isalnum (*s) || *s == '+' || *s == '-' || *s == '.'; ++s); + + /* <scheme> must be followed by ":" */ +- return (*s == ':' && *(s+1) == '/'); ++ return (*s == ':' && *(s+1) != '\0'); + } + + return FALSE; +-- +1.8.4.2 + Modified: PKGBUILD =================================================================== --- PKGBUILD 2013-11-11 13:09:47 UTC (rev 199341) +++ PKGBUILD 2013-11-11 15:17:04 UTC (rev 199342) @@ -5,7 +5,7 @@ pkgname=exo pkgver=0.10.2 -pkgrel=1 +pkgrel=2 pkgdesc="Extensions to Xfce by os-cillation" arch=('i686' 'x86_64') url="http://www.xfce.org/" @@ -15,9 +15,18 @@ makedepends=('perl-uri' 'intltool' 'gtk-doc' 'xorg-iceauth') optdepends=('perl-uri: for mail-compose helper script') install=$pkgname.install -source=(http://archive.xfce.org/src/xfce/$pkgname/0.10/$pkgname-$pkgver.tar.bz2) -sha256sums=('b385828bf8a38204da3254b57fdfa25a72694495aa189fabd5040f707eec76ce') +source=(http://archive.xfce.org/src/xfce/$pkgname/0.10/$pkgname-$pkgver.tar.bz2 + 0001-Fix-exo_str_looks_like_an_uri-bug-10098.patch) +sha256sums=('b385828bf8a38204da3254b57fdfa25a72694495aa189fabd5040f707eec76ce' + 'f3a92ea399c5786845d3c3a9d74a427299ecd5ed7e5ef2ac1cf636492050e247') +prepare() { + cd "$srcdir/$pkgname-$pkgver" + + # https://bugzilla.xfce.org/show_bug.cgi?id=10098 + patch -Np1 -i "$srcdir/0001-Fix-exo_str_looks_like_an_uri-bug-10098.patch" +} + build() { cd "$srcdir/$pkgname-$pkgver"
