X-Loop: help-debbugs@HIDDEN Subject: bug#50625: ghostscript shell scripts refer to unqualified external commands Resent-From: Jack Hill <jackhill@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guix@HIDDEN Resent-Date: Thu, 16 Sep 2021 15:29:02 +0000 Resent-Message-ID: <handler.50625.B.163180613221891 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 50625 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 50625 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-guix@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.163180613221891 (code B ref -1); Thu, 16 Sep 2021 15:29:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Sep 2021 15:28:52 +0000 Received: from localhost ([127.0.0.1]:56247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1mQtJj-0005h0-GO for submit <at> debbugs.gnu.org; Thu, 16 Sep 2021 11:28:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:35088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <jackhill@HIDDEN>) id 1mQtJc-0005gi-6Q for submit <at> debbugs.gnu.org; Thu, 16 Sep 2021 11:28:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <jackhill@HIDDEN>) id 1mQtJb-0007rm-Vc for bug-guix@HIDDEN; Thu, 16 Sep 2021 11:28:43 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:38718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <jackhill@HIDDEN>) id 1mQtJa-0000o1-AQ for bug-guix@HIDDEN; Thu, 16 Sep 2021 11:28:43 -0400 Received: from marsh.hcoop.net ([45.55.52.66]) by minsky.hcoop.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <jackhill@HIDDEN>) id 1mQtJY-0003f0-Kk for bug-guix@HIDDEN; Thu, 16 Sep 2021 11:28:40 -0400 Date: Thu, 16 Sep 2021 11:28:40 -0400 (EDT) From: Jack Hill <jackhill@HIDDEN> X-X-Sender: jackhill@HIDDEN Message-ID: <alpine.DEB.2.21.2109161121570.4243@HIDDEN> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Received-SPF: pass client-ip=104.248.1.95; envelope-from=jackhill@HIDDEN; helo=minsky.hcoop.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.4 (--) Hi Guix, Many of the commands, e.g. ps2pdf, provided by the ghostscript package are implemented as shell scripts that do some argument or file name processing before invoking the main gs binary. These scripts invoke external commands like basename, awk, dirname, and even gs by dynamically looking them up PATH. Instead, they should refer to a specific path in the store so that the behavior of ghostscript doesn't depend on the environment and so that Guix can see these references. Best, Jack
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Jack Hill <jackhill@HIDDEN> Subject: bug#50625: Acknowledgement (ghostscript shell scripts refer to unqualified external commands) Message-ID: <handler.50625.B.163180613221891.ack <at> debbugs.gnu.org> References: <alpine.DEB.2.21.2109161121570.4243@HIDDEN> X-Gnu-PR-Message: ack 50625 X-Gnu-PR-Package: guix Reply-To: 50625 <at> debbugs.gnu.org Date: Thu, 16 Sep 2021 15:29:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-guix@HIDDEN If you wish to submit further information on this problem, please send it to 50625 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 50625: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D50625 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#50625: ghostscript shell scripts refer to unqualified external commands Resent-From: zimoun <zimon.toutoune@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-guix@HIDDEN Resent-Date: Fri, 17 Sep 2021 14:46:02 +0000 Resent-Message-ID: <handler.50625.B50625.163188991322825 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 50625 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Jack Hill <jackhill@HIDDEN> Cc: 50625 <at> debbugs.gnu.org Received: via spool by 50625-submit <at> debbugs.gnu.org id=B50625.163188991322825 (code B ref 50625); Fri, 17 Sep 2021 14:46:02 +0000 Received: (at 50625) by debbugs.gnu.org; 17 Sep 2021 14:45:13 +0000 Received: from localhost ([127.0.0.1]:60876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1mRF73-0005vm-Fx for submit <at> debbugs.gnu.org; Fri, 17 Sep 2021 10:45:13 -0400 Received: from mail-qt1-f180.google.com ([209.85.160.180]:41599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <zimon.toutoune@HIDDEN>) id 1mRF71-0005o0-5m for 50625 <at> debbugs.gnu.org; Fri, 17 Sep 2021 10:45:12 -0400 Received: by mail-qt1-f180.google.com with SMTP id u21so8931116qtw.8 for <50625 <at> debbugs.gnu.org>; Fri, 17 Sep 2021 07:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aTpARAlgz7Gbw3yUKCRy6ZdI4oxgXd7di6inTrHnmCc=; b=G+A8gNk9TvvDzE979Wz3Fk7yI2OYud1PfcKhYFw2C0Hqj/wnpMt/rIayaCnDBcpwxK CU8mNulqb89l8/nJHxXYP0UeYq+ywwHXWnQNHiJQOlaNW/6X5MM5efSv+MU9CXtFw33Q qcF/buCt6LdQBkuAZmGz385vNG/tpbjb8Eip7UN5Hh8oNuCgyWuJQwTym2LKRyP/Yp+c 2aqXX+uD3AMOdGrb/n7lih1xZMVfBiDPOBDazWpa9nIRcrzVGQhbr4y57vPjrD0IiBoR n8NZEpwjEiseoOVoPmBDsIDN268m24zaOfnt33SqDJzakOf8PxuA8a/S9UWKg2J6SP62 6S1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aTpARAlgz7Gbw3yUKCRy6ZdI4oxgXd7di6inTrHnmCc=; b=cLD37Q7DowQ7GSpocV14SSTet4AXNiSLgIhtgWtYTj+WdfoesHAKcwfvvhbeXEMvPr /WJW6QwfVMq2FeLSLnjeOeDrwIzeCZ3ILXgHNKAuFwij5ciBouBOFhWjOzmOzicP+sH1 /loGxvYgDSXrcwlWSOjGqausero9guiiKUnMdoUhQOTn7LP6PBJhhqryiBXr1uZ+H2d/ foDvhfDxUMVP2NJ+MA0AhVZmvjL5+Cgp35zEW9JU+116XrfxvPfwaA7cLRdA9S+PA6n/ rEkuvCMCvuA8NqPL3Si/qjg7rtucs+U/s9QOITtd4ZYlDpDYQtZSn6owkB6UJJwqs3kf xOVA== X-Gm-Message-State: AOAM5306wmoKATkq1m2abaiUQBiGFr5CNZVTCSOS/OqSsXVOONMnkwp7 X+ZX9DWdv1eUU5/Cv5SJqy1eb7tXgcy2idkwykV69674LGk= X-Google-Smtp-Source: ABdhPJxdNkyWASLqNW6kVnj5sztIyelsaXskfq+BRbQiLGREC6ML8i3kLIqNsA+sD0yogNXJNtpxnmqXdEYZs8PThk4= X-Received: by 2002:ac8:570f:: with SMTP id 15mr10902616qtw.335.1631889905548; Fri, 17 Sep 2021 07:45:05 -0700 (PDT) MIME-Version: 1.0 References: <alpine.DEB.2.21.2109161121570.4243@HIDDEN> In-Reply-To: <alpine.DEB.2.21.2109161121570.4243@HIDDEN> From: zimoun <zimon.toutoune@HIDDEN> Date: Fri, 17 Sep 2021 16:44:54 +0200 Message-ID: <CAJ3okZ387X0bWitCQfbWAMDmdBBtET7gduiqK+y8FqjeEs60LQ@HIDDEN> Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, On Thu, 16 Sept 2021 at 17:29, Jack Hill <jackhill@HIDDEN> wrote: > Many of the commands, e.g. ps2pdf, provided by the ghostscript package are > implemented as shell scripts that do some argument or file name processing > before invoking the main gs binary. These scripts invoke external commands > like basename, awk, dirname, and even gs by dynamically looking them up > PATH. Instead, they should refer to a specific path in the store so that > the behavior of ghostscript doesn't depend on the environment and so that > Guix can see these references. Indeed. --8<---------------cut here---------------start------------->8--- $ guix environment -C --ad-hoc ghostscript [env]$ ps2pdf --version /gnu/store/jc3x02w3dmbff7s5r7g2d21r2jswag4p-profile/bin/ps2pdf: line 8: dirname: command not found /gnu/store/jc3x02w3dmbff7s5r7g2d21r2jswag4p-profile/bin/ps2pdf14: line 3: dirname: command not found /gnu/store/jc3x02w3dmbff7s5r7g2d21r2jswag4p-profile/bin/ps2pdfwr: line 7: dirname: command not found /gnu/store/jc3x02w3dmbff7s5r7g2d21r2jswag4p-profile/bin/ps2pdfwr: line 24: basename: command not found Usage: [options...] (input.[e]ps|-) [output.pdf|-] --8<---------------cut here---------------end--------------->8--- The fix would to add these external commands as 'inputs' and then let 'wrap-program'. Do you want to give a try? Cheers, simon
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.