Your message dated Fri, 04 Jan 2008 11:17:06 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#458978: fixed in xfce4-sensors-plugin 0.10.99.4~svn-r3775-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: xfce4-sensors-plugin
Version: 0.10.99.2-1
Severity: wishlist
Tags: patch

Hi,

A new upstream version of lm-sensors has been released upstream. The API
has changed, so the softwares using libsensors3 have to be modified so
that they can use libsensors4. It is planned to keep both versions for a
while, but the goal is to get rid of libsensors3 in Lenny.

You will find attached a patch for xfce4-sensors-plugin that changes
both upstream code and debian/ directory. I have moved lm-sensors from
Depends: to Recommends: as the configuration file has been moved to the
library, so it is not strictly necessary anymore to have lm-sensors
installed to get xfce4-sensors-plugin working.

Could you please apply this patch in your next upload?

Thanks,
Aurelien

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.23-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
diff -u xfce4-sensors-plugin-0.10.99.2/debian/control 
xfce4-sensors-plugin-0.10.99.2/debian/control
--- xfce4-sensors-plugin-0.10.99.2/debian/control
+++ xfce4-sensors-plugin-0.10.99.2/debian/control
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Xfce Maintainers <[EMAIL PROTECTED]>
 Uploaders: Emanuele Rocca <[EMAIL PROTECTED]>, Simon Huggins <[EMAIL 
PROTECTED]>, Rudy Godoy <[EMAIL PROTECTED]>, Yves-Alexis Perez <[EMAIL 
PROTECTED]>, Stefan Ott <[EMAIL PROTECTED]>
-Build-Depends: cdbs, debhelper (>= 4.1), libgtk2.0-dev, xfce4-panel-dev (>= 
4.4.1), libxml2-dev, libsensors-dev, libxml-parser-perl
+Build-Depends: cdbs, debhelper (>= 4.1), libgtk2.0-dev, xfce4-panel-dev (>= 
4.4.1), libxml2-dev, libsensors4-dev, libxml-parser-perl
 Standards-Version: 3.7.3
 Homepage: http://goodies.xfce.org/
 Vcs-Svn: svn://svn.debian.org/pkg-xfce/goodies/xfce4-sensors-plugin/
@@ -11,8 +11,8 @@
 
 Package: xfce4-sensors-plugin
 Architecture: any
-Depends: ${shlibs:Depends}, lm-sensors
-Recommends: hddtemp
+Depends: ${shlibs:Depends}
+Recommends: hddtemp, lm-sensors
 Suggests: xsensors
 Description: hardware sensors plugin for the Xfce4 panel
  The sensors plugin reads your hardware sensor values and displays
only in patch2:
unchanged:
--- xfce4-sensors-plugin-0.10.99.2.orig/panel-plugin/middlelayer.c
+++ xfce4-sensors-plugin-0.10.99.2/panel-plugin/middlelayer.c
@@ -110,6 +110,7 @@
 }
 
 
+#if SENSORS_API_VERSION < 0x400 /* libsensor 3 code */
 void
 categorize_sensor_type (t_chipfeature* chipfeature)
 {
@@ -141,7 +142,7 @@
 
    TRACE ("leaves categorize_sensor_type");
 }
-
+#endif
 
 int
 sensors_get_feature_wrapper (t_chip *chip, int number, double *value)
