RRDs perl library not on CPAN?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

RRDs perl library not on CPAN?

Cosimo Streppone
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlXxku8ACgkQ2BIPLEJOQdnYiACfUJCIQ9SMy8E+/l7SuPrQmNge
ZgUAoKNAT42eDsIMlE+CQv6Qm44dGdWx
=BUg4
-----END PGP SIGNATURE-----

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: RRDs perl library not on CPAN?

oetiker
Administrator
Hi Cosimo,

Today Cosimo Streppone wrote:

> 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



>
> --
> 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 [hidden email] +41 62 775 9902

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: RRDs perl library not on CPAN?

Maxwell Carey

Today Cosimo Streppone wrote:

> 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.

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: RRDs perl library not on CPAN?

Alceu
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 <[hidden email]>
Para: Tobias Oetiker <[hidden email]>
Cc: RRDtool users <[hidden email]>; "[hidden email]" <[hidden email]>
Enviadas: Quinta-feira, 10 de Setembro de 2015 12:57
Assunto: Re: [rrd-users] RRDs perl library not on CPAN?




Today Cosimo Streppone wrote:

> 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.


_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users



_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: RRDs perl library not on CPAN?

oetiker
Administrator
In reply to this post by Maxwell Carey
Today Maxwell Carey wrote:

> > Today Cosimo Streppone wrote:
> >
> > > 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 [hidden email] +41 62 775 9902

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply | Threaded
Open this post in threaded view
|

Re: RRDs perl library not on CPAN?

Maxwell Carey
On Thu, Sep 10, 2015 at 3:32 PM, Tobias Oetiker <[hidden email]> wrote:
Today Maxwell Carey wrote:

> > Today Cosimo Streppone wrote:
> >
> > > 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 ?

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.

_______________________________________________
rrd-users mailing list
[hidden email]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users