From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ILisESmLsV4sUgAA0tVLHw (envelope-from ) for ; Tue, 05 May 2020 15:50:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aPSHKjSLsV5vJQAAbx9fmQ (envelope-from ) for ; Tue, 05 May 2020 15:50:12 +0000 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CF7F0940609 for ; Tue, 5 May 2020 15:50:10 +0000 (UTC) Received: from localhost ([::1]:43918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVzpj-0002gw-Cb for larch@yhetil.org; Tue, 05 May 2020 11:50:11 -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 Content-Type: multipart/mixed; boundary="MP_/X1IZr6Hf2j0TetruM26.woW" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 X-Spam-Score: 1.59 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=disroot.org header.s=mail header.b=io+YKtZa; dmarc=fail reason="SPF not aligned (relaxed)" header.from=disroot.org (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Scan-Result: default: False [1.59 / 13.00]; GENERIC_REPUTATION(0.00)[-0.49555021846818]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:142::/48:c]; R_DKIM_REJECT(1.00)[disroot.org:s=mail]; HAS_ATTACHMENT(0.00)[]; MV_CASE(0.50)[]; DWL_DNSWL_BLOCKED(0.00)[2001:470:142::17:from]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.12), country: US(-0.00), ip: 2001:470:142::17(-0.50)]; DKIM_TRACE(0.00)[disroot.org:-]; RCPT_COUNT_TWO(0.00)[2]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; MIME_TRACE(0.00)[0:+,1:+,2:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[raghavgururajan@disroot.org,guix-patches-bounces@gnu.org]; ARC_NA(0.00)[]; URIBL_BLOCKED(0.00)[disroot.org:email]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain,text/x-patch]; HAS_LIST_UNSUB(-0.01)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_SEVEN(0.00)[9]; FORGED_SENDER_MAILLIST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[disroot.org : SPF not aligned (relaxed),none] X-TUID: 1Qrz+YPR/+AT --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--