@@ -153,7 +154,11 @@
 
     if (chip->type==LMSENSOR ) {
         #ifdef HAVE_LIBSENSORS
-            return sensors_get_feature (*(chip->chip_name), number, value);
+            #if SENSORS_API_VERSION < 0x400 /* libsensor 3 code */
+                return sensors_get_feature (*(chip->chip_name), number, value);
+            #else
+                return sensors_get_value (chip->chip_name, number, value);
+            #endif
         #else
             return -1;
         #endif
only in patch2:
unchanged:
--- xfce4-sensors-plugin-0.10.99.2.orig/panel-plugin/lmsensors.c
+++ xfce4-sensors-plugin-0.10.99.2/panel-plugin/lmsensors.c
@@ -47,12 +47,28 @@
     chip->chip_name = (sensors_chip_name *) g_malloc 
(sizeof(sensors_chip_name));
     memcpy ( (void *) (chip->chip_name), (void *) name, 
sizeof(sensors_chip_name) );
 
+#if SENSORS_API_VERSION < 0x400 /* libsensor 3 code */
     chip->sensorId = g_strdup_printf ("%s-%x-%x", name->prefix, name->bus, 
name->addr);
+#else
+    switch (name->bus.type) {
+        case SENSORS_BUS_TYPE_I2C:
+        case SENSORS_BUS_TYPE_SPI:
+            chip->sensorId = g_strdup_printf ("%s-%x-%x", name->prefix,
+                                              name->bus.nr, name->addr);
+            break;
+        default:
+            chip->sensorId = g_strdup_printf ("%s-%x", name->prefix, 
name->addr);
+    }
+#endif
     chip->num_features=0;
     chip->name = g_strdup (_("LM Sensors"));
     chip->chip_features = g_ptr_array_new();
 
+#if SENSORS_API_VERSION < 0x400 /* libsensor 3 code */
     chip->description = g_strdup (sensors_get_adapter_name 
(num_sensorchips-1));
+#else
+    chip->description = g_strdup (sensors_get_adapter_name (&name->bus));
+#endif
 
     TRACE("leaves setup_chip");
 
@@ -71,14 +87,23 @@
     chipfeature->address = number;
     chipfeature->show = FALSE;
 
+#if SENSORS_API_VERSION < 0x400 /* libsensor 3 code */
     categorize_sensor_type (chipfeature);
+#endif
 
     TRACE("leaves setup_chipfeature");
 }
 
 
