From debbugs-submit-bounces@debbugs.gnu.org Mon May 04 13:16:58 2020 Received: (at submit) by debbugs.gnu.org; 4 May 2020 17:16:58 +0000 Received: from localhost ([127.0.0.1]:33892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVeiA-0001V6-BV for submit@debbugs.gnu.org; Mon, 04 May 2020 13:16:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:55612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVei8-0001Uy-1z for submit@debbugs.gnu.org; Mon, 04 May 2020 13:16:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVei7-0008Uf-Ls for guix-patches@gnu.org; Mon, 04 May 2020 13:16:55 -0400 Received: from knopi.disroot.org ([178.21.23.139]:34650) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1jVei5-0002lL-I4 for guix-patches@gnu.org; Mon, 04 May 2020 13:16:55 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 82EC22BEA8 for ; Mon, 4 May 2020 19:16:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1g-4l6ZGjSwX for ; Mon, 4 May 2020 19:16:47 +0200 (CEST) Date: Mon, 4 May 2020 13:16:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1588612606; bh=2FJO+xJc/gvdX6fcb7WYqo5gEXrmuHAjbVFLDPmnzrg=; h=Date:From:To:Subject; b=I/HenlFujB/CqJlUW8bvn8AoO48fwYVbvbQy4M3m3rmTUh0xoWtXdi2p7CxxRgxgS +H/TDUDXSsz7OrRDv92ijQGbRwcy/gFBb3fcVgF8JCZMK5/EkbYYXUNuK/2p/zFu8j D+ghyUnxdaJJQfT5NRYPCEuBGwNoQvITisXgIsSY5lg/qhXytJh7iNmcJDFrRHEeJ2 QpwY07x+f9CYFpurnA/fK5brbi1RSmayeG/JnqFPhhSV2+irWtXNQTaTMB2Ioxjv5v aFkEPpndohl2hFU7SBKai/41jrXB38SjMwAe9rfTDV4y+CX3Kzbo0ofsZgAjhww5je rNE6eJvlPXBYw== From: Raghav Gururajan To: guix-patches@gnu.org Subject: gnu: xfe: Fix hard-coded fhs directories. Message-ID: <20200504131624.04c6d30e.raghavgururajan@disroot.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/xCvXmL8L5nXCexRRLsOLVuB" Received-SPF: pass client-ip=178.21.23.139; envelope-from=raghavgururajan@disroot.org; helo=knopi.disroot.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 13:16:49 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.4 (-) 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: -2.4 (--) --MP_/xCvXmL8L5nXCexRRLsOLVuB Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline --MP_/xCvXmL8L5nXCexRRLsOLVuB Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-gnu-xfe-Fix-hard-coded-fhs-directories.patch >From 660f134e15438e7ee7aec1c076dca93c68e4edc6 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Mon, 4 May 2020 13:07:02 -0400 Subject: [PATCH] gnu: xfe: Fix hard-coded fhs directories. * gnu/packages/disk.scm (xfe): Fix hard-coded fhs directories. [arguments]<#:phases>['patch-xfe-paths]: Delete phase. [arguments]<#:phases>['patch-bin-dirs]: New phase. [arguments]<#:phases>['patch-share-dirs]: New phase. [inputs]: New inputs. --- gnu/packages/disk.scm | 109 ++++++++++++++++++++++++++++++++---------- 1 file changed, 83 insertions(+), 26 deletions(-) diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index 484126a3ea..69f0a131bc 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -48,6 +48,7 @@ #:use-module (gnu packages documentation) #:use-module (gnu packages elf) #:use-module (gnu packages file-systems) + #:use-module (gnu packages file) #:use-module (gnu packages fontutils) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) @@ -940,43 +941,99 @@ since they are better handled by external tools.") (sha256 (base32 "1fl51k5jm2vrfc2g66agbikzirmp0yb0lqhmsssixfb4mky3hpzs")))) (build-system gnu-build-system) - (native-inputs - `(("intltool" ,intltool) - ("pkg-config" ,pkg-config))) - (inputs - `(("fox" ,fox) - ("freetype" ,freetype) - ("x11" ,libx11) - ("xcb" ,libxcb) - ("xcb-util" ,xcb-util) - ("xft" ,libxft) - ("xrandr" ,libxrandr))) (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-xfe-paths + (add-after 'unpack 'patch-bin-dirs + (lambda* (#:key inputs #:allow-other-keys) + (let* + ((sh + (string-append + (assoc-ref inputs "bash") "/bin/sh")) + (du + (string-append + (assoc-ref inputs "coreutils") "/bin/du")) + (sort + (string-append + (assoc-ref inputs "coreutils") "/bin/sort")) + (cut + (string-append + (assoc-ref inputs "coreutils") "/bin/cut")) + (ls + (string-append + (assoc-ref inputs "coreutils") "/bin/ls")) + (xargs + (string-append + (assoc-ref inputs "findutils") "/bin/xargs")) + (file + (string-append + (assoc-ref inputs "file") "/bin/file"))) + (substitute* "src/FilePanel.cpp" + (("/bin/sh") sh) + (("/usr/bin/du") du) + (("/usr/bin/sort") sort) + (("/usr/bin/cut") cut) + (("/usr/bin/xargs") xargs)) + (substitute* "src/help.h" + (("/bin/sh") sh) + (("/bin/ls") ls)) + (substitute* "src/SearchPanel.cpp" + (("/usr/bin/du") du) + (("/usr/bin/sort") sort) + (("/usr/bin/cut") cut) + (("/usr/bin/xargs") xargs)) + (substitute* "src/startupnotification.cpp" + (("/bin/sh") sh)) + (substitute* "src/xfeutils.cpp" + (("/usr/bin/file") file)) + #t))) + (add-after 'unpack 'patch-share-dirs (lambda* (#:key outputs #:allow-other-keys) (let* - ((out (assoc-ref outputs "out")) - (share (string-append out "/share")) - (xferc (string-append out "/share/xfe/xferc")) - (xfe-theme (string-append out "/share/xfe/icons/xfe-theme"))) - ;; Correct path for xfe registry. + ((out + (assoc-ref outputs "out")) + (share + (string-append out "/share")) + (xfe + (string-append out "/share/xfe")) + (xferc + (string-append out "/share/xfe/xferc")) + (icons + (string-append out "/share/xfe/icons")) + (xfe-theme + (string-append out "/share/xfe/icons/xfe-theme"))) (substitute* "src/foxhacks.cpp" - (("/etc:/usr/share:/usr/local/share") share)) - ;; Correct path for xfe configuration. + (("/usr/share") share) + (("/usr/local/share") share)) + (substitute* "src/help.h" + (("/usr/share/xfe") xfe) + (("/usr/local/share/xfe") xfe) + (("/opt/local/share/xfe") xfe) + (("/usr/share/xfe/icons/xfe-theme") xfe-theme) + (("/usr/local/share/xfe/icons/xfe-theme") xfe-theme)) + (substitute* "src/xfedefs.h" + (("/usr/share/xfe/icons") icons) + (("/usr/local/share/xfe/icons") icons)) (substitute* "src/XFileExplorer.cpp" (("/usr/share/xfe/xferc") xferc) (("/usr/local/share/xfe/xferc") xferc) (("/opt/local/share/xfe/xferc") xferc)) - ;; Correct path for xfe icons. - (substitute* "src/xfedefs.h" - (((string-append - "~/.config/xfe/icons/xfe-theme:" - "/usr/local/share/xfe/icons/xfe-theme:" - "/usr/share/xfe/icons/xfe-theme")) - xfe-theme)) #t)))))) + (native-inputs + `(("intltool" ,intltool) + ("pkg-config" ,pkg-config))) + (inputs + `(("bash" ,bash) + ("coreutils" ,coreutils) + ("file" ,file) + ("findutils" ,findutils) + ("fox" ,fox) + ("freetype" ,freetype) + ("x11" ,libx11) + ("xcb" ,libxcb) + ("xcb-util" ,xcb-util) + ("xft" ,libxft) + ("xrandr" ,libxrandr))) (synopsis "File Manager for X-Based Graphical Systems") (description"XFE (X File Explorer) is a file manager for X. It is based on the popular but discontinued, X Win Commander. It aims to be the file manager -- 2.26.2 --MP_/xCvXmL8L5nXCexRRLsOLVuB-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 04 17:05:01 2020 Received: (at 41083) by debbugs.gnu.org; 4 May 2020 21:05:01 +0000 Received: from localhost ([127.0.0.1]:34144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jViGr-0007C7-Hx for submit@debbugs.gnu.org; Mon, 04 May 2020 17:05:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jViGp-0007Bu-Mb for 41083@debbugs.gnu.org; Mon, 04 May 2020 17:05:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40590) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jViGj-00055K-Mw; Mon, 04 May 2020 17:04:53 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54844 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jViGg-0003kd-CY; Mon, 04 May 2020 17:04:51 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Raghav Gururajan Subject: Re: [bug#41083] gnu: xfe: Fix hard-coded fhs directories. References: <20200504131624.04c6d30e.raghavgururajan@disroot.org> Date: Mon, 04 May 2020 23:04:48 +0200 In-Reply-To: <20200504131624.04c6d30e.raghavgururajan@disroot.org> (Raghav Gururajan's message of "Mon, 4 May 2020 13:16:24 -0400") Message-ID: <878si7pg27.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41083 Cc: 41083@debbugs.gnu.org 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: -3.3 (---) Hello! Raghav Gururajan skribis: >>>From 660f134e15438e7ee7aec1c076dca93c68e4edc6 Mon Sep 17 00:00:00 2001 > From: Raghav Gururajan > Date: Mon, 4 May 2020 13:07:02 -0400 > Subject: [PATCH] gnu: xfe: Fix hard-coded fhs directories. > > * gnu/packages/disk.scm (xfe): Fix hard-coded fhs directories. > [arguments]<#:phases>['patch-xfe-paths]: Delete phase. > [arguments]<#:phases>['patch-bin-dirs]: New phase. > [arguments]<#:phases>['patch-share-dirs]: New phase. > [inputs]: New inputs. Nitpick: You don=E2=80=99t need to mention #:phases above, and the angle brackets are inappropriate for inputs. See =E2=80=98git log=E2=80=99 for e= xamples. > - (native-inputs > - `(("intltool" ,intltool) > - ("pkg-config" ,pkg-config))) > - (inputs > - `(("fox" ,fox) > - ("freetype" ,freetype) > - ("x11" ,libx11) > - ("xcb" ,libxcb) > - ("xcb-util" ,xcb-util) > - ("xft" ,libxft) > - ("xrandr" ,libxrandr))) To reduce review time :-), it=E2=80=99s a good idea to avoid unnecessary changes. In this case, you should avoid moving things around because that makes the patch harder to read. > + (substitute* "src/FilePanel.cpp" > + (("/bin/sh") sh) > + (("/usr/bin/du") du) > + (("/usr/bin/sort") sort) > + (("/usr/bin/cut") cut) > + (("/usr/bin/xargs") xargs)) > + (substitute* "src/help.h" > + (("/bin/sh") sh) > + (("/bin/ls") ls)) > + (substitute* "src/SearchPanel.cpp" > + (("/usr/bin/du") du) > + (("/usr/bin/sort") sort) > + (("/usr/bin/cut") cut) > + (("/usr/bin/xargs") xargs)) > + (substitute* "src/startupnotification.cpp" > + (("/bin/sh") sh)) > + (substitute* "src/xfeutils.cpp" > + (("/usr/bin/file") file)) I think you can just define a variable like: (coreutils (assoc-ref inputs "coreutils")) and then use (string-append coreutils "/bin/sort") and so on, instead of defining many variables that have a single user. > (let* > - ((out (assoc-ref outputs "out")) > - (share (string-append out "/share")) > - (xferc (string-append out "/share/xfe/xferc")) > - (xfe-theme (string-append out "/share/xfe/icons/xfe-= theme"))) > - ;; Correct path for xfe registry. > + ((out > + (assoc-ref outputs "out")) > + (share > + (string-append out "/share")) > + (xfe > + (string-append out "/share/xfe")) Avoid the indentation changes (previous version was fine, although we usually start the list of bindings on the same line as =E2=80=98let*=E2=80= =99). > - ;; Correct path for xfe icons. > - (substitute* "src/xfedefs.h" > - (((string-append > - "~/.config/xfe/icons/xfe-theme:" > - "/usr/local/share/xfe/icons/xfe-theme:" > - "/usr/share/xfe/icons/xfe-theme")) > - xfe-theme)) The ~/.config/xfe bit is going away, right? Could you send an updated patch? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon May 04 17:18:57 2020 Received: (at 41083) by debbugs.gnu.org; 4 May 2020 21:18:57 +0000 Received: from localhost ([127.0.0.1]:34177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jViUK-0007Xc-NQ for submit@debbugs.gnu.org; Mon, 04 May 2020 17:18:56 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:45697) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jViUI-0007XN-7A for 41083@debbugs.gnu.org; Mon, 04 May 2020 17:18:55 -0400 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay10.mail.gandi.net (Postfix) with ESMTPSA id E5C16240007; Mon, 4 May 2020 21:18:46 +0000 (UTC) From: Nicolas Goaziou To: Raghav Gururajan Subject: Re: [bug#41083] gnu: xfe: Fix hard-coded fhs directories. References: <20200504131624.04c6d30e.raghavgururajan@disroot.org> Date: Mon, 04 May 2020 23:18:45 +0200 In-Reply-To: <20200504131624.04c6d30e.raghavgururajan@disroot.org> (Raghav Gururajan's message of "Mon, 4 May 2020 13:16:24 -0400") Message-ID: <878si72ybu.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41083 Cc: 41083@debbugs.gnu.org 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 (-) Hello, Raghav Gururajan writes: > From 660f134e15438e7ee7aec1c076dca93c68e4edc6 Mon Sep 17 00:00:00 2001 > From: Raghav Gururajan > Date: Mon, 4 May 2020 13:07:02 -0400 > Subject: [PATCH] gnu: xfe: Fix hard-coded fhs directories. Thank you. Some cosmetics comments follow. > + (add-after 'unpack 'patch-bin-dirs > + (lambda* (#:key inputs #:allow-other-keys) > + (let* > + ((sh > + (string-append > + (assoc-ref inputs "bash") "/bin/sh")) This indentation is unusual. I think it would be clearer to write (let* ((sh (string-append (assoc-ref inputs "bash") "/bin/sh")))) I suggest the following simplification, however: (let* ((bash (assoc-ref inputs "bash")) (coreutils (assoc-ref inputs "coreutils")) (findutils (assoc-ref inputs "findutils")) (file (assoc-ref inputs "file"))) ...) See below for the consequences of this modification. > + (du > + (string-append > + (assoc-ref inputs "coreutils") "/bin/du")) > + (sort > + (string-append > + (assoc-ref inputs "coreutils") "/bin/sort")) > + (cut > + (string-append > + (assoc-ref inputs "coreutils") "/bin/cut")) Indentation is off here. > + (substitute* "src/FilePanel.cpp" `substitute*' accepts a list of files as its first argument. Please consider using the following, assuming you applied the simplification above. (with-directory-excursion "src" (substitute* '("FilePanel.cpp" "help.h" "SearchPanel.cpp" ...) (("/bin/sh" file) (string-append bash file)) (("/usr(/bin/du)" _ file) (string-append coreutils file)) ...)) > + ((out > + (assoc-ref outputs "out")) These should be on the same line. > + (share > + (string-append out "/share")) > + (xfe > + (string-append out "/share/xfe")) Ditto. You can also re-use share. > + (xferc > + (string-append out "/share/xfe/xferc")) Ditto. You can re-use xfe. > + (icons > + (string-append out "/share/xfe/icons")) > + (xfe-theme > + (string-append out "/share/xfe/icons/xfe-theme"))) > (substitute* "src/foxhacks.cpp" > - (("/etc:/usr/share:/usr/local/share") share)) > - ;; Correct path for xfe configuration. > + (("/usr/share") share) > + (("/usr/local/share") share)) > + (substitute* "src/help.h" > + (("/usr/share/xfe") xfe) > + (("/usr/local/share/xfe") xfe) > + (("/opt/local/share/xfe") xfe) > + (("/usr/share/xfe/icons/xfe-theme") xfe-theme) > + (("/usr/local/share/xfe/icons/xfe-theme") xfe-theme)) > + (substitute* "src/xfedefs.h" > + (("/usr/share/xfe/icons") icons) > + (("/usr/local/share/xfe/icons") icons)) Wouldn't it be simpler to replace "/(usr|opt)(/local)?" with `out' in all files? > (description"XFE (X File Explorer) is a file manager for X. It is based on ^^^^^^ missing space here Could you send an updated patch? Regards, -- Nicolas Goaziou From debbugs-submit-bounces@debbugs.gnu.org Tue May 05 11:37:20 2020 Received: (at 41083) by debbugs.gnu.org; 5 May 2020 15:37:20 +0000 Received: from localhost ([127.0.0.1]:37153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVzdI-0001vO-50 for submit@debbugs.gnu.org; Tue, 05 May 2020 11:37:20 -0400 Received: from knopi.disroot.org ([178.21.23.139]:46412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVzdF-0001vF-SB for 41083@debbugs.gnu.org; Tue, 05 May 2020 11:37:19 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 42DB52E5FE; Tue, 5 May 2020 17:37:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lJIN0jsZxOn4; Tue, 5 May 2020 17:37:14 +0200 (CEST) Date: Tue, 5 May 2020 11:36:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1588693034; bh=LmxySuSi9OYClIcIddx6TkixBccJm7Y88o2ftstSYig=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=io+YKtZauGel3aq+c483RtnTn7s/eUrK7ghACORX6+ata2+75FJ374ngnecybF+2t Ypl4p43BefI0Bp7asvGoPIZqkFzmEs9+OBb/oANDvRfR8GzJI9dAXRLO8nwlEFbuiw d+9LyDKUdLZxxqVPiodRW9WQqXs0CION0Ty+wJQ0ykASq03Hw+VxZyCY4OXnlnMcWe WcFXrWLOhaxcgrUXk9RNQpwBfU5ZoY6Fnfi7IX+iQwe9RCEEYt5S5grBhB5TcmFMhI /SaCzCFkNuzCXRep/4SBNvIXYnrOMDBOq8ydt1/UDtP4aHmH3iMsF2Ed/ejOkznA/o BroXIO7whQteg== From: Raghav Gururajan To: Nicolas Goaziou Subject: Re: [bug#41083] gnu: xfe: Fix hard-coded fhs directories. Message-ID: <20200505113651.2211d734.raghavgururajan@disroot.org> In-Reply-To: <878si72ybu.fsf@nicolasgoaziou.fr> References: <20200504131624.04c6d30e.raghavgururajan@disroot.org> <878si72ybu.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/X1IZr6Hf2j0TetruM26.woW" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41083 Cc: 41083@debbugs.gnu.org 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 (-) --MP_/X1IZr6Hf2j0TetruM26.woW Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello Nicolas! > This indentation is unusual. I think it would be clearer to write > > (let* ((sh (string-append (assoc-ref inputs "bash") > "/bin/sh")))) > > I suggest the following simplification, however: > > (let* ((bash (assoc-ref inputs "bash")) > (coreutils (assoc-ref inputs "coreutils")) > (findutils (assoc-ref inputs "findutils")) > (file (assoc-ref inputs "file"))) > ...) > > See below for the consequences of this modification. Thanks! I used this. > `substitute*' accepts a list of files as its first argument. Please > consider using the following, assuming you applied the simplification > above. > > (with-directory-excursion "src" > (substitute* '("FilePanel.cpp" "help.h" "SearchPanel.cpp" ...) > (("/bin/sh" file) (string-append bash file)) > (("/usr(/bin/du)" _ file) (string-append coreutils file)) > ...)) Thanks! I used this. > > + ((out > > + (assoc-ref outputs "out")) > > These should be on the same line. My new patch somehow has correct indentation. > Wouldn't it be simpler to replace "/(usr|opt)(/local)?" with `out' in > all files? Thanks! I used this. But the above would conflict with "/usr/bin". So I used "/(usr|opt)(/local)?/share". > > (description"XFE (X File Explorer) is a file manager for X. It is > > based on > ^^^^^^ > missing space here Fixed! > Could you send an updated patch? Please find updated patch attached with this email. Regards, RG. --MP_/X1IZr6Hf2j0TetruM26.woW Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-gnu-xfe-Fix-hard-coded-fhs-directories.patch >From e7032ff0032bbdbaefa8505f9f882fc6df58adaf Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Tue, 5 May 2020 11:22:01 -0400 Subject: [PATCH] gnu: xfe: Fix hard-coded fhs directories. * gnu/packages/disk.scm (xfe): [arguments]: Remove phase 'patch-xfe-paths. [arguments]: Add phases 'patch-bin-dirs and 'patch-share-dirs. [inputs]: Add bash, coreutils, file and findutils. --- gnu/packages/disk.scm | 66 +++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index 484126a3ea..e018df33fb 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -48,6 +48,7 @@ #:use-module (gnu packages documentation) #:use-module (gnu packages elf) #:use-module (gnu packages file-systems) + #:use-module (gnu packages file) #:use-module (gnu packages fontutils) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) @@ -940,45 +941,54 @@ since they are better handled by external tools.") (sha256 (base32 "1fl51k5jm2vrfc2g66agbikzirmp0yb0lqhmsssixfb4mky3hpzs")))) (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-bin-dirs + (lambda* (#:key inputs #:allow-other-keys) + (let* + ((bash (assoc-ref inputs "bash")) + (coreutils (assoc-ref inputs "coreutils")) + (findutils (assoc-ref inputs "findutils")) + (file-prog (assoc-ref inputs "file"))) + (with-directory-excursion "src" + (substitute* '("FilePanel.cpp" "help.h" "SearchPanel.cpp" + "startupnotification.cpp" "xfeutils.cpp") + (("/bin/sh" file) (string-append bash file)) + (("/bin/ls" file) (string-append coreutils file)) + (("/usr(/bin/du)" _ file) (string-append coreutils file)) + (("/usr(/bin/sort)" _ file) (string-append coreutils file)) + (("/usr(/bin/cut)" _ file) (string-append coreutils file)) + (("/usr(/bin/xargs)" _ file) (string-append findutils file)) + (("/usr(/bin/file)" _ file) (string-append file-prog file)))) + #t))) + (add-after 'unpack 'patch-share-dirs + (lambda* (#:key outputs #:allow-other-keys) + (let* + ((out (assoc-ref outputs "out")) + (share (string-append out "/share"))) + (with-directory-excursion "src" + (substitute* '("foxhacks.cpp" "help.h" "xfedefs.h" + "XFileExplorer.cpp") + (("/(usr|opt)(/local)?/share") share))) + #t)))))) (native-inputs `(("intltool" ,intltool) ("pkg-config" ,pkg-config))) (inputs - `(("fox" ,fox) + `(("bash" ,bash) + ("coreutils" ,coreutils) + ("file" ,file) + ("findutils" ,findutils) + ("fox" ,fox) ("freetype" ,freetype) ("x11" ,libx11) ("xcb" ,libxcb) ("xcb-util" ,xcb-util) ("xft" ,libxft) ("xrandr" ,libxrandr))) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-xfe-paths - (lambda* (#:key outputs #:allow-other-keys) - (let* - ((out (assoc-ref outputs "out")) - (share (string-append out "/share")) - (xferc (string-append out "/share/xfe/xferc")) - (xfe-theme (string-append out "/share/xfe/icons/xfe-theme"))) - ;; Correct path for xfe registry. - (substitute* "src/foxhacks.cpp" - (("/etc:/usr/share:/usr/local/share") share)) - ;; Correct path for xfe configuration. - (substitute* "src/XFileExplorer.cpp" - (("/usr/share/xfe/xferc") xferc) - (("/usr/local/share/xfe/xferc") xferc) - (("/opt/local/share/xfe/xferc") xferc)) - ;; Correct path for xfe icons. - (substitute* "src/xfedefs.h" - (((string-append - "~/.config/xfe/icons/xfe-theme:" - "/usr/local/share/xfe/icons/xfe-theme:" - "/usr/share/xfe/icons/xfe-theme")) - xfe-theme)) - #t)))))) (synopsis "File Manager for X-Based Graphical Systems") - (description"XFE (X File Explorer) is a file manager for X. It is based on + (description "XFE (X File Explorer) is a file manager for X. It is based on the popular but discontinued, X Win Commander. It aims to be the file manager of choice for all light thinking Unix addicts!") (home-page "http://roland65.free.fr/xfe/") -- 2.26.2 --MP_/X1IZr6Hf2j0TetruM26.woW-- From debbugs-submit-bounces@debbugs.gnu.org Tue May 05 11:45:14 2020 Received: (at 41083) by debbugs.gnu.org; 5 May 2020 15:45:14 +0000 Received: from localhost ([127.0.0.1]:37158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVzkw-00027Q-4m for submit@debbugs.gnu.org; Tue, 05 May 2020 11:45:14 -0400 Received: from knopi.disroot.org ([178.21.23.139]:35008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVzkt-00027E-Ij for 41083@debbugs.gnu.org; Tue, 05 May 2020 11:45:12 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 1C5642C990; Tue, 5 May 2020 17:45:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id l6vPRcpZArEu; Tue, 5 May 2020 17:45:08 +0200 (CEST) Date: Tue, 5 May 2020 11:44:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1588693507; bh=lo1+U0g2zrsI9iAslf8wy1nawsnd+ombkUUbMTnBj08=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=cPTaP0R87+o9lrJRR3j+wmzTFAI1rIgjC5tNnO6j/t8xGYBj22HPNYYrKDq/qr8Uo 9GTJWVvUTJ6OS1BqCH7v9ohM2kTSIGb+uhiCQuXfDEzUBBS4sDnpQimF2TbmTSwYAC RZd5MJBCZ/zTmhDBMqJ8drJmz9DWh8UQYQTsL9KCBu5byZ3l6o4TFLr1kg9xNuaNWf 84XFQo/MXBWhGmizYMLV7wpxP96Rpdh6TkHmls8iafLpFJRnhDNz+zLj4AcvPBA6SU kMCALPkDfMdXUulgGmO2+SXmxpQWJHA+RN1bBApHtxRa1+aKCjtZa4LRc/8DQLNfMa 1sfISdWUmb8DA== From: Raghav Gururajan To: Ludovic =?UTF-8?B?Q291cnTDqHM=?= Subject: Re: [bug#41083] gnu: xfe: Fix hard-coded fhs directories. Message-ID: <20200505114444.5cf4081f.raghavgururajan@disroot.org> In-Reply-To: <878si7pg27.fsf@gnu.org> References: <20200504131624.04c6d30e.raghavgururajan@disroot.org> <878si7pg27.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/9pG9IO_tLb_JfAv.HiOo0U0" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41083 Cc: 41083@debbugs.gnu.org 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 (-) --MP_/9pG9IO_tLb_JfAv.HiOo0U0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello Ludo! > Nitpick: You don=E2=80=99t need to mention #:phases above, and the angle > brackets are inappropriate for inputs. See =E2=80=98git log=E2=80=99 for= examples. Fixed! =20 > To reduce review time :-), it=E2=80=99s a good idea to avoid unnecessary > changes. In this case, you should avoid moving things around because > that makes the patch harder to read. Sorry about that. I was making the definition consistent with the order mentioned in https://guix.gnu.org/manual/en/html_node/Defining-Packages.html#Defining-Pa= ckages > I think you can just define a variable like: >=20 > (coreutils (assoc-ref inputs "coreutils")) >=20 > and then use (string-append coreutils "/bin/sort") and so on, instead of > defining many variables that have a single user. > > Avoid the indentation changes (previous version was fine, although we > usually start the list of bindings on the same line as =E2=80=98let*=E2= =80=99). I have changed some things in my new patch. > The ~/.config/xfe bit is going away, right? No. It is not necessary to remove it, as it is only an alternative dir. Xfe= now looks in 'out', if ~/.config/xfe doesn't exist. :-)=20 > Could you send an updated patch? Please find the updated patch attached with this email. Regards, RG. --MP_/9pG9IO_tLb_JfAv.HiOo0U0 Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-gnu-xfe-Fix-hard-coded-fhs-directories.patch >From e7032ff0032bbdbaefa8505f9f882fc6df58adaf Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Tue, 5 May 2020 11:22:01 -0400 Subject: [PATCH] gnu: xfe: Fix hard-coded fhs directories. * gnu/packages/disk.scm (xfe): [arguments]: Remove phase 'patch-xfe-paths. [arguments]: Add phases 'patch-bin-dirs and 'patch-share-dirs. [inputs]: Add bash, coreutils, file and findutils. --- gnu/packages/disk.scm | 66 +++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index 484126a3ea..e018df33fb 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -48,6 +48,7 @@ #:use-module (gnu packages documentation) #:use-module (gnu packages elf) #:use-module (gnu packages file-systems) + #:use-module (gnu packages file) #:use-module (gnu packages fontutils) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) @@ -940,45 +941,54 @@ since they are better handled by external tools.") (sha256 (base32 "1fl51k5jm2vrfc2g66agbikzirmp0yb0lqhmsssixfb4mky3hpzs")))) (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-bin-dirs + (lambda* (#:key inputs #:allow-other-keys) + (let* + ((bash (assoc-ref inputs "bash")) + (coreutils (assoc-ref inputs "coreutils")) + (findutils (assoc-ref inputs "findutils")) + (file-prog (assoc-ref inputs "file"))) + (with-directory-excursion "src" + (substitute* '("FilePanel.cpp" "help.h" "SearchPanel.cpp" + "startupnotification.cpp" "xfeutils.cpp") + (("/bin/sh" file) (string-append bash file)) + (("/bin/ls" file) (string-append coreutils file)) + (("/usr(/bin/du)" _ file) (string-append coreutils file)) + (("/usr(/bin/sort)" _ file) (string-append coreutils file)) + (("/usr(/bin/cut)" _ file) (string-append coreutils file)) + (("/usr(/bin/xargs)" _ file) (string-append findutils file)) + (("/usr(/bin/file)" _ file) (string-append file-prog file)))) + #t))) + (add-after 'unpack 'patch-share-dirs + (lambda* (#:key outputs #:allow-other-keys) + (let* + ((out (assoc-ref outputs "out")) + (share (string-append out "/share"))) + (with-directory-excursion "src" + (substitute* '("foxhacks.cpp" "help.h" "xfedefs.h" + "XFileExplorer.cpp") + (("/(usr|opt)(/local)?/share") share))) + #t)))))) (native-inputs `(("intltool" ,intltool) ("pkg-config" ,pkg-config))) (inputs - `(("fox" ,fox) + `(("bash" ,bash) + ("coreutils" ,coreutils) + ("file" ,file) + ("findutils" ,findutils) + ("fox" ,fox) ("freetype" ,freetype) ("x11" ,libx11) ("xcb" ,libxcb) ("xcb-util" ,xcb-util) ("xft" ,libxft) ("xrandr" ,libxrandr))) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-xfe-paths - (lambda* (#:key outputs #:allow-other-keys) - (let* - ((out (assoc-ref outputs "out")) - (share (string-append out "/share")) - (xferc (string-append out "/share/xfe/xferc")) - (xfe-theme (string-append out "/share/xfe/icons/xfe-theme"))) - ;; Correct path for xfe registry. - (substitute* "src/foxhacks.cpp" - (("/etc:/usr/share:/usr/local/share") share)) - ;; Correct path for xfe configuration. - (substitute* "src/XFileExplorer.cpp" - (("/usr/share/xfe/xferc") xferc) - (("/usr/local/share/xfe/xferc") xferc) - (("/opt/local/share/xfe/xferc") xferc)) - ;; Correct path for xfe icons. - (substitute* "src/xfedefs.h" - (((string-append - "~/.config/xfe/icons/xfe-theme:" - "/usr/local/share/xfe/icons/xfe-theme:" - "/usr/share/xfe/icons/xfe-theme")) - xfe-theme)) - #t)))))) (synopsis "File Manager for X-Based Graphical Systems") - (description"XFE (X File Explorer) is a file manager for X. It is based on + (description "XFE (X File Explorer) is a file manager for X. It is based on the popular but discontinued, X Win Commander. It aims to be the file manager of choice for all light thinking Unix addicts!") (home-page "http://roland65.free.fr/xfe/") -- 2.26.2 --MP_/9pG9IO_tLb_JfAv.HiOo0U0-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 11:40:34 2020 Received: (at 41083-done) by debbugs.gnu.org; 6 May 2020 15:40:34 +0000 Received: from localhost ([127.0.0.1]:40903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWM9x-0004OE-PB for submit@debbugs.gnu.org; Wed, 06 May 2020 11:40:33 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:57331) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWM9w-0004O2-Ht for 41083-done@debbugs.gnu.org; Wed, 06 May 2020 11:40:32 -0400 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 45985240022; Wed, 6 May 2020 15:39:17 +0000 (UTC) From: Nicolas Goaziou To: Raghav Gururajan Subject: Re: [bug#41083] gnu: xfe: Fix hard-coded fhs directories. References: <20200504131624.04c6d30e.raghavgururajan@disroot.org> <878si7pg27.fsf@gnu.org> <20200505114444.5cf4081f.raghavgururajan@disroot.org> Date: Wed, 06 May 2020 17:39:16 +0200 In-Reply-To: <20200505114444.5cf4081f.raghavgururajan@disroot.org> (Raghav Gururajan's message of "Tue, 5 May 2020 11:44:44 -0400") Message-ID: <87y2q59ior.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41083-done Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , 41083-done@debbugs.gnu.org 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 (-) Hello, Raghav Gururajan writes: > Please find the updated patch attached with this email. Thank you. I applied it, with the following few cosmetics changes. > Subject: [PATCH] gnu: xfe: Fix hard-coded fhs directories. > > * gnu/packages/disk.scm (xfe): > [arguments]: Remove phase 'patch-xfe-paths. > [arguments]: Add phases 'patch-bin-dirs and 'patch-share-dirs. I merged these two lines. > + (lambda* (#:key inputs #:allow-other-keys) > + (let* > + ((bash (assoc-ref inputs "bash")) I moved the bash binding onto the same line as let*. > + (lambda* (#:key outputs #:allow-other-keys) > + (let* > + ((out (assoc-ref outputs "out")) Ditto. Regards, -- Nicolas Goaziou From debbugs-submit-bounces@debbugs.gnu.org Wed May 06 11:52:42 2020 Received: (at 41083-done) by debbugs.gnu.org; 6 May 2020 15:52:42 +0000 Received: from localhost ([127.0.0.1]:40917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWMLi-0004h3-2t for submit@debbugs.gnu.org; Wed, 06 May 2020 11:52:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jWMLg-0004gq-LW for 41083-done@debbugs.gnu.org; Wed, 06 May 2020 11:52:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57445) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWMLa-0006rf-P7; Wed, 06 May 2020 11:52:34 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=33186 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jWMLZ-0003zx-Df; Wed, 06 May 2020 11:52:34 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Raghav Gururajan Subject: Re: [bug#41083] gnu: xfe: Fix hard-coded fhs directories. References: <20200504131624.04c6d30e.raghavgururajan@disroot.org> <878si7pg27.fsf@gnu.org> <20200505114444.5cf4081f.raghavgururajan@disroot.org> Date: Wed, 06 May 2020 17:52:30 +0200 In-Reply-To: <20200505114444.5cf4081f.raghavgururajan@disroot.org> (Raghav Gururajan's message of "Tue, 5 May 2020 11:44:44 -0400") Message-ID: <87o8r1f4ch.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41083-done Cc: 41083-done@debbugs.gnu.org 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: -3.3 (---) Hi, Raghav Gururajan skribis: >>>From e7032ff0032bbdbaefa8505f9f882fc6df58adaf Mon Sep 17 00:00:00 2001 > From: Raghav Gururajan > Date: Tue, 5 May 2020 11:22:01 -0400 > Subject: [PATCH] gnu: xfe: Fix hard-coded fhs directories. > > * gnu/packages/disk.scm (xfe): > [arguments]: Remove phase 'patch-xfe-paths. > [arguments]: Add phases 'patch-bin-dirs and 'patch-share-dirs. > [inputs]: Add bash, coreutils, file and findutils. Great. Applied, thanks! (And thanks to Nicolas as well.) Ludo=E2=80=99. From unknown Sat Sep 13 20:49:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 04 Jun 2020 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator