File nut.spec of Package nut

# spec file for package nut
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           nut
BuildRequires:  apache2-devel
BuildRequires:  avahi-devel
BuildRequires:  dbus-1-glib-devel
BuildRequires:  gcc-c++
BuildRequires:  gd-devel
BuildRequires:  libcppunit-devel
BuildRequires:  libneon-devel
BuildRequires:  libopenssl-devel
BuildRequires:  libtool
BuildRequires:  libusb-devel
BuildRequires:  net-snmp-devel
BuildRequires:  openssl-devel
BuildRequires:  pkg-config
BuildRequires:  tcpd-devel
# To fix end-of-line encoding:
BuildRequires:  dos2unix
%if 0%{?suse_version} < 1310
# for directory ownership:
BuildRequires:  pm-utils
BuildRequires:  udev
%if 0%{?suse_version} > 1230
%ifarch %{ix86} x86_64 ia64 alpha
BuildRequires:  freeipmi-devel
%if 0%{?suse_version} > 1110
BuildRequires:  powerman-devel
# For doc build:
BuildRequires:  asciidoc
BuildRequires:  dblatex
%if 0%{?suse_version} > 1210
BuildRequires:  systemd-devel

Summary:        Network UPS Tools Core (Unbreakable Power Supply Monitoring)
License:        GPL-2.0+
Group:          Hardware/UPS
Version:        2.7.4
Release:        1.1
Source1:        upsd.init
Source2:        README.SUSE
Source3:        upsd-early-powerdown.init
Source6:        nut.system-sleep
Source7:        nut.sleep

Source9:        %{name}.keyring
Source10:       nut-driver
Source11:       nut-server
Source12:       nut-monitor
Patch:          nut-preconfig.patch

Patch3:         nut-notifyflag.patch
Patch4:         nut-powersave.patch
Patch6:         nut-udev.patch
# PATCH-FIX-UPSTREAM nut-systemd-dirs.patch -- Fix systemd targets.
Patch7:         nut-systemd-dirs.patch
Provides:       smartups = %version
Obsoletes:      smartups < %version
Conflicts:      apcupsd
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         pwdutils /bin/chown %insserv_prereq pwdutils /bin/chown /bin/chmod %{_bindir}/fgrep %{_bindir}/grep %{_bindir}/sed %{_bindir}/head %{_bindir}/md5sum
Requires:       %{_bindir}/fgrep
Requires:       %{_bindir}/grep
Requires:       %{_bindir}/pgrep
Requires:       %{_bindir}/pkill
Requires:       %{_bindir}/readlink
Requires:       usbutils
Requires(post): udev
# for update from openSUSE <= 11.3, SLE <= 11
Provides:       nut-classic = %{version}
Obsoletes:      nut-classic < %{version}
Obsoletes:      nut-hal < %{version}
%define apache_serverroot %(%{_sbindir}/apxs2 -q datadir 2>/dev/null || %{_sbindir}/apxs -q PREFIX)
%define CGIPATH		%{apache_serverroot}/cgi-bin
%define HTMLPATH	%{apache_serverroot}/htdocs
%define MODELPATH       %{_prefix}/lib/ups/driver
%define STATEPATH       %{_localstatedir}/lib/ups
%define CONFPATH	%{_sysconfdir}/ups
%define USER		upsd
%define GROUP		daemon
%define LBRACE (
%define RBRACE )
%define QUOTE "
%define BACKSLASH \\
# Collect all devices listed in ups-nut-device.fdi:
%define USBHIDDRIVERS    %(zcat %{S:0} | tr a-z A-Z | fgrep -a -A1 USBHID-UPS | sed -n 's/.*ATTR{IDVENDOR}==%{QUOTE}%{BACKSLASH}%{LBRACE}[^%{QUOTE}]*%{BACKSLASH}%{RBRACE}%{QUOTE}, ATTR{IDPRODUCT}==%{QUOTE}%{BACKSLASH}%{LBRACE}[^%{QUOTE}]*%{BACKSLASH}%{RBRACE}%{QUOTE}, MODE=.*/modalias%{LBRACE}usb:v%{BACKSLASH}1p%{BACKSLASH}2d*dc*dsc*dp*ic*isc*ip*%{RBRACE}/p' | tr '%{BACKSLASH}n' ' ')
%define USBNONHIDDRIVERS %(zcat %{S:0} | tr a-z A-Z | fgrep -a -A1 _USB       | sed -n 's/.*ATTR{IDVENDOR}==%{QUOTE}%{BACKSLASH}%{LBRACE}[^%{QUOTE}]*%{BACKSLASH}%{RBRACE}%{QUOTE}, ATTR{IDPRODUCT}==%{QUOTE}%{BACKSLASH}%{LBRACE}[^%{QUOTE}]*%{BACKSLASH}%{RBRACE}%{QUOTE}, MODE=.*/modalias%{LBRACE}usb:v%{BACKSLASH}1p%{BACKSLASH}2d*dc*dsc*dp*ic*isc*ip*%{RBRACE}/p' | tr '%{BACKSLASH}n' ' ')
# Package provides driver for USB HID UPSes, but people can live with hal addon:
Enhances:       %USBHIDDRIVERS
# Package provides the only avalailable driver for other USB UPSes:
%if %suse_version > 1210
%define systemdsystemunitdir %(pkg-config --variable=systemdsystemunitdir systemd)
%define systemdsystemdutildir %(pkg-config --variable=systemdutildir systemd)
%if %suse_version < 1310
Requires:       powersave

Core package of Network UPS Tools.

Network UPS Tools is a collection of programs which provide a common
interface for monitoring and administering UPS hardware.

Detailed information about supported hardware can be found in

%package drivers-net
Summary:        Network UPS Tools - Extra Networking Drivers (for Network Monitoring)
Group:          Hardware/UPS
Requires:       %{name} = %{version}
Enhances:       %{name}
# for update from openSUSE <= 10.3, SLE <= 10
Provides:       nut:%{MODELPATH}/snmp-ups

%description drivers-net
Networking drivers for the Network UPS Tools. You will need them
together with nut to provide UPS networking support.

Network UPS Tools is a collection of programs which provide a common
interface for monitoring and administering UPS hardware.

Detailed information about supported hardware can be found in

%package -n libupsclient1
Summary:        Network UPS Tools Library (Unbreakable Power Supply Monitoring)
Group:          System/Libraries

%description -n libupsclient1
Shared library for the Network UPS Tools.

Network UPS Tools is a collection of programs which provide a common
interface for monitoring and administering UPS hardware.

Detailed information about supported hardware can be found in

%package cgi
Summary:        Network UPS Tools Web Server Support (UPS Status Pages)
Group:          Hardware/UPS
Requires:       %{name} = %{version}
Enhances:       %{name}
Supplements:    packageand(%{name}:apache2)
# for update from openSUSE <= 10.3, SLE <= 10
Provides:       nut:/srv/www/cgi-bin/upsstats.cgi

%description cgi
Web server support package for the Network UPS Tools.

Predefined URL is http://localhost/nut/index.html

Network UPS Tools is a collection of programs which provide a common
interface for monitoring and administering UPS hardware.

Detailed information about supported hardware can be found in

%package devel
Summary:        Network UPS Tools (Unbreakable Power Supply Monitoring)
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       openssl-devel

%description devel
Network UPS Tools is a collection of programs which provide a common
interface for monitoring and administering UPS hardware.

Detailed information about supported hardware can be found in

#%if 0%{?gpg_verify:1}
#%gpg_verify %{S:8}
%setup -q
cp -a %{S:1} %{S:2} %{S:3} %{S:5} %{S:6} %{S:7} %{S:10} %{S:11} %{S:12} .
mv upsd-early-powerdown.init upsd-early-powerdown

%if %suse_version < 1110
%if %suse_version < 1030
%patch6 -R
sed -i "s/@UPSD_USER@/%{USER}/g" upsd.init conf/
%if %suse_version < 1030
sed -i 's:/usr/lib/pm-utils/functions:/etc/pm/functions:' nut.sleep
%patch7 -p1
sed -i s:/usr/local/ups/bin:/bin: conf/
[ -f docs/nut-qa.txt ]
dos2unix docs/nut-qa.txt

autoreconf -f -i
%configure --disable-static --with-pic --libexecdir=%_prefix/lib\
%if 0%{?suse_version} <= 1230
%ifnarch %{ix86} x86_64 ia64 alpha
%if %suse_version <= 1110
	--with-group=%{GROUP} \
make %{?jobs:-j%jobs}
PORT=$(sed -n 's/#define PORT //p' config.log)
if test "$PORT" = 3493 ; then
sed s/@PORT@/$PORT/ < >nut.firewall

