From owner-freebsd-current@FreeBSD.ORG Wed Oct 29 06:09:28 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 580C6106564A; Wed, 29 Oct 2008 06:09:28 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: from zibbi.meraka.csir.co.za (zibbi.meraka.csir.co.za [IPv6:2001:4200:7000:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 305AE8FC16; Wed, 29 Oct 2008 06:09:27 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973) id 23AB433C7D; Wed, 29 Oct 2008 08:09:25 +0200 (SAST) Date: Wed, 29 Oct 2008 08:09:24 +0200 From: John Hay To: David Wolfskill , current@freebsd.org, ed@freebsd.org Message-ID: <20081029060924.GA51480@zibbi.meraka.csir.co.za> References: <20081029050917.GQ69155@bunrab.catwhisker.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081029050917.GQ69155@bunrab.catwhisker.org> User-Agent: Mutt/1.4.2.1i Cc: Subject: Re: Apparent "permissions" issue with /dev/cuau0? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 06:09:28 -0000 On Tue, Oct 28, 2008 at 10:09:17PM -0700, David Wolfskill wrote: > This seems a bit weird to me. I'll explain the context, then the > perceived issue. > > I maintain a port (astro/gpsman) which can make use of a serial port to > communicate with a GPS. > > The author of the program let me know earlier today that he had made a > tarball of GPSman-6/4 available. Accordingly, I started updating the > port to use the new version. > > While I was doing that, I noticed that there's a stanza in the port's > Makefile: > > .if ${OSVERSION} < 600000 > GPSMAN_DEFAULT_PORT?= /dev/cuaa0 > .else > GPSMAN_DEFAULT_PORT?= /dev/cuad0 > .endif > > and I recalled that the MPSAFE TTY layer was recently committed to HEAD, > and that the serial device names changed accordingly. Thus, while it > isn't actually essential (as the user can change the device name fairlly > readily), I thought it would be reasonable to adjust that stanza so that > folks installing GPSman on a recent CURRENT system would at least have a > default value that matched something on their system. > > Accordingly, I changed my working copy to read: > > .if ${OSVERSION} < 600000 > GPSMAN_DEFAULT_PORT?= /dev/cuaa0 > .elif ${OSVERSION} < 800045 > GPSMAN_DEFAULT_PORT?= /dev/cuad0 > .else > GPSMAN_DEFAULT_PORT?= /dev/cuau0 > .endif > > I then rebooted my laptop from the CURRENT slice and tried installing > the (updated) port. > > The install was clean (as expected). I found that I needed to move my > old ~/.gpsman directory aside; on invocation, gpsman offered to create > ~/.gpsman-dir (where it stashes various preferences). I was mildly > pleased to see that the default for the serial port showed up as > /dev/cuau0 (as desired). > > I turned on my GPS, plugged it in, tried getting gpsman to talk to it, > and got a complaint: GPSman said that I didn't have permission (I > *think* that was its whine, anyway). I looked; the device was: > > crw-rw---- 1 uucp dialer 0, 51 Oct 28 20:23 /dev/cuau0 > > and output of id(1) verified that I was in group "dialer" (specifically > so I could do this type of thing), as expected. > > > I then de-installed gpsman, rebooted the laptop to RELENG_6 (also built > this morning), reinstalled GPSman, tried the "tallk tothe GPS" > experiment again, and it worked just as it always had before -- no > problems (using the "Garmin" protocol, if that matters). > > So: the hardware works. The physical connection should be OK. It seems > to me that either there's Something Weird going on with access to > things in a file namespace in CURRENT (which isn't all that likely, as > it would probably have an adverrse effect on tracking CURRENT daily -- > and others would likely have been ... mentioning ... it) or GPSman is > trying to do something to the serial port in a way that is no longer > supported in CURRENT. > > Now, GPSman is a Tcl/Tk application. And as I'm not really sufficiently > ambitious as to keep a separate set of installed ports ofr each of > RELENG_6, RELENG_7, and HEAD, I set things up so that /usr/local is > mounted from the same place regardless of which slice I boot from. I > then maintain the ports while running RELENG_6 -- and on the other > slices, I have the misc/compat6x port installed. > > While there are a few "gotchas" occasionally (RELENG_6 firefox isn't > happy with CURRENT's threading model, though I could probably address > that via /etc/libmap.conf), the vast mojority of stuff I use Just Works. > > FWIW, the version of the misc/compat6x port installed is > compat6x-i386-6.4.604000.200810. > > I'm disinclined to believe that this is an issue with the 6.4 release of > GPSman; as ssuch, I expect to send out the PR to update the port > shortly. But it would be nicer if the software could be used under > FreeBSD CURRENT. :-} > > I suppose I could try using ktrace(1) to get a better idea what's going > on. Any other (better?) ideas? Maybe the problem lies with tcl. We had to patch it before to handle our serial ports (that was also for GPSman): http://lists.freebsd.org/pipermail/freebsd-ports/2004-June/013797.html John -- John Hay -- John.Hay@meraka.csir.co.za / jhay@FreeBSD.org