Arnaud Quette
2007-Sep-11 18:53 UTC
[Nut-upsdev] Bug#439986: Renaming `UPSCONN' to `UPSCONN_t' causes problems when upgrading.
tags 439986 upstream thanks Hi Florian, 2007/8/29, Florian Forster <octo at verplant.org>:> Package: nut-dev > Version: 2.2.0-1 > Severity: minor > > After upgrading from version 2.0.something to version 2.2.0-1 the type > `UPSCONN' had been renamed to `UPSCONN_t'. This is a problem for > software that is supposed to work with different versions of this > library - especially since it's not possible to determine the version > from within the preprocessor. > > The arguably best solution would be to add an additional type > typedef UPSCONN_t UPSCONN > for backwards compatibility. > > The second best option would be to use a define, such as > #define UPSCONN UPSCONN_t > > The third best option would be to add something to let the preprocessor > determine the libraries version and have it configure the program > accordingly. An example could be: > /* Version 2.2.0 */ > #define LIBUPSCLIENT_VERSION 200200000LSince I'm preparing 2.2.1, I will add a typedef to manage the backward compat. I've fixed it in the subversion trunk and Testing branches. A last question: what is your use of this (wmnut or something else)? Thanks for the report. Arnaud -- Free Software Developer - http://arnaud.quette.free.fr/ Debian Developer - http://people.debian.org/~aquette/ Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Ubuntu Media Center (UMC) Project Leader - https://launchpad.net/~umc-team
Florian Forster
2007-Sep-12 07:04 UTC
[Nut-upsdev] Bug#439986: Renaming `UPSCONN' to `UPSCONN_t' causes problems when upgrading.
Hi Arnaud, On Tue, Sep 11, 2007 at 08:53:21PM +0200, Arnaud Quette wrote:> Since I'm preparing 2.2.1, I will add a typedef to manage the backward compat. > I've fixed it in the subversion trunk and Testing branches.thanks :)> A last question: what is your use of this (wmnut or something else)?It's collectd <http://collectd.org/>. The story is this: First, a user complained that he couldn't build the plugin which queries nut. After some debugging it turned out that his version of libupsclient was linked against libssl. So I told him (how) to use CFLAGS and put him off the next version which would use `libupsclient-config' to get the flags right automatically. He came back to me and said that the configure script detected the library correctly, but he still had problems building the plugin. I saw in the CC output he sent me that the type was missing and after upgrading my Debian packages I could reproduce the problem.. I've added the appropriate checks to the configurescript now, but I guess other client projects will have the same problem eventually.. Regards, -octo -- Florian octo Forster Hacker in training GnuPG: 0x91523C3D http://verplant.org/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20070912/19a0ca77/attachment.pgp
Arnaud Quette
2007-Sep-12 07:12 UTC
[Nut-upsdev] Bug#439986: Renaming `UPSCONN' to `UPSCONN_t' causes problems when upgrading.
Hi Florian 2007/9/12, Florian Forster <octo at verplant.org>:> Hi Arnaud, > > On Tue, Sep 11, 2007 at 08:53:21PM +0200, Arnaud Quette wrote: > > Since I'm preparing 2.2.1, I will add a typedef to manage the backward compat. > > I've fixed it in the subversion trunk and Testing branches. > > thanks :) > > > A last question: what is your use of this (wmnut or something else)? > > It's collectd <http://collectd.org/>.I should have recalled it, sorry ;-) btw, I've added the specific nut-plugin link in the client page.> The story is this: > First, a user complained that he couldn't build the plugin which > queries nut. After some debugging it turned out that his version of > libupsclient was linked against libssl. So I told him (how) to use > CFLAGS and put him off the next version which would use > `libupsclient-config'prefer to use pkg-config and its autoconf macros. libupsclient-config is only there for systems not supporting pkg-config...> to get the flags right automatically. He came back > to me and said that the configure script detected the library correctly, > but he still had problems building the plugin. I saw in the CC output he > sent me that the type was missing and after upgrading my Debian packages > I could reproduce the problem.. > > I've added the appropriate checks to the configurescript now, but I > guess other client projects will have the same problem eventually..there is not many clients using that lib. For example, nagios has reimplemented the network protocol (since it's ascii, and easy to do so). thanks and keep up your good work, Arnaud -- Free Software Developer - http://arnaud.quette.free.fr/ Debian Developer - http://people.debian.org/~aquette/ Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Ubuntu Media Center (UMC) Project Leader - https://launchpad.net/~umc-team