From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jan 13 23:20:01 2008 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 8846D16A420 for ; Sun, 13 Jan 2008 23:20: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 591F513C46B for ; Sun, 13 Jan 2008 23:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m0DNK1G7046697 for ; Sun, 13 Jan 2008 23:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m0DNK1fl046690; Sun, 13 Jan 2008 23:20:01 GMT (envelope-from gnats) Resent-Date: Sun, 13 Jan 2008 23:20:01 GMT Resent-Message-Id: <200801132320.m0DNK1fl046690@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, Andrew Reilly Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F3D016A417 for ; Sun, 13 Jan 2008 23:14:59 +0000 (UTC) (envelope-from andrew@areilly.bpa.nu) Received: from omta01sl.mx.bigpond.com (omta01sl.mx.bigpond.com [144.140.92.153]) by mx1.freebsd.org (Postfix) with ESMTP id DE52813C45D for ; Sun, 13 Jan 2008 23:14:58 +0000 (UTC) (envelope-from andrew@areilly.bpa.nu) Received: from oaamta05sl.mx.bigpond.com ([124.188.162.219]) by omta01sl.mx.bigpond.com with ESMTP id <20080113231457.OAJR6603.omta01sl.mx.bigpond.com@oaamta05sl.mx.bigpond.com> for ; Sun, 13 Jan 2008 23:14:57 +0000 Received: from areilly.bpa.nu ([124.188.162.219]) by oaamta05sl.mx.bigpond.com with ESMTP id <20080113231456.HBCM26453.oaamta05sl.mx.bigpond.com@areilly.bpa.nu> for ; Sun, 13 Jan 2008 23:14:56 +0000 Received: (qmail 8469 invoked by uid 501); 13 Jan 2008 23:14:49 -0000 Message-Id: <20080113231449.8468.qmail@areilly.bpa.nu> Date: 13 Jan 2008 23:14:49 -0000 From: Andrew Reilly To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/119641: cups requires ownership of printer device but port has no example devd.conf entry X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andrew Reilly List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2008 23:20:01 -0000 >Number: 119641 >Category: ports >Synopsis: cups requires ownership of printer device but port has no example devd.conf entry >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sun Jan 13 23:20:00 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Andrew Reilly >Release: FreeBSD 7.0-PRERELEASE amd64 >Organization: >Environment: System: FreeBSD duncan.reilly.home 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #7: Sat Jan 12 11:03:22 EST 2008 root@duncan:/usr/obj/usr/src/sys/DUNCAN amd64 Machine is a P-III/500 with 512M RAM and a usb-attached Lexmark E312-PS laser printer >Description: The CUPS print driver runs as user:group cups:cups, and so requires read/write access to the chosen printer device as such. This doesn't happen by default, and it probably isn't clear to the newbie how to ensure that things are set up with the correct ownership and permissions. This problem is compounded for printers that are usb-attached (via ulpt0...), because the ulpt0 device comes and goes from the system whenever the printer is turned on or off (as it often is in low-use, home-office situations like mine). What makes it even trickier, is that there seem to be two mechanisms for adding policy regarding devices: devd.conf and devfs.conf. Devfs.conf is the only one of the two that has examples that include ownership changing, but it turns out that this is *not* the appropriate file to configure, because the devfs.conf rules are only applied at boot time, when devfs is mounted. Devd.conf is the correct place (or rather, /usr/local/etc/devd/ in this case) to make this tweak, but there is no appropriate example in the standard config file. >How-To-Repeat: Install cups from port. Use the web admin interface to set up a printer at /dev/ulpt0. Turn the printer off. Turn the printer back on. Try to print something, and watch the cups status show that the printer is borked. >Fix: Have the cups installation install something like the following, either directly in /usr/local/etc/devd/ulpt.conf (where I've put it) or in some example file that the installer's attention is drawn to by the port message. attach 110 { device-name "ulpt[0-9]+"; action "chown cups:cups /dev/$device-name"; }; It occurs to me that this fault (or something like it) might also occur for lpd, but I don't use that, so don't know for sure. Also: re general doc/Handbook: there is no reference to devd.conf in the handbook (according to a google search), other than indirectly through a devd(8) man-page link deep inside the bluetooth section. It would be nice if there was a bit more of a tutorial available on it, particularly since pluggable devices are becoming more common all the time. The manual page is well-written and complete, but the syntax is kind of curly, and without matching examples, it can be tricky. For example, the first go at this fix I didn't include the semicolon after the closing brace, and the error message confusingly talked about the line *after* the last line in the file. The second and third attempts didn't have "/dev/" in front of $device-name, because I hadn't grocked that $device-name didn't already include that (none of the other examples in /etc/devd.conf explicitly refer to the device file like this). >Release-Note: >Audit-Trail: >Unformatted: