commit 3fe919678b91605f803b642d92a1793f4a202f5ae82ed2653d5b5eb5c3104c13 Author: OBS User unknown Date: Mon Jan 15 23:36:43 2007 +0000 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sensors?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/README.SuSE b/README.SuSE new file mode 100644 index 0000000..4e5698c --- /dev/null +++ b/README.SuSE @@ -0,0 +1,27 @@ +(English version below) + + Hardware Überwachung für Linux + ============================== + +Das Paket »sensors« enthält die erforderlichen Programme (sensors), um +Daten einiger bekannten Sensor-Chips auslesen zu können. Die erforderliche +Schnittstelle wird durch Laden von Kernel-Modulen unter /proc/bus/i2c/ +bereitgestellt. Welche Module geladen werden müssen, kann als root mit +dem Programm /usr/sbin/sensors-detect interaktiv ermittelt werden. +Die Konfiguration in /etc/sensors.conf sollte auf die tatsächlichen +Gegebenheiten des Mainboards angepasst werden. + +--------------------------------------------------------------------------- + + Hardware health monitoring for Linux + ==================================== + +The sensors package includes the programs (sensors) to show the data of +some sensor chips. The interface /proc/bus/i2c/ is provided by loading +kernel modules. Which modules should been loaded can be interactively +detected as root by calling /usr/sbin/sensors-detect. The default +configuration in /etc/sensors.conf should be changed to fit the actual +circumstances of the mainboard. + + +Your SuSE Team diff --git a/lm_sensors-2.10.1.dif b/lm_sensors-2.10.1.dif new file mode 100644 index 0000000..c50e858 --- /dev/null +++ b/lm_sensors-2.10.1.dif @@ -0,0 +1,682 @@ +--- Makefile ++++ Makefile 2006-11-10 15:39:03.000000000 +0100 +@@ -45,8 +45,8 @@ LINUX_HEADERS := $(LINUX)/include + # may be used mistakenly. Note: This should point to the directory + # *above* the linux/ subdirectory, so to /usr/local/include in the + # above example. +-I2C_HEADERS := /usr/local/include +-#I2C_HEADERS := $(LINUX_HEADERS) ++#I2C_HEADERS := /usr/local/include ++I2C_HEADERS := $(LINUX_HEADERS) + + ifneq ($(MAKECMDGOALS),user) + ifneq ($(MAKECMDGOALS),user_install) +@@ -75,7 +75,7 @@ DEBUG := 0 + DESTDIR := + + # This is the prefix that will be used for almost all directories below. +-PREFIX := /usr/local ++PREFIX := /usr + + # Your C compiler + CC := gcc +@@ -97,7 +97,7 @@ ifeq (,$(findstring /2.4., $(MODPREF))) + else + SYSFS_SUPPORT := + endif +-#SYSFS_SUPPORT := 1 ++SYSFS_SUPPORT := 1 + + # Prevent 2.6+ users from using improper targets, as this won't work. + ifeq (,$(findstring /2.4., $(MODPREF))) +@@ -141,7 +141,7 @@ LIBINCLUDEDIR := $(INCLUDEDIR)/sensors + + # You should not need to change this. It is the base directory under which the + # manual pages will be installed. +-MANDIR := $(PREFIX)/man ++MANDIR := $(PREFIX)/share/man + + MACHINE := $(shell uname -m) + +@@ -215,7 +215,7 @@ ifeq ($(DEBUG),1) + ALL_CPPFLAGS += -DDEBUG + ALL_CFLAGS += -O -g + else +-ALL_CFLAGS += -O2 ++ALL_CFLAGS += $(RPM_OPT_FLAGS) + endif + + ifeq ($(WARN),1) +@@ -278,7 +278,7 @@ LIBCPPFLAGS := $(ALL_CPPFLAGS) + ifdef SYSFS_SUPPORT + LIBCPPFLAGS := $(LIBCPPFLAGS) -DSYSFS_SUPPORT + endif +-LIBCFLAGS := -fpic $(ALL_CFLAGS) ++LIBCFLAGS := -fpic -D_REENTRANT $(ALL_CFLAGS) + + .PHONY: all user clean install user_install uninstall user_uninstall version package + +--- prog/detect/sensors-detect ++++ prog/detect/sensors-detect 2006-11-10 17:45:13.000000000 +0100 +@@ -1997,7 +1997,9 @@ sub initialize_conf + } + } + +- if (-f '/etc/modules.conf') { ++ if (-f '/etc/modprobe.conf') { ++ $modules_conf = '/etc/modprobe.conf'; ++ } elsif (-f '/etc/modules.conf') { + $modules_conf = '/etc/modules.conf'; + } elsif (-f '/etc/conf.modules') { + $modules_conf = '/etc/conf.modules'; +@@ -5132,7 +5134,7 @@ sub generate_modprobes + + for ($i = 0; $i < $nr; $i++) { + foreach $adap (@adapters) { +- next unless exists $adap->{nr_later} and $adap->{nr_later} == $i; ++ next unless exists $adap->{driver} and $adap->{nr_later} == $i; + if ($adap->{driver} eq "UNKNOWN") { + $modprobes .= "# modprobe unknown adapter ".$adap->{adapname}."\n"; + } elsif ($adap->{driver} eq "DISABLED") { +@@ -5162,6 +5164,19 @@ sub generate_modprobes + next if $chip->{driver} eq "use-isa-instead"; + if ($chip->{driver} eq "to-be-written") { + $modprobes .= "# no driver for $chip->{detected}[0]{chipname} yet\n"; ++ } elsif ($chip->{driver} eq "w83627hf") { ++ my $check = 0; ++ open MODPROBE, "modprobe -l w83627hf|" or die "can not execute modprobe\n"; ++ while () { ++ $check = /^.*w83627hf.*$/; ++ } ++ close MODPROBE; ++ if ($check) { ++ $modprobes .= "modprobe $chip->{driver}\n"; ++ } else { ++ $modprobes .= "# no driver for ".$chip->{detected}[0]{chipname}." using w83781d\n"; ++ $modprobes .= "modprobe w83781d\n" ++ } + } else { + # need the * for 2.4 kernels, won't necessarily be an exact match + open(local *INPUTFILE, "modprobe -l $chip->{driver}\\* 2>/dev/null |"); +@@ -5430,7 +5445,7 @@ sub main + print "#----cut here----\n". + $modprobes. + "# sleep 2 # optional\n". +- "/usr/local/bin/sensors -s # recommended\n". ++ "/usr/bin/sensors -s # recommended\n". + "#----cut here----\n\n"; + + print "If you have some drivers built into your kernel, the list above will\n". +@@ -5499,6 +5514,8 @@ EOT + print "Copy prog/init/lm_sensors.init to /etc/init.d/lm_sensors\n". + "for initialization at boot time.\n" + unless -f "/etc/init.d/lm_sensors"; ++ system("/sbin/insserv", "/etc/init.d/lm_sensors") ++ if -f "/etc/init.d/lm_sensors"; + } + } + +--- prog/dump/isadump.c ++++ prog/dump/isadump.c 2006-02-28 13:05:01.000000000 +0100 +@@ -35,15 +35,26 @@ + + #include "superio.h" + +- + /* To keep glibc2 happy */ + #if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 +-#include ++# if !defined(__sparc__) && !defined(__sparc64__) && !defined(__powerpc__) ++# include ++# else ++#ifdef __powerpc__ ++#define __KERNEL__ ++#define CONFIG_ALL_PPC ++#endif ++# include ++#ifdef __powerpc__ ++#undef __KERNEL__ ++#undef CONFIG_ALL_PPC ++#endif ++# endif + #else +-#include ++# include + #endif + +-#ifdef __powerpc__ ++#if defined(__powerpc__) || defined(__sparc__) || defined(__sparc64__) + unsigned long isa_io_base = 0; /* XXX for now */ + #endif /* __powerpc__ */ + +@@ -255,7 +266,7 @@ int main(int argc, char *argv[]) + } + } + +-#ifndef __powerpc__ ++#if !defined(__sparc__) && !defined(__sparc64__) && !defined(__powerpc__) + if ((datareg < 0x400) && (addrreg < 0x400) && !flat) { + if (ioperm(datareg, 1, 1)) { + fprintf(stderr, "Error: Could not ioperm() data " +--- prog/init/README ++++ prog/init/README 2006-02-28 13:05:01.000000000 +0100 +@@ -10,7 +10,7 @@ The script lm_sensors.init is a nice sta + On RH and other RH-based systems (MDK, notably) use this sort of startup + mechanism (i.e. SVR4-based), as opposed to the everything-in-one-script + (/etc/rc or /etc/rc.local) like the BSD-based systems do. +-The lm_sensors.init file should be copied to /etc/rc.d/init.d/lm_sensors. ++The lm_sensors.init file should be copied to /etc/init.d/lm_sensors. + For more information see the top of the file. + It requires the /etc/sysconfig/sensors file, which identifies + the correct modules. +@@ -28,10 +28,10 @@ by Marc Rieffel . + ---------------- + + The script sensord.init also loads the modules, and then +-starts the sensord daemon. See the directory ../sensord for ++starts the sensord daemon. See the manual page sensord(8) for + more information on the daemon. + +-The sensord.init file should be copied to /etc/rc.d/init.d/sensord. ++The sensord.init file should be copied to /etc/init.d/sensord. + For more information see the top of the file. + + To configure this service one should put appropriate "alias i2c-bus-0 xxx" +--- prog/init/lm_sensors.init.suse ++++ prog/init/lm_sensors.init.suse 2006-02-28 13:05:01.000000000 +0100 +@@ -1,19 +1,14 @@ + #!/bin/sh + # + ### BEGIN INIT INFO +-# Provides: lm_sensors +-# Required-Start: $local_fs +-# X-UnitedLinux-Should-Start: +-# Required-Stop: $local_fs +-# X-UnitedLinux-Should-Stop: +-# Default-Start: 3 4 5 +-# Default-Stop: 0 1 2 6 +-# Short-Description: LM Sensors +-# Description: LM Sensors for hardware monitoring ++# Provides: sensors ++# Required-Start: $remote_fs ++# Required-Stop: $remote_fs ++# Default-Start: 2 3 5 ++# Default-Stop: ++# Description: sensors is used for monitoring motherboard sensor values. ++# Config file is /etc/sysconfig/lm_sensors + ### END INIT INFO +-# chkconfig: 2345 26 74 +-# description: sensors is used for monitoring motherboard sensor values. +-# config: /etc/sysconfig/sensors + # + # 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 +@@ -40,115 +35,91 @@ + # MODULE_1, MODULE_2, MODULE_3, etc. + + # If sensors isn't supported by the kernel, try loading the module... +-[ -e /proc/sys/dev/sensors ] || /sbin/modprobe i2c-proc &>/dev/null ++[ -e /sys/bus/i2c/devices ] || /sbin/modprobe i2c-dev &>/dev/null + + # Don't bother if /proc/sensors still doesn't exist, kernel doesn't have + # support for sensors. +-[ -e /proc/sys/dev/sensors ] || exit 0 +- ++[ -e /sys/bus/i2c/devices ] || exit 0 ++ + # If sensors was not already running, unload the module... +-[ -e /var/lock/subsys/lm_sensors ] || /sbin/modprobe -r i2c-proc &>/dev/null ++[ -e /var/lock/subsys/sensors ] || /sbin/modprobe -r i2c-dev &>/dev/null + + CONFIG=/etc/sysconfig/lm_sensors +-PSENSORS=/usr/local/bin/sensors ++PSENSORS=/usr/bin/sensors ++FANCONFIG=/etc/fancontrol ++PFAN=/usr/sbin/fancontrol + + # Source function library. +-#. /etc/init.d/functions +- +-# Shell functions sourced from /etc/rc.status: +-# rc_check check and set local and overall rc status +-# rc_status check and set local and overall rc status +-# rc_status -v ditto but be verbose in local rc status +-# rc_status -v -r ditto and clear the local rc status +-# rc_status -s display "skipped" and exit with status 3 +-# rc_status -u display "unused" and exit with status 3 +-# rc_failed set local and overall rc status to failed +-# rc_failed set local and overall rc status to +-# rc_reset clear local rc status (overall remains) +-# rc_exit exit appropriate to overall rc status +-# rc_active checks whether a service is activated by symlinks +-# rc_splash arg sets the boot splash screen to arg (if active) + . /etc/rc.status + +-# Reset status of this service +-rc_reset +- +-# Return values acc. to LSB for all commands but status: +-# 0 - success +-# 1 - generic or unspecified error +-# 2 - invalid or excess argument(s) +-# 3 - unimplemented feature (e.g. "reload") +-# 4 - user had insufficient privileges +-# 5 - program is not installed +-# 6 - program is not configured +-# 7 - program is not running +-# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl) +-# +-# Note that starting an already running service, stopping +-# or restarting a not-running service as well as the restart +-# with force-reload (in case signaling is not supported) are +-# considered a success. +- +-RETVAL=0 +- + start() { +- echo -n $"Starting up sensors: " ++ echo -n "Starting up sensors" ++ unset ${!MODULE_*} + test -r "$CONFIG" && . "$CONFIG" + +- modules=`grep \^MODULE_ $CONFIG | wc -l | tr -d ' '` +- i=0 +- while [ $i -lt $modules ] ; do +- module=`eval echo '$'MODULE_$i` +- echo starting module __${module}__ ++ for i in ${!MODULE_*} ; do ++ eval module=\$$i + /sbin/modprobe $module &>/dev/null +- i=`expr $i + 1` ++ rc_status + done +- $PSENSORS -s ++ rc_status + +- RETVAL=$? +- if [ $RETVAL -eq 0 ] && touch /var/lock/subsys/lm_sensors ; then +- rc_status -v ++ /usr/bin/sensors -s &> /dev/null ++ rc_status ++ ++ # Start fan control, if configured ++ if test -s "$FANCONFIG" -a -x "$PFAN" ; then ++ echo -n ", starting fan control: " ++ /sbin/startproc -q "$PFAN" ++ rc_status + else +- rc_status -v ++ echo -n ": " + fi ++ ++ rc_status -v && touch /var/lock/subsys/sensors + } + + stop() { +- echo -n $"Shutting down sensors: " ++ echo -n "Shutting down sensors" ++ unset ${!MODULE_*} + test -r "$CONFIG" && . "$CONFIG" + +- modules=`grep \^MODULE_ $CONFIG | wc -l | tr -d ' '` +- i=`expr $modules` +- while [ $i -ge 0 ] ; do +- module=`eval echo '$'MODULE_$i` ++ # Stop fan control, if it was started ++ if test -s /var/run/fancontrol.pid ; then ++ echo -n ", stopping fan control: " ++ /sbin/killproc -TERM "$PFAN" ++ rc_status ++ else ++ echo -n ": " ++ fi ++ ++ for i in ${!MODULE_*} ; do ++ eval module=\$$i + /sbin/modprobe -r $module &>/dev/null +- i=`expr $i - 1` ++ rc_status + done +- /sbin/modprobe -r i2c-proc &>/dev/null + +- RETVAL=$? +- if [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/lm_sensors ; then +- rc_status -v +- else +- rc_status -v +- fi ++ rc_status -v && rm -f /var/lock/subsys/sensors + } + + dostatus() { +- $PSENSORS +- RETVAL=$? ++ $PSENSORS ++ rc_status + } + + restart() { + stop + start +- RETVAL=$? ++ rc_status + } + + condrestart() { + [ -e /var/lock/subsys/lm_sensors ] && restart || : + } + ++# Reset status of this service ++rc_reset ++ + # See how we were called. + case "$1" in + start) +@@ -163,12 +134,12 @@ case "$1" in + restart|reload) + restart + ;; +- condrestart) ++ try-restart) + condrestart + ;; + *) +- echo "Usage: sensors.init {start|stop|status|restart|reload|condrestart}" ++ echo "Usage: lm_sensors {start|stop|status|restart|reload|try-restart}" + exit 1 + esac + +-exit $RETVAL ++rc_exit +--- prog/init/sensord.init ++++ prog/init/sensord.init 2006-02-28 13:05:01.000000000 +0100 +@@ -1,130 +1,83 @@ +-#!@BASH@ ++#!/bin/bash + # +-# @INITRDDIR@/sensord +-# +-# sensord This shell script takes care of starting and stopping +-# sensord, the lm_sensors hardware health monitoring daemon. +-# +-# Here is the sensors service for SysV init, based on lm_sensors-2.5.5-sensors +-# from Mandrake lm_sensors source RPM. It is modified according to recommendations +-# for RedHat initscripts. The drivers starting part is taken from alsasound +-# service. To configure this service one should put appropriate "alias i2c-bus-0 +-# xxx" and "alias i2c-sensors-chip-0 xxx" in /etc/modules.conf. The rest should be +-# self explaining. +-# +-# You put it into /etc/rc.d/init.d/, you make a symlink (probably using +-# chkconfig, ntsysv, tksysv or serviceconf program) named S95xxx and K05xxx +-# into /etc/rc#.d (where # is the number of runlevel), and sensors service +-# (which starts lm_sensors modules, runs sensors -s and starts sensord) +-# will be started automatically at startup/reboot and stopped at shutdown. +-# One could also start/stop service manually. +-# +-# This service was tested for RedHat 7.2 only. +-# Jakub Narêbski, Poland ++# /etc/init.d/sensord + # ++### BEGIN INIT INFO ++# Provides: sensors ++# Required-Start: $remote_fs ++# Required-Stop: $remote_fs ++# Default-Start: 2 3 5 ++# Default-Stop: ++# Description: This shell script takes care of starting and stopping ++# sensord, the lm_sensors hardware health monitoring daemon. ++### END INIT INFO + +-# chkconfig: 2345 05 95 +-# processname: sensord +-# config: @SYSCONFDIR@/sensors.conf +-# pidfile: /var/run/sensord.pid +-# description: Sensors is a sensors daemon which can be used to alert you \ +-# in the event of a hardware health monitoring alarm. + + # Source function library. +-. @INITRDDIR@/functions +- +-# Set default return value to 0 (success) +-RETVAL=0 +-# Add @SBINDIR@ (sensord) and @BINDIR@ (sensors) to PATH if necessary +-echo "$PATH" | grep -q @SBINDIR@ || PATH=$PATH:@SBINDIR@ +-echo "$PATH" | grep -q @BINDIR@ || PATH=$PATH:@BINDIR@ +-export PATH ++. /etc/rc.status + + # Modules to load from modules.conf (modules configuration) +-i2c_bus_drivers=´modprobe -c | \ +- awk ´/^[[:space:]]*alias[[:space:]]+i2c-bus-[[:digit:]]/ { print $3 }´´ +-i2c_chip_drivers=´modprobe -c | \ +- awk ´/^[[:space:]]*alias[[:space:]]+i2c-sensors-chip-[[:digit:]]/ { print $3 +-}´´ ++i2c_bus_drivers=`modprobe -c | \ ++ awk '/^[[:space:]]*alias[[:space:]]+i2c-bus-[[:digit:]]/ { print $3 }'` ++i2c_chip_drivers=`modprobe -c | \ ++ awk '/^[[:space:]]*alias[[:space:]]+i2c-sensors-chip-[[:digit:]]/ { print $3 }'` + + # Configuration of sensord + interval=1m # interval between scanning for sensor alarms + log_interval=30m # interval between logging all sensor readings + +-# Check that we use kernel for which lm_sensors-drivers was installed +-[ ´uname -r´ = @MVERSION@ ] || exit 0 +- + # Check that lm_sensors is installed. +-[ -x @SBINDIR@/sensord ] || exit 0 +-[ -x @BINDIR@/sensors ] || exit 0 +- +-echo_status() +-{ +- if [ $1 -eq 0 ]; then +- echo_success +- else +- echo_failure +- fi +- echo +-} ++[ -x /usr/sbin/sensord ] || exit 0 ++[ -x /usr/bin/sensors ] || exit 0 + + start() + { + # Start modules + echo "Starting I2C bus (adapter) drivers: " + for driver in $i2c_bus_drivers; do +- echo -n "Starting I2C driver: $driver " +- /sbin/modprobe ´echo $driver´ +- echo_status $? ++ /sbin/modprobe $driver &> /dev/null ++ rc_status + done ++ rc_status -v ++ + echo "Starting I2C chip (sensors) drivers: " + for driver in $i2c_chip_drivers; do +- echo -n "Starting I2C driver: $driver " +- /sbin/modprobe $(echo $driver) +- echo_status $? ++ /sbin/modprobe $driver &> /dev/null ++ rc_status + done ++ rc_status -v ++ + # Set Alarm + echo -n "Configuring sensors: " +- sensors -s && sleep 2 ++ sensors -s ++ rc_status && sleep 2 ++ rc_status -v ++ + echo_status $? + # Start daemons. + echo -n $"Starting sensord: " +- daemon sensord -i $interval -l $log_interval +- RETVAL=$? +- +- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sensord +- +- echo +- return $RETVAL ++ startproc /usr/sbin/sensord -i $interval -l $log_interval ++ rc_status -v && touch /var/lock/subsys/sensord + } + + stop() + { + # Stop daemons. + echo -n $"Shutting down sensord: " +- killproc sensord +- RETVAL=$? ++ killproc /usr/sbin/sensord ++ rc_status -v + +- echo + # Remove modules +- drivers=´echo "$i2c_chip_drivers $i2c_bus_drivers" | \ +- tr -s "[:space:]\n" " "´ +- echo -n "Removing I2C drivers: $drivers" +- /sbin/modprobe -r -q $drivers +- echo_status $? +- +- echo +- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sensord +- +- return $RETVAL ++ echo -n "Removing I2C drivers: " $i2c_chip_drivers $i2c_bus_drivers ++ /sbin/modprobe -r -q $i2c_chip_drivers $i2c_bus_drivers ++ rc_status -v && rm -f /var/lock/subsys/sensord + } + + reload() + { + # Reread configuration file + sensors -s +- +- return $? ++ rc_status + } + + # See how we were called. +@@ -135,9 +88,6 @@ case "$1" in + stop) + stop + ;; +- status) +- status sensord +- ;; + restart) + stop + start +@@ -145,11 +95,11 @@ case "$1" in + reload) + reload + ;; +- condrestart) ++ try-restart) + [ -e /var/lock/subsys/sensord ] && restart || : + ;; + *) +- echo "Usage: sensord {start|stop|restart|reload|condrestart|status}" ++ echo "Usage: sensord {start|stop|restart|reload|try-restart|status}" + exit 1 + ;; + esac +--- prog/pwm/fancontrol ++++ prog/pwm/fancontrol 2006-02-28 13:05:01.000000000 +0100 +@@ -154,10 +154,10 @@ function restorefans() + do + pwmo=${AFCPWM[$fcvcount]} + pwmdisable $pwmo +- fcvcount=$fcvcount+1 ++ let fcvcount=$fcvcount+1 + done + echo 'Verify fans have returned to full speed' +- exit 1 ++ exit 0 + } + + trap restorefans SIGHUP SIGINT SIGQUIT SIGTERM SIGKILL +@@ -240,7 +240,7 @@ function UpdateFanSpeeds { + if [ $pwmpval -eq 0 -o $fanval -eq 0 ] + then # if fan was stopped start it using a safe value + echo $minsa > $pwmo +- sleep 1 ++ read < <(exec sleep 1) + fi + fi + echo $pwmval > $pwmo # write new value to pwm output +@@ -253,7 +253,7 @@ function UpdateFanSpeeds { + then + echo "new pwmval=$pwmval" + fi +- fcvcount=$fcvcount+1 ++ let fcvcount=$fcvcount+1 + done + } + +@@ -268,7 +268,7 @@ do + echo "Error enabling PWM on $DIR/$pwmo" + restorefans + fi +- fcvcount=$fcvcount+1 ++ let fcvcount=$fcvcount+1 + done + + echo 'Starting automatic fan control...' +@@ -277,7 +277,7 @@ echo 'Starting automatic fan control...' + while true + do + UpdateFanSpeeds +- sleep $INTERVAL ++ read < <(exec sleep $INTERVAL) + done + + # some old stuff/missing features, will clean this up soon +--- prog/pwm/pwmconfig ++++ prog/pwm/pwmconfig 2006-02-28 13:05:01.000000000 +0100 +@@ -189,6 +189,9 @@ echo + PLOTTER=gnuplot + STEP=15 + PDELAY=2 ++STEP2=2 ++STEP2_BELOW=31 ++PDELAY=3 + + function pwmdetail() + { +@@ -256,6 +259,7 @@ function pwmdetail() + fi + break + fi ++ test $pwm -lt $STEP2_BELOW && let STEP=$STEP2 + let pwm=$pwm-$STEP + done + pwmdisable $P +--- prog/sensors/main.c ++++ prog/sensors/main.c 2006-02-28 13:05:01.000000000 +0100 +@@ -188,6 +188,11 @@ int main (int argc, char *argv[]) + exit(0); + case 'c': + config_file_name = strdup(optarg); ++ if (!config_file_name) { ++ fprintf(stderr, "Could not open config file\n"); ++ perror(config_file_name); ++ exit(1); ++ } + break; + case 's': + do_sets = 1; +@@ -232,6 +237,11 @@ int main (int argc, char *argv[]) + + if (config_file_name == NULL) + config_file_name = strdup(ETCDIR "/" DEFAULT_CONFIG_FILE_NAME); ++ if (!config_file_name) { ++ fprintf(stderr, "Could not open config file\n"); ++ perror(config_file_name); ++ exit(1); ++ } + open_config_file(config_file_name); + + if ((res = sensors_init(config_file))) { diff --git a/lm_sensors-2.10.1.tar.bz2 b/lm_sensors-2.10.1.tar.bz2 new file mode 100644 index 0000000..37f68b7 --- /dev/null +++ b/lm_sensors-2.10.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59fe249a90cdb503644a7801221cdb776630fd63af20df1b663d9870801a8bc0 +size 675481 diff --git a/lm_sensors-2.7.0-kernelheaders.dif b/lm_sensors-2.7.0-kernelheaders.dif new file mode 100644 index 0000000..bd4227c --- /dev/null +++ b/lm_sensors-2.7.0-kernelheaders.dif @@ -0,0 +1,11 @@ +--- Makefile ++++ Makefile +@@ -116,7 +116,7 @@ + # you will be able to use '#include ' regardless of the + # current kernel selected. + INCLUDEDIR := $(PREFIX)/include +-SYSINCLUDEDIR := $(INCLUDEDIR)/linux ++SYSINCLUDEDIR := $(LINUX_HEADERS) + LIBINCLUDEDIR := $(INCLUDEDIR)/sensors + + # You should not need to change this. It is the base directory under which the diff --git a/lm_sensors-2.8.3-nodump.patch b/lm_sensors-2.8.3-nodump.patch new file mode 100644 index 0000000..67b8864 --- /dev/null +++ b/lm_sensors-2.8.3-nodump.patch @@ -0,0 +1,11 @@ +--- Makefile ++++ Makefile +@@ -155,7 +155,7 @@ + endif + endif + SRCDIRS += kernel/include +-SRCDIRS += lib prog/detect prog/dump prog/eeprom prog/pwm \ ++SRCDIRS += lib prog/detect prog/eeprom prog/pwm \ + prog/sensors prog/xeon ${PROG_EXTRA:%=prog/%} etc + + # Some often-used commands with default options diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4 diff --git a/sensors.changes b/sensors.changes new file mode 100644 index 0000000..01d6ce2 --- /dev/null +++ b/sensors.changes @@ -0,0 +1,238 @@ +------------------------------------------------------------------- +Mon Nov 13 12:06:01 CET 2006 - werner@suse.de + +- Update to lm_sensors version 2.10.1 which also includes the + fix for bug #192092 by not overwriting chip settings +- Remove notify warn message from pdb about overwriting settings + +------------------------------------------------------------------- +Mon Jun 26 14:21:24 CEST 2006 - werner@suse.de + +- Load i2c-dev kernel module instead of i2c-sensor (bug #188126) + +------------------------------------------------------------------- +Tue Feb 28 13:11:23 CET 2006 - werner@suse.de + +- Update to version 2.10.0 for better udev support (bug #151931) +- Add i2c-0 to static device list for udev (bug #151931) + +------------------------------------------------------------------- +Wed Jan 25 21:41:33 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Wed Jan 11 14:45:10 CET 2006 - werner@suse.de + +- Include fan control in lm_sensors service script (bug #141958) + +------------------------------------------------------------------- +Tue Dec 13 11:20:39 CET 2005 - werner@suse.de + +- Do not to handle module variables from package Modules (#137963) + +------------------------------------------------------------------- +Thu Nov 10 14:06:52 CET 2005 - werner@suse.de + +- Add postun section to run insserv_clean (bug #132934) + +------------------------------------------------------------------- +Fri Oct 14 14:01:39 CEST 2005 - werner@suse.de + +- Update to lm_sensors version 2.9.2 + +------------------------------------------------------------------- +Thu Aug 25 13:33:08 CEST 2005 - werner@suse.de + +- Security fix in pwmconfig (bug #112925) + +------------------------------------------------------------------- +Wed May 11 14:04:09 CEST 2005 - schwab@suse.de + +- Add freetype2 and libart_lgpl to nfb, needed by rrdtool. + +------------------------------------------------------------------- +Mon May 9 16:17:16 CEST 2005 - werner@suse.de + +- Update to lm_sensors-2.9.1 +- Use insserv to enable rc script (bug #76174) + +------------------------------------------------------------------- +Thu Feb 17 18:31:22 CET 2005 - werner@suse.de + +- Update to lm_sensors-2.9.0 (bug #50681) + +------------------------------------------------------------------- +Mon Aug 30 16:57:43 CEST 2004 - werner@suse.de + +- Update to newest lm_sensors-2.8.7 to be compatible to the current + kernel version. + +------------------------------------------------------------------- +Tue May 4 17:08:34 CEST 2004 - werner@suse.de + +- Fix bug #35502 (missing w83627hf entries) by updating to + lm_sensors-2.8.6 which includes a better parser for sysfs + +------------------------------------------------------------------- +Tue Apr 13 12:42:09 CEST 2004 - ro@suse.de + +- remove kernel-source from neededforbuild + (not needed any longer) + +------------------------------------------------------------------- +Wed Mar 10 14:31:30 CET 2004 - werner@suse.de + +- Add workaround for missing w83627hf chip driver (bug #35501) + +------------------------------------------------------------------- +Tue Mar 9 18:00:34 CET 2004 - werner@suse.de + +- A few changes for kernel 2.6 (bug #35500) + +------------------------------------------------------------------- +Fri Mar 5 16:35:32 CET 2004 - pth@suse.de + +- Remove no-strict-aliasing and fix the code instead. Patch + was also sent to upstream maintainers for inclusion. + +------------------------------------------------------------------- +Fri Mar 5 01:23:54 CET 2004 - ro@suse.de + +- added libpng to neededforbuild (for rrdtool) +- use no-strict-aliasing + +------------------------------------------------------------------- +Wed Jan 28 01:28:01 CET 2004 - ro@suse.de + +- update to 2.8.3 +- use buildroot and build as user + +------------------------------------------------------------------- +Fri Sep 12 14:32:13 CEST 2003 - ro@suse.de + +- configure kernel-source if needed + +------------------------------------------------------------------- +Mon Jul 21 15:40:30 CEST 2003 - werner@suse.de + +- Update to lm_sensors 2.8.0 + +------------------------------------------------------------------- +Thu Jun 5 15:51:12 CEST 2003 - ro@suse.de + +- compile using headers from kernel-source not glibc + +------------------------------------------------------------------- +Wed Mar 19 00:38:38 CET 2003 - olh@suse.de + +- add lm_sensors-2.7.0-nodump.patch to fix dependency tree + +------------------------------------------------------------------- +Thu Feb 27 11:11:50 CET 2003 - werner@suse.de + +- Fix location of sensors program in boot script + +------------------------------------------------------------------- +Tue Feb 11 17:08:53 CET 2003 - werner@suse.de + +- Update due to kernel interface update (anything else is a bug) + +------------------------------------------------------------------- +Mon Dec 2 19:29:49 CET 2002 - werner@suse.de + +- Update to lm_sensors 2.4.6 + +------------------------------------------------------------------- +Wed Nov 6 15:07:21 CET 2002 - werner@suse.de + +- Fix bug # 21583: sensors shouldn't segfault on missing argument. + +------------------------------------------------------------------- +Wed Sep 4 17:29:11 CEST 2002 - werner@suse.de + +- Fix boot scripts to be usable (bug #18868) +- Install some progs which are described in FAQ + +------------------------------------------------------------------- +Wed Aug 28 14:41:35 CEST 2002 - fehr@suse.de + +- updated to current version 2.6.4 of lm_sensors + +------------------------------------------------------------------- +Thu Aug 1 17:10:58 CEST 2002 - werner@suse.de + +- Use _libdir macro for 64bit architectures + +------------------------------------------------------------------- +Wed Jul 31 14:59:13 CEST 2002 - werner@suse.de + +- Install sensord daemon for logging (bug #17316) + +------------------------------------------------------------------- +Tue Jun 18 14:56:39 CEST 2002 - ke@suse.de + +- Fix typo in README.SuSE [# 14790]. + +------------------------------------------------------------------- +Mon Aug 6 10:54:15 CEST 2001 - uli@suse.de + +- fixed to build on PPC + +------------------------------------------------------------------- +Wed Jul 4 19:11:52 CEST 2001 - werner@suse.de + +- update to 2.6.0 + +------------------------------------------------------------------- +Mon Apr 16 14:21:51 CEST 2001 - werner@suse.de + +- update to 2.5.5 + +------------------------------------------------------------------- +Thu Apr 5 18:21:38 CEST 2001 - uli@suse.de + +- removed lx_suse from neededforbuild + +------------------------------------------------------------------- +Thu Dec 14 17:14:04 CET 2000 - werner@suse.de + +- Group tag + +------------------------------------------------------------------- +Mon Jun 19 00:17:11 CEST 2000 - ro@suse.de + +- update to 2.5.0 + +------------------------------------------------------------------- +Wed Jun 7 18:38:15 MEST 2000 - uli@suse.de + +- moved docs to %{_docdir} + +------------------------------------------------------------------- +Fri Feb 11 12:59:20 CET 2000 - ro@suse.de + +- removed requires kernmod (package eliminated) + +------------------------------------------------------------------- +Wed Feb 2 18:56:23 CET 2000 - werner@suse.de + + - No asm/io.h if sys/io.h is included + +------------------------------------------------------------------- +Wed Feb 2 16:55:25 CET 2000 - werner@suse.de + + - No sys/perm.h or sys/io.h on ppc and sparc + +------------------------------------------------------------------- +Tue Feb 1 20:40:40 CET 2000 - werner@suse.de + + - New package sensors (version 2.4.3 corresponds with + current used kernel i2c patch) + - Prefix is /usr, mandir is /usr/share/man, and kernel + includes i2c + - Be reentrant + - Use RPM_OPT_FLAGS + - Install docs of busses, chips and the FAQ + +------------------------------------------------------------------- diff --git a/sensors.spec b/sensors.spec new file mode 100644 index 0000000..59e5313 --- /dev/null +++ b/sensors.spec @@ -0,0 +1,225 @@ +# +# spec file for package sensors (Version 2.10.1) +# +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +Name: sensors +BuildRequires: rrdtool sysfsutils udev +URL: http://www.lm-sensors.org/ +Version: 2.10.1 +Release: 1 +Summary: Hardware health monitoring for Linux +License: GNU General Public License (GPL) - all versions +Group: System/Monitoring +Requires: modules udev +Autoreqprov: on +Source0: lm_sensors-2.10.1.tar.bz2 +Source1: README.SuSE +Patch: lm_sensors-2.10.1.dif +Patch1: lm_sensors-2.8.3-nodump.patch +Patch2: lm_sensors-2.7.0-kernelheaders.dif +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%ifarch %ix86 x86_64 ia64 alpha +%define we_have_isa 1 +%else +%define we_have_isa 0 +%endif + +%description +This package includes programs that show data from some sensor chips. +The interface /proc/bus/i2c/ is provided by loading kernel modules. +Which modules to load can be interactively detected as root by calling +/usr/sbin/sensors-detect. Warning, before using the sensors the default +configuration in /etc/sensors.conf has to be checked and changed to fit +the actual set up of the mainboard and the BIOS used on that specific +mainboard! + + + +Authors: +-------- + Simon G. Vogl + Mark D. Studebaker + Philip Edelbrock + Kyösti Mälkki + Fons Rademakers + Frodo Looijaard + Geert Uytterhoeven + +%prep +%setup -n lm_sensors-%{version} +%patch +%if !%{we_have_isa} +%patch1 +%endif +%patch2 + +%build +RPM_OPT_FLAGS="$RPM_OPT_FLAGS" + make PROG_EXTRA:=sensord LIBDIR=%{_libdir} user + +%install + rm -rf $RPM_BUILD_ROOT + test -d lm_sensors2/ && cd lm_sensors2/ + make user_install PROG_EXTRA:=sensord LIBDIR=%{_libdir} DESTDIR=$RPM_BUILD_ROOT + cd doc/ + mkdir -p $RPM_BUILD_ROOT/%{_docdir}/sensors + cp -a FAQ $RPM_BUILD_ROOT/%{_docdir}/sensors/ + cp -a modules $RPM_BUILD_ROOT/%{_docdir}/sensors/ + cp -a donations $RPM_BUILD_ROOT/%{_docdir}/sensors/ + cp -a fan-divisors $RPM_BUILD_ROOT/%{_docdir}/sensors/ + cp -a fancontrol.txt $RPM_BUILD_ROOT/%{_docdir}/sensors/ + cp -a busses/ $RPM_BUILD_ROOT/%{_docdir}/sensors/ + cp -a temperature-sensors $RPM_BUILD_ROOT/%{_docdir}/sensors/ + cp -a vid $RPM_BUILD_ROOT/%{_docdir}/sensors/ + cp -a useful_addresses.html $RPM_BUILD_ROOT/%{_docdir}/sensors/ + cp -a chips/ $RPM_BUILD_ROOT/%{_docdir}/sensors/ + cp -a progs $RPM_BUILD_ROOT/%{_docdir}/sensors/ + #chown -R root:root $RPM_BUILD_ROOT/%{_docdir}/sensors/ + chmod -R u+rwX,g+rX,o+rX $RPM_BUILD_ROOT/%{_docdir}/sensors/ + cd ../ + cp ${RPM_SOURCE_DIR}/README.SuSE $RPM_BUILD_ROOT/%{_docdir}/sensors/ + mkdir -p $RPM_BUILD_ROOT/%{_docdir}/sensors/prog/init + install -m 0755 prog/init/lm_sensors.init.suse $RPM_BUILD_ROOT/%{_docdir}/sensors/prog/init/ + install -m 0644 prog/init/lm_sensors.sysconfig $RPM_BUILD_ROOT/%{_docdir}/sensors/prog/init/ + install -m 0755 prog/init/sensord.init $RPM_BUILD_ROOT/%{_docdir}/sensors/prog/init/ + install -m 0644 prog/init/README $RPM_BUILD_ROOT/%{_docdir}/sensors/prog/init/ + chmod 0755 $RPM_BUILD_ROOT/%{_libdir}/libsensors.so.* + mkdir -p $RPM_BUILD_ROOT/etc/init.d + install -m 0755 prog/init/lm_sensors.init.suse $RPM_BUILD_ROOT/etc/init.d/lm_sensors +# cleanup +rm -f $RPM_BUILD_ROOT/usr/src/linux/include/i2c-dev.h +rm -f $RPM_BUILD_ROOT/usr/src/linux/include/sensors.h + +%postun +%{insserv_cleanup} + +%files +%defattr(-,root,root) +%config(noreplace) /etc/sensors.conf +%config /etc/init.d/lm_sensors +%attr(660, root, root) %dev(c, 89, 0) /lib/udev/devices/i2c-0 +/usr/bin/* +/usr/sbin/* +%doc %{_docdir}/sensors/ +/usr/include/sensors/ +%{_libdir}/libsensors.a +%{_libdir}/libsensors.so* +%doc /usr/share/man/man1/*.1.gz +%doc /usr/share/man/man3/*.3.gz +%doc /usr/share/man/man5/*.5.gz +%doc /usr/share/man/man8/*.8.gz + +%changelog -n sensors +* Mon Nov 13 2006 - werner@suse.de +- Update to lm_sensors version 2.10.1 which also includes the + fix for bug #192092 by not overwriting chip settings +- Remove notify warn message from pdb about overwriting settings +* Mon Jun 26 2006 - werner@suse.de +- Load i2c-dev kernel module instead of i2c-sensor (bug #188126) +* Tue Feb 28 2006 - werner@suse.de +- Update to version 2.10.0 for better udev support (bug #151931) +- Add i2c-0 to static device list for udev (bug #151931) +* Wed Jan 25 2006 - mls@suse.de +- converted neededforbuild to BuildRequires +* Wed Jan 11 2006 - werner@suse.de +- Include fan control in lm_sensors service script (bug #141958) +* Tue Dec 13 2005 - werner@suse.de +- Do not to handle module variables from package Modules (#137963) +* Thu Nov 10 2005 - werner@suse.de +- Add postun section to run insserv_clean (bug #132934) +* Fri Oct 14 2005 - werner@suse.de +- Update to lm_sensors version 2.9.2 +* Thu Aug 25 2005 - werner@suse.de +- Security fix in pwmconfig (bug #112925) +* Wed May 11 2005 - schwab@suse.de +- Add freetype2 and libart_lgpl to nfb, needed by rrdtool. +* Mon May 09 2005 - werner@suse.de +- Update to lm_sensors-2.9.1 +- Use insserv to enable rc script (bug #76174) +* Thu Feb 17 2005 - werner@suse.de +- Update to lm_sensors-2.9.0 (bug #50681) +* Mon Aug 30 2004 - werner@suse.de +- Update to newest lm_sensors-2.8.7 to be compatible to the current + kernel version. +* Tue May 04 2004 - werner@suse.de +- Fix bug #35502 (missing w83627hf entries) by updating to + lm_sensors-2.8.6 which includes a better parser for sysfs +* Tue Apr 13 2004 - ro@suse.de +- remove kernel-source from neededforbuild + (not needed any longer) +* Wed Mar 10 2004 - werner@suse.de +- Add workaround for missing w83627hf chip driver (bug #35501) +* Tue Mar 09 2004 - werner@suse.de +- A few changes for kernel 2.6 (bug #35500) +* Fri Mar 05 2004 - pth@suse.de +- Remove no-strict-aliasing and fix the code instead. Patch + was also sent to upstream maintainers for inclusion. +* Fri Mar 05 2004 - ro@suse.de +- added libpng to neededforbuild (for rrdtool) +- use no-strict-aliasing +* Wed Jan 28 2004 - ro@suse.de +- update to 2.8.3 +- use buildroot and build as user +* Fri Sep 12 2003 - ro@suse.de +- configure kernel-source if needed +* Mon Jul 21 2003 - werner@suse.de +- Update to lm_sensors 2.8.0 +* Thu Jun 05 2003 - ro@suse.de +- compile using headers from kernel-source not glibc +* Wed Mar 19 2003 - olh@suse.de +- add lm_sensors-2.7.0-nodump.patch to fix dependency tree +* Thu Feb 27 2003 - werner@suse.de +- Fix location of sensors program in boot script +* Tue Feb 11 2003 - werner@suse.de +- Update due to kernel interface update (anything else is a bug) +* Mon Dec 02 2002 - werner@suse.de +- Update to lm_sensors 2.4.6 +* Wed Nov 06 2002 - werner@suse.de +- Fix bug # 21583: sensors shouldn't segfault on missing argument. +* Wed Sep 04 2002 - werner@suse.de +- Fix boot scripts to be usable (bug #18868) +- Install some progs which are described in FAQ +* Wed Aug 28 2002 - fehr@suse.de +- updated to current version 2.6.4 of lm_sensors +* Thu Aug 01 2002 - werner@suse.de +- Use _libdir macro for 64bit architectures +* Wed Jul 31 2002 - werner@suse.de +- Install sensord daemon for logging (bug #17316) +* Tue Jun 18 2002 - ke@suse.de +- Fix typo in README.SuSE [# 14790]. +* Mon Aug 06 2001 - uli@suse.de +- fixed to build on PPC +* Wed Jul 04 2001 - werner@suse.de +- update to 2.6.0 +* Mon Apr 16 2001 - werner@suse.de +- update to 2.5.5 +* Thu Apr 05 2001 - uli@suse.de +- removed lx_suse from neededforbuild +* Thu Dec 14 2000 - werner@suse.de +- Group tag +* Mon Jun 19 2000 - ro@suse.de +- update to 2.5.0 +* Wed Jun 07 2000 - uli@suse.de +- moved docs to %%{_docdir} +* Fri Feb 11 2000 - ro@suse.de +- removed requires kernmod (package eliminated) +* Wed Feb 02 2000 - werner@suse.de +- No asm/io.h if sys/io.h is included +* Wed Feb 02 2000 - werner@suse.de +- No sys/perm.h or sys/io.h on ppc and sparc +* Tue Feb 01 2000 - werner@suse.de +- New package sensors (version 2.4.3 corresponds with + current used kernel i2c patch) + - Prefix is /usr, mandir is /usr/share/man, and kernel + includes i2c + - Be reentrant + - Use RPM_OPT_FLAGS + - Install docs of busses, chips and the FAQ