Bug 242615

Summary: [patch] print/cups-filters: make remote queues auto-installed by cups-browsed actually work
Product: Ports & Packages Reporter: J.R. Oldroyd <fbsd>
Component: Individual Port(s)Assignee: Tijl Coosemans <tijl>
Status: Closed FIXED    
Severity: Affects Some People CC: fbsd
Priority: --- Flags: bugzilla: maintainer-feedback? (tijl)
Version: Latest   
Hardware: Any   
OS: Any   

Description J.R. Oldroyd 2019-12-12 23:18:09 UTC
When cups-browsed auto-installs remote printer queues on a local system, a printer with an "implicitclass://" URI is created.  Jobs for this queue are processed by the backend/implicitclass program which, in turn, tries to run CUPS' backend/ipp program.

But a hard-coded path to the ipp program which is invalid on FreeBSD causes the execv() of ipp to fail.

This patch fixes the hard-coded path and also adds a couple of additional fixes to this code to make sure that the argv_nt[] array is properly sized and properly NULL terminated and, additionally, that there's an error exit() in case the execv() fails.

Patch has been submitted upstream here: https://github.com/OpenPrinting/cups-filters/issues/182
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2019-12-13 11:43:56 UTC
(In reply to J.R. Oldroyd from comment #0)
Upstream has closed the issue already, but forgot the NULL termination of argv_nt.  Can you let them know?
Comment 2 J.R. Oldroyd 2019-12-13 14:09:12 UTC
I've added an additional note in the upstream #182 issue, but I don't see any way to re-open a closed issue.  So, please use this PR as your reminder to go back to upsteram #182 for the argv_nt[] size change and NULL termination.
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-12-13 15:07:12 UTC
A commit references this bug:

Author: tijl
Date: Fri Dec 13 15:06:20 UTC 2019
New revision: 520041
URL: https://svnweb.freebsd.org/changeset/ports/520041

Log:
  Add a patch to let the implicitclass backend run the ipp backend.

  This fixes printer queues for remote printers detected by cups-browsed.

  PR:		242615
  Submitted by:	J.R. Oldroyd <fbsd@opal.com>

Changes:
  head/print/cups-filters/Makefile
  head/print/cups-filters/files/patch-backend-implicitclass.c
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-12-13 15:16:14 UTC
A commit references this bug:

Author: tijl
Date: Fri Dec 13 15:16:08 UTC 2019
New revision: 520043
URL: https://svnweb.freebsd.org/changeset/ports/520043

Log:
  MFH: r520041

  Add a patch to let the implicitclass backend run the ipp backend.

  This fixes printer queues for remote printers detected by cups-browsed.

  PR:		242615
  Submitted by:	J.R. Oldroyd <fbsd@opal.com>
  Approved by:	ports-secteam (blanket)

Changes:
_U  branches/2019Q4/
  branches/2019Q4/print/cups-filters/Makefile
  branches/2019Q4/print/cups-filters/files/patch-backend-implicitclass.c