debian/0000755000000000000000000000000012134747022007170 5ustar debian/docs0000644000000000000000000000002611324233752010041 0ustar BUGS NEWS README TODO debian/xsensors.desktop0000644000000000000000000000031711330461305012442 0ustar [Desktop Entry] Type=Application Name=XSensors GenericName=Hardware Monitor Comment=View hardware health Icon=/usr/share/pixmaps/xsensors/default.xpm Exec=/usr/bin/xsensors Terminal=false Categories=System; debian/changelog0000644000000000000000000001222112134647153011044 0ustar xsensors (0.70-3) unstable; urgency=low * Add filename argument to image option in manpage * debian/control: - Comply with Standards-Version 3.9.4 - Build-Depend on debhelper (>= 9.20120909) * debian/rules: - don't link against unneeded libraries - remove dh_install and dh_installman overrides and add required files * debian/patches/*: - Provide more accurate error message when no supported sensors are found - Fix early termination during sensor detection (Closes: #665668) - Drop previous chip selection patches to fix commandline handling and reduce upstream delta (Closes: #665504) -- Nanley Chery Sat, 20 Apr 2013 22:24:38 -0400 xsensors (0.70-2) unstable; urgency=low * Thanks to Luca for the upload. * Comply with Standards-Version 3.9.2. - Remove article from beginning of package description * Fix FTBFS with these patches: (Closes: #610321, #622005, #625435) - remove-unused-variables.patch - replace-deprecated-gtk.patch * Add support for multiple chip selection and improve memory management - select-chip.patch - support-multiple-chips-on-cmd.patch - cleanup-allocs.patch -- Nanley Chery Mon, 12 Sep 2011 18:30:14 -0400 xsensors (0.70-1.1) unstable; urgency=medium * Non-maintainer upload. * debian/patches/deprecated_GTK.patch: - Replace deprecated GTK macro with related function (Closes: #577318). -- Luca Falavigna Sat, 08 May 2010 01:47:59 +0200 xsensors (0.70-1) unstable; urgency=low * New upstream release. - Swap voltage limits depending on the chip wiring. (Closes: #441138) - Provides support for all libsensors4 supported chips. (Closes: #460170) * Dropped previous patches due to upstream switching to newer libsensors. * Switched to dpkg-source 3.0 (quilt) format. * Bumped to Standards-Version 3.8.4. * Recommend lm-sensors instead of Depend. * Build-Depend on debhelper (>= 7.0.50) and libsensors4-dev. * debian/rules: use debhelper extensively. * Improved manpage for user-friendliness. * Updated and removed trailing whitespaces from files in debian/*. -- Nanley Chery Wed, 03 Feb 2010 00:24:53 -0500 xsensors (0.60-1) unstable; urgency=low * New upstream release (Closes: #446530) * debian/menu: fixed menu section. * debian/control: updated Build-Depends and Standards-Version. * debian/copyright: updated to debhelper suggested format. * debian/rules: added patching targets (to patch at build time) and removed compat variable. * debian/compat: added new file suggested by lintian. * debian/watch: added new file. * debian/patches: added new directory. - Added support for coretemp. - Applied sensors3.conf patch from Ubuntu. * Update copyright file to reflect package changes. -- Nanley Chery Tue, 05 Jan 2010 15:52:23 -0500 xsensors (0.50-1) unstable; urgency=low * New upstream release (Closes: #349130) + Adds support for smsc47b397, it8712, DDR2 SDRAM EEPROM * Remove recommendation for lm-sensors-mod (Closes: #377834) * Fixed the FSF address in copyright. * Quoted some stuff in the menu item. * Removed an ISO-Latin1 character from the manpage. -- Nick Rusnov Sun, 12 Nov 2006 18:23:08 -0800 xsensors (0.46-1) unstable; urgency=low * New upstream versions. (Closes: #243782) + Adds support for as99127f, w83697hf, lm90, adm1032, mc1066, max1617a, and w83791d. * Removed patch to deal with old versions of libsensors. -- Nick Rusnov Mon, 3 May 2004 09:25:33 -0700 xsensors (0.40-2) unstable; urgency=medium * This release closes several Release-Critical bugs. * Added dependency for lm-sensors (which contains sensors.conf) (Closes: #230424) * Depend on libsensors-dev (>= 2.8.4-1) (Closes: #237346) * Rebuild against libsensors-dev >= 2.8.4-1 (Closes: #215200) Thanks for the NMU. * Bumped standards version. -- Nick Rusnov Tue, 16 Mar 2004 10:18:19 -0800 xsensors (0.40-1.1) unstable; urgency=low * Non-maintainer upload * Rebuild to fix libsensors soname change (closes: #215200) * Fixed debhelper Build-Depends version While we are at it -- Riku Voipio Mon, 15 Dec 2003 20:54:28 +0200 xsensors (0.40-1) unstable; urgency=low * New Upstream Release + Added support for lm85, lm85b, lm85c, adm1027, adt7463, and emc6d100 chipsets. These chipsets are disabled in the current build because of an outdated libsensors in debian. * Updated for standards version 3.6.0 * Built with GTK2.0 now. * Updated manpage. -- Nick Rusnov Fri, 5 Sep 2003 08:59:40 -0700 xsensors (0.20-1) unstable; urgency=low * New upstream release. + Adds support for adm103, lm87 + Misc bugfixes. See upstream changelog. * Package now uses upstreams new autoconf support. * Fixed silly version cock-up. -- Nick Rusnov Wed, 12 Mar 2003 15:54:52 -0800 xsensors (0.10) unstable; urgency=low * Initial release. (closes: #164161) -- Nick Rusnov Thu, 10 Oct 2002 09:44:03 -0700 debian/rules0000755000000000000000000000017412070072476010255 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed %: dh $@ --with autotools-dev debian/xsensors.install0000644000000000000000000000005712067725502012452 0ustar debian/xsensors.desktop usr/share/applications debian/watch0000644000000000000000000000024111330457426010221 0ustar # Compulsory line, this is a version 3 file version=3 # Uncomment to examine a Webserver directory http://www.linuxhardware.org/xsensors/xsensors-(.*)\.tar\.gz debian/menu0000644000000000000000000000017111324632547010063 0ustar ?package(xsensors):needs="X11" section="Applications/System/Monitoring"\ title="XSensors" command="/usr/bin/xsensors" debian/compat0000644000000000000000000000000212066715431010371 0ustar 9 debian/xsensors.manpages0000644000000000000000000000002212066417216012566 0ustar debian/xsensors.1 debian/control0000644000000000000000000000116712070072773010603 0ustar Source: xsensors Section: x11 Priority: optional Maintainer: Nanley Chery Uploaders: Nick Rusnov Build-Depends: debhelper (>= 9.20120909), autotools-dev, libgtk2.0-dev, libsensors4-dev Standards-Version: 3.9.4 Homepage: http://www.linuxhardware.org/xsensors/ Package: xsensors Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: lm-sensors Description: hardware health information viewer xsensors reads data from the libsensors library regarding hardware health such as temperature, voltage and fan speed and displays the information in a digital read-out. debian/xsensors.10000644000000000000000000000227312070072564011143 0ustar .TH XSENSORS 1 "30 December 2012" "" "User Commands" .SH NAME xsensors \- display hardware sensor information as a graphical read-out. .SH SYNOPSIS .B xsensors [\fIOPTION\fR]... .SH DESCRIPTION View the output from the libsensors library regarding hardware health in a graphical read-out. .SH OPTIONS .TP .B -f display all temperatures in Fahrenheit. .TP \fB\-c\fR filename specify the libsensors configuration file. .TP \fB\-i\fR filename specify the image file to use as the graphical theme. .TP \fB\-t\fR time specify the update interval in seconds. .TP .B -v display the version number. .SH CONFIGURATION To find the proper kernel modules necessary for xsensors to work, please run the \fBsensors-detect\fR command as superuser and follow the on-screen instructions; a reboot may be required. The \fBsensors-detect\fR command is provided by the \fIlm-sensors\fR package. .SH FILES \fI/usr/share/pixmaps/xsensors/default.xpm\fR: the default graphical theme. .PP \fI/etc/sensors3.conf\fR: the default configuration file. .SH AUTHOR This manual page was written by Nick Rusnov and Nanley Chery for the Debian GNU/Linux system (but may be used by others). debian/copyright0000644000000000000000000000267611324604027011133 0ustar This work was originally packaged for Debian by: Nick Rusnov on Thu, 10 Oct 2002 09:58:52 -0700 It was downloaded from http://www.linuxhardware.org/xsensors/ Upstream Author: Kris Kersey Copyright: Copyright (C) 2002 - 2010 Kris Kersey License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. The Debian packaging is: Copyright (C) 2010 Nanley Chery you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. debian/source/0000755000000000000000000000000012066104601010462 5ustar debian/source/format0000644000000000000000000000001411334124124011667 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000012134565764010632 5ustar debian/patches/replace-deprecated-gtk.patch0000644000000000000000000001354511633515376016154 0ustar Author: Nanley Chery Subject: Update deprecated gtk casts and replace deprecated function calls with their analogous cairo counterparts. Bug-Debian: http://bugs.debian.org/622005 Bug-Debian: http://bugs.debian.org/610321 --- --- a/src/gui.c +++ b/src/gui.c @@ -27,10 +27,10 @@ GtkWidget *mainwindow = NULL; GdkColor colorWhite = { 0, 0xFFFF, 0xFFFF, 0xFFFF }; - -GdkColormap *cmap = NULL; -GdkPixmap *theme = NULL; +GdkPixbuf *theme = NULL; + +cairo_surface_t *surface = NULL; /* Destroy the main window. */ gint destroy_gui( GtkWidget *widget, gpointer data ) { @@ -76,17 +76,16 @@ } } -static void draw_digits( GtkWidget *widget, const gchar *digits, int highLow ) +static void draw_digits( GtkWidget *widget, cairo_t *cr, const gchar *digits, int highLow ) { const gchar *digit = digits; int pos = 0, x = 0, y = 0, w = 0; while ( *digit ) { get_pm_location( *digit, &x, &y, &w ); - gdk_draw_drawable( widget->window, - widget->style->fg_gc[ GTK_WIDGET_STATE - (widget) ], theme, x, y + highLow, - pos, 0, w, 30 ); + cairo_set_source_surface (cr, surface, pos-x, 0-(y + highLow)); + cairo_rectangle(cr, pos, 0, w, 30); + cairo_fill(cr); pos += w; digit++; } @@ -102,6 +101,8 @@ gchar result[7]; + cairo_t *cr = gdk_cairo_create(widget->window); + #ifdef DEBUG_XSENSORS printf( "area.width = %d, area.height = %d\n", event->area.width, event->area.height ); @@ -117,13 +118,11 @@ /* Display the digits */ if ( g_snprintf( result, 6, "%5.0f", current->curvalue ) >= 0 ) - draw_digits( widget, result, highLow ); + draw_digits( widget, cr, result, highLow ); /* Display RPM */ - gdk_draw_drawable( widget->window, - widget->style->fg_gc[ GTK_WIDGET_STATE - (widget) ], theme, 0, 120 + highLow, - 90, 0, 57, 30 ); + cairo_set_source_surface (cr, surface, 90-0, 0-(120 + highLow)); + cairo_rectangle(cr, 90, 0, 57, 30); break; case TEMP: if ( current->curvalue > current->curmax ) @@ -134,17 +133,15 @@ /* Display the digits */ if ( g_snprintf( result, 7, "%6.1f", current->curvalue ) >= 0 ) - draw_digits( widget, result, highLow ); + draw_digits( widget, cr, result, highLow ); /* Display degree symbol */ if ( tf == FALSE ) x = 0; else x = 57; - gdk_draw_drawable( widget->window, - widget->style->fg_gc[ GTK_WIDGET_STATE - (widget) ], theme, x, 60 + highLow, - 96, 0, 57, 30 ); + cairo_set_source_surface (cr, surface, 96-x, 0-(60 + highLow)); + cairo_rectangle(cr, 96, 0, 57, 30); break; case VOLT: @@ -154,20 +151,17 @@ /* Display the digits */ if ( g_snprintf( result, 7, "%6.2f", current->curvalue ) >= 0 ) - draw_digits( widget, result, highLow ); + draw_digits( widget, cr, result, highLow ); /* Display V */ - gdk_draw_drawable( widget->window, - widget->style->fg_gc[ GTK_WIDGET_STATE - (widget) ], theme, 114, 60 + highLow, - 96, 0, 57, 30 ); - - + cairo_set_source_surface (cr, surface, 96-114, 0-(60 + highLow)); + cairo_rectangle(cr, 96, 0, 57, 30); break; default: break; } - + cairo_fill(cr); + cairo_destroy(cr); return TRUE; } @@ -260,7 +254,7 @@ /* Setup timer for updates. */ g_timeout_add( update_time * 1000, - (GtkFunction) update_sensor_data, + (GSourceFunc) update_sensor_data, (gpointer) data ); return SUCCESS; @@ -460,8 +454,6 @@ g_signal_connect( G_OBJECT (mainwindow), "delete_event", G_CALLBACK (destroy_gui), NULL ); - /* Graphics needed for drawing info. */ - cmap = gtk_widget_get_colormap( mainwindow ); /* Set up the image file used for displaying characters. */ if ( imagefile == NULL ) { @@ -481,12 +473,10 @@ "Image file not found in either location! Exiting!\n" ); exit( 1 ); } else { - theme = gdk_pixmap_colormap_create_from_xpm( NULL, cmap, - NULL, NULL, "./images/default.xpm" ); + theme = gdk_pixbuf_new_from_file("./images/default.xpm", NULL ); } } else { - theme = gdk_pixmap_colormap_create_from_xpm( NULL, cmap, - NULL, NULL, imagefile ); + theme = gdk_pixbuf_new_from_file(imagefile, NULL ); } } else { if ( stat( imagefile, &sbuf ) != 0 ) { @@ -495,11 +485,15 @@ "Image file not found in specified location! Exiting!\n" ); exit( 1 ); } else { - theme = gdk_pixmap_colormap_create_from_xpm( NULL, cmap, - NULL, NULL, imagefile ); + theme = gdk_pixbuf_new_from_file(imagefile, NULL ); } } - + surface = cairo_image_surface_create_for_data(gdk_pixbuf_get_pixels(theme), + CAIRO_FORMAT_RGB24, + gdk_pixbuf_get_width(theme), + gdk_pixbuf_get_height(theme), + gdk_pixbuf_get_rowstride(theme)); + /* Create notebook for sensors. */ notebook = gtk_notebook_new( ); gtk_widget_modify_bg( notebook, GTK_STATE_NORMAL, &colorWhite ); debian/patches/improve-sensor-detection.patch0000644000000000000000000000261312134565764016621 0ustar Description: Remove early termination behavior during sensor detection Exit the application when all sensors on the system are determined to be unsupported rather than exiting immediately after encountering the first unsupported sensor. Author: Nanley Chery --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/src/gui.c +++ b/src/gui.c @@ -438,6 +438,7 @@ int chipnum = 0; const sensors_chip_name *name = NULL; + int supported_sensor_found = FALSE; gtk_init( &argc, &argv ); @@ -507,15 +508,17 @@ #ifdef DEBUG_XSENSORS printf( "Adding tab for %s\n", name->prefix ); #endif - if ( ( head = add_sensor_tab( notebook, name ) ) == NULL ) - return FAILURE; - - update_sensor_data( head ); - g_signal_connect( G_OBJECT (mainwindow), "realize", - G_CALLBACK (start_timer), head ); + if ( ( head = add_sensor_tab( notebook, name ) ) != NULL ) { + supported_sensor_found = update_sensor_data( head ); + g_signal_connect( G_OBJECT (mainwindow), "realize", + G_CALLBACK (start_timer), head ); + } } } + if ( supported_sensor_found != TRUE ) + return FAILURE; + /* Setup the main components. */ gtk_widget_show( mainwindow ); debian/patches/series0000644000000000000000000000021112066103227012023 0ustar remove-unused-variables.patch cleanup-allocs.patch replace-deprecated-gtk.patch improve-sensor-detection.patch specify-gui-failure.patch debian/patches/specify-gui-failure.patch0000644000000000000000000000110012066103705015477 0ustar Description: Improve gui failure description The start_gui function only fails when no supported sensors are found; update the error description to reflect that. Author: Nanley Chery --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/src/main.c +++ b/src/main.c @@ -123,7 +123,7 @@ /* This will start the GUI. */ if ( start_gui( argc, argv ) != SUCCESS ) { - fprintf( stderr, "GUI failed!\n" ); + fprintf( stderr, "No supported sensors found!\n" ); } /* Clean up the sensors library. */ debian/patches/cleanup-allocs.patch0000644000000000000000000000357311633514350014551 0ustar From: Jean Delvare Subject: Fix memory allocation and freeing in add_sensor_tab * When realloc fails, it doesn't free the original buffer. * strcat never fails. * Use free, not g_free, to free memory not allocated with g_malloc. * No need to free feattext twice. --- src/gui.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) --- a/src/gui.c +++ b/src/gui.c @@ -358,19 +358,20 @@ feattext = sensors_get_label( name, feature ); if ( feattext != NULL ) { + /* We need a temporary variable in case realloc fails */ + char *new_feattext; #ifdef DEBUG_XSENSORS printf( "Adding feature %d, %s.\n", i, feattext ); #endif - if ( ( feattext = realloc( feattext, + if ( ( new_feattext = realloc( feattext, ( strlen( feattext ) + 2 ) * sizeof( char ) ) ) == NULL ) { fprintf( stderr, "realloc failed in add_sensor_tab()!\n" ); + free( feattext ); return NULL; } - if ( strcat( feattext, ":" ) == NULL ) { - fprintf( stderr, "strcat failed in add_sensor_tab()!\n" ); - return NULL; - } + feattext = new_feattext; + strcat( feattext, ":" ); gtk_frame_set_label( GTK_FRAME (featframe), feattext ); @@ -408,8 +409,7 @@ gtk_widget_show( innerbox ); gtk_widget_show( darea ); gtk_widget_show( featpbar ); - g_free( feattext ); - feattext = NULL; + free( feattext ); } if ( usedvolt > 0 ) { @@ -430,8 +430,6 @@ gtk_widget_show( fanlabel ); } - g_free( feattext ); - return head; } debian/patches/remove-unused-variables.patch0000644000000000000000000000204011633515371016403 0ustar Author: Nanley Chery From: Jean Delvare Subject: Remove declared, but unused variables Bug-Debian: http://bugs.debian.org/625435 --- --- a/src/gui.c +++ b/src/gui.c @@ -257,10 +257,9 @@ /* Start the sensor info update timer. */ gint start_timer( GtkWidget *widget, gpointer data ) { - gint timer; /* Setup timer for updates. */ - timer = g_timeout_add( update_time * 1000, + g_timeout_add( update_time * 1000, (GtkFunction) update_sensor_data, (gpointer) data ); @@ -287,7 +286,7 @@ /* feature data */ updates *head = NULL; - updates *current = NULL, *prev = NULL; + updates *current = NULL; const sensors_feature *feature; @@ -347,10 +346,8 @@ new_node->pbar = featpbar; if ( head == NULL ) { - prev = head; head = current = new_node; } else { - prev = current; current = current->next = new_node; }