From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Dec 7 11:40:01 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5D4A1065676 for ; Mon, 7 Dec 2009 11:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 903B68FC17 for ; Mon, 7 Dec 2009 11:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nB7Be1uT000583 for ; Mon, 7 Dec 2009 11:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nB7Be1Yc000582; Mon, 7 Dec 2009 11:40:01 GMT (envelope-from gnats) Resent-Date: Mon, 7 Dec 2009 11:40:01 GMT Resent-Message-Id: <200912071140.nB7Be1Yc000582@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Matt Dawson Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9CED106566C for ; Mon, 7 Dec 2009 11:35:56 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id A9B018FC17 for ; Mon, 7 Dec 2009 11:35:56 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nB7BZuBf041855 for ; Mon, 7 Dec 2009 11:35:56 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id nB7BZuS5041854; Mon, 7 Dec 2009 11:35:56 GMT (envelope-from nobody) Message-Id: <200912071135.nB7BZuS5041854@www.freebsd.org> Date: Mon, 7 Dec 2009 11:35:56 GMT From: Matt Dawson To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/141246: [ports] print/cups-base printing to USB devices broken X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 11:40:01 -0000 >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: