From 06a2c65676d56528c354b985061fb4388befb79f2820818f6b564f3477640c67 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 9 May 2008 20:13:02 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nut?expand=0&rev=11 --- nut-2.2.2-pre3.tar.bz2 | 3 -- nut-2.2.2.tar.bz2 | 3 ++ nut-hal-dir.patch | 11 ------ nut-parallel-build.patch | 62 ----------------------------- nut.changes | 8 ++++ nut.sleep | 14 +++++++ nut.spec | 85 ++++++++++++++++++++++++++++++++-------- 7 files changed, 93 insertions(+), 93 deletions(-) delete mode 100644 nut-2.2.2-pre3.tar.bz2 create mode 100644 nut-2.2.2.tar.bz2 delete mode 100644 nut-hal-dir.patch delete mode 100644 nut-parallel-build.patch create mode 100644 nut.sleep diff --git a/nut-2.2.2-pre3.tar.bz2 b/nut-2.2.2-pre3.tar.bz2 deleted file mode 100644 index cc40b05..0000000 --- a/nut-2.2.2-pre3.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:acc6973aff01fccff73029b86587e08d4578eebd37281791c02d725306c753d6 -size 889156 diff --git a/nut-2.2.2.tar.bz2 b/nut-2.2.2.tar.bz2 new file mode 100644 index 0000000..e885728 --- /dev/null +++ b/nut-2.2.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2a2d9ed1acd8b49f6898daf7c720199478111443708794c0b8e856d83a7f1f0 +size 887444 diff --git a/nut-hal-dir.patch b/nut-hal-dir.patch deleted file mode 100644 index c27c824..0000000 --- a/nut-hal-dir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- m4/nut_check_libhal.m4 -+++ m4/nut_check_libhal.m4 -@@ -63,7 +63,7 @@ - dnl As per HAL spec, §5 Callouts and §2 Device Information Files - dnl - addon install path: $libdir/hal - AC_MSG_CHECKING(for libhal Callouts path) -- if (test -d "/usr/lib/hal") -+ if (test -d "${libdir}/hal") - then - # For Debian - HAL_CALLOUTS_PATH="${libdir}/hal" diff --git a/nut-parallel-build.patch b/nut-parallel-build.patch deleted file mode 100644 index 69d9259..0000000 --- a/nut-parallel-build.patch +++ /dev/null @@ -1,62 +0,0 @@ -Date: Wed, 30 Apr 2008 19:24:27 +0200 -From: "Arnaud Quette" -To: "Stanislav Brabec" -Subject: Re: openSUSE 11.0 - NUT -Cc: "Arjen de Korte" , NUT-developers -In-Reply-To: -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Disposition: inline -References: <48182EB2.7070206@de-korte.org> - <1209546455.3949.153.camel@hammer.suse.cz> - - <1209562423.3949.199.camel@hammer.suse.cz> - <1209565291.3949.206.camel@hammer.suse.cz> - -X-Virus-Scanned: by amavisd-new at suse.cz -X-Spam-Status: No, hits=-2.6 tagged_above=-20.0 required=5.0 tests=BAYES_00 -X-Spam-Level: -X-Evolution-Source: imap://sbrabec@imap.suse.cz/ -Content-Transfer-Encoding: 8bit - -before going on week end, just a small one line patch to test for the // build - -2008/4/30 Arnaud Quette : -> ... -> > I found another problem - nut-2.2.2-pre3 is not parallel build ready and -> > parallel build fails in ~80% of cases. It seems that dependencies are -> > not complete. -> > -> > Build on one processor works. -> > ... -> -> I've seen another mail from a SuSE guy, and fwded by Arjen, about -> libtool and possibly dependencies. I gotta check it. -> if you have a patch underhand, just forward it. I can wait just a bit -> more of the final 2.2.2, but not that much since it's already more -> than late. - ---- clients/Makefile.am (révision 1455) -+++ clients/Makefile.am (copie de travail) -@@ -1,7 +1,7 @@ - # Network UPS Tools: clients - - # by default, link programs in this directory with libcommon.a --LDADD = ../common/libcommon.a -lupsclient $(NETLIBS) -+LDADD = ../common/libcommon.a libupsclient.la $(NETLIBS) - if WITH_SSL - LDADD += $(LIBSSL_LDFLAGS) - endif - -I've tested it with "make -j2", and 2 config set (--disable-shared for -full static, and --enable-static for linking clients on the shared lib -while still shipping the static lib) and everything seems fine. -Can you confirm on your side? - -thanks, -Arnaud --- -Linux / Unix Expert R&D - MGE Office Protection Systems - http://www.mgeops.com -Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ -Debian Developer - http://people.debian.org/~aquette/ -Free Software Developer - http://arnaud.quette.free.fr/ diff --git a/nut.changes b/nut.changes index cbd8038..2b230f9 100644 --- a/nut.changes +++ b/nut.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 9 16:07:28 CEST 2008 - sbrabec@suse.cz + +- 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 14:28:33 CEST 2008 - sbrabec@suse.cz diff --git a/nut.sleep b/nut.sleep new file mode 100644 index 0000000..2d4c78b --- /dev/null +++ b/nut.sleep @@ -0,0 +1,14 @@ +#!/bin/bash + +. /etc/pm/functions + +case "$1" in + hibernate|suspend) + stopservice upsd + ;; + thaw|resume) + restartservice upsd + ;; + *) + ;; +esac diff --git a/nut.spec b/nut.spec index 7da29ea..618f083 100644 --- a/nut.spec +++ b/nut.spec @@ -1,5 +1,5 @@ # -# spec file for package nut (Version 2.2.1.9.3) +# spec file for package nut (Version 2.2.2) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -12,30 +12,30 @@ Name: nut BuildRequires: apache2-devel dbus-1-devel gd-devel hal-devel libneon-devel libopenssl-devel libusb-devel net-snmp-devel openssl-devel pkg-config tcpd-devel +# for directory ownership: +BuildRequires: pm-utils License: GPL v2 or later Group: Hardware/UPS Provides: smartups Obsoletes: smartups Conflicts: apcupsd -Summary: Network UPS Tools (Unbreakable Power Supply Monitoring) -Version: 2.2.1.9.3 +Summary: Network UPS Tools Core (Unbreakable Power Supply Monitoring) +Version: 2.2.2 Release: 1 -%define _version 2.2.2-pre3 Url: http://www.networkupstools.org/ -Source: %{name}-%{_version}.tar.bz2 +Source: %{name}-%{version}.tar.bz2 Source1: upsd.init Source2: README.SUSE Source3: upsd-early-powerdown.init Source4: upsd.dbus-1 Source5: nut.firewall.in Source6: nut-disable-hal-hid-ups.fdi +Source7: nut.sleep Patch: nut-preconfig.patch Patch3: nut-notifyflag.patch Patch4: nut-powersave.patch Patch6: nut-udev.patch Patch8: nut-libtool.patch -Patch9: nut-hal-dir.patch -Patch10: nut-parallel-build.patch Patch11: nut-intptr.patch Patch12: nut-hal.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -60,6 +60,8 @@ Enhances: %(set -x ; echo %{QUOTE}%{USBDRIVERS}%{QUOTE} | sed -n s/^HALD-A Supplements: %(set -x ; echo %{QUOTE}%{USBDRIVERS}%{QUOTE} | sed '/^HALD-ADDON-USBHID-UPS=/d;s/^.*=//' | tr '%{BACKSLASH}n' ' ') %description +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. @@ -104,7 +106,7 @@ Authors: %package drivers-net License: GPL v2 or later -Summary: Network UPS Tools (Unbreakable Power Supply Monitoring) +Summary: Network UPS Tools - Extra Networking Drivers (Unbreakable Power Supply Monitoring) Group: Hardware/UPS Requires: %{name}-classic = %{version} Enhances: %{name}-classic @@ -112,6 +114,9 @@ Enhances: %{name}-classic Provides: nut:%{_prefix}/lib/ups/driver/snmp-ups %description drivers-net +Networking drivers for the Network UPS Tools. You will need them +altogether with nut-classic to provide UPS networking support. + Network UPS Tools is a collection of programs which provide a common interface for monitoring and administering UPS hardware. @@ -156,10 +161,12 @@ Authors: %package -n libupsclient1 License: GPL v2 or later -Summary: Network UPS Tools (Unbreakable Power Supply Monitoring) +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. @@ -204,7 +211,7 @@ Authors: %package classic License: GPL v2 or later -Summary: Network UPS Tools (Unbreakable Power Supply Monitoring) +Summary: Network UPS Tools Classic Package (Unbreakable Power Supply Monitoring) Group: Hardware/UPS Requires: %{name} = %{version} Conflicts: %{name}-hal @@ -215,9 +222,33 @@ Requires: powersave Provides: nut:%{_sbindir}/upsmon %description classic +Classic package of Network UPS Tools. + Network UPS Tools is a collection of programs which provide a common interface for monitoring and administering UPS hardware. +This is the standard installation that uses a layered approach to +connect all of the NUT parts. + +Drivers are provided for a wide assortment of equipment. They +understand the specific language of each UPS and map it back to a +compatibility layer. This means both an expensive "smart" protocol UPS +and a simple "power strip" model can be handled transparently. + +This information is cached by the network server upsd, which then +answers queries from the clients. upsd contains a number of access +control features to limit the abilities of the clients. Only +authorized hosts may monitor or control your UPS hardware if you wish. +Since the notion of monitoring over the network is built into the +software, you can hang many systems off one large UPS and they will all +shut down together. + +Clients such as upsmon check on the status of the hardware and do +things when necessary. The most important task is shutting down the +operating system cleanly before the UPS runs out of power. Other +programs are also provided to log UPS status regularly, monitor status +through your web browser, and more. + Detailed information about supported hardware can be found in /usr/share/doc/packages/nut. @@ -259,13 +290,25 @@ Authors: %package hal License: GPL v2 or later -Summary: Network UPS Tools (Unbreakable Power Supply Monitoring) +Summary: Network UPS Tools Support for HAL (Unbreakable Power Supply Monitoring) Group: Hardware/UPS Requires: %{name} = %{version} Conflicts: %{name}-classic Requires: hal >= 0.5.8 %description hal +HAL package of Network UPS Tools is intended for use with supported USB +devices on HAL enabled desktops (Gnome and KDE). + +Using this approach, you don't have to configure NUT files, nor to +manually start components, nor to install a specific NUT client. + +Upon plugging your USB UPS, the right driver will be automatically +launched, and the according Power Manager GUI will pop up. + +Note that this feature is still beta and incomplete. But it represents +a major evolution, and a huge user experience improvement! + Network UPS Tools is a collection of programs which provide a common interface for monitoring and administering UPS hardware. @@ -310,7 +353,7 @@ Authors: %package cgi License: GPL v2 or later -Summary: Network UPS Tools (Unbreakable Power Supply Monitoring) +Summary: Network UPS Tools Web Server Support (Unbreakable Power Supply Monitoring) Group: Hardware/UPS Requires: %{name}-classic = %{version} Enhances: %{name}-classic @@ -319,6 +362,8 @@ Supplements: packageand(%{name}-classic:apache2) Provides: nut:/srv/www/cgi-bin/upsstats.cgi %description cgi +Web server support package for the Network UPS Tools. + Network UPS Tools is a collection of programs which provide a common interface for monitoring and administering UPS hardware. @@ -411,8 +456,8 @@ Authors: Olli Savia %prep -%setup -q -n %{name}-%{_version} -cp -a %{S:1} %{S:2} %{S:3} %{S:4} %{S:5} . +%setup -q +cp -a %{S:1} %{S:2} %{S:3} %{S:4} %{S:5} %{S:7} . cp -a %{S:6} 20-nut-disable-hal-hid-ups.fdi mv upsd-early-powerdown.init upsd-early-powerdown %patch @@ -423,8 +468,6 @@ mv upsd-early-powerdown.init upsd-early-powerdown %endif %patch8 sed -i "s/@UPSD_USER@/%{USER}/g" upsd.init conf/upsmon.conf.sample -%patch9 -%patch10 %patch11 %if %suse_version > 1030 %patch12 @@ -469,6 +512,8 @@ cp nut.firewall $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services %endif mkdir -p $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/20thirdparty install -m 644 20-nut-disable-hal-hid-ups.fdi $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/20thirdparty/ +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pm/sleep.d +install nut.sleep $RPM_BUILD_ROOT%{_sysconfdir}/pm/sleep.d/80nut # Rename web pages to not conflict with apache2-example-pages or user home page: mv $RPM_BUILD_ROOT%{HTMLPATH}/index.html $RPM_BUILD_ROOT%{HTMLPATH}/ups.html mv $RPM_BUILD_ROOT%{HTMLPATH}/header.html $RPM_BUILD_ROOT%{HTMLPATH}/ups_header.html @@ -579,11 +624,12 @@ rm -rf $RPM_BUILD_ROOT %doc %{_mandir}/man5/*.* %doc %{_mandir}/man8/ups*.* %{_sbindir}/* +%{_sysconfdir}/dbus-1/system.d/upsd.conf %if %suse_version >= 1030 %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/nut %endif %{_sysconfdir}/init.d/upsd -%{_sysconfdir}/dbus-1/system.d/upsd.conf +%{_sysconfdir}/pm/sleep.d/80nut %{_sysconfdir}/udev/rules.d/*.rules %files cgi @@ -608,6 +654,11 @@ rm -rf $RPM_BUILD_ROOT %doc %{_mandir}/man3/*.* %changelog +* Fri May 09 2008 sbrabec@suse.cz +- 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 sbrabec@suse.cz - Added hardware modaliases for solver. - Fixed generating of NUT firewall rule (bnc#385111).