Date: Mon, 7 Dec 2009 11:35:56 GMT From: Matt Dawson <matt@chronos.org.uk> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/141246: [ports] print/cups-base printing to USB devices broken Message-ID: <200912071135.nB7BZuS5041854@www.freebsd.org> Resent-Message-ID: <200912071140.nB7Be1Yc000582@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 141246 >Category: ports >Synopsis: [ports] print/cups-base printing to USB devices broken >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Dec 07 11:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Matt Dawson >Release: FreeBSD 8.0-RELEASE-p1 >Organization: n/a >Environment: FreeBSD tinderbox 8.0-RELEASE-p1 FreeBSD 8.0-RELEASE-p1 #3 r200058M: Thu Dec 3 14:04:07 GMT 2009 md001@tinderbox:/usr/obj/usr/src/sys/TINDERBOX amd64 >Description: The current cups-base port handles USB devices incorrectly. As well as leaving libusb support enabled when the user doesn't ask for it, it also does not take into account the libusb merge to base along with HPS's USB2 import from OSVERSION 800063 onwards. Also, the CUPS_OVERWRITE_BASE case does not restore the correct permissions for lp and friends in base on deinstall. >How-To-Repeat: Install cups-base on any system with or without the WITH_LIBUSB option set. >Fix: Diff attached and note added to pkg-message warning not to allow ulpt(4) to attach when using libusb support. Patch attached with submission follows: diff -ruN ../Server/ports/print/cups-base/Makefile ./ports/print/cups-base/Makefile --- ../Server/ports/print/cups-base/Makefile 2009-12-07 11:25:13.000000000 +0000 +++ ./ports/print/cups-base/Makefile 2009-12-07 11:16:22.000000000 +0000 @@ -173,8 +173,13 @@ RUN_DEPENDS+= xdg-open:${PORTSDIR}/devel/xdg-utils .endif -.if !defined(CUPS_CLIENT) && !defined(CUPS_IMAGE) && defined(WITH_LIBUSB) +.if !defined(CUPS_CLIENT) && !defined(CUPS_IMAGE) && defined(WITH_LIBUSB) && ${OSVERSION}>800062 +CPPFLAGS+= -I/usr/include +LDFLAGS+= -L/usr/lib +.elif !defined(CUPS_CLIENT) && !defined(CUPS_IMAGE) && defined(WITH_LIBUSB) && ${OSVERSION}<800063 LIB_DEPENDS+= usb:${PORTSDIR}/devel/libusb +.else +CONFIGURE_ARGS+= --disable-libusb .endif .if defined(CUPS_CLIENT) diff -ruN ../Server/ports/print/cups-base/pkg-message ./ports/print/cups-base/pkg-message --- ../Server/ports/print/cups-base/pkg-message 2009-05-16 15:28:18.000000000 +0100 +++ ./ports/print/cups-base/pkg-message 2009-12-07 11:26:33.000000000 +0000 @@ -24,4 +24,8 @@ 1) Uncomment application/octet-stream line in mime.types 2) Uncomment application/octet-stream line in mime.convs 3) Restart cupsd + +If you are using libusb, it is important that no device driver, e.g. +ulpt(4) is attached to the device you wish to use. In this case please +ensure the cups user and group has read/write access to /dev/ugen* ====================================================================== diff -ruN ../Server/ports/print/cups-base/pkg-plist ./ports/print/cups-base/pkg-plist --- ../Server/ports/print/cups-base/pkg-plist 2009-12-07 11:25:13.000000000 +0000 +++ ./ports/print/cups-base/pkg-plist 2009-12-06 12:24:18.000000000 +0000 @@ -20,6 +20,11 @@ %%OVERWRITE%%@exec if test -e /usr/bin/lpr; then chmod -h 0 /usr/bin/lpr; fi %%OVERWRITE%%@exec if test -e /usr/bin/lprm; then chmod -h 0 /usr/bin/lprm; fi %%OVERWRITE%%@exec if test -e /usr/sbin/lpc; then chmod -h 0 /usr/sbin/lpc; fi +%%OVERWRITE%%@unexec if test -e /usr/bin/lp; then chmod -h 0555 /usr/bin/lp; fi +%%OVERWRITE%%@unexec if test -e /usr/bin/lpq; then chmod -h 06555 /usr/bin/lpq; fi +%%OVERWRITE%%@unexec if test -e /usr/bin/lpr; then chmod -h 06555 /usr/bin/lpr; fi +%%OVERWRITE%%@unexec if test -e /usr/bin/lprm; then chmod -h 06555 /usr/bin/lprm; fi +%%OVERWRITE%%@unexec if test -e /usr/sbin/lpc; then chmod -h 02555 /usr/sbin/lpc; fi @unexec if cmp -s %D/etc/cups/cupsd.conf.N %D/etc/cups/cupsd.conf; then rm -f %D/etc/cups/cupsd.conf; fi etc/cups/cupsd.conf.N @exec if test ! -f %D/etc/cups/cupsd.conf; then cp -p %D/etc/cups/cupsd.conf.N %D/etc/cups/cupsd.conf; fi >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912071135.nB7BZuS5041854>