gpsd doesn't start when USB GPS is plugged in

Bug #57486 reported by Sascha Silbe
2
Affects Status Importance Assigned to Milestone
gpsd (Debian)
Fix Released
Unknown
gpsd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: gpsd

/usr/share/doc/gpsd/README.Debian tells me gpsd could be started using hotplug, but when I plug in the GPS receiver, the device (/dev/ttyUSB0) gets created, but gpsd won't be started.
/etc/hotplug/usb/gpsd.hotplug exists, but apparently it doesn't get called. Maybe this broke during the transition to udev?

Since the GPS receiver is usually not plugged in at bootup, I cannot simply start gpsd in the default runlevel (the device doesn't exist). So currently I have to start it manually. That's quite annoying.

Revision history for this message
In , Tilman Koschnick (til) wrote : Re: Bug#338745: requires the obsolete /etc/hotplug/usb/ interface

On Sat, 2005-11-12 at 12:22 +0100, Marco d'Itri wrote:
> Package: gpsd
> Version: 2.28-2
> Severity: important
>
> Your package installs files in the /etc/hotplug/usb/ directory, but
> does not provide an udev rules file. The /etc/hotplug/usb/ interface has
> been obsolete for a long time and is not supported by udev.

Hi Marco,

thanks for your report. I finally get round to prepare a new upload with
udev support.

> For more information about this you can look at the debian-devel@
> threads of last october.
> The libgphoto2 package is a good example of how to provide udev support,
> please let me know if you have any doubts.
> I will also be happy to review your changes before they are uploaded, if
> you want.

I'd be glad if you could have a look at my changes. All changes related
to udev are attached as a diff; the package itself is at
<http://www.subnetz.org/~til/gpsd-preview/>.

> I also noticed that the script installed by your package uses python.
> Please remember that udev RUN rules are run at the very beginning of the
> boot process, where /usr may not be available.
> You probably need to use a wrapper shell script which waits for /usr to
> appear, /lib/udev/hotplug.functions provides a wait_for_file function
> you could use for this.

I assume /lib/udev/hotplug.functions is not guarenteed to be around on
other distributions? I want to pass my changes upstream, so I don't
source /lib/udev/hotplug.functions, but duplicate the wait_for_file
function.

Cheers, Til

Revision history for this message
In , Marco d'Itri (md) wrote :

On Apr 30, Tilman Koschnick <email address hidden> wrote:

> I assume /lib/udev/hotplug.functions is not guarenteed to be around on
> other distributions? I want to pass my changes upstream, so I don't
> source /lib/udev/hotplug.functions, but duplicate the wait_for_file
> function.
Correct. OTOH, other distributions usually do not support a standalone
/usr or re-run the failed events, so it might not matter.

> + CONTROL_SOCKET = "/var/run/gpsd.sock"
So your wrapper needs to wait for /var too.

> +wait_for_python && /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"
wait_for_python && exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"

--
ciao,
Marco

Revision history for this message
In , Tilman Koschnick (til) wrote : Bug#338745: fixed in gpsd 2.32-2

Format: 1.7
Date: Mon, 26 Jun 2006 16:28:36 +0200
Source: gpsd
Binary: gpsd gpsd-clients
Architecture: source i386
Version: 2.33-1
Distribution: unstable
Urgency: low
Maintainer: Tilman Koschnick <email address hidden>
Changed-By: Tilman Koschnick <email address hidden>
Description:
 gpsd - GPS (Global Positioning System) service daemon
 gpsd-clients - clients for the GPS service daemon
Closes: 303548 321423 335480 338745 374658
Changes:
 gpsd (2.33-1) unstable; urgency=low
 .
   * New upstream release
   * debian/copyright:
     - update author list
   * debian/control:
     - bump Standards-Version to 3.7.2 (no changes required)
   * debian/patches/:
     - rm 16_fix_manpages.dpatch (obsolete)
     - add 19_gpsfake_fuser.dpatch
     - add 20_gpsfake_manpage.dpatch (closes: #335480)
     - add 21_autobaud_delay.dpatch: make connecting to Garmin eTrex more
       reliable (closes: #303548, #321423)
     - add 22_manpage_linebreak.dpatch
   * /etc/init.d/gpsd:
     - stop gracefully if gpsd is not running (closes: #374658)
   * update lintian-overrides
 .
   * Upload sponsored by Petter Reinholdtsen
 .
 gpsd (2.32-2) unstable; urgency=low
 .
   * switch from obsolete hotplug to udev interface, thanks to Marco d'Itri
     (closes: #338745)
   * debian/patches/:
     - add 17_gpsd_manpage_section.dpatch
   * debian/gpsd.postinst:
     - always source /usr/share/debconf/confmodule
   * debian/rules:
     - add -I/usr/X11R6/include to CFLAGS until xorg migration is complete
     - add -fno-strict-aliasing to CFLAGS to satisfy gcc 4.1
Files:
 721145408f8cd021b3d099a0a1d748ca 494 misc optional gpsd_2.33-1.dsc
 03b57754091e4a34e27c78e1dc35c55e 639348 misc optional gpsd_2.33.orig.tar.gz
 08bd5c6a917d3cf96cf2658b3d1ef558 17248 misc optional gpsd_2.33-1.diff.gz
 57e7bc56332b1a2e58db604bfbf8b387 230882 misc optional gpsd_2.33-1_i386.deb
 58be989d6fb1f419f02fd10c4f74a661 76886 misc optional gpsd-clients_2.33-1_i386.deb

Revision history for this message
Sascha Silbe (sascha-ubuntu-launchpad) wrote :

Binary package hint: gpsd

/usr/share/doc/gpsd/README.Debian tells me gpsd could be started using hotplug, but when I plug in the GPS receiver, the device (/dev/ttyUSB0) gets created, but gpsd won't be started.
/etc/hotplug/usb/gpsd.hotplug exists, but apparently it doesn't get called. Maybe this broke during the transition to udev?

Since the GPS receiver is usually not plugged in at bootup, I cannot simply start gpsd in the default runlevel (the device doesn't exist). So currently I have to start it manually. That's quite annoying.

Revision history for this message
Kai Kasurinen (kai-kasurinen) wrote :

Thanks for the bug report. I'm closing it because the bug has been fixed in Edgy.

gpsd (2.32-2) unstable; urgency=low
 .
   * switch from obsolete hotplug to udev interface, thanks to Marco d'Itri
     (closes: #338745)
   * debian/patches/:
     - add 17_gpsd_manpage_section.dpatch
   * debian/gpsd.postinst:
     - always source /usr/share/debconf/confmodule
   * debian/rules:
     - add -I/usr/X11R6/include to CFLAGS until xorg migration is complete
     - add -fno-strict-aliasing to CFLAGS to satisfy gcc 4.1

Changed in gpsd:
status: Unconfirmed → Fix Released
Revision history for this message
Sascha Silbe (sascha-ubuntu-launchpad) wrote :

Is there a chance to get the dapper version fixed?

Revision history for this message
Kai Kasurinen (kai-kasurinen) wrote :

If you need a fix for the bug in Dapper, please follow the instructions for "How to request new packages". https://wiki.ubuntu.com/UbuntuBackports

Revision history for this message
Sascha Silbe (sascha-ubuntu-launchpad) wrote :
Changed in gpsd:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.