From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: bug#26558: Opening URLs with xdg-open fails (eg. Gajim, Pumpa) Date: Wed, 19 Apr 2017 21:22:40 +0200 Message-ID: <874lxkurr3.fsf@fastmail.com> References: <871sspdywc.fsf@sturm.com.au> <87vaq0l4fd.fsf@gmail.com> <5c8ca67b.AEMAJYZoETwAAAAAAAAAAAO2XMEAAAACwQwAAAAAAAW9WABY97Uk@mailjet.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0vC0-0004f9-9K for bug-guix@gnu.org; Wed, 19 Apr 2017 15:23:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0vBw-0007am-5O for bug-guix@gnu.org; Wed, 19 Apr 2017 15:23:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:59168) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d0vBv-0007aT-Or for bug-guix@gnu.org; Wed, 19 Apr 2017 15:23:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d0vBu-0002Rk-Dw for bug-guix@gnu.org; Wed, 19 Apr 2017 15:23:03 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <5c8ca67b.AEMAJYZoETwAAAAAAAAAAAO2XMEAAAACwQwAAAAAAAW9WABY97Uk@mailjet.com> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Arun Isaac , Mekeor Melire Cc: 26558@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Arun Isaac writes: > Thank you for the bug reports! > > The Guix xdg-utils package is in need of an update. The latest release > is 1.1.1. Unlike the 1.0.2 release currently in Guix, the new release > has test cases, many of which currently fail in Guix. While trying to > get the tests to pass, I noticed that /usr/bin/file is hardcoded into > xdg-mime. That, I think, is at least part of the problem. I am working > on this, and will hopefully be done this weekend. We will revisit these > bugs after that. Heh, I've had a WIP update for 1.1.1 for some time and decided to finish it based on this discussion. This tries "gvfs-open" before "gnome-open". @Ben (and others), can you try this patch and see if that works for you? --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-xdg-utils-Update-to-1.1.1.patch Content-Transfer-Encoding: quoted-printable From=206ed7008561eea7b09085a17d6c443ee657a7fc2d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 8 Apr 2017 03:46:15 +0200 Subject: [PATCH] gnu: xdg-utils: Update to 1.1.1. * gnu/packages/freedesktop.scm (xdg-utils): Update to 1.1.1. [source]: Adjust file name. [native-inputs]: Add DOCBOOK-XSL, DOCBOOK-XML-4.1.2, LIBXSLT, W3M and XMLTO. [arguments]<#:phases>: Add 'patch-hardcoded-paths' and 'locate-catalog-file= s' phases. New parameter. [home-page]: Update to new home. =2D-- gnu/packages/freedesktop.scm | 50 +++++++++++++++++++++++++++++++++++++++-= ---- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index b912ce026..85a6c8b26 100644 =2D-- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -8,6 +8,7 @@ ;;; Copyright =C2=A9 2016, 2017 Efraim Flashner ;;; Copyright =C2=A9 2016 Kei Kebreau ;;; Copyright =C2=A9 2017 Mark H Weaver +;;; Copyright =C2=A9 2017 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -55,6 +56,7 @@ #:use-module (gnu packages polkit) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages w3m) #:use-module (gnu packages xml) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg)) @@ -62,23 +64,61 @@ (define-public xdg-utils (package (name "xdg-utils") =2D (version "1.0.2") + (version "1.1.1") (source (origin (method url-fetch) (uri (string-append "https://portland.freedesktop.org/download/xdg-utils-" =2D version ".tgz")) + version ".tar.gz")) (sha256 (base32 =2D "1b019d3r1379b60p33d6z44kx589xjgga62ijz9vha95dg8vgbi1")))) + "09a1pk3ifsndc5qz2kcd1557i137gpgnv3d739pv22vfayi67pdh")))) (build-system gnu-build-system) + (native-inputs + `(("docbook-xsl" ,docbook-xsl) + ("docbook-xml" ,docbook-xml-4.1.2) + ("libxslt" ,libxslt) + ("w3m" ,w3m) + ("xmlto" ,xmlto))) (propagated-inputs `(("xprop" ,xprop) ; for Xfce detecting ("xset" ,xset))) ; for xdg-screensaver (arguments =2D `(#:tests? #f)) ; no check target =2D (home-page "http://portland.freedesktop.org/") + `(#:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-hardcoded-paths + (lambda _ + (substitute* "scripts/xdg-mime.in" + (("/usr/bin/file") (which "file"))) + (substitute* "scripts/xdg-open.in" + (("/usr/bin/printf") (which "printf"))) + #t)) + (add-before 'build 'locate-catalog-files + (lambda* (#:key inputs #:allow-other-keys) + (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook")) + (xsldoc (string-append (assoc-ref inputs "docbook-xsl") + "/xml/xsl/docbook-xsl-" + ,(package-version docbook-xsl)))) + (for-each (lambda (file) + (substitute* file + (("http://.*/docbookx\\.dtd") + (string-append xmldoc "/docbookx.dtd")))) + (find-files "scripts/desc" "\\.xml$")) + (substitute* "scripts/Makefile" + ;; Apparently `xmlto' does not bother to looks up the sty= lesheets + ;; specified in the XML, unlike the above substitition. I= nstead it + ;; uses a hard-coded URL. Work around it here, but if thi= s is + ;; common perhaps we should hardcode this path in xmlto i= tself. + (("\\$\\(XMLTO\\) man") + (string-append "$(XMLTO) -x " xsldoc + "/manpages/docbook.xsl man"))) + (setenv "STYLESHEET" + (string-append xsldoc "/html/docbook.xsl")) + #t)))))) + (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/") (synopsis "Freedesktop.org scripts for desktop integration") (description "The xdg-utils package is a set of simple scripts that provide basic desktop integration functions in the framework of the =2D-=20 2.12.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlj3uQAACgkQoqBt8qM6 VPrTZAf9EkHqWjUQ0LRjbez2XxfDC+cd27hNgLy/HDNpzofT6UCFQtGlENOl2Tt/ QLMOo7YDMOhwYVJbuxx7qQi8ktalhVClXUW1ng27nVRdLJYmD4bhAqmPbbgHSD+W O9ErTVSGxJ2Ouvh0PuKzLx3j0lxUUsKb1eYu47kr89r/wtZsZidMW2k2/0XAip/H /VhZiG3PXZ/kXu8kxxoRAZCGAATzr2GjvApPw8CLKP9KN3YwjGKkU7mFMxrNmiHc wzPGgOOsQfm+1xXNiw2wgBhSpkfx6qg5VXk5u0G2RnUSBe1SG56lxUF7jw2POUn9 /CJSQEL45z+7f0rTsNlzjdvXo3ECxg== =1znj -----END PGP SIGNATURE----- --==-=-=--