* [oe-commits] org.oe.dev gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds. [not found] <E1J9k05-00006v-OV@linuxtogo.org> @ 2008-01-01 17:03 ` Paul Sokolovsky 2008-01-01 18:49 ` Matthias Hentges 2008-01-01 17:12 ` Koen Kooi 1 sibling, 1 reply; 8+ messages in thread From: Paul Sokolovsky @ 2008-01-01 17:03 UTC (permalink / raw) To: openembedded-devel Hello, Working default configuration should go to ${PN}-conf or something, like most of OE does, and few remaining uncomplying packages are being converted. This helps with build, QA, and release management. Thanks. This is a forwarded message From: coredump2 commit <openembedded-commits@lists.openembedded.org> To: openembedded-commits@lists.openembedded.org Date: Tuesday, January 1, 2008, 6:29:57 PM Subject: [oe-commits] org.oe.dev gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds. ===8<==============Original message text=============== gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds. Author: coredump2@openembedded.org Branch: org.openembedded.dev Revision: bc99dc2db85d728b06d198abe611e989797af107 ViewMTN: http://monotone.openembedded.org/revision/info/bc99dc2db85d728b06d198abe611e989797af107 Files: 1 packages/gpsd/files/fic-gta01 packages/gpsd/files/fic-gta01/gpsd packages/gpsd/files/fic-gta01/gpsd-default packages/gpsd/gpsd_2.34.bb mtn:execute true Diffs: # # mt diff -r501fa938422c98da06cd4133211f6e771f97716f -rbc99dc2db85d728b06d198abe611e989797af107 # # # # add_dir "packages/gpsd/files/fic-gta01" # # add_file "packages/gpsd/files/fic-gta01/gpsd" # content [30f3c12ba74fb70a443b725f2bb81760e8c6b8d8] # # add_file "packages/gpsd/files/fic-gta01/gpsd-default" # content [c45e36caad5bdf37b7d5defe8f18d431e25f9bd4] # # patch "packages/gpsd/gpsd_2.34.bb" # from [4ea8e37b9fbdf1a614c46bcd12247dffa2d96067] # to [8e241bbd828101019cda7b30a6725fd6759f50f4] # # set "packages/gpsd/files/fic-gta01/gpsd" # attr "mtn:execute" # value "true" # ============================================================ --- packages/gpsd/files/fic-gta01/gpsd 30f3c12ba74fb70a443b725f2bb81760e8c6b8d8 +++ packages/gpsd/files/fic-gta01/gpsd 30f3c12ba74fb70a443b725f2bb81760e8c6b8d8 @@ -0,0 +1,105 @@ +#!/bin/sh +# +# gpsd This shell script starts and stops gpsd. +# +# chkconfig: 345 90 40 +# description: Gpsd manages access to a serial- or USB-connected GPS +# processname: gpsd + +# Source function library. +#. /etc/rc.d/init.d/functions + +RETVAL=0 +prog="gpsd" + +test -f /etc/default/$prog && . /etc/default/$prog + +start() { + # Start daemons. + echo -n "Starting $prog: " + # We don't use the daemon function here because of a known bug + # in initlog -- it spuriously returns a nonzero status when + # starting daemons that fork themselves. See + # http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130629 + # for discussion. Fortunately: + # + # 1. gpsd startup can't fail, or at least not in the absence of + # much larger resource-exhaustion problems that would be very obvious. + # + # 2. We don't need all the logging crud that daemon/initlog sets + # up -- gpsd does its own syslog calls. + # + + if test -e /home/root/gllin/gllin + then + /home/root/gllin/gllin >/var/log/gllin.log 2>&1 & + else + echo -e "\n\ngllin GPS driver for Neo1973 not found," + echo "please install the gllin package from" + echo "http://3rdparty.downloads.openmoko.org/gllin/" + echo "" + exit 1 + fi + + if [ -e "${GPS_DEV}" ] + then + gpsd ${GPSD_OPTS} -p ${GPS_DEV} + echo "success" + else + # User needs to symlink ${GPS_DEV} to the right thing + echo "No ${GPS_DEV} GPS device, aborting gpsd startup. Check /etc/default/$prog" + fi + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gpsd + return $RETVAL +} + +stop() { + # Stop daemons. + echo -n "Shutting down $prog: " + + gllin_PIDs="`ps ax | grep "/home/root/gllin" | grep -v grep | awk '{print $1}'`" + test -n "$gllin_PIDs" && kill $gllin_PIDs + + killall gpsd + killproc gpsd + RETVAL=$? + echo + if [ $RETVAL -eq 0 ] + then + rm -f /var/lock/subsys/gpsd; + fi + return $RETVAL +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + RETVAL=$? + ;; + condrestart) + if [ -f /var/lock/subsys/gpsd ]; then + stop + start + RETVAL=$? + fi + ;; + status) +# status gpsd +# RETVAL=$? + ;; + *) + echo "Usage: $0 {start|stop|restart|condrestart|status}" + exit 1 +esac + +exit $RETVAL ============================================================ --- packages/gpsd/files/fic-gta01/gpsd-default c45e36caad5bdf37b7d5defe8f18d431e25f9bd4 +++ packages/gpsd/files/fic-gta01/gpsd-default c45e36caad5bdf37b7d5defe8f18d431e25f9bd4 @@ -0,0 +1,3 @@ +# If you must specify a non-NMEA driver, uncomment and modify the next line +#GPSD_OPTS= +GPS_DEV="/tmp/nmeaNP" ============================================================ --- packages/gpsd/gpsd_2.34.bb 4ea8e37b9fbdf1a614c46bcd12247dffa2d96067 +++ packages/gpsd/gpsd_2.34.bb 8e241bbd828101019cda7b30a6725fd6759f50f4 @@ -1,4 +1,4 @@ require gpsd.inc require gpsd.inc -PR = "r5" +PR = "r6" _______________________________________________ Openembedded-commits mailing list Openembedded-commits@lists.openembedded.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-commits ===8<===========End of original message text=========== -- Best regards, Paul mailto:pmiscml@gmail.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [oe-commits] org.oe.dev gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds. 2008-01-01 17:03 ` [oe-commits] org.oe.dev gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds Paul Sokolovsky @ 2008-01-01 18:49 ` Matthias Hentges 2008-01-01 19:42 ` Paul Sokolovsky 0 siblings, 1 reply; 8+ messages in thread From: Matthias Hentges @ 2008-01-01 18:49 UTC (permalink / raw) To: openembedded-devel [-- Attachment #1: Type: text/plain, Size: 685 bytes --] Hey there. Am Dienstag, den 01.01.2008, 19:03 +0200 schrieb Paul Sokolovsky: > Hello, > > Working default configuration should go to ${PN}-conf or > something, like most of OE does, and few remaining uncomplying packages are > being converted. This helps with build, QA, and release management. Thanks. > could you please point me to a sample package with acceptable integration of -conf? I'd rather _not_ do this a third time. -- Matthias 'CoreDump' Hentges Cologne / Germany Webmaster of Hentges.net & Embedded Linux Developer GPG -> gpg --keyserver gpg-keyserver.de --recv-keys 0xAF3030D9 My OS: Debian SID: Geek by Nature, Linux by Choice [-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --] [-- Type: application/pgp-signature, Size: 196 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [oe-commits] org.oe.dev gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds. 2008-01-01 18:49 ` Matthias Hentges @ 2008-01-01 19:42 ` Paul Sokolovsky 2008-01-01 20:09 ` Matthias Hentges 0 siblings, 1 reply; 8+ messages in thread From: Paul Sokolovsky @ 2008-01-01 19:42 UTC (permalink / raw) To: Matthias Hentges; +Cc: openembedded-devel Hello Matthias, Tuesday, January 1, 2008, 8:49:57 PM, you wrote: > Hey there. > Am Dienstag, den 01.01.2008, 19:03 +0200 schrieb Paul Sokolovsky: >> Hello, >> >> Working default configuration should go to ${PN}-conf or >> something, like most of OE does, and few remaining uncomplying packages are >> being converted. This helps with build, QA, and release management. Thanks. >> > could you please point me to a sample package with acceptable > integration of -conf? I'd rather _not_ do this a third time. mplayer & mplayer-common by you are good examples. mplayer-common so far is not machine-specific, but if we'll *really* find it beneficial to make it so, we're all set for that. keylaunch & keylaunch-conf are another recent refactor, by me, with keylaunch-conf being actually per-machine. I see where current problem lies with the code you committed - in snippet like this: +# gpsd This shell script starts and stops gpsd. [] + if test -e /home/root/gllin/gllin + then + /home/root/gllin/gllin >/var/log/gllin.log 2>&1 & + else + echo -e "\n\ngllin GPS driver for Neo1973 not found," + echo "please install the gllin package from" + echo "http://3rdparty.downloads.openmoko.org/gllin/" + echo "" + exit 1 + fi So, one thing is device-specific conf, another way is generic gpsd's device-specific service init. But that's why it would be nice if we adopted soft vs soft-conf split as consistent best practice - then snippets like above would seem to us as anomaly right away, and we'd think how to solve it. The issue here that /etc/init.d/gpsd tries to init both gpsd and gps hardware. Why not separate them. Say, have /etc/init.d/gllin with that snippet. But wait, there're different GPS hardware exists, why don't we make it polymorphic? So, we'd have /etc/init.d/gps-hardware, and that's for should would be device-specific. Then, /etc/init.d/gpsd could do sth like: [ -x /etc/init.d/gps-hardware ] && /etc/init.d/gps-hardware start to make sure that it ups entire GPS system. How does that sound? -- Best regards, Paul mailto:pmiscml@gmail.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [oe-commits] org.oe.dev gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds. 2008-01-01 19:42 ` Paul Sokolovsky @ 2008-01-01 20:09 ` Matthias Hentges 2008-01-01 20:48 ` Paul Sokolovsky 0 siblings, 1 reply; 8+ messages in thread From: Matthias Hentges @ 2008-01-01 20:09 UTC (permalink / raw) To: Paul Sokolovsky; +Cc: openembedded-devel [-- Attachment #1: Type: text/plain, Size: 3314 bytes --] Am Dienstag, den 01.01.2008, 21:42 +0200 schrieb Paul Sokolovsky: > Hello Matthias, > > Tuesday, January 1, 2008, 8:49:57 PM, you wrote: > > > Hey there. > > > Am Dienstag, den 01.01.2008, 19:03 +0200 schrieb Paul Sokolovsky: > >> Hello, > >> > >> Working default configuration should go to ${PN}-conf or > >> something, like most of OE does, and few remaining uncomplying packages are > >> being converted. This helps with build, QA, and release management. Thanks. > >> > > > could you please point me to a sample package with acceptable > > integration of -conf? I'd rather _not_ do this a third time. > > mplayer & mplayer-common by you are good examples. mplayer-common so > far is not machine-specific, but if we'll *really* find it beneficial > to make it so, we're all set for that. keylaunch & keylaunch-conf are > another recent refactor, by me, with keylaunch-conf being actually > per-machine. > > I see where current problem lies with the code you committed - in > snippet like this: > > +# gpsd This shell script starts and stops gpsd. > [] > + if test -e /home/root/gllin/gllin > + then > + /home/root/gllin/gllin >/var/log/gllin.log 2>&1 & > + else > + echo -e "\n\ngllin GPS driver for Neo1973 not found," > + echo "please install the gllin package from" > + echo "http://3rdparty.downloads.openmoko.org/gllin/" > + echo "" > + exit 1 > + fi > > So, one thing is device-specific conf, another way is generic gpsd's > device-specific service init. But that's why it would be nice if we > adopted soft vs soft-conf split as consistent best practice - then > snippets like above would seem to us as anomaly right away, and we'd > think how to solve it. > > The issue here that /etc/init.d/gpsd tries to init both gpsd and > gps hardware. Why not separate them. Say, have /etc/init.d/gllin with > that snippet. Difficult. /e/i/gllin should, if at all, be provided by the gllin package. It is a hand-crafted ipkg containing a binary-only driver. It will be an interesting task to find someone at OM willing to change it. Maybe if I annoy mickey enough... ;) > But wait, there're different GPS hardware exists, why > don't we make it polymorphic? So, we'd have /etc/init.d/gps-hardware, > and that's for should would be device-specific. Then, /etc/init.d/gpsd > could do sth like: > > [ -x /etc/init.d/gps-hardware ] && /etc/init.d/gps-hardware start > > to make sure that it ups entire GPS system. > > How does that sound? That sounds like a very good idea, I like the generic approach better than a hard-coded init-script. I will try to get the gllin ipk changed, but that may take a few days. What do you think about installing /etc/default/gpsd via update-alternatives so a driver could install proper defaults w/o resorting to a -conf at all? Not that many drivers are going to do this. Neo1973 is probably a very special case in this regard. -- Matthias 'CoreDump' Hentges Cologne / Germany Webmaster of Hentges.net & Embedded Linux Developer GPG -> gpg --keyserver gpg-keyserver.de --recv-keys 0xAF3030D9 My OS: Debian SID: Geek by Nature, Linux by Choice [-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --] [-- Type: application/pgp-signature, Size: 196 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [oe-commits] org.oe.dev gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds. 2008-01-01 20:09 ` Matthias Hentges @ 2008-01-01 20:48 ` Paul Sokolovsky 0 siblings, 0 replies; 8+ messages in thread From: Paul Sokolovsky @ 2008-01-01 20:48 UTC (permalink / raw) To: Matthias Hentges; +Cc: openembedded-devel Hello Matthias, Tuesday, January 1, 2008, 10:09:25 PM, you wrote: [] >> The issue here that /etc/init.d/gpsd tries to init both gpsd and >> gps hardware. Why not separate them. Say, have /etc/init.d/gllin with >> that snippet. > Difficult. /e/i/gllin should, if at all, be provided by the gllin > package. It is a hand-crafted ipkg containing a binary-only driver. It > will be an interesting task to find someone at OM willing to change it. > Maybe if I annoy mickey enough... ;) Well, I don't call to create a real package for gllin, it would still contain just that notice - "go url, clickthru, download". Well, that clickthru license and download could be moved into such package, but that still rather be done by core OM people, keeping a connection with FIC's legal dept ;-). >> But wait, there're different GPS hardware exists, why >> don't we make it polymorphic? So, we'd have /etc/init.d/gps-hardware, >> and that's for should would be device-specific. Then, /etc/init.d/gpsd >> could do sth like: >> >> [ -x /etc/init.d/gps-hardware ] && /etc/init.d/gps-hardware start >> >> to make sure that it ups entire GPS system. >> >> How does that sound? > That sounds like a very good idea, I like the generic approach better > than a hard-coded init-script. I will try to get the gllin ipk changed, > but that may take a few days. Great! I think, we should do similar for BT. Note that there's currently no flexible way to deal with BT *hardware* in OE. blue-probe just records static external properties of BT hardware. But how that HW is inited? The current way us to have BT drivers kernel-builtin, or auto-loaded per machine config. That has its issues - memory is taken regardless if BT is actually used, plus for some devices that may course BT HW to be always active, draining power. > What do you think about installing /etc/default/gpsd via > update-alternatives so a driver could install proper defaults w/o > resorting to a -conf at all? > Not that many drivers are going to do this. Neo1973 is probably a very > special case in this regard. Well, there're other devices with GPS builtin (few HTC phones), that's why I raised the question. Plus, we could have gpsd-conf-usb and gpsd-conf-bt. Taking the above, update-alternatives management would be quite helpful. But how they are structured package wise is up to different alternatives, e.g.: 1. One big package with few conf's inside, managed by update-alt. 2. pkg and pkf-conf, with the latter containing confs, managed by update-alt. 3. Bunch of conf packages, managed by update-alt. I'd err on fine-grained packaging, but I understand that it makes no sense to put every 20-byte file into own package. I'd still prefer 2, as with it, updating configs does *not* require: 1) devels to rebuild whole source; 2) release managers to upload more bytes to feeds; 3) users download those bytes, times many. Anyway, I don't have strong opinion here. All 3 choices are valid, as called by specific case. As long as we agree on the general plan to deal with this, it can be changed to another method if practical need arises. -- Best regards, Paul mailto:pmiscml@gmail.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [oe-commits] org.oe.dev gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds. [not found] <E1J9k05-00006v-OV@linuxtogo.org> 2008-01-01 17:03 ` [oe-commits] org.oe.dev gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds Paul Sokolovsky @ 2008-01-01 17:12 ` Koen Kooi 2008-01-01 18:47 ` Matthias Hentges 1 sibling, 1 reply; 8+ messages in thread From: Koen Kooi @ 2008-01-01 17:12 UTC (permalink / raw) To: Using the OpenEmbedded metadata to build Distributions -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 coredump2 commit schreef: > gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds. the (recently renamed) machine_id function exists for a reason. gta0* is runtime detectable, so no reason to hardcode it at buildtime. And if people insist on buildtime hardcodes, but the stuff in ${PN}-conf or something. - -- koen@dominion.kabel.utwente.nl will go go away in december 2007, please use k.kooi@student.utwente.nl instead. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFHenRpMkyGM64RGpERAjztAJ4nPr9CmM7O3lBj8C/UOmrBDEdv3wCgsx6C ViBarcTWDPu136ztHVCr178= =m7d8 -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [oe-commits] org.oe.dev gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds. 2008-01-01 17:12 ` Koen Kooi @ 2008-01-01 18:47 ` Matthias Hentges 2008-01-01 20:23 ` Koen Kooi 0 siblings, 1 reply; 8+ messages in thread From: Matthias Hentges @ 2008-01-01 18:47 UTC (permalink / raw) To: openembedded-devel [-- Attachment #1: Type: text/plain, Size: 1594 bytes --] Am Dienstag, den 01.01.2008, 18:12 +0100 schrieb Koen Kooi: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > coredump2 commit schreef: > > gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds. > > the (recently renamed) machine_id function exists for a reason. gta0* is > runtime detectable, so no reason to hardcode it at buildtime. Are you seriously suggesting hacking gpsd to runtime-detect the device it's running on and auto-configure itself _just_ so you can point to machine_id and make life for everyone a bit more difficult? You can't expect people to hack apps just so the apps fit your holy image of a "good" build environment, it is the other way around my friend. > And if > people insist on buildtime hardcodes, but the stuff in ${PN}-conf or > something. Please stop your trolling. Paul took the two minutes to think up some understandable reasons for the change-request. Your mail, OTOH didn't add any value at all to this thread, and is just wasted bandwidth, like usual. If I see any more of this trolling nonsense thrown my way, I will add you to my killfile. I don't care what you think, what you say, or what you write. Very few people these days do take you seriously, that is something to think about. -- Matthias 'CoreDump' Hentges Cologne / Germany Webmaster of Hentges.net & Embedded Linux Developer GPG -> gpg --keyserver gpg-keyserver.de --recv-keys 0xAF3030D9 My OS: Debian SID: Geek by Nature, Linux by Choice [-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --] [-- Type: application/pgp-signature, Size: 196 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [oe-commits] org.oe.dev gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds. 2008-01-01 18:47 ` Matthias Hentges @ 2008-01-01 20:23 ` Koen Kooi 0 siblings, 0 replies; 8+ messages in thread From: Koen Kooi @ 2008-01-01 20:23 UTC (permalink / raw) To: openembedded-devel -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Matthias Hentges schreef: > Am Dienstag, den 01.01.2008, 18:12 +0100 schrieb Koen Kooi: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> coredump2 commit schreef: >>> gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds. >> the (recently renamed) machine_id function exists for a reason. gta0* is >> runtime detectable, so no reason to hardcode it at buildtime. > > Are you seriously suggesting hacking gpsd to runtime-detect the device > it's running on and auto-configure itself _just_ so you can point to > machine_id and make life for everyone a bit more difficult? machine_id is sourced in the initscripts, if you would have bothered to look. - -- koen@dominion.kabel.utwente.nl will go go away in december 2007, please use k.kooi@student.utwente.nl instead. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFHeqEkMkyGM64RGpERAix4AKCDMsHZ9h7V6y6W9ym/Sy641sjrXgCgqhFn fXhuoUAxzI8PcN4kOslXoCc= =L1IP -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-01-01 20:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1J9k05-00006v-OV@linuxtogo.org>
2008-01-01 17:03 ` [oe-commits] org.oe.dev gpsd: Provide working default configuration and init-script for fic-gta01. This makes gpsd device-specific for gta01, please check the feeds Paul Sokolovsky
2008-01-01 18:49 ` Matthias Hentges
2008-01-01 19:42 ` Paul Sokolovsky
2008-01-01 20:09 ` Matthias Hentges
2008-01-01 20:48 ` Paul Sokolovsky
2008-01-01 17:12 ` Koen Kooi
2008-01-01 18:47 ` Matthias Hentges
2008-01-01 20:23 ` Koen Kooi
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.