Discussion:
[rrd-users] RRDs perl library not on CPAN?
(too old to reply)
Cosimo Streppone
2015-09-10 14:25:51 UTC
Permalink
Hi,

I'm working on a statsd-to-RRD backend in form of a Perl library
(for Net::Statsd::Server if you're curious).

I started out by including RRD::Simple, then I noticed it uses
RRDs.pm under the hood, so I converted my code to it.

I searched for RRDs on the CPAN, but I can't find it,
not on metacpan nor on search.cpan.org.

I saw that debian has a librrds-perl package which seems to
point back to rrdtool[1].

Question: is RRDs not on CPAN? If so, why?

Doesn't that make CPAN distributions that need to depend
on RRDs/RRDtool automatically broken?

Thanks,

- --
Cosimo

[1] https://sources.debian.net/src/rrdtool/1.5.4-5/bindings/perl-shared/
Tobias Oetiker
2015-09-10 15:42:00 UTC
Permalink
Hi Cosimo,
Post by Cosimo Streppone
Hi,
I'm working on a statsd-to-RRD backend in form of a Perl library
(for Net::Statsd::Server if you're curious).
I started out by including RRD::Simple, then I noticed it uses
RRDs.pm under the hood, so I converted my code to it.
I searched for RRDs on the CPAN, but I can't find it,
not on metacpan nor on search.cpan.org.
I saw that debian has a librrds-perl package which seems to
point back to rrdtool[1].
Question: is RRDs not on CPAN? If so, why?
Doesn't that make CPAN distributions that need to depend
on RRDs/RRDtool automatically broken?
the rrdtool distribution contains a bunch of language bindings ...
since I develop both, rrdtool and update the bindings as required,
distributing the rrdtool bindings seperately on cpan seems a bit
odd, as they make no sense without rrdtool ... and are coupled to
the version of rrdtool ...

if you know a clever way to handle this, let me know.

cheers
tobi
Post by Cosimo Streppone
--
Cosimo
[1] https://sources.debian.net/src/rrdtool/1.5.4-5/bindings/perl-shared/
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
www.oetiker.ch ***@oetiker.ch +41 62 775 9902
Maxwell Carey
2015-09-10 15:57:30 UTC
Permalink
Post by Cosimo Streppone
I started out by including RRD::Simple, then I noticed it uses
RRDs.pm under the hood, so I converted my code to it.
I searched for RRDs on the CPAN, but I can't find it,
not on metacpan nor on search.cpan.org.
Doesn't that make CPAN distributions that need to depend
on RRDs/RRDtool automatically broken?
No more broken than any Perl module that has a dependency on an external
library or binary, e.g. SNMP.pm, XML::LibXML, most of the DBD::* modules,
the list goes on.

If you try to install one of these from CPAN without first installing the
dependency, the build will break. This makes sense, if you think about it.
I wouldn't expect DBD::mysql to install properly if I didn't have the MySQL
client installed on my system, for example.
Alceu R. de Freitas Jr.
2015-09-10 21:26:41 UTC
Permalink
I agree with Maxwell... there are plenty of distributions on CPAN in the same situation.
On the other hand, you might get a higher audience to validate your code by people using CPAN with CPAN::Reporter enabled.
I'm not acquainted with XS anyway, but the trick is to find out if the current RRDTool libraries that are available have the correct version to work with the Perl bindings. Not sure how to implement it anyway.
I did a quick check on Makefile.PL and I think that Devel::CheckOS (http://search.cpan.org/~dcantrell/Devel-CheckOS-1.76/lib/Devel/CheckOS.pm) might help checking specifics for O.S. and even generating a proper error if the O.S. is unsupported. Maybe Config module might have the proper directories for settings some of the paths definitions that you have along the file too.
Another tip is to check if Strawberry Perl cannot offer better support on Windows for definitions of compilers.

If everything else fails, you could offer to install RRDTool by downloading the source and compiling it. RRDTool-OO distribution (http://cpansearch.perl.org/src/MSCHILLI/RRDTool-OO-0.36/Makefile.PL) does exactly that (although not very elegant way IMHO).

It looks like a lot of work but I think it's worth... I'm willing on giving a hand with the non-XS related suggestions. :-)
Regards,
Alceu

De: Maxwell Carey <***@ucar.edu>
Para: Tobias Oetiker <***@oetiker.ch>
Cc: RRDtool users <rrd-***@lists.oetiker.ch>; "debian-***@lists.debian.org" <debian-***@lists.debian.org>
Enviadas: Quinta-feira, 10 de Setembro de 2015 12:57
Assunto: Re: [rrd-users] RRDs perl library not on CPAN?
Post by Cosimo Streppone
I started out by including RRD::Simple, then I noticed it uses
RRDs.pm under the hood, so I converted my code to it.
I searched for RRDs on the CPAN, but I can't find it,
not on metacpan nor on search.cpan.org.
Doesn't that make CPAN distributions that need to depend
on RRDs/RRDtool automatically broken?
No more broken than any Perl module that has a dependency on an external library or binary, e.g. SNMP.pm, XML::LibXML, most of the DBD::* modules, the list goes on.

If you try to install one of these from CPAN without first installing the dependency, the build will break. This makes sense, if you think about it. I wouldn't expect DBD::mysql to install properly if I didn't have the MySQL client installed on my system, for example.
Tobias Oetiker
2015-09-10 21:32:34 UTC
Permalink
Post by Maxwell Carey
Post by Cosimo Streppone
I started out by including RRD::Simple, then I noticed it uses
RRDs.pm under the hood, so I converted my code to it.
I searched for RRDs on the CPAN, but I can't find it,
not on metacpan nor on search.cpan.org.
Doesn't that make CPAN distributions that need to depend
on RRDs/RRDtool automatically broken?
No more broken than any Perl module that has a dependency on an external
library or binary, e.g. SNMP.pm, XML::LibXML, most of the DBD::* modules,
the list goes on.
If you try to install one of these from CPAN without first installing the
dependency, the build will break. This makes sense, if you think about it.
I wouldn't expect DBD::mysql to install properly if I didn't have the MySQL
client installed on my system, for example.
so you would want me to maintain packages for each of the scripting
languages supported by rrdtool (which are tied to features in
certain versions of the library) independently of the main program
and keep them updated in the different scripting languages
repositories ?

cheers
tobi
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
www.oetiker.ch ***@oetiker.ch +41 62 775 9902
Maxwell Carey
2015-09-10 21:56:16 UTC
Permalink
Post by Tobias Oetiker
Post by Maxwell Carey
Post by Cosimo Streppone
I started out by including RRD::Simple, then I noticed it uses
RRDs.pm under the hood, so I converted my code to it.
I searched for RRDs on the CPAN, but I can't find it,
not on metacpan nor on search.cpan.org.
Doesn't that make CPAN distributions that need to depend
on RRDs/RRDtool automatically broken?
No more broken than any Perl module that has a dependency on an external
library or binary, e.g. SNMP.pm, XML::LibXML, most of the DBD::* modules,
the list goes on.
If you try to install one of these from CPAN without first installing the
dependency, the build will break. This makes sense, if you think about
it.
Post by Maxwell Carey
I wouldn't expect DBD::mysql to install properly if I didn't have the
MySQL
Post by Maxwell Carey
client installed on my system, for example.
so you would want me to maintain packages for each of the scripting
languages supported by rrdtool (which are tied to features in
certain versions of the library) independently of the main program
and keep them updated in the different scripting languages
repositories ?
Nope, not what I'm saying at all, sorry if I was unclear. I was responding
to Cosimo's question, "Doesn't that make CPAN distributions that need to
depend on RRDs/RRDtool automatically broken?" My point was that RRD::Simple
is not "automatically broken" because it's dependent on RRDs/rrdtool, just
like XML::LibXML is not broken because it's dependent on libxml2. Some Perl
modules have external dependencies; if you want to use those modules, you
have to install the dependencies yourself. You can't expect the CPAN shell
to install libxml2 for you, and you can't expect it to install rrdtool for
you either.

The way you're currently packaging RRDs is fine, and I can't imagine it
working very well on CPAN because of the version dependencies you mention.
Loading...