From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UHQ3O4fxuGQOcQEASxT56A (envelope-from ) for ; Thu, 20 Jul 2023 10:34:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id yLFuOofxuGTXwwAAG6o9tA (envelope-from ) for ; Thu, 20 Jul 2023 10:34:15 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.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 4C6EE6D49C for ; Thu, 20 Jul 2023 10:34:15 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=beffara.org header.s=gm1 header.b=eyV65Ly1; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689842055; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=AEXOgtN3S9VQo1uf3qFE0IV5Qzfha93BQ6HSGrKaH10=; b=SCcEwELHwDq19e5SzUcGjKev+u8vhXFd8hsxY9y3ZHuGukJ/zbeZ+oBdK+rnshsGh7JIeL 9/pzJm+SxHKcTweeQIbTS8PbvFK5DTKWPfAnL1WY0oysasUDiBq6kEDL1A8z949Z9fDI7b NM1Hb6bVC2SgVvx8UvVYmA7Ztd6Anz/aIGgxt1F7f6muFzdiq6D7ZieNfZnYGOMRUpkoVT zLd/6BxJtjUHoWf6EuapUw0QUlYPEYwDNwr6jwuxrTKsassFHzC2xqzZdyt8Z7hzXGI3PG XV/mpVfmZfFZKhFZzkk/44c+49vLWQpUDm+oYByst8D64H/1FnPIPZCL+2bE2g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=beffara.org header.s=gm1 header.b=eyV65Ly1; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689842055; a=rsa-sha256; cv=none; b=BuPlPPyt3meCv+E0TfpaoLOU05qtWXsKIuuBJ3rSZV85lTtfZ1QfXP0ImuNknGFOC7pDHS cbdG1kLxZVWKO1rRHGLh7ZN7+/Vk1dn1h6+cgzA8B1eRyJu9jPspCYJhardY2JXHrxlSNu NErUZRS/VCp0W1ybNfHEFfdQhEIRGX0mL9Z7y0I/KHWmomwFyQ2mxWC+MKYoYBd6PovzJH CGx79HDsHpl+DdUtveNOHQhOfEwO9ztxrVh3eXvGeUAPf5env6C3GVUp+RVMiplhs9svO3 /wnlRUgO2vb7K8sQM6SRa3x/tylvrzJxZIIwo+VjnIy4rKNga8KweTY6SPx2DA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qMP6r-00067k-C5; Thu, 20 Jul 2023 04:34:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMP6o-00065A-D9 for bug-guix@gnu.org; Thu, 20 Jul 2023 04:34:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qMP6o-0006m4-2p for bug-guix@gnu.org; Thu, 20 Jul 2023 04:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qMP6n-0006e7-Ui for bug-guix@gnu.org; Thu, 20 Jul 2023 04:34:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#64741: CUPS: fix the PATH settings for filters Resent-From: Emmanuel Beffara Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 20 Jul 2023 08:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64741 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 64741@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168984201525494 (code B ref -1); Thu, 20 Jul 2023 08:34:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Jul 2023 08:33:35 +0000 Received: from localhost ([127.0.0.1]:57650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMP6M-0006d8-FT for submit@debbugs.gnu.org; Thu, 20 Jul 2023 04:33:34 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMP6K-0006co-6X for submit@debbugs.gnu.org; Thu, 20 Jul 2023 04:33:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMP6D-0005tI-KU for bug-guix@gnu.org; Thu, 20 Jul 2023 04:33:26 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMP67-0006Ru-M6 for bug-guix@gnu.org; Thu, 20 Jul 2023 04:33:25 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 2E59520015 for ; Thu, 20 Jul 2023 08:33:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beffara.org; s=gm1; t=1689841995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=AEXOgtN3S9VQo1uf3qFE0IV5Qzfha93BQ6HSGrKaH10=; b=eyV65Ly1ILDZ1h5iW9hKTTgOz3/z9KrhaSIYgqSbZ0SETdx7kqiZA8FwoDcoOcPj4q+44s XwFTmCF/I9+A7gG3Ij0z8q0jwCnUFaOP5/sbIZSDs798UAe1bXTWOG9c/FF2RHVWaScVxf QlWDKiA9va9sOmuk+KX0FHY+oZZ3Y3f4nIof0fXgwwwYNSHify2peoyE+FVriweegkAQXz gmvEvy/a7lO6jvGszGK5oy46aBnBaKjwmRWUpWjuJ7eJBP35x7kagBKcWIQYN4cfls/eFH 5G6CG0tF6+hW74i9deKUWhXm52VjMtUQ0L0NBylXNsGq1QhS6XjjRMaoaCjhBA== Date: Thu, 20 Jul 2023 10:32:48 +0200 Message-ID: <20230720103248.GB1092@beffara.org> From: Emmanuel Beffara References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="EsVSDa8c3jWVzaDR" Content-Disposition: inline Content-Transfer-Encoding: 8bit X-GND-Sasl: manu@beffara.org Received-SPF: none client-ip=217.70.183.200; envelope-from=manu@beffara.org; helo=relay7-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -0.75 X-Migadu-Queue-Id: 4C6EE6D49C X-Migadu-Spam-Score: -0.75 X-Migadu-Scanner: mx0.migadu.com X-TUID: fea/Jp+uIImx --EsVSDa8c3jWVzaDR Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hello, I would like to propose the attached patch for the `cups-filters` package. The point is to add the paths for `coreutils` and `sed` to the PATH setting in the wrapper scripts so that the filters can find them. Maybe other packages should be added, at least this patch fixes the issue I was facing. About my specific case: I want to use the printing service of my university, an instance of PaperCut. This is as simple as setting an LPD queue at the right address with the PPD printer driver provided by the university (a Ricoh IM C5500 PS in my case, if that makes any difference). After switching to Guix system a few months ago, this stopped working: print jobs were sent with no error message but they all appeared as 1 page in PaperCut and nothing actually came out of the printers. I finally took the time to explore the logs and it appears that CUPS at some point calls `foomatic-rip` and that this filter fails, as shown in these extracts from `/var/log/cups/error_log`: ``` I [18/Jul/2023:16:34:10 +0200] [Job 12] Started filter /gnu/store/nhjpc32034v6186v37l51j0z2jq8xlkm-cups-server-bin/lib/cups/filter/foomatic-rip (PID 27451) [...] D [18/Jul/2023:16:34:21 +0200] [Job 12] Starting process \"renderer\" (generation 2) D [18/Jul/2023:16:34:21 +0200] [Job 12] JCL: \033%-12345X@PJL D [18/Jul/2023:16:34:21 +0200] [Job 12] D [18/Jul/2023:16:34:21 +0200] [Job 12] /gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash: line 5: date: command not found D [18/Jul/2023:16:34:21 +0200] [Job 12] /gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash: line 5: sed: command not found D [18/Jul/2023:16:34:21 +0200] [Job 12] /gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash: line 5: date: command not found D [18/Jul/2023:16:34:21 +0200] [Job 12] /gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash: line 5: sed: command not found D [18/Jul/2023:16:34:21 +0200] [Job 12] /gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash: line 5: cat: command not found D [18/Jul/2023:16:34:21 +0200] [Job 12] renderer exited with status 127 D [18/Jul/2023:16:34:21 +0200] [Job 12] Process is dying with \"Encountered error Broken pipe during fwrite\", exit stat 1 [...] D [18/Jul/2023:16:34:21 +0200] [Job 12] PID 27451 (/gnu/store/nhjpc32034v6186v37l51j0z2jq8xlkm-cups-server-bin/lib/cups/filter/foomatic-rip) stopped with status 1. ``` So `foomatic-rip` actually needs `date`, `sed` and `cat` but does not find them. The issue with required tools is known in Guix because the package definition for `cups-filters` already adds paths for `ghostscript-with-cups` and `grep`. The patch just adds necessary inputs for those, and it makes printing work for me. I don't know what other tools the filters might require in other situations. On a different level, I am surprised that the failure above does not lead to an actual user-visible error by CUPS. A corrupted job is actually sent silently (probably with some error messages mixed with the printing job or with malformed printing commands) although the filter does return an error code. Maybe this should be sent upstream as a CUPS bug? -- Emmanuel --EsVSDa8c3jWVzaDR Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="cups-filters.patch" Content-Transfer-Encoding: 8bit diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 9d81a0aa07..301fdcdb35 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -198,9 +198,11 @@ (define-public cups-filters (wrap-program file `("PATH" ":" prefix (,(string-append + #$(this-package-input "coreutils") "/bin:" #$(this-package-input "ghostscript-with-cups") "/bin:" - #$(this-package-input "grep") "/bin"))))) + #$(this-package-input "grep") "/bin:" + #$(this-package-input "sed") "/bin"))))) (find-files (string-append #$output "/lib/cups/filter")))))))) (native-inputs @@ -208,6 +210,7 @@ (define-public cups-filters pkg-config)) (inputs (list avahi + coreutils fontconfig freetype font-dejavu ; also needed by test suite @@ -222,6 +225,7 @@ (define-public cups-filters glib qpdf poppler + sed cups-minimal)) (home-page "https://wiki.linuxfoundation.org/openprinting/cups-filters") (synopsis "OpenPrinting CUPS filters and backends") --EsVSDa8c3jWVzaDR--