diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2006-08-14 06:40:01 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2006-08-14 06:40:01 +0000 |
commit | fe75b445b3f7bb405b59be02202ac624452ebf27 (patch) | |
tree | b58cf8a6dcbd85c0fc5e34ec7f9925ffac370a95 /sci-geosciences/gpsd | |
parent | Added ~ppc (diff) | |
download | historical-fe75b445b3f7bb405b59be02202ac624452ebf27.tar.gz historical-fe75b445b3f7bb405b59be02202ac624452ebf27.tar.bz2 historical-fe75b445b3f7bb405b59be02202ac624452ebf27.zip |
Fix bug #132288 and also two other hotplug issues that I personally ran into. The patches have been submitted upstream.
Package-Manager: portage-2.1.1_pre4-r3
Diffstat (limited to 'sci-geosciences/gpsd')
-rw-r--r-- | sci-geosciences/gpsd/ChangeLog | 10 | ||||
-rw-r--r-- | sci-geosciences/gpsd/Manifest | 23 | ||||
-rw-r--r-- | sci-geosciences/gpsd/files/digest-gpsd-2.33-r1 | 3 | ||||
-rw-r--r-- | sci-geosciences/gpsd/files/gpsd-2.33-duplicate-device-add-hang.patch | 26 | ||||
-rw-r--r-- | sci-geosciences/gpsd/files/gpsd-2.33-hotplug-background-fix.patch | 54 | ||||
-rw-r--r-- | sci-geosciences/gpsd/gpsd-2.33-r1.ebuild | 135 |
6 files changed, 246 insertions, 5 deletions
diff --git a/sci-geosciences/gpsd/ChangeLog b/sci-geosciences/gpsd/ChangeLog index 26e9b1c45d09..1cc34254f561 100644 --- a/sci-geosciences/gpsd/ChangeLog +++ b/sci-geosciences/gpsd/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sci-geosciences/gpsd # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/ChangeLog,v 1.18 2006/07/18 06:09:06 nerdboy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/ChangeLog,v 1.19 2006/08/14 06:40:01 robbat2 Exp $ + +*gpsd-2.33-r1 (14 Aug 2006) + + 14 Aug 2006; Robin H. Johnson <robbat2@gentoo.org> + +files/gpsd-2.33-duplicate-device-add-hang.patch, + +files/gpsd-2.33-hotplug-background-fix.patch, +gpsd-2.33-r1.ebuild: + Fix bug #132288 and also two other hotplug issues that I personally ran + into. The patches have been submitted upstream. 18 Jul 2006; Steve Arnold <nerdboy@gentoo.org> -gpsd-2.31.ebuild, gpsd-2.32.ebuild: diff --git a/sci-geosciences/gpsd/Manifest b/sci-geosciences/gpsd/Manifest index aff09d90d4db..66b52d583ba1 100644 --- a/sci-geosciences/gpsd/Manifest +++ b/sci-geosciences/gpsd/Manifest @@ -2,6 +2,14 @@ AUX 40-usb-serial.rules 212 RMD160 373c62caf5048f360a13313fd7386a44452ee247 SHA1 MD5 f6622a741ad185c494741151fac6f920 files/40-usb-serial.rules 212 RMD160 373c62caf5048f360a13313fd7386a44452ee247 files/40-usb-serial.rules 212 SHA256 ed2436fa838c9bd2f74f8d0c56cb91ebd73a4b93377e7fbefe217f58d379ce70 files/40-usb-serial.rules 212 +AUX gpsd-2.33-duplicate-device-add-hang.patch 1094 RMD160 651375eacec543581266b3bfbf996ee31f4bbc03 SHA1 b00cd23f00bdd24280664c8a38efa752838909fe SHA256 504784c891073fa8825704c9e94598fceb1c95c0750566e230ace19e7c777b83 +MD5 a39d462bb99f67207d87c8b08a624af8 files/gpsd-2.33-duplicate-device-add-hang.patch 1094 +RMD160 651375eacec543581266b3bfbf996ee31f4bbc03 files/gpsd-2.33-duplicate-device-add-hang.patch 1094 +SHA256 504784c891073fa8825704c9e94598fceb1c95c0750566e230ace19e7c777b83 files/gpsd-2.33-duplicate-device-add-hang.patch 1094 +AUX gpsd-2.33-hotplug-background-fix.patch 2231 RMD160 1b5d0326501627ec99dd08fb10a2b0eaed2f69e1 SHA1 9ba7b5a3f802d12527ad6937121027a41ecccbce SHA256 acf258d1b15fda4aa303105a62807d28cde1173817a7e46ad719be479cf28a33 +MD5 326ba3e84fdbb9707a7a9d281123feb0 files/gpsd-2.33-hotplug-background-fix.patch 2231 +RMD160 1b5d0326501627ec99dd08fb10a2b0eaed2f69e1 files/gpsd-2.33-hotplug-background-fix.patch 2231 +SHA256 acf258d1b15fda4aa303105a62807d28cde1173817a7e46ad719be479cf28a33 files/gpsd-2.33-hotplug-background-fix.patch 2231 AUX gpsd.conf 872 RMD160 3eadbbc3b5d56bb3f8c32d3a8b2cb3697fae36c9 SHA1 e01cfa6365e297ad5446044bdba02d37c5b01a77 SHA256 dabf2ae12aabbdd10b7197f0f0e72d1f357cdd62a2a494ac0624db63e79ccf34 MD5 5527d72eff2668d32cabb8ade57aa82e files/gpsd.conf 872 RMD160 3eadbbc3b5d56bb3f8c32d3a8b2cb3697fae36c9 files/gpsd.conf 872 @@ -16,14 +24,18 @@ EBUILD gpsd-2.32.ebuild 3611 RMD160 d443c93e0fe5c01740ea28b4b6145683dafad5e9 SHA MD5 247472a10c7c968fe83871025c8fa760 gpsd-2.32.ebuild 3611 RMD160 d443c93e0fe5c01740ea28b4b6145683dafad5e9 gpsd-2.32.ebuild 3611 SHA256 790b0524f1a1f490fa21bac1f51d3d21ac6045cce8442d062ec0c60ca8033351 gpsd-2.32.ebuild 3611 +EBUILD gpsd-2.33-r1.ebuild 3988 RMD160 861553b9ff4580c7b5ab2b768223b588f5ce06b8 SHA1 854340858c4f356c9b68247ecb40eab3966650e7 SHA256 6a4c8c6877a31083f5482717f6cfa92185e8069c49509887d5aed2ca94d7f421 +MD5 7b3df21abbb3355abddf48e244b6d9ca gpsd-2.33-r1.ebuild 3988 +RMD160 861553b9ff4580c7b5ab2b768223b588f5ce06b8 gpsd-2.33-r1.ebuild 3988 +SHA256 6a4c8c6877a31083f5482717f6cfa92185e8069c49509887d5aed2ca94d7f421 gpsd-2.33-r1.ebuild 3988 EBUILD gpsd-2.33.ebuild 3830 RMD160 91ad71452485d7e9bd1240fa630c941359c4d6ab SHA1 e0ab088337d2ba86219c5e9cb1a34464eef0cdf1 SHA256 9631fc7305a5f663b325dfe97b25bc5a9c51294c3a280e661655fd408238698c MD5 a1ef3811af9700bfc52e07c6108cb426 gpsd-2.33.ebuild 3830 RMD160 91ad71452485d7e9bd1240fa630c941359c4d6ab gpsd-2.33.ebuild 3830 SHA256 9631fc7305a5f663b325dfe97b25bc5a9c51294c3a280e661655fd408238698c gpsd-2.33.ebuild 3830 -MISC ChangeLog 3803 RMD160 91f2e23f9bb04642cfbd960d169673a5e650a71a SHA1 5cd0d044080c0d42a9ba21c8ddc8285ceb84d155 SHA256 da3e99ab8a2102a3954e9958fc32bde7b2826f98d8dc67508d4ac37212996b77 -MD5 152c6efc038a9777b6c99a570060c15d ChangeLog 3803 -RMD160 91f2e23f9bb04642cfbd960d169673a5e650a71a ChangeLog 3803 -SHA256 da3e99ab8a2102a3954e9958fc32bde7b2826f98d8dc67508d4ac37212996b77 ChangeLog 3803 +MISC ChangeLog 4133 RMD160 32102b4a5adbf914a28bf1912fd0a932c98c2bbc SHA1 a6e06dfa476fdd52f5fe5f3a6f0ef00488e3d608 SHA256 861d8b2c66a436cd9fb8db9fb34818fb5bf4283dcb8d741ff7bf8e87f0072f83 +MD5 ddf505a8d9e53d6486a5146c19e2eec9 ChangeLog 4133 +RMD160 32102b4a5adbf914a28bf1912fd0a932c98c2bbc ChangeLog 4133 +SHA256 861d8b2c66a436cd9fb8db9fb34818fb5bf4283dcb8d741ff7bf8e87f0072f83 ChangeLog 4133 MISC metadata.xml 420 RMD160 622357f000f6db7c03ae91821a849e4fcb8c45be SHA1 10e44b1ff8653aea70f834cb7a9e67dde40f9f4a SHA256 7eabf7b07513a6c1a83ae6e2fc3ac748ad3cefdde87b42d1a5a2149eab1383f8 MD5 78ec9f0a49a5a89267a4b8953d904de9 metadata.xml 420 RMD160 622357f000f6db7c03ae91821a849e4fcb8c45be metadata.xml 420 @@ -34,3 +46,6 @@ SHA256 b5c690c88f52aa25b5d4016b1f33bee3cbaf94e90649904ddb06da522d4c75da files/di MD5 e367888dd99ccfe208a546788c6be6ab files/digest-gpsd-2.33 229 RMD160 186ab51d05adbaa95f4a54dac7448c20b16b4826 files/digest-gpsd-2.33 229 SHA256 8c4b6783e1831f6e01d46afe9f41e18b71a14167638c0243314a9419ed7b39a3 files/digest-gpsd-2.33 229 +MD5 e367888dd99ccfe208a546788c6be6ab files/digest-gpsd-2.33-r1 229 +RMD160 186ab51d05adbaa95f4a54dac7448c20b16b4826 files/digest-gpsd-2.33-r1 229 +SHA256 8c4b6783e1831f6e01d46afe9f41e18b71a14167638c0243314a9419ed7b39a3 files/digest-gpsd-2.33-r1 229 diff --git a/sci-geosciences/gpsd/files/digest-gpsd-2.33-r1 b/sci-geosciences/gpsd/files/digest-gpsd-2.33-r1 new file mode 100644 index 000000000000..3ebb820ad471 --- /dev/null +++ b/sci-geosciences/gpsd/files/digest-gpsd-2.33-r1 @@ -0,0 +1,3 @@ +MD5 03b57754091e4a34e27c78e1dc35c55e gpsd-2.33.tar.gz 639348 +RMD160 175b90cb8dda1d85964078a4f14cec84b0cc4885 gpsd-2.33.tar.gz 639348 +SHA256 e6a055689ad05f6adba7dbb9490891a18a240d1a30e34424b3a034f4152f2c28 gpsd-2.33.tar.gz 639348 diff --git a/sci-geosciences/gpsd/files/gpsd-2.33-duplicate-device-add-hang.patch b/sci-geosciences/gpsd/files/gpsd-2.33-duplicate-device-add-hang.patch new file mode 100644 index 000000000000..5e3d957a478a --- /dev/null +++ b/sci-geosciences/gpsd/files/gpsd-2.33-duplicate-device-add-hang.patch @@ -0,0 +1,26 @@ +If you try to add the same device twice with the hotplug script, gpsd does not +send any error back to the script, leading to it waiting forever on recv(), and +blocking gpsd from progressing in it's select loop. + +This patch makes the daemon write back an error to the control socket (in +addition the the normal debug output), so that the hotplug script does not +block for the socket, and everything proceeds much better. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff -Nuar --exclude '*~' gpsd-2.33.orig/gpsd.c gpsd-2.33/gpsd.c +--- gpsd-2.33.orig/gpsd.c 2006-06-09 05:34:09.000000000 -0700 ++++ gpsd-2.33/gpsd.c 2006-08-13 15:42:25.152204904 -0700 +@@ -1048,9 +1048,10 @@ + (void)write(sfd, "ERROR\n", 6); + } else if (buf[0] == '+') { + p = snarfline(buf+1, &stash); +- if (find_device(stash)) ++ if (find_device(stash)) { + gpsd_report(1,"<= control(%d): %s already active \n", sfd, stash); +- else { ++ (void)write(sfd, "ERROR\n", 6); ++ } else { + gpsd_report(1,"<= control(%d): adding %s \n", sfd, stash); + if (open_device(stash)) + (void)write(sfd, "OK\n", 3); diff --git a/sci-geosciences/gpsd/files/gpsd-2.33-hotplug-background-fix.patch b/sci-geosciences/gpsd/files/gpsd-2.33-hotplug-background-fix.patch new file mode 100644 index 000000000000..03963ed6e5b8 --- /dev/null +++ b/sci-geosciences/gpsd/files/gpsd-2.33-hotplug-background-fix.patch @@ -0,0 +1,54 @@ +In recent versions of udev, the gpsd script runs in series with the task that +creates the real /dev/ttyUSB0 device node. Unfortuntely, the gpsd script runs +BEFORE the creation of the node, and the node is not created until after you +kill the gpsd script, because the gpsd script waits forever for the node to +appear. + +This is a race condition, and is best fixed by running the actual wait/hotplug +portion in the background. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff -Nuar --exclude '*~' gpsd-2.33.orig/gpsd.hotplug gpsd-2.33/gpsd.hotplug +--- gpsd-2.33.orig/gpsd.hotplug 2005-06-27 11:53:00.000000000 -0700 ++++ gpsd-2.33/gpsd.hotplug 2006-08-13 18:35:03.382383884 -0700 +@@ -56,7 +56,7 @@ + return action + + def hotplug(action, devpath): +- #syslog.syslog("ACTION=%s" % action) ++ #syslog.syslog("ACTION=%s DEVPATH=%s" % (action,devpath)) + if not devpath: + syslog.syslog("No device") + else: +@@ -88,16 +88,18 @@ + return + + if __name__ == '__main__': +- syslog.openlog('gpsd.hotplug', 0, syslog.LOG_DAEMON) +- try: +- if len(sys.argv) == 1: # Called as hotplug script +- hotplug(os.getenv("ACTION"), os.getenv("DEVPATH")) +- else: # Called by hand for testing +- gpsd_control(sys.argv[1], sys.argv[2]) +- except: +- (exc_type, exc_value, exc_traceback) = sys.exc_info() +- syslog.syslog("gpsd.hotplug: exception %s yields %s" % (exc_type, exc_value)) +- raise exc_type, exc_value, exc_traceback +- #syslog.syslog("gpsd.hotplug ends") +- syslog.closelog() ++ pid = os.fork() ++ if not pid: ++ syslog.openlog('gpsd.hotplug', 0, syslog.LOG_DAEMON) ++ try: ++ if len(sys.argv) == 1: # Called as hotplug script ++ hotplug(os.getenv("ACTION"), os.getenv("DEVPATH")) ++ else: # Called by hand for testing ++ gpsd_control(sys.argv[1], sys.argv[2]) ++ except: ++ (exc_type, exc_value, exc_traceback) = sys.exc_info() ++ syslog.syslog("gpsd.hotplug: exception %s yields %s" % (exc_type, exc_value)) ++ raise exc_type, exc_value, exc_traceback ++ #syslog.syslog("gpsd.hotplug ends") ++ syslog.closelog() + diff --git a/sci-geosciences/gpsd/gpsd-2.33-r1.ebuild b/sci-geosciences/gpsd/gpsd-2.33-r1.ebuild new file mode 100644 index 000000000000..89de2c29b0fe --- /dev/null +++ b/sci-geosciences/gpsd/gpsd-2.33-r1.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/gpsd-2.33-r1.ebuild,v 1.1 2006/08/14 06:40:01 robbat2 Exp $ + +inherit eutils libtool distutils + +DESCRIPTION="GPS daemon and library to support USB/serial GPS devices and various GPS/mapping clients." +HOMEPAGE="http://gpsd.berlios.de/" +SRC_URI="http://download.berlios.de/gpsd/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~arm ~amd64 ~ppc ~ppc64 ~sparc ~x86" + +IUSE="dbus ntp static usb X" + +RDEPEND="X? ( || ( + ( x11-libs/libXmu + x11-libs/libXext + x11-libs/libXp + x11-libs/libX11 + x11-libs/libXt + x11-libs/libSM + x11-libs/libICE + x11-libs/libXpm + x11-libs/libXaw ) + || ( + x11-libs/openmotif + x11-libs/lesstif + ) + ( virtual/motif + virtual/x11 ) + ) + ) + dev-lang/python + app-text/xmlto + dbus? ( >=sys-apps/dbus-0.6 ) + ntp? ( net-misc/ntp ) + usb? ( sys-apps/hotplug )" + +DEPEND="${RDEPEND} + X? ( || ( + ( x11-proto/xproto x11-proto/xextproto ) + virtual/x11 + ) + )" + +RESTRICT="test" + +src_unpack() { + unpack ${A} + epatch ${FILESDIR}/${P}-duplicate-device-add-hang.patch + epatch ${FILESDIR}/${P}-hotplug-background-fix.patch + cd ${S} + elibtoolize +} + +src_compile() { + distutils_python_version + + local my_conf="--enable-shared" + + if ! use static; then + my_conf="${my_conf} --with-pic --disable-static" + else + my_conf="${my_conf} --enable-static" + fi + + if ! use ntp; then + my_conf="${my_conf} --disable-ntpshm" + fi + + econf ${my_conf} $(use_with X x) $(use_enable dbus) \ + || die "econf failed" + + emake LDFLAGS="${LDFLAGS} -lm" || die "emake failed" +} + +src_install() { + cd ${S} + make DESTDIR=${D} install + + if use usb ; then + sed -i -e "s/gpsd.hotplug/gpsd/g" gpsd.hotplug gpsd.usermap + insinto /etc/hotplug/usb + doins gpsd.usermap + exeinto /etc/hotplug/usb + newexe gpsd.hotplug gpsd + keepdir /var/run/usb # needed for REMOVER + else + newconfd ${FILESDIR}/gpsd.conf gpsd + newinitd ${FILESDIR}/gpsd.init gpsd + fi + if use X ; then + insinto /etc/X11/app-defaults + newins xgps.ad Xgps + newins xgpsspeed.ad Xgpsspeed + fi + dobin logextract + diropts "-m0644" + exeinto /usr/$(get_libdir)/python${PYVER}/site-packages + doexe gps.py gpsfake.py + dodoc AUTHORS HACKING INSTALL README TODO ${FILESDIR}/40-usb-serial.rules +} + +pkg_postinst() { + einfo "To use hotplugging (USB devices) your kernel has to be compiled" + einfo "with CONFIG_HOTPLUG enabled and sys-apps/hotplug must be emerged" + einfo "(both usb and dbus support are optional)." + einfo + einfo "Different GPS devices require the corresponding kernel options" + einfo "to be enabled, such as USB_SERIAL_GARMIN, or a USB serial driver" + einfo "for an adapter such as those that come with Deluo GPS units (eg," + einfo "USB_SERIAL_PL2303). Straight serial devices should always work," + einfo "even without hotplug support." + ewarn + ewarn "If your client connection shows no data when gpsd is started via" + ewarn "the normal hotplug action, then kill the existing gpsd process" + ewarn "and try starting it directly via something like:" + ewarn "sudo /usr/sbin/gpsd -p /dev/ttyUSB0" + ewarn "or whatever your device is. This will verify whether your device" + ewarn "is working or not." + ewarn + einfo "Read the INSTALL doc for more information on supported hardware," + einfo "and make sure udev has the right group permissions set on the tty" + einfo "devices if using USB (it should Do The Right Thing (TM))..." + einfo + einfo "Finally, the default gpsd setup looks for /dev/ttyUSB0, in the" + einfo "case of the USB-serial adapter mentioned above. Depending on" + einfo "your default device scheme (ie, udev, devfs, static), you may" + einfo "need to create a device alias if the default name is different." + einfo "A udev rule file has been provided with an example rule in the" + einfo "docs directory. If the device names are correct, gpsd will" + einfo "start automatically when the GPS device is plugged in." +} |