From patchwork Tue May 5 15:36:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghav Gururajan X-Patchwork-Id: 21905 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4A38527BBE3; Tue, 5 May 2020 16:50:05 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) by mira.cbaines.net (Postfix) with ESMTP id B761E27BBE1 for ; Tue, 5 May 2020 16:50:04 +0100 (BST) Received: from localhost ([::1]:43918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVzpc-0002gw-AX for patchwork@mira.cbaines.net; Tue, 05 May 2020 11:50:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVzdx-0004N7-W9 for guix-patches@gnu.org; Tue, 05 May 2020 11:38:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVzdx-00042D-NB for guix-patches@gnu.org; Tue, 05 May 2020 11:38:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jVzdx-0001wO-KI for guix-patches@gnu.org; Tue, 05 May 2020 11:38:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41083] gnu: xfe: Fix hard-coded fhs directories. Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 May 2020 15:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41083 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Nicolas Goaziou Cc: 41083@debbugs.gnu.org Received: via spool by 41083-submit@debbugs.gnu.org id=B41083.15886930407407 (code B ref 41083); Tue, 05 May 2020 15:38:01 +0000 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 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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. 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