Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 203642 - sys-fs/owfs-2.7_p3 released
Summary: sys-fs/owfs-2.7_p3 released
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Wolfram Schlich (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-29 02:01 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2008-02-26 10:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-12-29 02:01:44 UTC
sys-fs/owfs-2.7_p2 was released on 2007-12-20.
Comment 1 Wolfram Schlich (RETIRED) gentoo-dev 2007-12-29 23:05:18 UTC
2.7_p2 coredumps on my system when trying to access the serial
1 wire bus controller device...
Comment 2 Daniel Glaser 2007-12-31 16:23:42 UTC
I Have some problems stopping the service owfs. First the onewire mount point (default: /var/lib/owfs/mnt/) must be unmounted, then service can be stopped. Perhaps umount should be included in /etc/init.d/owfs in function stop before stopping the service itself.
Comment 3 Shawn Rutledge 2008-02-23 07:42:30 UTC
/etc/init.d/owfs references OWHTTPD_OPTS; it should be OWFS_OPTS.  

I don't like the default options, like assuming a serial adapter is on /dev/ttyS0.  This is a matter of user configuration which should not be guessed about, and anyway the ebuild installs /etc/conf.d/stuff so why duplicate the same defaults in the /etc/init.d scripts themselves?

Where did the default mount point /var/lib/owfs/mnt come from?  Seems like kindof an out-of-the-way place for it.  My convention is to use /mnt/ow0, /mnt/ow1 and so on, because there can be more than one mounted bus.  (But if you have owserver handle the multiple buses, I think they can be aggregated into a single mount point.)

/etc/init.d/owfs should have

need net owserver fuse

and owhttpd should need owserver too.  (The assumption is you want to run more than one service rather than e.g. just owfs talking directly to the hardware bus.)

I don't see Wolfram's or Daniel's problems happening on my system; after getting the init scripts configured to start up the processes the way I want, it seems to be working so far.

Comment 4 Shawn Rutledge 2008-02-23 07:43:10 UTC
There is a compilation problem if the php USE flag is turned on:

ow_wrap.c: In function 'SWIG_Php4_GetModule':
ow_wrap.c:691: error: too few arguments to function 'zend_get_constant'
ow_wrap.c: In function 'SWIG_Php4_SetModule':
ow_wrap.c:700: error: 'tsrm_ls' undeclared (first use in this function)
ow_wrap.c:700: error: (Each undeclared identifier is reported only once
ow_wrap.c:700: error: for each function it appears in.)
ow_wrap.c: In function 'SWIG_ResetError':
ow_wrap.c:752: error: 'tsrm_ls' undeclared (first use in this function)
ow_wrap.c:752: error: expected expression before '=' token
ow_wrap.c:753: error: expected expression before '=' token
ow_wrap.c: In function '_wrap_version':
ow_wrap.c:994: error: expected ')' before ';' token
ow_wrap.c:994: error: too few arguments to function 'zend_error'
ow_wrap.c: In function '_wrap_init':
ow_wrap.c:1021: error: expected ')' before ';' token
ow_wrap.c:1021: error: too few arguments to function 'zend_error'
ow_wrap.c: In function '_wrap_get':
ow_wrap.c:1052: error: expected ')' before ';' token
ow_wrap.c:1052: error: too few arguments to function 'zend_error'
ow_wrap.c: In function '_wrap_put':
ow_wrap.c:1086: error: expected ')' before ';' token
ow_wrap.c:1086: error: too few arguments to function 'zend_error'
ow_wrap.c: In function '_wrap_finish':
ow_wrap.c:1103: error: expected ')' before ';' token
ow_wrap.c:1103: error: too few arguments to function 'zend_error'
ow_wrap.c: In function '_wrap_set_error_print':
ow_wrap.c:1127: error: expected ')' before ';' token
ow_wrap.c:1127: error: too few arguments to function 'zend_error'
ow_wrap.c: In function '_wrap_get_error_print':
ow_wrap.c:1147: error: expected ')' before ';' token
ow_wrap.c:1147: error: too few arguments to function 'zend_error'
ow_wrap.c: In function '_wrap_set_error_level':
ow_wrap.c:1171: error: expected ')' before ';' token
ow_wrap.c:1171: error: too few arguments to function 'zend_error'
ow_wrap.c: In function '_wrap_get_error_level':
ow_wrap.c:1191: error: expected ')' before ';' token
ow_wrap.c:1191: error: too few arguments to function 'zend_error'
make[3]: *** [ow_wrap.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/sys-fs/owfs-2.7_p3/work/owfs-2.7p3/module/swig/php'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-fs/owfs-2.7_p3/work/owfs-2.7p3/module/swig'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-fs/owfs-2.7_p3/work/owfs-2.7p3/module'
make: *** [all-recursive] Error 1
 *
 * ERROR: sys-fs/owfs-2.7_p3 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2126:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed"
 *  The die message:
 *   emake failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-fs/owfs-2.7_p3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-fs/owfs-2.7_p3/temp/environment'.
 *
Comment 5 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-02-23 16:55:59 UTC
*owfs-2.7_p3 (24 Jan 2008)

  24 Jan 2008; Wolfram Schlich <wschlich@gentoo.org> +owfs-2.7_p3.ebuild:
  version bump
Comment 6 Wolfram Schlich (RETIRED) gentoo-dev 2008-02-25 07:17:58 UTC
(In reply to comment #3)
> /etc/init.d/owfs references OWHTTPD_OPTS; it should be OWFS_OPTS.  

Thanks, fixed in CVS :)

> I don't like the default options, like assuming a serial adapter is on
> /dev/ttyS0.  This is a matter of user configuration which should not
> be guessed about,

Does it hurt anyone?

> and anyway the ebuild installs /etc/conf.d/stuff so why duplicate the
> same defaults in the /etc/init.d scripts themselves?

I might consider dropping that at some point...

> Where did the default mount point /var/lib/owfs/mnt come from?  Seems like
> kindof an out-of-the-way place for it.  My convention is to use /mnt/ow0,
> /mnt/ow1 and so on, because there can be more than one mounted bus.  (But if
> you have owserver handle the multiple buses, I think they can be aggregated
> into a single mount point.)

That's why the default is overridable by /etc/conf.d/owfs.

> /etc/init.d/owfs should have
> 
> need net owserver fuse
> 
> and owhttpd should need owserver too.  (The assumption is you want to run more
> than one service rather than e.g. just owfs talking directly to the hardware
> bus.)

No. Anyone can choose to have owfs/owhttpd/owftpd talk to the
1-wire bus adapter directly and not via owserver.
Therefore it's only "use" and not "need".
You can always override that by putting RC_NEED=owserver into, say,
/etc/conf.d/owhttpd.

> I don't see Wolfram's or Daniel's problems happening on my system; after
> getting the init scripts configured to start up the processes the way I want,
> it seems to be working so far.

As 2.7_p3 is already in the tree, I don't care about the _p2
issues anymore as those are gone with _p3 anyway :)
Comment 7 Wolfram Schlich (RETIRED) gentoo-dev 2008-02-25 07:21:21 UTC
(In reply to comment #4)
> There is a compilation problem if the php USE flag is turned on:
> 
> ow_wrap.c: In function 'SWIG_Php4_GetModule':
> ow_wrap.c:691: error: too few arguments to function 'zend_get_constant'
> [...]

What versions of php and swig do you have installed?
It compiled fine on my system using dev-lang/php-5.2.5-r1 and
dev-lang/swig-1.3.31.
Anyway, please open up a new bug as this here was a version bump
bug. Thanks!
Comment 8 Shawn Rutledge 2008-02-25 08:01:12 UTC
(In reply to comment #6)
> > I don't like the default options, like assuming a serial adapter is on
> > /dev/ttyS0.  This is a matter of user configuration which should not
> > be guessed about,
> 
> Does it hurt anyone?

If anyone's system has any other hardware attached to ttyS0, it could have some unintended effects.  For example a printer, plotter, a terminal being used as the console, modem, embedded-system programming device, an X10 module, a Bluetooth radio, some sort of bit-banged device... these are all things that might potentially either do something, display something, or just get confused if you start sending data (to probe for 1-wire devices) when the user starts up the service.

> > /etc/init.d/owfs should have
> > 
> > need net owserver fuse
> > 
> > and owhttpd should need owserver too.  (The assumption is you want to run more
> > than one service rather than e.g. just owfs talking directly to the hardware
> > bus.)
> 
> No. Anyone can choose to have owfs/owhttpd/owftpd talk to the
> 1-wire bus adapter directly and not via owserver.

Well you were not afraid to make the assumption that there is a DS9097 on ttyS0, but assuming that one will use owserver is a pretty reasonable default, IMO.  But if this default cannot be overridden without modifying the init script, then I guess you are right, it shouldn't be a default.

> Therefore it's only "use" and not "need".
> You can always override that by putting RC_NEED=owserver into, say,
> /etc/conf.d/owhttpd.

OK, that's good to know.  

Maybe the default conf files need to have more examples, commented out, but not provide any default configuration: the user just has to edit them before getting any results.  

Or you could have in /etc/conf.d/owserver
OWSERVER_OPTS="-u"

that should be safe because it uses libusb to discover the USB interface.  If the USB interface is not plugged in, then nothing bad happens, right?  And I suspect the usage of the USB dongles will be growing and the 9097's declining anyway.
Comment 9 Shawn Rutledge 2008-02-25 08:11:38 UTC
(In reply to comment #6)
> What versions of php and swig do you have installed?
> It compiled fine on my system using dev-lang/php-5.2.5-r1 and
> dev-lang/swig-1.3.31.

I have the same ones.  Maybe it's an AMD64 thing.

> Anyway, please open up a new bug as this here was a version bump
> bug. Thanks!

OK it is bug 211341.
Comment 10 Wolfram Schlich (RETIRED) gentoo-dev 2008-02-26 10:26:54 UTC
(In reply to comment #8)
> (In reply to comment #6)
> If anyone's system has any other hardware attached to ttyS0, it could have some
> unintended effects.  For example a printer, plotter, a terminal being used as
> the console, modem, embedded-system programming device, an X10 module, a
> Bluetooth radio, some sort of bit-banged device... these are all things that
> might potentially either do something, display something, or just get confused
> if you start sending data (to probe for 1-wire devices) when the user starts up
> the service.

By default, the daemons are being run as user owfs, which by default
cannot access the serial devices. Thus, nothing bad can happen by default.

> > No. Anyone can choose to have owfs/owhttpd/owftpd talk to the
> > 1-wire bus adapter directly and not via owserver.
> 
> Well you were not afraid to make the assumption that there is a DS9097 on
> ttyS0, but assuming that one will use owserver is a pretty reasonable default,
> IMO.  But if this default cannot be overridden without modifying the init
> script, then I guess you are right, it shouldn't be a default.

Not the init script, just /etc/conf.d/ow*.

> Maybe the default conf files need to have more examples, commented out, but not
> provide any default configuration: the user just has to edit them before
> getting any results.  

You're free to provide patches :)

> Or you could have in /etc/conf.d/owserver
> OWSERVER_OPTS="-u"
> 
> that should be safe because it uses libusb to discover the USB interface.  If
> the USB interface is not plugged in, then nothing bad happens, right?  And I
> suspect the usage of the USB dongles will be growing and the 9097's declining
> anyway.

As the package is running the daemons as owfs:owfs by default and
that user is not a member of group usb by default, that doesn't make
any sense. Well, as the same goes for the serial device, I will just make
owserver fail to start by default, so everyone will have to wake up and
open their eyes.