diff options
author | Martin Kelly <mkelly@xevo.com> | 2017-11-16 17:10:11 -0800 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2017-11-30 09:13:32 -0800 |
commit | c8913de265ce8f6355ba1f56d034f6ac40596763 (patch) | |
tree | e15989ce0bbffbe5ee2dd2150178480a5a79ad13 /meta-oe/recipes-navigation/gpsd | |
parent | 754754b53bbf4c72d7855e9209f1ccecce5cd8dd (diff) | |
download | meta-openembedded-c8913de265ce8f6355ba1f56d034f6ac40596763.tar.gz |
gpsd: use upstream config instead of our own
We have our own versions of the udev, hotplug, and systemd scripts,
but at this point they are several years old and were added to fix bugs
at the time. As far as I can tell, the relevant bugs are now fixed
upstream, so we can move back to the upstream versions.
Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-navigation/gpsd')
-rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd/60-gpsd.rules | 47 | ||||
-rwxr-xr-x | meta-oe/recipes-navigation/gpsd/gpsd/gpsd | 136 | ||||
-rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd/gpsd-default | 5 | ||||
-rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd/gpsd.service | 10 | ||||
-rw-r--r-- | meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb | 12 |
5 files changed, 4 insertions, 206 deletions
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/60-gpsd.rules b/meta-oe/recipes-navigation/gpsd/gpsd/60-gpsd.rules deleted file mode 100644 index 61143b8f6..000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd/60-gpsd.rules +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | # udev rules for gpsd | ||
2 | # $Id$ | ||
3 | # | ||
4 | # GPSes don't have their own USB device class. They're serial-over-USB | ||
5 | # devices, so what you see is actually the ID of the serial-over-USB chip. | ||
6 | # Fortunately, just two of these account for over 80% of consumer-grade | ||
7 | # GPS sensors. The gpsd.hotplug.wrapper script will tell a running gpsd | ||
8 | # that it should look at the device that just went active, because it | ||
9 | # might be a GPS. | ||
10 | # | ||
11 | # The following setup works on Debian - something similar will apply on | ||
12 | # other distributions: | ||
13 | # | ||
14 | # /etc/udev/gpsd.rules | ||
15 | # /etc/udev/rules.d/025_gpsd.rules -> ../gpsd.rules | ||
16 | # /lib/udev/gpsd.hotplug.wrapper | ||
17 | # /lib/udev/gpsd.hotplug | ||
18 | # | ||
19 | # Setting the link in /etc/udev/rules.d activates the rule and determines | ||
20 | # when to run it on boot (similar to init.d processing). | ||
21 | |||
22 | SUBSYSTEM!="tty", GOTO="gpsd_rules_end" | ||
23 | |||
24 | # Prolific Technology, Inc. PL2303 Serial Port | ||
25 | ATTR{idVendor}=="067b", ATTR{idProduct}=="2303", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" | ||
26 | # ATEN International Co., Ltd UC-232A Serial Port [pl2303] | ||
27 | ATTR{idVendor}=="0557", ATTR{idProduct}=="2008", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" | ||
28 | # FTDI 8U232AM | ||
29 | ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" | ||
30 | # Cypress M8/CY7C64013 (DeLorme uses these) | ||
31 | ATTR{idVendor}=="1163", ATTR{idProduct}=="0100", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" | ||
32 | # PS-360 OEM (Microsoft GPS sold with Street and Trips 2005) | ||
33 | ATTR{idVendor}=="067b", ATTR{idProduct}=="aaa0", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" | ||
34 | # Garmin International GPSmap, various models (tested with Garmin GPS 18 USB) | ||
35 | ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" | ||
36 | # Cygnal Integrated Products, Inc. CP210x Composite Device (Used by Holux m241) | ||
37 | ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea60", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" | ||
38 | # u-blox AG, u-blox 5 (tested with Navilock NL-402U) | ||
39 | ATTR{idVendor}=="1546", ATTR{idProduct}=="01a5", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" | ||
40 | # FTDI FT232 | ||
41 | ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" | ||
42 | # u-blox 4 | ||
43 | ATTR{idVendor}=="1546", ATTR{idProduct}=="01a4", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper" | ||
44 | |||
45 | ACTION=="remove", RUN+="/lib/udev/gpsd.hotplug.wrapper" | ||
46 | |||
47 | LABEL="gpsd_rules_end" | ||
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/gpsd b/meta-oe/recipes-navigation/gpsd/gpsd/gpsd deleted file mode 100755 index ba73dafb2..000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd/gpsd +++ /dev/null | |||
@@ -1,136 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: gpsd | ||
4 | # Required-Start: $remote_fs $network | ||
5 | # Should-Start: bluetooth dbus udev | ||
6 | # Required-Stop: $remote_fs $network | ||
7 | # Default-Start: 2 3 4 5 | ||
8 | # Default-Stop: 0 1 6 | ||
9 | # Short-Description: GPS (Global Positioning System) daemon start/stop script | ||
10 | # Description: Start/Stop script for the gpsd service daemon, | ||
11 | # which is able to monitor one or more GPS devices | ||
12 | # connected to a host computer, making all data on | ||
13 | # the location and movements of the sensors available | ||
14 | # to be queried on TCP port 2947. | ||
15 | ### END INIT INFO | ||
16 | |||
17 | # Author: Bernd Zeimetz <bzed@debian.org> | ||
18 | # | ||
19 | # Please remove the "Author" lines above and replace them | ||
20 | # with your own name if you copy and modify this script. | ||
21 | |||
22 | # Do NOT "set -e" | ||
23 | |||
24 | # PATH should only include /usr/* if it runs after the mountnfs.sh script | ||
25 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | ||
26 | DESC="GPS (Global Positioning System) daemon" | ||
27 | NAME=gpsd | ||
28 | DAEMON=/usr/sbin/$NAME | ||
29 | PIDFILE=/var/run/$NAME.pid | ||
30 | SCRIPTNAME=/etc/init.d/$NAME | ||
31 | |||
32 | # Exit if the package is not installed | ||
33 | [ -x "$DAEMON" ] || exit 0 | ||
34 | |||
35 | # Read configuration, if present | ||
36 | [ -r /etc/default/$NAME ] && . /etc/default/$NAME | ||
37 | |||
38 | if [ -z "$GPSD_SOCKET" ] && [ -z "$DEVICES" ]; then | ||
39 | GPSD_SOCKET=/var/run/gpsd.sock | ||
40 | fi | ||
41 | |||
42 | if [ -n "$GPSD_SOCKET" ]; then | ||
43 | GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET" | ||
44 | fi | ||
45 | |||
46 | # | ||
47 | # Function that starts the daemon/service | ||
48 | # | ||
49 | do_start() | ||
50 | { | ||
51 | # Return | ||
52 | # 0 if daemon has been started | ||
53 | # 1 if daemon was already running | ||
54 | # 2 if daemon could not be started | ||
55 | start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test \ | ||
56 | -- $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES > /dev/null \ | ||
57 | || return 1 | ||
58 | start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ | ||
59 | $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES \ | ||
60 | || return 2 | ||
61 | } | ||
62 | |||
63 | # | ||
64 | # Function that stops the daemon/service | ||
65 | # | ||
66 | do_stop() | ||
67 | { | ||
68 | # Return | ||
69 | # 0 if daemon has been stopped | ||
70 | # 1 if daemon was already stopped | ||
71 | # 2 if daemon could not be stopped | ||
72 | # other if a failure occurred | ||
73 | start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME | ||
74 | RETVAL="$?" | ||
75 | [ "$RETVAL" = 2 ] && return 2 | ||
76 | # Many daemons don't delete their pidfiles when they exit. | ||
77 | rm -f $PIDFILE | ||
78 | return "$RETVAL" | ||
79 | } | ||
80 | |||
81 | # | ||
82 | # Function that sends a SIGHUP to the daemon/service | ||
83 | # | ||
84 | do_reload() { | ||
85 | # | ||
86 | # If the daemon can reload its configuration without | ||
87 | # restarting (for example, when it is sent a SIGHUP), | ||
88 | # then implement that here. | ||
89 | # | ||
90 | start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME | ||
91 | return 0 | ||
92 | } | ||
93 | |||
94 | case "$1" in | ||
95 | start) | ||
96 | echo "Starting $DESC" "$NAME" | ||
97 | do_start | ||
98 | exit $? | ||
99 | ;; | ||
100 | stop) | ||
101 | echo "Stopping $DESC" "$NAME" | ||
102 | do_stop | ||
103 | exit $? | ||
104 | ;; | ||
105 | status) | ||
106 | ;; | ||
107 | reload|force-reload) | ||
108 | echo "Reloading $DESC" "$NAME" | ||
109 | do_reload | ||
110 | exit $? | ||
111 | ;; | ||
112 | restart) | ||
113 | # | ||
114 | # If the "reload" option is implemented then remove the | ||
115 | # 'force-reload' alias | ||
116 | # | ||
117 | echo "Restarting $DESC" "$NAME" | ||
118 | do_stop | ||
119 | case "$?" in | ||
120 | 0|1) | ||
121 | do_start | ||
122 | exit $? | ||
123 | ;; | ||
124 | *) | ||
125 | # Failed to stop | ||
126 | exit 1 | ||
127 | ;; | ||
128 | esac | ||
129 | ;; | ||
130 | *) | ||
131 | echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 | ||
132 | exit 3 | ||
133 | ;; | ||
134 | esac | ||
135 | |||
136 | : | ||
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/gpsd-default b/meta-oe/recipes-navigation/gpsd/gpsd/gpsd-default deleted file mode 100644 index 0ceff0382..000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd/gpsd-default +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # If you must specify a non-NMEA driver, uncomment and modify the next line | ||
2 | GPSD_SOCKET="/var/run/gpsd.sock" | ||
3 | GPSD_OPTIONS="" | ||
4 | GPS_DEVICES="" | ||
5 | |||
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd/gpsd.service b/meta-oe/recipes-navigation/gpsd/gpsd/gpsd.service deleted file mode 100644 index 7131a589d..000000000 --- a/meta-oe/recipes-navigation/gpsd/gpsd/gpsd.service +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=GPS (Global Positioning System) Daemon | ||
3 | Requires=gpsd.socket | ||
4 | |||
5 | [Service] | ||
6 | EnvironmentFile=/etc/default/gpsd | ||
7 | ExecStart=/usr/sbin/gpsd -N $GPS_DEVICES | ||
8 | |||
9 | [Install] | ||
10 | Also=gpsd.socket | ||
diff --git a/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb b/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb index 26d74867b..4c2e328e8 100644 --- a/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb +++ b/meta-oe/recipes-navigation/gpsd/gpsd_3.16.bb | |||
@@ -11,10 +11,6 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ | |||
11 | file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \ | 11 | file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \ |
12 | file://0004-SConstruct-disable-html-and-man-docs-building-becaus.patch \ | 12 | file://0004-SConstruct-disable-html-and-man-docs-building-becaus.patch \ |
13 | file://0001-include-sys-ttydefaults.h.patch \ | 13 | file://0001-include-sys-ttydefaults.h.patch \ |
14 | file://gpsd-default \ | ||
15 | file://gpsd \ | ||
16 | file://60-gpsd.rules \ | ||
17 | file://gpsd.service \ | ||
18 | " | 14 | " |
19 | SRC_URI[md5sum] = "68691b5de4c94f82ec4062b042b5eb63" | 15 | SRC_URI[md5sum] = "68691b5de4c94f82ec4062b042b5eb63" |
20 | SRC_URI[sha256sum] = "03579af13a4d3fe0c5b79fa44b5f75c9f3cac6749357f1d99ce5d38c09bc2029" | 16 | SRC_URI[sha256sum] = "03579af13a4d3fe0c5b79fa44b5f75c9f3cac6749357f1d99ce5d38c09bc2029" |
@@ -67,13 +63,13 @@ do_install() { | |||
67 | 63 | ||
68 | do_install_append() { | 64 | do_install_append() { |
69 | install -d ${D}/${sysconfdir}/init.d | 65 | install -d ${D}/${sysconfdir}/init.d |
70 | install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/ | 66 | install -m 0755 ${S}/packaging/deb/etc_init.d_gpsd ${D}/${sysconfdir}/init.d/gpsd |
71 | install -d ${D}/${sysconfdir}/default | 67 | install -d ${D}/${sysconfdir}/default |
72 | install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default | 68 | install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}/${sysconfdir}/default/gpsd.default |
73 | 69 | ||
74 | #support for udev | 70 | #support for udev |
75 | install -d ${D}/${sysconfdir}/udev/rules.d | 71 | install -d ${D}/${sysconfdir}/udev/rules.d |
76 | install -m 0644 ${WORKDIR}/60-gpsd.rules ${D}/${sysconfdir}/udev/rules.d | 72 | install -m 0644 ${S}/gpsd.rules ${D}/${sysconfdir}/udev/rules.d/ |
77 | install -d ${D}${base_libdir}/udev/ | 73 | install -d ${D}${base_libdir}/udev/ |
78 | install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ | 74 | install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/ |
79 | 75 | ||
@@ -83,7 +79,7 @@ do_install_append() { | |||
83 | 79 | ||
84 | #support for systemd | 80 | #support for systemd |
85 | install -d ${D}${systemd_unitdir}/system/ | 81 | install -d ${D}${systemd_unitdir}/system/ |
86 | install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service | 82 | install -m 0644 ${S}/systemd/${BPN}.service ${D}${systemd_unitdir}/system/${BPN}.service |
87 | install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket | 83 | install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_unitdir}/system/${BPN}.socket |
88 | } | 84 | } |
89 | 85 | ||