From unknown Mon Jun 23 23:55:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39102] [PATCH 1/2] gnu: xdg-utils: Don't use propagated inputs. Resent-From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Jan 2020 15:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39102 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39102@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.157884385532740 (code B ref -1); Sun, 12 Jan 2020 15:45:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Jan 2020 15:44:15 +0000 Received: from localhost ([127.0.0.1]:57817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqfPO-0008Vv-0k for submit@debbugs.gnu.org; Sun, 12 Jan 2020 10:44:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:58541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqfPM-0008Vn-9J for submit@debbugs.gnu.org; Sun, 12 Jan 2020 10:44:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33557) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqfPK-0000Rj-SN for guix-patches@gnu.org; Sun, 12 Jan 2020 10:44:08 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iqfPJ-0004oz-7C for guix-patches@gnu.org; Sun, 12 Jan 2020 10:44:06 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:47086) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iqfPI-00044N-SQ for guix-patches@gnu.org; Sun, 12 Jan 2020 10:44:05 -0500 Received: (qmail 17091 invoked by uid 1009); 12 Jan 2020 16:43:55 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25691. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.008612 secs); 12 Jan 2020 15:43:55 -0000 Received: from unknown (HELO zdrowyportier.kadziolka.net) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 12 Jan 2020 16:43:55 +0100 Date: Sun, 12 Jan 2020 16:43:53 +0100 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Message-ID: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 37.59.186.212 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/freedesktop.scm (xdg-utils) [propagated-inputs, inputs]: Add awk, coreutils, grep, inetutils and sed; make the dependencies not propagated. [arguments](patch-hardcoded-paths): Move to after 'install to make wrap-program function correctly. Wrap the installed programs. --- gnu/packages/freedesktop.scm | 43 +++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 7066685dee..06006ed53d 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2018 Stefan Stefanović ;;; Copyright © 2019 Reza Alizadeh Majd ;;; Copyright © 2019 Guillaume Le Vaillant +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; This file is part of GNU Guix. ;;; @@ -47,6 +48,7 @@ #:use-module (gnu packages acl) #:use-module (gnu packages admin) #:use-module (gnu packages autotools) + #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages boost) #:use-module (gnu packages check) @@ -55,6 +57,7 @@ #:use-module (gnu packages disk) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) + #:use-module (gnu packages gawk) #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) @@ -107,20 +110,40 @@ ("libxslt" ,libxslt) ("w3m" ,w3m) ("xmlto" ,xmlto))) - (propagated-inputs - `(("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback - ("xprop" ,xprop) ; for Xfce detecting - ("xset" ,xset))) ; for xdg-screensaver + (inputs + `(("PATH:awk" ,gawk) + ("PATH:coreutils" ,coreutils) + ("PATH:grep" ,grep) + ("PATH:inetutils" ,inetutils) ; xdg-screensaver uses `hostname' + ("PATH:perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback + ("PATH:sed" ,sed) + ("PATH:xprop" ,xprop) ; for Xfce detecting + ("PATH:xset" ,xset))) ; for xdg-screensaver (arguments `(#: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"))) + (add-after 'install 'patch-hardcoded-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (with-directory-excursion (string-append (assoc-ref outputs "out") + "/bin") + (substitute* "xdg-mime" + (("/usr/bin/file") (which "file"))) + (substitute* "xdg-open" + (("/usr/bin/printf") (which "printf"))) + (let ((path-ext + (map (lambda (package) + (string-append package "/bin")) + (cons (assoc-ref outputs "out") + (map cdr + (filter (lambda (package) + (string-prefix? "PATH:" (car package))) + inputs)))))) + (for-each + (lambda (script) + (wrap-program script + `("PATH" ":" prefix ,path-ext))) + (find-files ".")))) #t)) (add-before 'build 'locate-catalog-files (lambda* (#:key inputs #:allow-other-keys) -- 2.24.1 From unknown Mon Jun 23 23:55:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39102] [PATCH 2/2 staging] gnu: qtbase: Open links properly without xdg-utils in profile References: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> In-Reply-To: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> Resent-From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Jan 2020 15:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39102 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39102@debbugs.gnu.org Received: via spool by 39102-submit@debbugs.gnu.org id=B39102.1578844062678 (code B ref 39102); Sun, 12 Jan 2020 15:48:02 +0000 Received: (at 39102) by debbugs.gnu.org; 12 Jan 2020 15:47:42 +0000 Received: from localhost ([127.0.0.1]:57826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqfSo-0000As-73 for submit@debbugs.gnu.org; Sun, 12 Jan 2020 10:47:42 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:59836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqfSl-0000Aj-Bv for 39102@debbugs.gnu.org; Sun, 12 Jan 2020 10:47:40 -0500 Received: (qmail 19568 invoked by uid 1009); 12 Jan 2020 16:47:37 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25691. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 27.137554 secs); 12 Jan 2020 15:47:37 -0000 Received: from unknown (HELO zdrowyportier.kadziolka.net) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 12 Jan 2020 16:47:10 +0100 Date: Sun, 12 Jan 2020 16:47:09 +0100 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Message-ID: <20200112154709.fhxirioephom3zvc@zdrowyportier.kadziolka.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/patches/qtbase-use-xdg-open-in-store.patch: New file. * gnu/packages/qt.scm (qtbase)[source][patches]: Apply the patch. [inputs]: Add a dependency on xdg-utils to get its store path. [arguments]: Add a new phase to patch the path into the source code. --- .../qtbase-use-xdg-open-in-store.patch | 103 ++++++++++++++++++ gnu/packages/qt.scm | 10 +- 2 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/qtbase-use-xdg-open-in-store.patch diff --git a/gnu/packages/patches/qtbase-use-xdg-open-in-store.patch b/gnu/packages/patches/qtbase-use-xdg-open-in-store.patch new file mode 100644 index 0000000000..505fff13c2 --- /dev/null +++ b/gnu/packages/patches/qtbase-use-xdg-open-in-store.patch @@ -0,0 +1,103 @@ +To make Qt respect the user's settings for the preferred browser, use xdg-open +even if it is not installed in the profile. The patch makes Qt always use +xdg-open, and makes the path used easy to substitute when building. +======================================================================== +--- qtbase-everywhere-src-5.12.6.orig/src/platformsupport/services/genericunix/qgenericunixservices.cpp 2020-01-01 20:47:16.775671802 +0100 ++++ qtbase-everywhere-src-5.12.6/src/platformsupport/services/genericunix/qgenericunixservices.cpp 2020-01-01 20:56:22.167662035 +0100 +@@ -117,47 +117,6 @@ + return QByteArrayLiteral("UNKNOWN"); + } + +-static inline bool checkExecutable(const QString &candidate, QString *result) +-{ +- *result = QStandardPaths::findExecutable(candidate); +- return !result->isEmpty(); +-} +- +-static inline bool detectWebBrowser(const QByteArray &desktop, +- bool checkBrowserVariable, +- QString *browser) +-{ +- const char *browsers[] = {"google-chrome", "firefox", "mozilla", "opera"}; +- +- browser->clear(); +- if (checkExecutable(QStringLiteral("xdg-open"), browser)) +- return true; +- +- if (checkBrowserVariable) { +- QByteArray browserVariable = qgetenv("DEFAULT_BROWSER"); +- if (browserVariable.isEmpty()) +- browserVariable = qgetenv("BROWSER"); +- if (!browserVariable.isEmpty() && checkExecutable(QString::fromLocal8Bit(browserVariable), browser)) +- return true; +- } +- +- if (desktop == QByteArray("KDE")) { +- // Konqueror launcher +- if (checkExecutable(QStringLiteral("kfmclient"), browser)) { +- browser->append(QLatin1String(" exec")); +- return true; +- } +- } else if (desktop == QByteArray("GNOME")) { +- if (checkExecutable(QStringLiteral("gnome-open"), browser)) +- return true; +- } +- +- for (size_t i = 0; i < sizeof(browsers)/sizeof(char *); ++i) +- if (checkExecutable(QLatin1String(browsers[i]), browser)) +- return true; +- return false; +-} +- + static inline bool launch(const QString &launcher, const QUrl &url) + { + const QString command = launcher + QLatin1Char(' ') + QLatin1String(url.toEncoded()); +@@ -297,6 +256,8 @@ + return result; + } + ++static QString xdg_open = QStringLiteral("@@GUIX:XDG-OPEN@@"); ++ + bool QGenericUnixServices::openUrl(const QUrl &url) + { + if (url.scheme() == QLatin1String("mailto")) { +@@ -320,11 +281,7 @@ + } + #endif + +- if (m_webBrowser.isEmpty() && !detectWebBrowser(desktopEnvironment(), true, &m_webBrowser)) { +- qWarning("Unable to detect a web browser to launch '%s'", qPrintable(url.toString())); +- return false; +- } +- return launch(m_webBrowser, url); ++ return launch(xdg_open, url); + } + + bool QGenericUnixServices::openDocument(const QUrl &url) +@@ -337,11 +294,7 @@ + } + #endif + +- if (m_documentLauncher.isEmpty() && !detectWebBrowser(desktopEnvironment(), false, &m_documentLauncher)) { +- qWarning("Unable to detect a launcher for '%s'", qPrintable(url.toString())); +- return false; +- } +- return launch(m_documentLauncher, url); ++ return launch(xdg_open, url); + } + + #else +diff -ur qtbase-everywhere-src-5.12.6.orig/src/platformsupport/services/genericunix/qgenericunixservices_p.h qtbase-everywhere-src-5.12.6/src/platformsupport/services/genericunix/qgenericunixservices_p.h +--- qtbase-everywhere-src-5.12.6.orig/src/platformsupport/services/genericunix/qgenericunixservices_p.h 2020-01-01 20:47:16.775671802 +0100 ++++ qtbase-everywhere-src-5.12.6/src/platformsupport/services/genericunix/qgenericunixservices_p.h 2020-01-01 20:54:12.135664364 +0100 +@@ -65,10 +65,6 @@ + + bool openUrl(const QUrl &url) override; + bool openDocument(const QUrl &url) override; +- +-private: +- QString m_webBrowser; +- QString m_documentLauncher; + }; + + QT_END_NAMESPACE diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 514577678e..0b1d372d8b 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2019, 2020 Marius Bakke ;;; Copyright © 2018 John Soo ;;; Copyright © 2020 Mike Rosset +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; This file is part of GNU Guix. ;;; @@ -349,7 +350,8 @@ developers using C++ or QML, a CSS & JavaScript like language.") (base32 "09wz7zs1x5mpgs2y4xnl2zv3naqls4sz6v2arwl1fz2dsx4jddba")) ;; Use TZDIR to avoid depending on package "tzdata". - (patches (search-patches "qtbase-use-TZDIR.patch")) + (patches (search-patches "qtbase-use-TZDIR.patch" + "qtbase-use-xdg-open-in-store.patch")) (modules '((guix build utils))) (snippet ;; corelib uses bundled harfbuzz, md4, md5, sha3 @@ -407,6 +409,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") ("xcb-util-keysyms" ,xcb-util-keysyms) ("xcb-util-renderutil" ,xcb-util-renderutil) ("xcb-util-wm" ,xcb-util-wm) + ("xdg-utils" ,xdg-utils) ("zlib" ,zlib))) (native-inputs `(("bison" ,bison) @@ -428,6 +431,11 @@ developers using C++ or QML, a CSS & JavaScript like language.") "qmake/library/qmakebuiltins.cpp") (("/bin/sh") (which "sh"))) #t)) + (add-after 'configure 'patch-xdg-open + (lambda _ + (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp") + (("@@GUIX:XDG-OPEN@@") (which "xdg-open"))) + #t)) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) -- 2.24.1 From unknown Mon Jun 23 23:55:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39102] [PATCH v2 1/2] gnu: xdg-utils: Don't use propagated inputs. References: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> In-Reply-To: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> Resent-From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Jan 2020 17:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39102 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39102@debbugs.gnu.org Received: via spool by 39102-submit@debbugs.gnu.org id=B39102.15788486037521 (code B ref 39102); Sun, 12 Jan 2020 17:04:01 +0000 Received: (at 39102) by debbugs.gnu.org; 12 Jan 2020 17:03:23 +0000 Received: from localhost ([127.0.0.1]:57866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqgdz-0001xC-Ry for submit@debbugs.gnu.org; Sun, 12 Jan 2020 12:03:23 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:48758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqgdw-0001wz-HR for 39102@debbugs.gnu.org; Sun, 12 Jan 2020 12:03:18 -0500 Received: (qmail 18990 invoked by uid 1009); 12 Jan 2020 18:03:13 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25691. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.008959 secs); 12 Jan 2020 17:03:13 -0000 Received: from unknown (HELO zdrowyportier.kadziolka.net) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 12 Jan 2020 18:03:13 +0100 Date: Sun, 12 Jan 2020 18:03:12 +0100 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Message-ID: <20200112170312.vaivt4puflzacg4b@zdrowyportier.kadziolka.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Sending a revision to the first patch after feedback on IRC. Changes: - Remove the `string-prefix? "PATH:"' hack, list the packages explicitly. - Use cute to make the code easier to read. --- * gnu/packages/freedesktop.scm (xdg-utils) [propagated-inputs, inputs]: Add awk, coreutils, grep and sed, make the dependencies not propagated. [arguments](patch-hardcoded-paths): Move to after 'install to make wrap-program function correctly. Wrap the installed programs. --- gnu/packages/freedesktop.scm | 40 ++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 7066685dee..9e1bf730d2 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2018 Stefan Stefanović ;;; Copyright © 2019 Reza Alizadeh Majd ;;; Copyright © 2019 Guillaume Le Vaillant +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; This file is part of GNU Guix. ;;; @@ -47,6 +48,7 @@ #:use-module (gnu packages acl) #:use-module (gnu packages admin) #:use-module (gnu packages autotools) + #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages boost) #:use-module (gnu packages check) @@ -55,6 +57,7 @@ #:use-module (gnu packages disk) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) + #:use-module (gnu packages gawk) #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) @@ -107,20 +110,41 @@ ("libxslt" ,libxslt) ("w3m" ,w3m) ("xmlto" ,xmlto))) - (propagated-inputs - `(("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback + (inputs + `(("awk" ,gawk) + ("coreutils" ,coreutils) + ("grep" ,grep) + ("inetutils" ,inetutils) ; xdg-screensaver uses `hostname' + ("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback + ("sed" ,sed) ("xprop" ,xprop) ; for Xfce detecting ("xset" ,xset))) ; for xdg-screensaver (arguments `(#:tests? #f ; no check target + #:modules ((srfi srfi-26) + (guix build utils) + (guix build gnu-build-system)) #: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"))) + (add-after 'install 'patch-hardcoded-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (with-directory-excursion (string-append (assoc-ref outputs "out") + "/bin") + (substitute* "xdg-mime" + (("/usr/bin/file") (which "file"))) + (substitute* "xdg-open" + (("/usr/bin/printf") (which "printf"))) + (let ((path-ext + (map (cute string-append <> "/bin") + (cons (assoc-ref outputs "out") + (map (cute assoc-ref inputs <>) + '("awk" "coreutils" "grep" "inetutils" + "perl-file-mimeinfo" "sed" "xprop" + "xset")))))) + (for-each + (cute wrap-program <> + `("PATH" ":" prefix ,path-ext)) + (find-files ".")))) #t)) (add-before 'build 'locate-catalog-files (lambda* (#:key inputs #:allow-other-keys) -- 2.24.1 From unknown Mon Jun 23 23:55:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39102] [PATCH v2 1/2] gnu: xdg-utils: Don't use propagated inputs. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Jan 2020 19:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39102 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= , 39102@debbugs.gnu.org Received: via spool by 39102-submit@debbugs.gnu.org id=B39102.157885741821678 (code B ref 39102); Sun, 12 Jan 2020 19:31:01 +0000 Received: (at 39102) by debbugs.gnu.org; 12 Jan 2020 19:30:18 +0000 Received: from localhost ([127.0.0.1]:58000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqiw8-0005dR-JE for submit@debbugs.gnu.org; Sun, 12 Jan 2020 14:30:18 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:58169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqiw4-0005c8-6Z for 39102@debbugs.gnu.org; Sun, 12 Jan 2020 14:30:11 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id C3C1521EEB; Sun, 12 Jan 2020 14:30:02 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 12 Jan 2020 14:30:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=J4YVpCu9e8Xb8D+eKna9lK9zP+ XOMEuIHp7UxPMI6fw=; b=mOv0vownMpzlwz7VEOBWxQw0QlfukzBZYT0nLfri9x LRj5MFWn7QOidi8BLHE3IKCpOHxk4jHbDwCUiTq51C/Do3OYNtgyxIXQfpNXkYCB l0fAB9C14qM0zBEZcLKWaF+2opQEeJb1rR5xajCV+u87Gp4X1NNRwwHJRMBAtYHq lEY7LReZ1FIL0jtlhhIkcnjCMJlFrBVt66+K0Wl9Y1CASROfwWauuOYMYqH8cWnG YKXs3F/oCtKidScc6KlSqiA6VbC8P1ENIlpz9WZ6kHc6LQCTSTRPVvmpf1ccLHjG KA+X2PxyaeikeJtsIr4DeimlfokvyfCIaNreYejjMXew== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=J4YVpC u9e8Xb8D+eKna9lK9zP+XOMEuIHp7UxPMI6fw=; b=k8AbnB1k08NV8pK60maMFx NH7AdZnULN3SIYLKRWdbTnuRhiXKlu0kdYSA4EkcUXVLTA4tmDeYEgvTpYhc+7op rDcHlB09GeozV/VGlfBhjnJOvz0axWrUE2Z6g4sRBKBq1BK0ySK/qYACo+xTjFEy vOFVowPF5Efd20CcabsFFdtwzda7TF/o5ymUik41XNR/bQ2vQD+/pnitVqjP8vxa 08Q/pRG/QJ44XjoHMxGFKI0CoI8KpIwiZE+LRVkmz7F91KpiBidx6+ngfdc/PWob 45O2Nr02bnQwkNwXuVkEBltohffnXQRHlPWDJd0EOOm8RGwkCuCkeoPb3aboay9Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdeikedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufgjfhgffffkgggtsehgtd erredtreejnecuhfhrohhmpeforghrihhushcuuegrkhhkvgcuoehmsggrkhhkvgesfhgr shhtmhgrihhlrdgtohhmqeenucfkphepkeegrdehvddrvddviedruddtvdenucfrrghrrg hmpehmrghilhhfrhhomhepmhgsrghkkhgvsehfrghsthhmrghilhdrtghomhenucevlhhu shhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (84-52-226.102.3p.ntebredband.no [84.52.226.102]) by mail.messagingengine.com (Postfix) with ESMTPA id CC56F30607B4; Sun, 12 Jan 2020 14:30:01 -0500 (EST) From: Marius Bakke In-Reply-To: <20200112170312.vaivt4puflzacg4b@zdrowyportier.kadziolka.net> References: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> <20200112170312.vaivt4puflzacg4b@zdrowyportier.kadziolka.net> User-Agent: Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Sun, 12 Jan 2020 20:29:59 +0100 Message-ID: <87k15wxyko.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jakub K=C4=85dzio=C5=82ka writes: > Sending a revision to the first patch after feedback on IRC. Changes: > - Remove the `string-prefix? "PATH:"' hack, list the packages > explicitly. > - Use cute to make the code easier to read. > > --- > * gnu/packages/freedesktop.scm (xdg-utils) > [propagated-inputs, inputs]: Add awk, coreutils, grep and sed, make > the dependencies not propagated. > [arguments](patch-hardcoded-paths): Move to after 'install to make > wrap-program function correctly. Wrap the installed programs. FYI: The stray '---' here made git disregard the actual commit message, and instead only added the four lines above. The other way around would be perfect. :-) I've applied this patch, with the changes below (leaving the original patch-hardcoded-paths phase intact, renaming the new phase accordingly; and added a let binding for "out"). I'll address the Qt patch in a separate message. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=diff diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 9e1bf730d2..ed221439b4 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -122,29 +122,15 @@ (arguments `(#:tests? #f ; no check target #:modules ((srfi srfi-26) - (guix build utils) - (guix build gnu-build-system)) + ,@%gnu-build-system-modules) #:phases (modify-phases %standard-phases - (add-after 'install 'patch-hardcoded-paths - (lambda* (#:key inputs outputs #:allow-other-keys) - (with-directory-excursion (string-append (assoc-ref outputs "out") - "/bin") - (substitute* "xdg-mime" - (("/usr/bin/file") (which "file"))) - (substitute* "xdg-open" - (("/usr/bin/printf") (which "printf"))) - (let ((path-ext - (map (cute string-append <> "/bin") - (cons (assoc-ref outputs "out") - (map (cute assoc-ref inputs <>) - '("awk" "coreutils" "grep" "inetutils" - "perl-file-mimeinfo" "sed" "xprop" - "xset")))))) - (for-each - (cute wrap-program <> - `("PATH" ":" prefix ,path-ext)) - (find-files ".")))) + (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) @@ -168,6 +154,21 @@ "/manpages/docbook.xsl man"))) (setenv "STYLESHEET" (string-append xsldoc "/html/docbook.xsl")) + #t))) + (add-after 'install 'wrap-executables + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (with-directory-excursion (string-append out "/bin") + (let ((path-ext + (map (cute string-append <> "/bin") + (cons out + (map (cute assoc-ref inputs <>) + '("awk" "coreutils" "grep" "inetutils" + "perl-file-mimeinfo" "sed" "xprop" + "xset")))))) + (for-each (cute wrap-program <> + `("PATH" ":" prefix ,path-ext)) + (find-files ".")))) #t)))))) (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/") (synopsis "Freedesktop.org scripts for desktop integration") --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl4bc7gACgkQoqBt8qM6 VPpQPgf+JFCSunjTkSxa1urFj5CySbaYjktEI7jX/jPvmzG22MOfOXLQ0qijZ4rD KvuhTeDfGZaQ59iBGZtk3bak8qArQ8HxLEcj0CDcu3EIPqmOryaQ4H0kfw81H28o zfXZduakiW5aRhTG/H7ERlNgjE05+LVTJeYtXphTLQ2rMdi2PS8UCEKj4Y/JsQPX RehLGZbQvUHihxBFBxaiNm9YCQgaKAzlXHyUkH8WAvaUOvtkNTef0ROHKbIi+Y59 G1t0vVehD3rn/plUZP34SSvWi9svepYTZ40VFNW9g/h1+q5zTyPeGT/XYCX2D0kF 6E6MRpH2lU8L177FsNSc1htHdHLqUw== =NSj8 -----END PGP SIGNATURE----- --==-=-=-- From unknown Mon Jun 23 23:55:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39102] [PATCH 2/2 staging] gnu: qtbase: Open links properly without xdg-utils in profile Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Jan 2020 19:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39102 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= , 39102@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 39102-submit@debbugs.gnu.org id=B39102.157885829523068 (code B ref 39102); Sun, 12 Jan 2020 19:45:02 +0000 Received: (at 39102) by debbugs.gnu.org; 12 Jan 2020 19:44:55 +0000 Received: from localhost ([127.0.0.1]:58028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqjAM-000600-Po for submit@debbugs.gnu.org; Sun, 12 Jan 2020 14:44:55 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:43225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqjAK-0005zn-35 for 39102@debbugs.gnu.org; Sun, 12 Jan 2020 14:44:52 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 7220C22110; Sun, 12 Jan 2020 14:44:46 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 12 Jan 2020 14:44:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=sSYmtK3aUw/pR7L1WFXeZ/vOvX a+THpUIo65O9RhK3U=; b=CTYH5zyLAm4VzFZcjWWAIfZWOB2ON06ivIdQ1dg2AS ZfIHJ8tihkw9ocgu5JTEXU5NcgC3cW5R7B9bFx5WKjrEXagv1xlaiOFUuDK6M1ck hT2rS3oz9rZPakRLvqhdZKx/54b3MVPoSxg+/HjOrpBn7FoUMgxXFnntASWKsUqm 6bjXsK6TIPp7GRbD0WEv0rtMbkiyVaKyLxAdaUFlejWgw+Fg/gXbyb71sN2BA/tZ 1kyCk9UZ1AnqcamEqRUy3yA4i5uocQwYpftMb0zfHdtd2kH+4a/STLiwG+Ky3l8s cqEA+Bakh47MopTkw+w6bzj5lEyHL7+pSfPnjfpMtzBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=sSYmtK 3aUw/pR7L1WFXeZ/vOvXa+THpUIo65O9RhK3U=; b=ZdMEEYSltOGlx9kunTDhBj 8HupW0fLVx9ioPKjfIOUxyckAMHCHq64iY8UibQVbYT90pptlpPlnzFpU0xo7jGx w7c4Eb2vP4AFPIBNmaf73DD0Stxu481zUUsO0HN29AHGv1A4JUF1MEj4sd6N1GtI 5t67hs3lfWRMe9aZ22G/Z5q8i3wVA6tnbu33OTgUVg3v/yAYbgaSlWL53m/XBqqD 3ZbpthUKQ0qPN+zKSMHG5iC6VaeweH/s/LD2N04lbUJpAshUoDGkMvufdXTn1Uju MOxY7Xoxgqe2mwUVypS1O0gHQJ6VFvxrOWU7W9rumTumB0eFV3e+mjTjLJuLne8g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdeikedguddvlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffgffkfggtgesghdtreertderjeenucfhrhhomhepofgrrhhi uhhsuceurghkkhgvuceomhgsrghkkhgvsehfrghsthhmrghilhdrtghomheqnecukfhppe ekgedrhedvrddvvdeirddutddvnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmsggrkhhk vgesfhgrshhtmhgrihhlrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (84-52-226.102.3p.ntebredband.no [84.52.226.102]) by mail.messagingengine.com (Postfix) with ESMTPA id 7D96080059; Sun, 12 Jan 2020 14:44:45 -0500 (EST) From: Marius Bakke In-Reply-To: <20200112154709.fhxirioephom3zvc@zdrowyportier.kadziolka.net> References: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> <20200112154709.fhxirioephom3zvc@zdrowyportier.kadziolka.net> User-Agent: Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Sun, 12 Jan 2020 20:44:43 +0100 Message-ID: <87imlgxxw4.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jakub K=C4=85dzio=C5=82ka writes: > * gnu/packages/patches/qtbase-use-xdg-open-in-store.patch: New file. > * gnu/packages/qt.scm (qtbase)[source][patches]: Apply the patch. > [inputs]: Add a dependency on xdg-utils to get its store path. > [arguments]: Add a new phase to patch the path into the source code. This patch does a lot. :-) With this patch, BROWSER and DEFAULT_BROWSER would no longer be consulted, right? Does checkExecutable work with absolute file names? I.e. could we get away by simply patching "xdg-open" with its store file name? Probably should change the default browsers while at it, though. :-) Wrt the easy substitution, I think we should try and avoid introducing changes to source code that depend on magic from #:phases. That way people will still be (mostly) able to build Qt manually using the Guix source. In this case, maybe defaulting to just "xdg-open" is enough? In short, I'm looking for an easier way to achieve the same goal, without the rather intrusive patch. Copying Efraim as our resident Qt expert. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl4bdysACgkQoqBt8qM6 VPpBTwf/e8RMyGNFndDX9iJ6t53STKH426U2Uqf2FcYp/5SmNjp78URiu5oH3jXQ 11v/aNi3i4XSvOzDml4M5fr+BIz3Sm8rPe9W7Fl8eYWEjLXRZZKeMV18J7ISARn+ 1IG0f3M6c3LicUl713BoBxCwyx1PJMWXloWRFEg6Hr/gyBwLPnmvse+3bghnW3Gn CHYqm+lPwDwS6lBAPgjn9Q7PY6e2CklOQtTy1bTnh839eMmlWYL1tvUnvcflRZ+h xTJlGkL0G7ElZfg55kf2bkYzgbyoNMvsEDSSVxbAVgFy8imlGNuaAH8Z7ZQIUiJ0 OCco6NKOZL0UbBvn/nPQq1eJrmfAew== =XAxj -----END PGP SIGNATURE----- --=-=-=-- From unknown Mon Jun 23 23:55:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39102] [PATCH 2/2 staging] gnu: qtbase: Open links properly without xdg-utils in profile Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Jan 2020 07:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39102 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Marius Bakke Cc: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= , 39102@debbugs.gnu.org Received: via spool by 39102-submit@debbugs.gnu.org id=B39102.157890203132345 (code B ref 39102); Mon, 13 Jan 2020 07:54:01 +0000 Received: (at 39102) by debbugs.gnu.org; 13 Jan 2020 07:53:51 +0000 Received: from localhost ([127.0.0.1]:58599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iquXn-0008Pd-C1 for submit@debbugs.gnu.org; Mon, 13 Jan 2020 02:53:51 -0500 Received: from flashner.co.il ([178.62.234.194]:35270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iquXl-0008PP-7U for 39102@debbugs.gnu.org; Mon, 13 Jan 2020 02:53:49 -0500 Received: from localhost (unknown [141.226.13.108]) by flashner.co.il (Postfix) with ESMTPSA id 13F0E401E4; Mon, 13 Jan 2020 07:53:42 +0000 (UTC) Date: Mon, 13 Jan 2020 09:53:12 +0200 From: Efraim Flashner Message-ID: <20200113075312.GA15806@E5400> References: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> <20200112154709.fhxirioephom3zvc@zdrowyportier.kadziolka.net> <87imlgxxw4.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="huq684BweRXVnRxX" Content-Disposition: inline In-Reply-To: <87imlgxxw4.fsf@devup.no> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --huq684BweRXVnRxX Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 12, 2020 at 08:44:43PM +0100, Marius Bakke wrote: > Jakub K=C4=85dzio=C5=82ka writes: >=20 > > * gnu/packages/patches/qtbase-use-xdg-open-in-store.patch: New file. > > * gnu/packages/qt.scm (qtbase)[source][patches]: Apply the patch. > > [inputs]: Add a dependency on xdg-utils to get its store path. > > [arguments]: Add a new phase to patch the path into the source code. >=20 > This patch does a lot. :-) >=20 > With this patch, BROWSER and DEFAULT_BROWSER would no longer be > consulted, right? >=20 > Does checkExecutable work with absolute file names? I.e. could we get > away by simply patching "xdg-open" with its store file name? Probably > should change the default browsers while at it, though. :-) >=20 > Wrt the easy substitution, I think we should try and avoid introducing > changes to source code that depend on magic from #:phases. That way > people will still be (mostly) able to build Qt manually using the Guix > source. In this case, maybe defaulting to just "xdg-open" is enough? >=20 > In short, I'm looking for an easier way to achieve the same goal, > without the rather intrusive patch. >=20 > Copying Efraim as our resident Qt expert. I disagree about being a qt expert, I just like fixing packages :) Looking at the patch, I'm not in love with how there's a default list of browsers to look for. Looking at the code, it seems that if there's xdg-open available then open browser from the pre-defined list. What is the code around m_documentLauncher? Does that really need to be removed? I think our best bet would be to substitute xdg-open with the actual xdg-open binary around line 130 and to change the list of *browsers[] to ones we actually have in Guix. If we switched the list to {"icecat", "next", "chromium", "netsurf"} and made the substitution on xdg-open we'd be in a much better place than we are now. As it currently stands I know I don't have BROWSER or DEFAULT_BROWSER defined and we don't have any Debian-like package named 'default-browser' or similar that we could throw in. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --huq684BweRXVnRxX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl4cIeQACgkQQarn3Mo9 g1GEbg/9F21IjnrThvmPXIREqwVlZ2u/+wxXa6qg6992RSvLdKyZUlricmOgQ0Oz gz1ayp8sR7J82oFOFNjlV2sBW//njNGcWQFVNFISjf7pcrIT7RBjR9yhGhI3iyv8 8TMnbgC6ZRfEXX3qk5RfCo4XAR2W7GlzXpwq155fNEmWY+HZAOlXsRFzOeh4VoHs GmgVZ0oAfYqRijUBBL2tCbkKZum278k47EcwgWu1eTbuWhweCQGL57qfN6GNSf99 Ez3TdhoQTMLrchwU4M5aU7EXHpsQzmG+70/N48OqimLOtamlZmlHObPbEA0PfhFv 45Yiu8Rn7L8RkQESE8fVYwEV+IWx5KxjKCJBwNW6hXHeM1UcQ/sgVdn4iQoMJADP vVlEJVGguRSsLktCCLgo8mMYZFm7S1JFyYo/IgvuzXHNa/Cowbts97RjXgFAm8oV V7Itn0LtTMsuwE686ls/iIhz0hu+5fjIoTtas98pYldR98F01W8/gsH+FfI4Hdfw vryGHFKt9xXF6ab5qGdROAREgUPPgKBnQyDIK17+foor1dNsxm/c3epq+eBTZwWu +2qkwCWNJIA9O7mVS5ndaV1Sg+vtNDR9FtogxjjZ/Hq1bFQ3LQe9uj9LFCZxV8mb Eg6WNghuOkokYXKsHH2IIDGXJo7k66zedGxVCvSecoOglvsHhMw= =u5ei -----END PGP SIGNATURE----- --huq684BweRXVnRxX-- From unknown Mon Jun 23 23:55:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39102] [PATCH v2 2/2 staging] gnu: qtbase: Open links properly without xdg-utils in profile References: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> In-Reply-To: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> Resent-From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Jan 2020 11:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39102 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39102@debbugs.gnu.org, mbakke@fastmail.com, efraim@flashner.co.il Received: via spool by 39102-submit@debbugs.gnu.org id=B39102.157891559130573 (code B ref 39102); Mon, 13 Jan 2020 11:40:02 +0000 Received: (at 39102) by debbugs.gnu.org; 13 Jan 2020 11:39:51 +0000 Received: from localhost ([127.0.0.1]:58718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqy4V-0007x2-Cn for submit@debbugs.gnu.org; Mon, 13 Jan 2020 06:39:51 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:58814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqy4T-0007wt-4d for 39102@debbugs.gnu.org; Mon, 13 Jan 2020 06:39:49 -0500 Received: (qmail 8793 invoked by uid 1009); 13 Jan 2020 12:39:46 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25693. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.008943 secs); 13 Jan 2020 11:39:46 -0000 Received: from unknown (HELO zdrowyportier.kadziolka.net) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 13 Jan 2020 12:39:46 +0100 Date: Mon, 13 Jan 2020 12:39:45 +0100 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Message-ID: <20200113113945.xrozaipgq65yxwbz@zdrowyportier.kadziolka.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/qt.scm (qtbase)[inputs]: Add XDG-UTILS. [arguments](patch-xdg-open): New phase. --- On Sun, Jan 12, 2020 at 08:44:43PM +0100, Marius Bakke wrote: > Jakub Kądziołka writes: > > > * gnu/packages/patches/qtbase-use-xdg-open-in-store.patch: New file. > > * gnu/packages/qt.scm (qtbase)[source][patches]: Apply the patch. > > [inputs]: Add a dependency on xdg-utils to get its store path. > > [arguments]: Add a new phase to patch the path into the source code. > > This patch does a lot. :-) Yeah, for some reason I thought a patch like this might as well not leave any dead code behind. > With this patch, BROWSER and DEFAULT_BROWSER would no longer be > consulted, right? BROWSER is checked by xdg-open anyway. DEFAULT_BROWSER would indeed be no longer consulted. > Does checkExecutable work with absolute file names? I.e. could we get > away by simply patching "xdg-open" with its store file name? That's what I considered doing at first, but when I drilled a few methods into the code, I decided that it's very unlikely to work and I don't want to check it empirically due to the painfully long compile-times. > Probably should change the default browsers while at it, though. :-) I don't think there's much point, as that code becomes dead when xdg-open is always found. > Wrt the easy substitution, I think we should try and avoid introducing > changes to source code that depend on magic from #:phases. That way > people will still be (mostly) able to build Qt manually using the Guix > source. In this case, maybe defaulting to just "xdg-open" is enough? Perhaps applying the patch in a phase instead of (source _) would help? > In short, I'm looking for an easier way to achieve the same goal, > without the rather intrusive patch. See PATCHv2, which uses a much more minimal approach, but leaves some dead stuff that isn't likely to be optimized by the compiler. Caring about this might not be rational, now that I think about it... On Mon, Jan 13, 2020 at 09:53:12AM +0200, Efraim Flashner wrote: | Looking at the patch, I'm not in love with how there's a default list of | browsers to look for. Looking at the code, it seems that if there's | xdg-open available then open browser from the pre-defined list. You seem to be misreading the code. If xdg-open is available, it is used, the browser list is only used when xdg-open isn't found. | I think our best bet would be to [...] change the list of *browsers[] to | ones we actually have in Guix. As mentioned above, the list would never be read, since xdg-open would always be found. --- gnu/packages/qt.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 514577678e..8dc771a5f8 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2019, 2020 Marius Bakke ;;; Copyright © 2018 John Soo ;;; Copyright © 2020 Mike Rosset +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; This file is part of GNU Guix. ;;; @@ -363,6 +364,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (build-system gnu-build-system) (propagated-inputs `(("mesa" ,mesa) + ;; Use which the package, not the function ("which" ,(@ (gnu packages base) which)))) (inputs `(("alsa-lib" ,alsa-lib) @@ -407,6 +409,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") ("xcb-util-keysyms" ,xcb-util-keysyms) ("xcb-util-renderutil" ,xcb-util-renderutil) ("xcb-util-wm" ,xcb-util-wm) + ("xdg-utils" ,xdg-utils) ("zlib" ,zlib))) (native-inputs `(("bison" ,bison) @@ -428,6 +431,14 @@ developers using C++ or QML, a CSS & JavaScript like language.") "qmake/library/qmakebuiltins.cpp") (("/bin/sh") (which "sh"))) #t)) + (add-after 'configure 'patch-xdg-open + (lambda _ + (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp") + (("^.*const char \\*browsers.*$" all) + (string-append "*browser = QStringLiteral(\"" + (which "xdg-open") + "\"); return true; \n" all))) + #t)) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) -- 2.24.1 From unknown Mon Jun 23 23:55:29 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Subject: bug#39102: closed (Re: [PATCH v2 2/2 staging] gnu: qtbase: Open links properly without xdg-utils in profile) Message-ID: References: <87ftgjvxqy.fsf@devup.no> <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> X-Gnu-PR-Message: they-closed 39102 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 39102@debbugs.gnu.org Date: Mon, 13 Jan 2020 21:44:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1578951842-10376-1" This is a multi-part message in MIME format... ------------=_1578951842-10376-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #39102: [PATCH 1/2] gnu: xdg-utils: Don't use propagated inputs. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 39102@debbugs.gnu.org. --=20 39102: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39102 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1578951842-10376-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 39102-done) by debbugs.gnu.org; 13 Jan 2020 21:43:11 +0000 Received: from localhost ([127.0.0.1]:60227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ir7UM-0002fW-Kl for submit@debbugs.gnu.org; Mon, 13 Jan 2020 16:43:10 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:52019) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ir7UL-0002fI-4G for 39102-done@debbugs.gnu.org; Mon, 13 Jan 2020 16:43:09 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id ECBE2222FF; Mon, 13 Jan 2020 16:43:03 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 13 Jan 2020 16:43:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=Q67rWI57Q1QX3HDoxTBCW1K4fb e85HHg5UK1CSvbraQ=; b=TW7lGzFmxEWldSqhsCE5B3/p4B9m0px7qkNg9HHWbe ZTrrG4NpaQq3sknRxkAeDJSgWufd7FU0vaduKynmXY9qBB8cBX8rD1PFityfWr0O aa05zkRRUQXULNKKnDcjWIZ3NMm4XdJiWZPCFbz4l4+zU7VesLz4vE+/beVxz4iP cn4GGy4qgCtZZsk/V5GvIZTPJwtDpKAoVJKr1gHveSF1ajSPrKR5qsFj8/O/MVvi 5kacgRbi/+4L36917+5LbSgSsSwyVqAaBgNbwIXInTv9Jlq7iKztpu7PunjF7C3u cRVFij3NqGSe2EvWMlDgQfiCSj3246VOUziZUL6kdJ/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Q67rWI 57Q1QX3HDoxTBCW1K4fbe85HHg5UK1CSvbraQ=; b=RWsSKGniV1Czvxewj299LK 62yrsI8m+Zg+3pX0R6CwtX3N6webDAtjzhK7l/E7aFjZyRnoWDSQyEkReffDZnyy CiP9xgtdTEdmDpeY4RHlma0ETmchN3F+VDqkfPVWPlcmf64MR29rIGsc7PWg7IQO tTR4yOg3t4vRZg2CnETHLkYSvxnE2ApjUzFEYNagrzblZ0pwFb7+b00q3bcm8XgF IYvYXEO4Txr22Ls1SwwTdfB5Np8r6SENKrP3oL77yYoVeYGa/ebma1QxEgyZ2K0y BBDFKM9PsGx/+jQcJ5u/aweBeop1cWZmbLX+iUj5IYPkFnbnGudrEd2vr1Gk8BXQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdejtddgudehtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufgjfhgffffkgggtsehgtd erredtreejnecuhfhrohhmpeforghrihhushcuuegrkhhkvgcuoehmsggrkhhkvgesfhgr shhtmhgrihhlrdgtohhmqeenucfkphepkeegrddvtddvrdeiledrvdehfeenucfrrghrrg hmpehmrghilhhfrhhomhepmhgsrghkkhgvsehfrghsthhmrghilhdrtghomhenucevlhhu shhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (ti0006q161-3035.bb.online.no [84.202.69.253]) by mail.messagingengine.com (Postfix) with ESMTPA id 42FC930602DB; Mon, 13 Jan 2020 16:43:03 -0500 (EST) From: Marius Bakke To: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= , 39102-done@debbugs.gnu.org, efraim@flashner.co.il Subject: Re: [PATCH v2 2/2 staging] gnu: qtbase: Open links properly without xdg-utils in profile In-Reply-To: <20200113113945.xrozaipgq65yxwbz@zdrowyportier.kadziolka.net> References: <20200113113945.xrozaipgq65yxwbz@zdrowyportier.kadziolka.net> User-Agent: Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Mon, 13 Jan 2020 22:43:01 +0100 Message-ID: <87ftgjvxqy.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39102-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jakub K=C4=85dzio=C5=82ka writes: > * gnu/packages/qt.scm (qtbase)[inputs]: Add XDG-UTILS. > [arguments](patch-xdg-open): New phase. > --- > > On Sun, Jan 12, 2020 at 08:44:43PM +0100, Marius Bakke wrote: >> Jakub K=C4=85dzio=C5=82ka writes: >>=20 >> > * gnu/packages/patches/qtbase-use-xdg-open-in-store.patch: New file. >> > * gnu/packages/qt.scm (qtbase)[source][patches]: Apply the patch. >> > [inputs]: Add a dependency on xdg-utils to get its store path. >> > [arguments]: Add a new phase to patch the path into the source code. >>=20 >> This patch does a lot. :-) > > Yeah, for some reason I thought a patch like this might as well not > leave any dead code behind. > >> With this patch, BROWSER and DEFAULT_BROWSER would no longer be >> consulted, right? > > BROWSER is checked by xdg-open anyway. DEFAULT_BROWSER would indeed be > no longer consulted. > >> Does checkExecutable work with absolute file names? I.e. could we get >> away by simply patching "xdg-open" with its store file name? > > That's what I considered doing at first, but when I drilled a few > methods into the code, I decided that it's very unlikely to work and I > don't want to check it empirically due to the painfully long > compile-times. > >> Probably should change the default browsers while at it, though. :-) > > I don't think there's much point, as that code becomes dead when > xdg-open is always found. Right, thanks for clarifying. >> Wrt the easy substitution, I think we should try and avoid introducing >> changes to source code that depend on magic from #:phases. That way >> people will still be (mostly) able to build Qt manually using the Guix >> source. In this case, maybe defaulting to just "xdg-open" is enough? > > Perhaps applying the patch in a phase instead of (source _) would help? > >> In short, I'm looking for an easier way to achieve the same goal, >> without the rather intrusive patch. > > See PATCHv2, which uses a much more minimal approach, but leaves some > dead stuff that isn't likely to be optimized by the compiler. Caring > about this might not be rational, now that I think about it... Heh. Considering possible side effects is good, even if the effects are not very worrying. :-) > On Mon, Jan 13, 2020 at 09:53:12AM +0200, Efraim Flashner wrote: > | Looking at the patch, I'm not in love with how there's a default list of > | browsers to look for. Looking at the code, it seems that if there's > | xdg-open available then open browser from the pre-defined list. > > You seem to be misreading the code. If xdg-open is available, it is > used, the browser list is only used when xdg-open isn't found. > > | I think our best bet would be to [...] change the list of *browsers[] to > | ones we actually have in Guix. > > As mentioned above, the list would never be read, since xdg-open would > always be found. OK. The new patch is much less intimidating, I will apply it shortly. (by the way, please attach full patches instead of plain diffs, so we can 'git am' straight from our MUA instead of having to mangle it) Thank you! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl4c5GUACgkQoqBt8qM6 VPptJAgAkN5pyDS84RkEqtH5LdFqMmemtLujrzJwAXBVac1J5eFKE1YOg//rYIbK N24ZgnloEpLbiBxVnLEYIanymEeydsvb/RZK7+7792HOg3dN5Y5GyAiVhyy+Xr9T DX3JzPh267q/yZGCCVXAa7d1crvK3DjZ+RQgMznfvZnRzlosv+zesKfN8MITfiGQ XcuBsjTwdKOkFHN5X2ptc+EO5IFAeD1GMVAbDjQxnMhGJbTCs2T7gmKx4/5Hig+r ZGC3ZwIcobZOo2n9+EcAnin2W5viB6vnSoWI9KMjc7+oANeM5EMKckcGMs5RPGvo dZgufJNmYS+LXHbpCpIbRIsyNZbOKw== =aQ5D -----END PGP SIGNATURE----- --=-=-=-- ------------=_1578951842-10376-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 12 Jan 2020 15:44:15 +0000 Received: from localhost ([127.0.0.1]:57817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqfPO-0008Vv-0k for submit@debbugs.gnu.org; Sun, 12 Jan 2020 10:44:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:58541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iqfPM-0008Vn-9J for submit@debbugs.gnu.org; Sun, 12 Jan 2020 10:44:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33557) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqfPK-0000Rj-SN for guix-patches@gnu.org; Sun, 12 Jan 2020 10:44:08 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iqfPJ-0004oz-7C for guix-patches@gnu.org; Sun, 12 Jan 2020 10:44:06 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:47086) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iqfPI-00044N-SQ for guix-patches@gnu.org; Sun, 12 Jan 2020 10:44:05 -0500 Received: (qmail 17091 invoked by uid 1009); 12 Jan 2020 16:43:55 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25691. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.008612 secs); 12 Jan 2020 15:43:55 -0000 Received: from unknown (HELO zdrowyportier.kadziolka.net) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 12 Jan 2020 16:43:55 +0100 Date: Sun, 12 Jan 2020 16:43:53 +0100 From: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= To: guix-patches@gnu.org Subject: [PATCH 1/2] gnu: xdg-utils: Don't use propagated inputs. Message-ID: <20200112154353.3xfdivef3fewlqx4@zdrowyportier.kadziolka.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 37.59.186.212 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/freedesktop.scm (xdg-utils) [propagated-inputs, inputs]: Add awk, coreutils, grep, inetutils and sed; make the dependencies not propagated. [arguments](patch-hardcoded-paths): Move to after 'install to make wrap-program function correctly. Wrap the installed programs. --- gnu/packages/freedesktop.scm | 43 +++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 7066685dee..06006ed53d 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2018 Stefan Stefanović ;;; Copyright © 2019 Reza Alizadeh Majd ;;; Copyright © 2019 Guillaume Le Vaillant +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; This file is part of GNU Guix. ;;; @@ -47,6 +48,7 @@ #:use-module (gnu packages acl) #:use-module (gnu packages admin) #:use-module (gnu packages autotools) + #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages boost) #:use-module (gnu packages check) @@ -55,6 +57,7 @@ #:use-module (gnu packages disk) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) + #:use-module (gnu packages gawk) #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) @@ -107,20 +110,40 @@ ("libxslt" ,libxslt) ("w3m" ,w3m) ("xmlto" ,xmlto))) - (propagated-inputs - `(("perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback - ("xprop" ,xprop) ; for Xfce detecting - ("xset" ,xset))) ; for xdg-screensaver + (inputs + `(("PATH:awk" ,gawk) + ("PATH:coreutils" ,coreutils) + ("PATH:grep" ,grep) + ("PATH:inetutils" ,inetutils) ; xdg-screensaver uses `hostname' + ("PATH:perl-file-mimeinfo" ,perl-file-mimeinfo) ; for mimeopen fallback + ("PATH:sed" ,sed) + ("PATH:xprop" ,xprop) ; for Xfce detecting + ("PATH:xset" ,xset))) ; for xdg-screensaver (arguments `(#: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"))) + (add-after 'install 'patch-hardcoded-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (with-directory-excursion (string-append (assoc-ref outputs "out") + "/bin") + (substitute* "xdg-mime" + (("/usr/bin/file") (which "file"))) + (substitute* "xdg-open" + (("/usr/bin/printf") (which "printf"))) + (let ((path-ext + (map (lambda (package) + (string-append package "/bin")) + (cons (assoc-ref outputs "out") + (map cdr + (filter (lambda (package) + (string-prefix? "PATH:" (car package))) + inputs)))))) + (for-each + (lambda (script) + (wrap-program script + `("PATH" ":" prefix ,path-ext))) + (find-files ".")))) #t)) (add-before 'build 'locate-catalog-files (lambda* (#:key inputs #:allow-other-keys) -- 2.24.1 ------------=_1578951842-10376-1-- From unknown Mon Jun 23 23:55:29 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39102] [PATCH v2 2/2 staging] gnu: qtbase: Open links properly without xdg-utils in profile Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 13 Jan 2020 22:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39102 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Cc: 39102-done@debbugs.gnu.org Received: via spool by 39102-done@debbugs.gnu.org id=D39102.157895468015782 (code D ref 39102); Mon, 13 Jan 2020 22:32:02 +0000 Received: (at 39102-done) by debbugs.gnu.org; 13 Jan 2020 22:31:20 +0000 Received: from localhost ([127.0.0.1]:60296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ir8Ex-00046T-To for submit@debbugs.gnu.org; Mon, 13 Jan 2020 17:31:20 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:34789) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ir8Ev-00046H-BR for 39102-done@debbugs.gnu.org; Mon, 13 Jan 2020 17:31:18 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 34B7C21B81; Mon, 13 Jan 2020 17:31:12 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 13 Jan 2020 17:31:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=zUqKbrY+TkAv6grFrh9YIsFsKf ROPuMYVP7b2CMcU3A=; b=TTnmdbTdxxp/1Nc/TcpH9hOiY+VFs7Z05ba9FzW+no Lozu2S3FL94QPG+K2Iv9QOf+KohqMeWDD3+oRjoDGhGWgTuh2dEqPIkEz2Tn1jUW ukSxoT5yXyVqFccZpNoU69+P7AD24rAQYMTrHwnG9xSUaEqXHUGvLQwgtiuKip5O 49+ZpV8OyIJAeStbPiU14OlarggVGV9Ny1A7nNk3Olhc2rlvrnB9XpH8LGwH1Ve5 xVR85bLAw8PsRlUQuqS+E5TqBVtboOD2Wssgk5fbRycrueKNNCDdkHeadPomphAF 6JcDwlhEdSpR7je7TULDBaQ8SDW2odtw//8/BovqCy6g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=zUqKbr Y+TkAv6grFrh9YIsFsKfROPuMYVP7b2CMcU3A=; b=jkfVKpVQAX+kVBE3bZqHZG d3H1HPaf4wZ8iFImC7iVaQieuPY2FuTHEslHwsNfZUhbley1gLziJZ5WySPNYdkZ Tpm3Euym8uCpe3kGqeelTpuSUjj4rgrH+hkU2TB3l70Cpu/o2jRyuqYLrqsLRRQQ cOXGLrGEGeaTUlCulbL33g5mFz1FNILNim2eQ9euzOK4PLwdzFRXC024maYOpWMK /tuaW7f5h3JOd04gJ7K+7+WmnMC85u3fNoCkbNNgy4b5SjtMWRSnwVzSip4oJXaF IhRN91Y59/8WgojHQSRE9zILcXU5gc9FYhyZtbzwAC4loaErYZBOqvuKPUBJhhIw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdejtddgudehlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufgjfhgffffkgggtsehgtd erredtreejnecuhfhrohhmpeforghrihhushcuuegrkhhkvgcuoehmsggrkhhkvgesfhgr shhtmhgrihhlrdgtohhmqeenucfkphepkeegrddvtddvrdeiledrvdehfeenucfrrghrrg hmpehmrghilhhfrhhomhepmhgsrghkkhgvsehfrghsthhmrghilhdrtghomhenucevlhhu shhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (ti0006q161-3035.bb.online.no [84.202.69.253]) by mail.messagingengine.com (Postfix) with ESMTPA id 8FCE230607B0; Mon, 13 Jan 2020 17:31:11 -0500 (EST) From: Marius Bakke In-Reply-To: <20200113215130.3afsnbsq2efiovhy@zdrowyportier.kadziolka.net> References: <20200113113945.xrozaipgq65yxwbz@zdrowyportier.kadziolka.net> <87ftgjvxqy.fsf@devup.no> <20200113215130.3afsnbsq2efiovhy@zdrowyportier.kadziolka.net> User-Agent: Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Mon, 13 Jan 2020 23:31:10 +0100 Message-ID: <877e1vvvip.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jakub K=C4=85dzio=C5=82ka writes: > On Mon, Jan 13, 2020 at 10:43:01PM +0100, Marius Bakke wrote: >> (by the way, please attach full patches instead of plain diffs, so we >> can 'git am' straight from our MUA instead of having to mangle it) > > I did! This is how format-patch generated the email, with commentary > added like you've suggested before: > >> FYI: The stray '---' here made git disregard the actual commit message, >> and instead only added the four lines above. The other way around would >> be perfect. :-) > > How should my email have looked? Ha, you're right, my bad! I had not even tried applying the patch, but it did indeed work out of the box. So I pushed it as-is in 6e332fd3706fbe81c67b50c9d6b27df18f363c34. I need to adjust my mental patch parser ;-) Thank you! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl4c764ACgkQoqBt8qM6 VPrEagf/Q5NB+HFq14cIl+LHg/fuV5B26lWHH++wRn5h2Ex0n/8Sd4CSVCJzdk+R 5soJqp1yikPpjEMfrAG5RP2CKiaGGGXK0HoHMnqU5RmA3wqkUh4EeFiNqWLVrlrc OBKe29V7EcS1lRffh22i8YN48dRK7mo4mO+2zWmnsBEkp3BCHLSv3bQm8uY1vPvD sIIbTdoV//cFdjbkurJk6mUekwtk9zpkhd1OHqCG09kD6uTKu/O5X9ndrRNl513S NU/CnYne9tHre/OYnHDjWWMSlaqlPbt8kkajtVPQPrdpLvmGiCOgau+JOgaySOq4 jpwG725kACIvfTp0JWEv5DJ/5Fxb0w== =9EEd -----END PGP SIGNATURE----- --=-=-=--