+#if SENSORS_API_VERSION < 0x400 /* libsensor 3 code */
 t_chipfeature *find_chipfeature    (const sensors_chip_name *name, t_chip 
*chip, int number)
 {
+#else
+t_chipfeature *find_chipfeature    (const sensors_chip_name *name, t_chip 
*chip, const sensors_feature *feature)
+{
+    const sensors_subfeature *sub_feature = NULL;
+    int number = -1;
+#endif
     int res;
     double sensorFeature;
     t_chipfeature *chipfeature;
@@ -87,6 +112,7 @@
 
     chipfeature = g_new0 (t_chipfeature, 1);
 
+#if SENSORS_API_VERSION < 0x400 /* libsensor 3 code */
     if (sensors_get_ignored (*(name), number)==1) {
         res = sensors_get_label(*(name), number,
                                 &(chipfeature->name));
@@ -95,6 +121,87 @@
             res = sensors_get_feature (*(name), number,
                                         &sensorFeature);
 
+#else /* libsensors 4 code */
+
+    switch (feature->type) {
+    case SENSORS_FEATURE_IN:
+        sub_feature = sensors_get_subfeature(name, feature,
+                                             SENSORS_SUBFEATURE_IN_INPUT);
+        if (!sub_feature)
+            break;
+
+        number = sub_feature->number;
+        chipfeature->class = VOLTAGE;
+        chipfeature->min_value = 2.8;
+        chipfeature->max_value = 12.2;
+
+        if ((sub_feature = sensors_get_subfeature(name, feature,
+                SENSORS_SUBFEATURE_IN_MIN)) &&
+                !sensors_get_value(name, sub_feature->number, &sensorFeature))
+            chipfeature->min_value = sensorFeature;
+
+        if ((sub_feature = sensors_get_subfeature(name, feature,
+                SENSORS_SUBFEATURE_IN_MAX)) &&
+                !sensors_get_value(name, sub_feature->number, &sensorFeature))
+            chipfeature->max_value = sensorFeature;
+
+        break;
+
+    case SENSORS_FEATURE_FAN:
+        sub_feature = sensors_get_subfeature(name, feature,
+                                             SENSORS_SUBFEATURE_FAN_INPUT);
+        if (!sub_feature)
+            break;
+
+        number = sub_feature->number;
+        chipfeature->class = SPEED;
+        chipfeature->min_value = 1000.0;
+        chipfeature->max_value = 3500.0;
+
+        if ((sub_feature = sensors_get_subfeature(name, feature,
+                SENSORS_SUBFEATURE_FAN_MIN)) &&
+                !sensors_get_value(name, sub_feature->number, &sensorFeature))
+            chipfeature->min_value = sensorFeature;
+
+        break;
+
+    case SENSORS_FEATURE_TEMP:
+        sub_feature = sensors_get_subfeature(name, feature,
+                                             SENSORS_SUBFEATURE_TEMP_INPUT);
+        if (!sub_feature)
+            break;
+
+        number = sub_feature->number;
+        chipfeature->class = TEMPERATURE;
+        chipfeature->min_value = 0.0;
+        chipfeature->max_value = 80.0;
+
+        if ((sub_feature = sensors_get_subfeature(name, feature,
+                SENSORS_SUBFEATURE_TEMP_MIN)) &&
+                !sensors_get_value(name, sub_feature->number, &sensorFeature))
+            chipfeature->min_value = sensorFeature;
+
+        if (((sub_feature = sensors_get_subfeature(name, feature,
+                SENSORS_SUBFEATURE_TEMP_MAX)) ||
+                (sub_feature = sensors_get_subfeature(name, feature,
+                SENSORS_SUBFEATURE_TEMP_CRIT))) &&
+                !sensors_get_value(name, sub_feature->number, &sensorFeature))
+            chipfeature->max_value = sensorFeature;
+    }
+
+    if (number != -1) {
+
+        chipfeature->name = sensors_get_label(name, feature);
+
+        if (!chipfeature->name)
+            chipfeature->name = feature->name;
+
+        if (chipfeature->name) {
+            res = sensors_get_value (name, number,
+                                        &sensorFeature);
+
+#endif /* libsensor3 / libsensors4 code */
+
             if (res==0) {
                 setup_chipfeature (chipfeature, number, sensorFeature);
                 chip->num_features++;
@@ -103,6 +210,7 @@
             }
         }
     }
+    g_free(chipfeature);
 
     TRACE("leaves find_chipfeature with null");
     return NULL;
@@ -114,8 +222,9 @@
     int sensorsInit, nr1, nr2, num_sensorchips; /*    , numchips;  */
     t_chip *chip;
     t_chipfeature *chipfeature; /* , *furtherchipfeature; */
-    FILE *file;
     const sensors_chip_name *detected_chip;
+#if SENSORS_API_VERSION < 0x400 /* libsensor 3 code */
+    FILE *file;
     const sensors_feature_data *sfd;
 
     TRACE("enters initialize_libsensors");
@@ -167,6 +276,45 @@
         TRACE ("leaves initialize_libsensors with -1");
         return -1;
     }
+#else
+    const sensors_feature *sfd;
+    TRACE("enters initialize_libsensors");
+    
+    sensorsInit = sensors_init(NULL);
+    if (sensorsInit != 0)
+    {
+        g_printf(_("Error: Could not connect to sensors!"));
+        /* FIXME: better popup window? write to special logfile? */
+        return -2;
+    }
+
+    num_sensorchips = 0;
+    detected_chip = sensors_get_detected_chips (NULL, &num_sensorchips);
+    /* iterate over chips on mainboard */
+    while (detected_chip!=NULL)
+    {
+        chip = setup_chip (chips, detected_chip, num_sensorchips);
+
+        nr1 = 0;
+        nr2 = 0;
+        /* iterate over chip features, i.e. id, cpu temp, mb temp... */
+        /* numchips = get_number_chip_features (detected_chip); */
+        sfd = sensors_get_features (detected_chip, &nr1);
+        while (sfd != NULL)
+        {
+            chipfeature = find_chipfeature (detected_chip, chip, sfd);
+            if (chipfeature!=NULL) {
+                g_ptr_array_add (chip->chip_features, chipfeature);
+            }
+            sfd = sensors_get_features (detected_chip, &nr1);
+        }
+
+        detected_chip = sensors_get_detected_chips (NULL, &num_sensorchips);
+    } /* end while sensor chipNames */
+
+    TRACE ("leaves initialize_libsensors with 1");
+    return 1;
+#endif
 }
 
 

--- End Message ---
--- Begin Message ---
Source: xfce4-sensors-plugin
Source-Version: 0.10.99.4~svn-r3775-1

We believe that the bug you reported is fixed in the latest version of
xfce4-sensors-plugin, which is due to be installed in the Debian FTP archive:

xfce4-sensors-plugin_0.10.99.4~svn-r3775-1.diff.gz
  to 
pool/main/x/xfce4-sensors-plugin/xfce4-sensors-plugin_0.10.99.4~svn-r3775-1.diff.gz
xfce4-sensors-plugin_0.10.99.4~svn-r3775-1.dsc
  to 
pool/main/x/xfce4-sensors-plugin/xfce4-sensors-plugin_0.10.99.4~svn-r3775-1.dsc
xfce4-sensors-plugin_0.10.99.4~svn-r3775-1_amd64.deb
  to 
pool/main/x/xfce4-sensors-plugin/xfce4-sensors-plugin_0.10.99.4~svn-r3775-1_amd64.deb
xfce4-sensors-plugin_0.10.99.4~svn-r3775.orig.tar.gz
  to 
pool/main/x/xfce4-sensors-plugin/xfce4-sensors-plugin_0.10.99.4~svn-r3775.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Yves-Alexis Perez <[EMAIL PROTECTED]> (supplier of updated xfce4-sensors-plugin 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


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

Format: 1.7
Date: Fri, 04 Jan 2008 11:53:43 +0100
Source: xfce4-sensors-plugin
Binary: xfce4-sensors-plugin
Architecture: source amd64
Version: 0.10.99.4~svn-r3775-1
Distribution: unstable
Urgency: low
Maintainer: Debian Xfce Maintainers <[EMAIL PROTECTED]>
Changed-By: Yves-Alexis Perez <[EMAIL PROTECTED]>
Description: 
 xfce4-sensors-plugin - hardware sensors plugin for the Xfce4 panel
Closes: 458978
Changes: 
 xfce4-sensors-plugin (0.10.99.4~svn-r3775-1) unstable; urgency=low
 .
   * New upstream svn snapshot.
     add libsensors 3 support.                                   closes: #458978
   * debian/rules: enable configure flags explicitely.
   * debian/control: build-dep on hddtemp so its path is correctly detected.
Files: 
 445a3d2db2dfc771a9f8fc0a9d296b5c 1157 x11 optional 
xfce4-sensors-plugin_0.10.99.4~svn-r3775-1.dsc
 556ef244232b4970fc2e4da9aea73c13 431712 x11 optional 
xfce4-sensors-plugin_0.10.99.4~svn-r3775.orig.tar.gz
 0fd8b61854a670cb0366e298fdc43526 2253 x11 optional 
xfce4-sensors-plugin_0.10.99.4~svn-r3775-1.diff.gz
 1e4c5e80bd88508975cc7fe193902e36 47496 x11 optional 
xfce4-sensors-plugin_0.10.99.4~svn-r3775-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHfhHKTUTAIMXAW64RAidqAKCDbEc92KOsptGWrePtv2e6l+tvQgCfRD6L
bF8e46xkkarVETroSgSlSK0=
=LJxZ
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to