[Nut-upsdev] HAL and UPSs (was: Small feature request for 0.5.9)

Arnaud Quette aquette.dev at gmail.com
Thu Apr 12 12:53:24 UTC 2007


Hi Dave and HAL fellows,

2007/3/30, David Zeuthen <david at fubar.dk>:
>
> Hi!
>
> On Fri, 2007-03-30 at 11:22 +0200, Arnaud Quette wrote:
> > I would really need an "addondir" variable in hal.pc to get to exact
> > path to install the NUT addons...
>
> I just clarified this in the spec with this commit
>
>  http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=e7010183bf3a052f13bd735669cfc4b5e846bdab
>
> and I uploaded a version with this change here
>
>  http://people.freedesktop.org/~david/hal-spec/hal-spec.html#device-properties-info-callouts
>
> The answer: to be portable, install your addon in $libdir/hal/scripts
>
> (e.g. where $libdir typically is is /usr/lib or /usr/lib64)
>

point taken, thanks.

btw, the "Latest HAL specification" from the FD page is broken:
http://gitweb.freedesktop.org/?p=hal.git;a=blob_plain;f=doc/spec/hal-spec.html

you should replace it with your above link...

> > Something that would act like:
> > pkg-config --silence-errors --variable=addondir hal
> > => /usr/lib/hal/
> >
> > The same goes for the fdi file. IMHO, this should point the thirdparty
> > directory, since it's oriented toward external apps.
>
> This should already be clarified in the spec in this section.
>
>  http://people.freedesktop.org/~david/hal-spec/hal-spec.html#id3065099
>
> The answer here is: install your information fdi files (for matching
> supported devices) in
>
>  $datadir/hal/fdi/information/20thirdparty

that's the one I was searching for...

> and the policy files (for launching the addon) in
>
>  $datadir/hal/fdi/policy/20thirdparty
>
> You may combine both files into a single one; in that case put it in
> 'policy' rather than 'information'.
>
> (e.g. where $datadir typically is is /usr/share)
>
> Does that help?

greatly, thanks.
I'm still not sure about the policy: should that be provided by nut,
or gpm / whatever... ?

> > Since I'm currently finishing the NUT to HAL bridge, I'll need this to
> > produce some final integration and packages.
>
> Cool, I'd love to look at the code and give feedback on it.

for sure, you (and others) are more than welcome.
the file to look at are:
- drivers/main-hal.c (the main(), search for HAL comments)
- drivers/dstate-hal.c (the wrapper that feed HAL instead of NUT sockets).

> Do you have a pointer?

nut trunk:
svn co svn://svn.debian.org/nut/trunk

have a look at trunk/docs/nut-hal.txt for compilation / usage info.

it's still a work in progress, but it's in better shape since the last
time. Though it still need some love, I'm considering a backport in
the stable branch for a quicker release. But this would need some
feedback from you and Richard at least...

Arnaud
-- 
Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/
OpenSource Developer - http://arnaud.quette.free.fr/



More information about the Nut-upsdev mailing list