# SuSE rc
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
install -m 755 upsd.init $RPM_BUILD_ROOT%{_sysconfdir}/init.d/upsd
ln -sf ../..%{_sysconfdir}/init.d/upsd $RPM_BUILD_ROOT%{_sbindir}/rcupsd
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
install -m 644 scripts/logrotate/nutlogd $RPM_BUILD_ROOT/etc/logrotate.d/
%if %suse_version < 1110
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d
install -m 644 packaging/opensuse/upsd.dbus-1 $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/upsd.conf
rename .sample "" $RPM_BUILD_ROOT%{_sysconfdir}/ups/*.sample
%if %suse_version >= 1030
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
cp nut.firewall $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/nut
%if 0%{?suse_version} < 1310
%if %suse_version >= 1030
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/pm-utils/sleep.d
install nut.sleep $RPM_BUILD_ROOT%{_prefix}/lib/pm-utils/sleep.d/99nut
install -d $RPM_BUILD_ROOT%{_sysconfdir}/pm/sleep.d
install nut.sleep $RPM_BUILD_ROOT%{_sysconfdir}/pm/sleep.d/99nut
install -d $RPM_BUILD_ROOT/usr/lib/systemd/system-sleep
install nut.system-sleep $RPM_BUILD_ROOT/usr/lib/systemd/system-sleep/%{name}.sh
mkdir $RPM_BUILD_ROOT/bin
mv $RPM_BUILD_ROOT%{_bindir}/upssched-cmd $RPM_BUILD_ROOT/bin/upssched-cmd
# Rename web pages to not conflict with apache2-example-pages or user home page:
%{__rm} -f %{buildroot}%{_libdir}/*.la
mkdir -p $RPM_BUILD_ROOT/etc/bash_completion.d
install -m0644 scripts/misc/nut.bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/
# It would be nice to use -m0644, but it will fail on brp-55-boot-scripts
install nut-driver nut-server nut-monitor $RPM_BUILD_ROOT/etc/init.d/

usr/sbin/useradd -r -g %{GROUP} -s /bin/false \
  -c "UPS daemon" -d /sbin %{USER} 2>/dev/null || :
%if %suse_version > 1210
%service_add_pre nut-driver.service nut-server.service nut-monitor.service

# Be sure that all files are owned by a dedicated user.
bin/chown -R %{USER}:%{GROUP} %{STATEPATH}
%{fillup_and_insserv -f -n upsd}
# Generate initial passwords.
if usr/bin/fgrep -q "password = @UPSD_INITIAL_MASTER_PASSWORD@" %{CONFPATH}/{upsmon.conf,upsd.users} ; then
  UPSD_INITIAL_MASTER_PASSWORD=$(usr/bin/head -c 20 /dev/urandom | usr/bin/md5sum | usr/bin/head -c 10)
  usr/bin/sed -i s/@UPSD_INITIAL_MASTER_PASSWORD@/$UPSD_INITIAL_MASTER_PASSWORD/ %{CONFPATH}/{upsmon.conf,upsd.users}
if usr/bin/fgrep -q "password = @UPSD_INITIAL_SLAVE_PASSWORD@" %{CONFPATH}/upsd.users ; then
  UPSD_INITIAL_SLAVE_PASSWORD=$(usr/bin/head -c 20 /dev/urandom | usr/bin/md5sum | usr/bin/head -c 10)
# Be sure that all files are owned by a dedicated user.
bin/chown %{USER}:root %{CONFPATH}/upsd.conf %{CONFPATH}/upsmon.conf %{CONFPATH}/upsd.users
bin/chmod 600 %{CONFPATH}/upsd.conf %{CONFPATH}/upsmon.conf %{CONFPATH}/upsd.users
# Install or remove HALT_POWERDOWN_INSERT
# It was last installed in 1310, but it is obsolete since dropping sysvinit support.
%if 0%{?suse_version} < 1310
if usr/bin/grep -q '^HALT_POWERDOWN_INSERT="\(%{_sysconfdir}/init\.d/upsd try-powerdown\|\)"' etc/sysconfig/shutdown ; then
  usr/bin/sed -i 's:^\(HALT_POWERDOWN_INSERT="\).*"[[:space:]]*:\1%{_sysconfdir}/init.d/upsd try-powerdown":' etc/sysconfig/shutdown
 # User configured Suspend-to-disc. Keep it unchanged and be silent.
  if ! usr/bin/grep -q '^HALT_POWERDOWN_INSERT="/usr/bin/powersave -U' etc/sysconfig/shutdown ; then
    echo >&2 "nut: WARNING: Unknown value of HALT_POWERDOWN_INSERT in %{_sysconfdir}/sysconfig/shutdown."
    echo >&2 "     Keeping unchanged. Should be:"
    echo >&2 "HALT_POWERDOWN_INSERT=\"%{_sysconfdir}/init.d/upsd try-powerdown\""
    echo >&2 "or"
    echo >&2 "HALT_POWERDOWN_INSERT=\"/usr/bin/powersave -U\""
# Unconditional removal of HALT_POWERDOWN_INSERT in new SUSE versions. (last installed in 1310)
if usr/bin/grep -q '^HALT_POWERDOWN_INSERT="\(%{_sysconfdir}/init\.d/upsd try-powerdown\|/usr/bin/powersave -U\)"' etc/sysconfig/shutdown ; then
  usr/bin/sed -i 's:^\(HALT_POWERDOWN_INSERT="\)\(%{_sysconfdir}/init\.d/upsd try-powerdown\|/usr/bin/powersave -U\)":\1":' etc/sysconfig/shutdown
# Migrate Suspend to Disc to the new convention (bnc#449861 and later bnc#871406):
# It was never on by default, but documentation up to 11.0 recommends
# "shutdown -z +0" for suspend to disc. It was discontinued before 11.0.
# Documentation since 11.0 up to 13.1 recommends /usr/bin/powersave -U.
# pm-utils (and powersave) were obsoleted after 13.1 in favor of systemd.
%if 0%{?suse_version} >= 1310
if fgrep "shutdown -z +0" /etc/ups/upsmon.conf ; then
sed -i 's:/sbin/shutdown -z +0:/usr/bin/systemctl hibernate:;s:shutdown -z +0:/usr/bin/systemctl hibernate:' /etc/ups/upsmon.conf
if fgrep "powersave -U" /etc/ups/upsmon.conf ; then
sed -i 's:/usr/bin/powersave -U:/usr/bin/systemctl hibernate:;s:powersave -U:/usr/bin/systemctl hibernate:' /etc/ups/upsmon.conf
if fgrep "shutdown -z +0" /etc/ups/upsmon.conf ; then
sed -i 's:/sbin/shutdown -z +0:/usr/bin/powersave -U:;s:shutdown -z +0:/usr/bin/powersave -U:' /etc/ups/upsmon.conf
# Silently remove %{_sysconfdir}/sysconfig/smartups. File is now obsolete and
# values are copied to not replaced config files.
# %{_sysconfdir}/sysconfig/smartups was last present in SuSE Linux 10.0
rm -f %{_sysconfdir}/sysconfig/smartups
# And finally trigger udev to set permissions according to newly installed rules files.
/sbin/udevadm trigger --subsystem-match=usb --property-match=DEVTYPE=usb_device
%if %suse_version > 1210
%service_add_post nut-driver.service nut-server.service nut-monitor.service

%{stop_on_removal upsd}
%if %suse_version > 1210
%service_del_preun nut-driver.service nut-server.service nut-monitor.service

%{restart_on_update upsd}
# It was last installed in 1310, but it is obsolete since dropping sysvinit support.
%if 0%{?suse_version} < 1310
if test $1 -eq 0 -a ! -f %{_sysconfdir}/init.d/upsd ; then
  if usr/bin/grep -q '^HALT_POWERDOWN_INSERT="\(%{_sysconfdir}/init\.d/upsd try-powerdown\|/usr/bin/powersave -U\)"' etc/sysconfig/shutdown ; then
    usr/bin/sed -i 's:^\(HALT_POWERDOWN_INSERT="\)\(%{_sysconfdir}/init\.d/upsd try-powerdown\|/usr/bin/powersave -U\)":\1":' etc/sysconfig/shutdown
    echo >&2 "nut: WARNING: Unknown value of HALT_POWERDOWN_INSERT in %{_sysconfdir}/sysconfig/shutdown."
    echo >&2 "     Keeping unchanged. Should be:"
    echo >&2 "HALT_POWERDOWN_INSERT=\"\""
  if test -f %{_sysconfdir}/init.d/upsd-early-powerdown ; then
    echo >&2 "nut: WARNING: You may want to remove your %{_sysconfdir}/init.d/upsd-early-powerdown."
%if %suse_version > 1210
%service_del_postun nut-driver.service nut-server.service nut-monitor.service

%post -n libupsclient1 -p /sbin/ldconfig

%postun -n libupsclient1 -p /sbin/ldconfig


%doc AUTHORS COPYING ChangeLog MAINTAINERS NEWS README README.SUSE UPGRADING upsd-early-powerdown docs/*.txt docs/cables
%doc %{_mandir}/man5/*.*
%doc %{_mandir}/man8/*.*
%exclude %doc %{_mandir}/man8/netxml-ups*.*
%exclude %doc %{_mandir}/man8/snmp-ups*.*
%dir %{_prefix}/lib/ups
%if 0%{?suse_version} < 1310
%if %suse_version >= 1030
%if %suse_version < 1110
%if %suse_version >= 1030
%config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/nut
%dir %{_sysconfdir}/udev
%dir %{_sysconfdir}/udev/rules.d
%config(noreplace) %{_sysconfdir}/udev/rules.d/*.rules
%config(noreplace) %{CONFPATH}/hosts.conf
%config(noreplace) %attr(600,%{USER},root) %{CONFPATH}/upsd.conf
%config(noreplace) %attr(600,%{USER},root) %{CONFPATH}/upsd.users
%config(noreplace) %attr(600,%{USER},root) %{CONFPATH}/upsmon.conf
%dir %{CONFPATH}
%config(noreplace) %{CONFPATH}/nut.conf
%config(noreplace) %{CONFPATH}/ups.conf
%config(noreplace) %{CONFPATH}/upsset.conf
%config(noreplace) %{CONFPATH}/upssched.conf
%exclude %{MODELPATH}/snmp-ups
%exclude %{MODELPATH}/netxml-ups
%attr(700,%{USER},%{GROUP}) %{STATEPATH}
%if %suse_version > 1210

%files drivers-net
%doc %{_mandir}/man8/netxml-ups*.*
%doc %{_mandir}/man8/snmp-ups*.*

%files -n libupsclient1

%files cgi
%config(noreplace) %{CONFPATH}/upsstats-single.html
%config(noreplace) %{CONFPATH}/upsstats.html

%files devel
%doc %{_mandir}/man3/*.*

* Thu Apr  3 2014
- Replace powersave support by systemd (bnc#871406).
* Thu Mar 27 2014
- explicitly require udev to fix buildenvironment issues
* Fri Feb 14 2014
- Replace pm-utils support by systemd (FATE#316824).
* Tue Nov 26 2013
- Update to version 2.7.1:
  For more see NEWS and UPGRADING in /usr/share/doc/packages/nut.
  Potentially incompatible changes:
  * First release after the transition from Subversion to Git.
  * The linkman:apcsmart[8] driver has been replaced by a new
    implementation. There is a new parameter, 'ttymode'.  In case
    of issues with this new version, users can revert to
  * The linkman:nutdrv_qx[8] driver will eventually supersede
    blazer_ser and blazer_usb.  Options are not exactly the same,
    but are documented in the nutdrv_qx man page.
  * Mozilla NSS support has been added.
  * linkman:upsrw[8] now prints out the maximum size of
  Other changes:
  * Added a new driver, nutdrv_qx, for Megatec/Qx devices. This
    driver will eventually replace the blazer_ser and blazer_usb
    drivers. In particular, it adds support for Voltronic Power
  * Increased USB_TIMEOUT to standards-compliant 5.000 seconds in
    most drivers.  This should reduce the number of timeouts on
    low-speed USB 1.1 devices.
  * Added many devices to the HCL. Of particular note are many
    Tripp Lite USB HID PDC models which were tested against NUT by
    Tripp Lite.
  * Reworked some visual elements of the HCL.
  * Also increased timeouts and added redundant commands to improve
    reliability of mge-utalk driver.
  * Added the apcupsd-ups driver to interoperate with apcupsd
  * Added documentation on creating subdrivers for snmp-ups and
  * Added new drivers for the Riello UPS product line
  * Many improvements to the BCM/XCP.
  * Added a few variables to the Powercom HID mappings.
  * Updated the apcsmart driver, and renamed the previous driver to
  * Fixed the battery percentage calculation in the bestfcom
  * libnutclient has been added as a C++ alternative to
  * Fix shutdown of Eaton HID, using usbhid-ups and mge-shut
  * usbhid-ups: final fix for APC Back UPS ES.
  * nut-scanner: fix crash
  * IPMI support can handle more different versions of FreeIPMI
  * Support power supplies scan over the network nut-scanner can
    now scan for power supplies with IPMI over LAN.  This is
    currently limited to IPMI 1.5 only
  * Improve systemd integration
  * snmp-ups: Fixed a crash on outlet management, and added
    delta_ups MIB support. Also fixed mappings for
    upsBypassVoltage, upsBypassCurrent, and upsBypassPower in
    three-phase IETF MIB.
- Enable FreeIPMI.
* Tue Jan 29 2013
- Turn systemd integration on (nut-systemd-dirs.patch).
- nut-preconfig.patch: Fix UID recommendation.
* Mon Nov 19 2012
- Verify GPG signature.
* Sat Nov 17 2012
- Fix useradd invocation: -o is useless without -u and newer
  versions of pwdutils/shadowutils fail on this now.
- Fix provides/obsoletes
* Tue Sep  4 2012
- Update to version 2.6.5:
  * Fix regression in upssched.
  * Support for new devices: Eaton ePDU Switched, Online Zinto A,
    REDi Blazer 400VA / 600VA / 800VA, UNITEK Alpha650ipF and
    Alpha650ipE, AEG Power Solutions PROTECT HOME, more APC SNMP
    cards, ATEK Defensor range, all Borri models, all COVER ENERGY
    SA, CyberPower OR700LCDRM1U, PR6000LCDRTXL5U and CP1000PFCLCD,
    Dell UPS Network Management Card, Dynamix 1000VA USB, Eaton
    Management Card Contact (ref 66104), EVER POWERLINE RT / 11 /
    31 and DUO II Pro, GE Digital Energy GT Series 1000-3000 VA,
    Gtec models, all recent HP serial / USB UPS (G2, G3 and R/T
    models) and HP UPS Management Module, Ippon INNOVA RT, KOLFF
    BLACK NOVA, Lexis X-power Tigra 1kVA, Microline C-Lion Innova,
    Online Yunto YQ450, PowerShield Defender 1200VA, PowerWalker
    Online VFI LCD, Line-Interactive VI LCD and Line-Interactive
    VI, Riello Netman Plus 102 SNMP Card, Tripp-Lite OMNISMART500.
  * mge-shut driver has been replaced by a new implementation.
  * Support for integration with VMware ESXI 5.0.
  * IPMI support.
  * snmp-ups: high precision values for APC, more variables.
  * The NUT variables and commands namespace has been fixed and
  * Support of ranges of values for writable variables added.
  * Static source code analysis fixes by RedHat using Coverity.
  * Add new "LIST CLIENTS" and "NETVER" commands to NUT network
  * bcmxcp has improved support for battery status, and better
    supports PW9120 units.
  * bestfortress has improved Best Fortress LI675VA support.
  * blazer_ser and blazer_usb now try to automatically estimate high
    and low voltages; support for online Innova UPS (T, RT and 3/1
    T); Best UPS support has been improved.
  * bestups fixes, but will soon be deprecated.
  * newmge-shut has been heavilly improved.
  * oneac 0.80 improves support for all families of Oneac.
  * usbhid-ups: for Eaton devices, is now
    automatically adjusted for shutdown.{return,stayoff}; Liebert
    firmwares with incorrect exponents have also been addressed.
  * snmp-ups now provides support for UPS shutdown. Composite
    commands are also supported now; Eaton/MGE MIB has been cleaned
    and completed; 3-phases support has been added to Socomec
    Netvision MIB; HP/Compaq MIB has been completed.
  * nut-scanner now also has libupsclient has a weak runtime
  * Provide an Uncomplicated Firewall (UFW) profile.
  * Riello protocols have been officially published in NUT
    protocols library.
  * Duplicate instances of upsd / upsmon are now detected.
  * upslog now comes with logrotate configuration.
  * more devices embed NUT for power protection, now including
    Thecus NAS range.
  * has been updated to version 1.2.2.
  * Bugfixes, cleanup and improvements.
* Thu May 31 2012
- Fix random network data crash (bnc#764699, CVE-2012-2944).
* Wed May 30 2012
- Upgrade to version 2.6.3:
  * nut-scanner is now improved and more portable.
  * pkg-config support
  * Support for new devices: Cyber Power Systems with SNMP RMCARD
    (100, 201, 202 and 301); Dynamix 650VA USB; LDLC UPS-1200D;
    Tecnoware UPS ERA LCD 0.65; Powercom BNT-xxxAP (USB ID
    0d9f:0004); Various USB devices using UPSilon 2000 software.
  * bcmxcp_usb now handles disconnection and reconnection.
  * blazer_usb enables again inclusion of buggy IDs.
  * upsd doesn't anymore fail where either IPv4 or IPv6 is
    disabled, and no explicit LISTEN directive has been specified.
  * Avahi support is now automatically enabled, upon detection.
  * jNut (NUT Java interface) adds device discovery support.
  * Many bugfixes, cleanup and improvements.
* Sun Nov 20 2011
- add libtool as buildrequire to avoid implicit dependency
* Wed Nov  2 2011
- Patch real source files to get missing devices (bnc#719292#c7).
* Tue Nov  1 2011
- Added missing USB devices (bnc#719292).
- Build without IPMI (openSUSE 12.1 does not contain freeipmi).
- Build without powerman for older products.
- Trigger udev to apply newly installed rules (bnc#727396).
* Wed Sep 21 2011
- Build without IPMI for older products.
* Mon Sep 19 2011
- Upgrade to version 2.6.2 (requested by
  * NUT can now monitor power supply units (PSU) in servers
  * NUT now provides 'nut-scanner', to discover supported devices
  * NUT now provides a Java interface called 'jNut'.
  * support for: Eaton 3S ; Cyber Power Systems CP1000AVRLCD ;
    various APC models equiped with APC AP9618 management card, including APC
    Smart-UPS RT XL ;  Orvaldi 750 / 900SP ; POWEREX VI 1000 LED ; PowerWalker
    VI 850 LCD ; SVEN Power Pro+ series (USB ID ffff:0000).
  * Avahi support has been added
  * many updates and fixes.
* Thu Jun 16 2011
- Upgrade to version 2.6.1 (bnc#698152):
  * NUT now propose a variable to expose UPS efficiency.
  * Various recent USB regressions have been definitely fixed.
  * NUT now propose a variable to expose UPS efficiency.
  * Support for new devices: Eaton Ellipse ECO, Powerware 9140,
    Eaton 5 PX, and ambient sensor on Eaton ePDU managed, GE EP
    series, Inform Sinus SS 210, IPAR Mini Energy ME 800, Mustek
    Yukai PowerMust 1000 USB, Numeric 3000 SW, SVEN Power Pro+
    series (recent models), Vivaldi EA200 LED.
  * Improved Liebert ESP II support, PowerCom BNT 1500A and
    BNT-other, blazer
  * apcsmart has more improved UPS poweroff support and options.
  * usbhid-ups has completed a bit supported variables for APC and
  * Documentation updates.
- Drop nut-hal and merge nut-classic back to nut (bnc#697028).
* Tue Jun 14 2011
- Fixed command order during hibernate to prevent UPS communication
  locks and failures (bnc#660236).
* Wed Feb  9 2011
- Do not force move hal addons - fix configure check instead -
  different SUSE versions need different path.
* Tue Feb  8 2011
- do not hardcode location of lsusb
* Sat Jan 29 2011
- Upgrade to 2.6.0.
  * WARNING: Users of the megatec and megatec_usb drivers must respectively
    switch to blazer_ser and blazer_usb.
  * WARNING: Users of the liebertgxt2 driver are advised that the driver name
    has changed to liebert-esp2.
  * Greatly improve documentation.
  * Add Augeas support.
  * Added support for new devices.
  * Many other fixes and improvements.
* Fri Aug  7 2009
- Updated to version 2.4.1:
  * Support for new devices: MicroDowell Enterprise B8, B10, N8,
  N11, N15, N20, N22, N30, N40, N50, N60 and HiBox ST.
  * NUT-Monitor now better handles the ups.status field.
  * Support for Power Distribution Units (PDUs), including: Eaton
    ePDUs (Managed and Monitored), some Aphel models, some Raritan
    PDUs, and the whole list of Powerman supported devices,
    Chloride Desk Power 650, Cyber Power Systems Value
    400E/600E/800E (USB models), Delta GES602N, Digitus DN-170020,
    the whole Eaton ranges (mostly composed of MGE Office
    Protection Systems and Powerware units) including BladeUPS,
    Forza Power Technologies SL-1001, HP PowerTrust 2997A, HP R/T
    2200 G2, Infosec XP 1000 and XP 500, Ippon Back Power Pro
    (serial and USB), Kebo 1200D/D Series, Liebert PowerSure
    Personal XT, MGE Office Protection Systems Protection Station,
    Neus 400va and 600va, Phasak 400VA and 600VA, Plexus 500VA,
    Powercom Black Knight PRO / King PRO and Imperial,
    PowerKinetics BlackOut Buster, Sweex 1000 USB, UNITEK Alpha
    500, WinPower CPM-800.
  * NUT now embeds Python client support through the PyNUTClient
    module and the NUT-Monitor application.
  * The dummy-ups driver now support a "repeater" mode.
  * tcp-wrappers support has been added to the upsd server.
  * The nut.conf file has been introduced.
  * NUT now ships a bash completion function for 'upsc' command.
  * Many internal changes to improve maintenability:
  * the USB information automatic extraction to generate the
    various USB helper files,
  * the upsdrv_info_t structure to track more driver
    information, and remove the need for the upsdrv_banner()
  * common USB code refactoring, as it is done for the serial
  * Tons of bugfixes, cleanup and improvements.
* Tue Jul 14 2009
- fix hal directories
* Mon Feb  2 2009
- Removed obsolete dbus configuration for powersave (bnc#468391).
* Wed Jan 28 2009
- remove static libraries and "la" files
- add missing openssl-devel to Requires of -devel package
* Tue Jan 27 2009
- pass --with-udev-dir to configure to fix build
  (hal does not own /etc/udev anymore)
* Wed Dec 17 2008
- Fixed Suspend to Disc documentation (bnc#449861).
- Support Suspend to Disc in scriptlets.
- Turn UPS down during emergency Suspend to Disc (bnc#449862).
- Fixed locations of pm-utils stuff (bnc#449866).
- upssched-cmd moved to /bin (bnc#449828).
- Fixed incorrect path to upssched-cmd (bnc#449869).
- Fixed files listed twice.
* Tue Dec  9 2008
- add pre script for classic package to add the user also
  before this package is installed
* Fri Sep 26 2008
- Fixed PreReq, useradd must be installed for %%pre (bnc#429557).
- Sync permissions in scriptlets and file list.
* Wed May 28 2008
- nut-cgi: Fixed and documented URLs (bnc#354388#c10).
- README.SUSE: Fixed name of the most common USB HID driver.
* Mon May 26 2008
- Provide and Require nut-package (bnc#337059#c3).
* Fri May  9 2008
- Added suspend hook (bnc#230267).
- Updated to final version 2.2.2 (bnc#385133):
  * added two models supported by megatec
  * includes build fixes from patches
* Wed Apr 30 2008
- Added hardware modaliases for solver.
- Fixed generating of NUT firewall rule (bnc#385111).
- Installed HAL FDI to disable hald-addon-hid-ups (bnc#385253).
- Split nut-classic and hut-hal variants to separate subpackages
- Split networking drivers and web server into separate packages to
  reduce dependencies (bnc#156614).
- Split shared library according to shared library policy.
- Updated README.SuSE.
- Updated to version 2.2.2-pre3 (bnc#385133):
  * support for new devices: APC BACK-UPS XS LCD, Atlantis Land,
    Mustek Powermust Office 650, Oneac XAU models, Powerware PW5115
    and PW9120 (USB), Nitram Elite 2005.
  * Advanced Integrated Power Management (NUT HAL integration).
  * Shutdown handling has been reworked.
  * Support for MGE UPS SYSTEMS 3 phases units has been added.
  * snmp-ups now supports MGE* Environment Sensor (ref 66 846).
  * The ambient.temperature reporting has also been fixed for units
    other than APC.
  * the netxml-ups driver has appeared to support MGE* network
    HTTP/XML cards.
  * The shared library installed by default.
  * powerpanel has reach a new step toward the replacement of
    nitram and cpsups drivers.
  * many changes, cleanup and fixes to the NUT core and various
* Thu Apr 24 2008
- Updated to version 2.2.1:
  * support for new devices: all MGE Office Protection Systems
    units, Advice TopGuard 2000, Belkin F6H375-USB, Dynamix
    UPS1700D, Effekta RM2000MH, Jageson Technology Jasuny USPS,
    Powercom SMK-1500A and SXL-1500A, PowerWalker Line-Interactive
    VI 400/800 and 600, Powerware 9110, UNITEK Alpha 2600, UPSonic
    CXR1000, some vintage serial APC UPSs.
  * Improvements, fixes and backports to usbhid-ups.
  * Updated udev rules.
  * megatec and megatec_usb drivers backported.
  * development files improved.
* Mon Apr 14 2008
- Work around misuse of libtool.
* Thu Oct 25 2007
- Fixed use of uninitialized memory (#331749#c13).
* Tue Oct 23 2007
- Renamed web pages to prevent conflicts.
* Mon Oct 22 2007
- Fixed udev USB rules for current kernels (#331749).
- Added SuSEfirewall2 rule and fixed documentation (#335466).
* Tue Aug  7 2007
- Updated to version 2.2.0:
  * New build infrastructure, with shared library.
  * Support for HAL and Plug and Play.
  * New drivers.
  * Support for many new devices.
  * IPv6 support.
  * Client commands now defaults to localhost.
  * Driver improvements.
  * Documentation improvements.
* Wed May 16 2007
- Buildrequires libusb -> libusb-devel
* Tue Feb 20 2007
- Comparison with string literal (bug #232417)
  - setcmd-literal.patch
* Mon Sep 18 2006
- fixed compiler warning: array subscript out of range [#204417]
* Fri Sep  1 2006
- updated to 2.0.4
  * A bug has been fixed in NUT core to support resuming from
    suspend-to-disk. This should also fix other similar issues,
    like time synchronisation through the NTP.
  * The mge-shut driver now better detects the Low Battery status,
    support new models and fixes some wrong status and data.
    It also fixes some issue where the UPS wasn't restarting
    (refer to mge-shut manpage).
  * The genericups custom configuration through ups.conf
    is working again
  * The genericups driver type 22 also support CyberPower 725SL
    (and maybe others SL models)
  * The new megatec driver, which will replace a bunch of drivers
    by nut 2.2 (refer to docs/megatec.txt and UPGRADING) has been
    backported from the trunk (Development tree). The powermust
    driver has also received some attention.
  * The new rhino driver was added to support Microsol Rhino UPS
    hardware. The solis has also been improved for solaris
    compatibility, and internal / external shutdown programming.
    Solis can now save external shutdown programming to ups,
    and support new cables for solis 3
- dropped obsolete patch (nut-2.0.4-memset.patch)
- fixed subscript out of range [#185610] (overflow.patch)
* Fri Jun 23 2006
- Typo fix in the init script.
* Thu Apr 27 2006
- Work correctly, if port is a symlink (168611#c6).
* Tue Apr 25 2006
- Fixed init script to behave correctly for port = auto (#168611).
* Fri Mar 24 2006
- Typo fixes.
* Tue Mar 21 2006
- Added D-BUS policy file (#159668).
* Mon Mar 20 2006
- Support for UPS powerdown using HALT_POWERDOWN_INSERT.
- Added upsd-early-powerdown template and improved README.SUSE.
- Remove obsolete /etc/sysconfig/smartups in %%post.
* Fri Mar 17 2006
- README.SUSE fixes (Marius Tomaschewski).
- Init script fix.
- Install all driver manual pages.
- Use new powersave-notify path.
* Wed Mar 15 2006
- Build all available drivers.
* Tue Mar 14 2006
- Improved README.SUSE and predefined configuration.
- Checks and fixes in the init script.
- Improved notify flags, integrate with powersave.
  (Some fixes provided by Marius Tomaschewski.)
* Fri Mar 10 2006
- Fixed memset error in upsrw.c.
- Fixed upsmon typo in the init script.
- Preconfigure upsd with one local UPS as default.
* Thu Mar  9 2006
- Updated to version 2.0.3.
- Removed SuSEconfig, wrote new init script
  (#27721, #141948, #156614).
* Mon Feb 20 2006
- fix array index out of range
  [#133610] (overflow.patch)
* Wed Jan 25 2006
- converted neededforbuild to BuildRequires
* Thu Jan 12 2006
- Updated to version 2.0.3-pre2.
* Thu Nov  3 2005
- don't build as root
* Mon Aug  1 2005
- Updated to version 2.0.2.
* Fri Jan 21 2005
- Updated to version 2.0.1-pre4.
* Mon Aug 23 2004
- Updated to version 2.0.0.
* Mon Apr 19 2004
- build with apache2
* Wed Apr 14 2004
- build without kernel-source.
* Tue Mar 23 2004
- Force-define HID_MAX_USAGES (kernel 2.6.4 include file bug, should
  be fixed in later kernels).
* Mon Feb  9 2004
- Updated to version 1.4.1.
* Thu Oct  2 2003
- adapted pre-configuration and startscript to reflect changes
  in 1.4.0
- changed file-permissions
* Mon Sep 29 2003
- update to 1.4.0
* Tue Aug 19 2003
- Add sysconfig metadata [#28939]
* Thu Jun 26 2003
- update to 1.2.2
- removed config-check in init-script
* Fri Jun 20 2003
- added directories to filelist
* Tue May 13 2003
- use %%defattr
* Thu Feb 20 2003
- Add sysconfig metadata [#22688]
* Tue Aug  6 2002
- use X-UnitedLinux-Should-Start
* Mon Aug  5 2002
- Required-start: setserial, add Prereq
* Fri Aug  2 2002
- adapt server-root
* Sat Jul 27 2002
- fix SuSEconfig.nut:
  - don't include rc.config [Bug #17267]
  - use correct path to sysconfig directory
* Fri Jul 26 2002
- fix neededforbuild
* Tue May 28 2002
- update to 0.50.0
- changed init-script to use upsdrvctl
  (make it possible to change config-files manually without
  changing /etc/sysconfig/smartups)
* Tue Apr  9 2002
- update to 0.45.5
- fixed SuSEconfig.nut to sysconfig scheme
* Fri Feb  1 2002
- changed neededforbuild <libpng> to <libpng-devel-packages>
* Sat Jan 12 2002
- little ifarch fix again :-(
* Fri Jan 11 2002
- changed rc.config.d leftover in rcups
- build hidups on all archs excluding s390 (finally)
* Tue Jan  8 2002
- build hidups only on i386
* Thu Jan  3 2002
- build hidups driver for EXPERIMENTAL USB usage
* Wed Dec 12 2001
- updated to 0.45.3
- renamed package to nut
- b2zipped sources
- moved rc.config.d/smartups.rc.config -> sysconfig/smartups
* Mon Oct 22 2001
- fixed init-script to POWERDOWN correctly (#11909)
- added rc.config variable UPSLOG_INTERVAL
* Tue Sep 18 2001
- changed STATEPATH to /var/lib/ups according to FHS (#8678)
* Fri Sep  7 2001
- added Conflicts: apcupsd
  (/usr/local/httpd/cgi-bin/multimon.cgi is in both packages)
* Mon Sep  3 2001
- added a patch to be able to write the POWERDOWNFLAG to
  only-root-writable directories
* Mon Aug 13 2001
- update to 0.45.1
* Mon Jun 18 2001
- update to 0.45.0
* Fri Apr 27 2001
- minor changes in init-script to avoid premature aborts
* Thu Apr 19 2001
- minor changes on %%config-files and %%clean
- changed upsd-exec-group to uucp
- added libjpeg freetype2 freetype2-devel xf86
  to neededforbuild
* Tue Apr 17 2001
- init-script cleanup: try-restart and exitcodes
* Fri Mar 23 2001
- update to 0.44.3
* Fri Mar 16 2001
- minor changes in init-script and documentation
* Thu Jan  4 2001
- update to 0.44.2
* Thu Dec 14 2000
- fixed case in rc-script
- move SuSE scripts and configs out of the diff
- minor changes in config for insserv (use macros)
* Mon Nov 27 2000
- moved /sbin/init.d -> /etc/init.d
* Fri Nov 24 2000
- init script more LSB compliant
* Wed Nov 22 2000
- improved runlevel position
- spec now uses %%{_tmppath}
* Tue Nov 21 2000
- removed runlevel-links from spec-file and moved to insserv
- added init information to rc-script
* Mon Nov 20 2000
- minor changes in rc-script (status)
* Wed Nov 15 2000
- fixed neededforbuild gdlib -> gd gd-devel
* Thu Nov  9 2000
- neededforbuild gd -> perl-GD
* Wed Nov  8 2000
- adapted rc-script to use rc.status
* Thu Oct  5 2000
- fixed typo in SuSEconfig.smartups
* Mon Sep 18 2000
- update to 0.44.1
- new spec-file (with buildroot etc.)
- fixed rc-script for server/client
- added SuSEconfig.smartups
* Thu Sep 14 2000
- fixed rc-script (added . /etc/rc.config)
* Tue Jul 11 2000
- bugfix in ups start-script
- changed /etc/rc.config to /etc/rc.config.d/smartups.rc.config
* Mon Feb 28 2000
- Move most variables from rc.config -> rc.config.d
* Thu Feb 24 2000
- new version
- the orginal source is renamed, new name is nut-0.XX.X.tar.gz
- added 2 new variables in rc.config; GENERICUPS_MODEL; SMARTUPS_MASTER
- model check in rcups for genericups
- starting all 4 deamons in rcups
- new binary-installpath /usr/sbin
* Wed Nov 10 1999
- fixed postinstall: (its post and not pre)
* Tue Oct 26 1999
- added 2 new variables in rc.config; SMARTUPS_DEVICE; SMARTUPS_MODEL
- modified rcups and smartups.spec
- sending mail after instalation
* Fri Oct 15 1999
- added libpng to neededforbuild (now needed for libgd)
* Fri Oct 15 1999
- fixed patch arg
* Thu Oct 14 1999
- new package