GNU bug report logs -
#64741
CUPS: fix the PATH settings for filters
Previous Next
Reported by: Emmanuel Beffara <manu <at> beffara.org>
Date: Thu, 20 Jul 2023 08:34:01 UTC
Severity: normal
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64741 in the body.
You can then email your comments to 64741 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#64741
; Package
guix
.
(Thu, 20 Jul 2023 08:34:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Emmanuel Beffara <manu <at> beffara.org>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Thu, 20 Jul 2023 08:34:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <at> PJL
D [18/Jul/2023:16:34:21 +0200] [Job 12] <job data>
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
[cups-filters.patch (text/plain, attachment)]
Reply sent
to
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:
You have taken responsibility.
(Thu, 20 Jul 2023 21:29:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Emmanuel Beffara <manu <at> beffara.org>
:
bug acknowledged by developer.
(Thu, 20 Jul 2023 21:29:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 64741-done <at> debbugs.gnu.org (full text, mbox):
Hello,
Emmanuel Beffara <manu <at> beffara.org> writes:
> 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 <at> PJL
> D [18/Jul/2023:16:34:21 +0200] [Job 12] <job data>
> 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.
That sounds reasonable.
> 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?
That's indeed surprising. I'd encourage you to try to reach out to
upstream with the problem, if that's feasible for you.
I've installed the change to the recently reintroduced core-updates
branch.
Bonus points next time if you write a GNU ChangeLog style commit message
to go along with it!
--
Thanks,
Maxim
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 18 Aug 2023 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 307 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.