[nut/el5/master] update to 2.2.2 (#683538)

Michal Hlavinka mhlavink at fedoraproject.org
Wed Mar 23 12:01:04 UTC 2011


commit 506f9a6130e6c2f8e089b77f7ee5ed18fcdf095b
Author: Michal Hlavinka <mhlavink at redhat.com>
Date:   Wed Mar 23 12:31:03 2011 +0100

    update to 2.2.2 (#683538)

 .gitignore                          |    1 +
 nut-2.2.0-conf.patch                |    4 ++--
 nut-2.2.0-glibcopen.patch           |   22 ++++++----------------
 nut-2.2.0-multilib.patch            |    6 +++---
 nut-2.2.0-trippliteusb_476850.patch |   23 +++++++++++------------
 nut-2.2.2-oldglib2.patch            |   12 ++++++++++++
 nut.spec                            |   18 ++++++++++++++----
 sources                             |    2 +-
 8 files changed, 50 insertions(+), 38 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 747d82c..9eebfb4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 nut-2.2.0.tar.gz
+/nut-2.2.2.tar.gz
diff --git a/nut-2.2.0-conf.patch b/nut-2.2.0-conf.patch
index 78839b0..fd377a5 100644
--- a/nut-2.2.0-conf.patch
+++ b/nut-2.2.0-conf.patch
@@ -1,5 +1,5 @@
---- nut-2.2.0/conf/upssched.conf.sample.schconf	2007-07-12 15:14:33.000000000 +0200
-+++ nut-2.2.0/conf/upssched.conf.sample	2007-07-12 15:16:45.000000000 +0200
+--- nut-2.2.0/conf/upssched.conf.sample.in.schconf	2007-07-12 15:14:33.000000000 +0200
++++ nut-2.2.0/conf/upssched.conf.sample.in	2007-07-12 15:16:45.000000000 +0200
 @@ -14,7 +14,7 @@
  # A shell script with a big case..esac construct should work nicely for this.
  # An example has been provided to help you get started.
diff --git a/nut-2.2.0-glibcopen.patch b/nut-2.2.0-glibcopen.patch
index 90cfa21..ed8db0b 100644
--- a/nut-2.2.0-glibcopen.patch
+++ b/nut-2.2.0-glibcopen.patch
@@ -1,22 +1,12 @@
---- nut-2.2.0/drivers/megatec_usb.c.open	2007-08-16 09:32:03.000000000 +0200
-+++ nut-2.2.0/drivers/megatec_usb.c	2007-08-16 09:32:24.000000000 +0200
-@@ -209,7 +209,7 @@
+diff -up nut-2.2.1/drivers/megatec_usb.c.open nut-2.2.1/drivers/megatec_usb.c
+--- nut-2.2.1/drivers/megatec_usb.c.open	2008-01-09 14:22:27.000000000 +0100
++++ nut-2.2.1/drivers/megatec_usb.c	2008-01-09 14:23:00.000000000 +0100
+@@ -207,7 +207,7 @@ int ser_open(const char *port)
  	/* link the matchers */
  	regex_matcher->next = &subdriver_matcher;
  
--	ret = usb->open(&udev, &hiddevice, regex_matcher, NULL, MODE_NOHID);
-+	ret = (usb->open)(&udev, &hiddevice, regex_matcher, NULL, MODE_NOHID);
+-	ret = usb->open(&udev, &usbdevice, regex_matcher, NULL);
++	ret = (usb->open)(&udev, &usbdevice, regex_matcher, NULL);
  	if (ret < 0)
  		usb_open_error(port);
  
---- nut-2.2.0/drivers/libhid.c.open	2007-08-16 09:28:05.000000000 +0200
-+++ nut-2.2.0/drivers/libhid.c	2007-08-16 09:28:23.000000000 +0200
-@@ -589,7 +589,7 @@
- 	}
- 
- 	/* get and parse descriptors (dev, cfg and report) */
--	ReportSize = comm_driver->open(udevp, hd, matcher, ReportDesc, mode);
-+	ReportSize = (comm_driver->open)(udevp, hd, matcher, ReportDesc, mode);
- 
- 	if (ReportSize == -1)
- 		return NULL;
diff --git a/nut-2.2.0-multilib.patch b/nut-2.2.0-multilib.patch
index e865892..fef6c35 100644
--- a/nut-2.2.0-multilib.patch
+++ b/nut-2.2.0-multilib.patch
@@ -4,8 +4,8 @@
  Version="@PACKAGE_VERSION@"
  prefix=@prefix@
  exec_prefix=@exec_prefix@
--Libs="-L at libdir@ -lupsclient @SSL_LDFLAGS@"
- Cflags="-I at includedir@ @SSL_CFLAGS@"
+-Libs="-L at libdir@ -lupsclient @LIBSSL_LDFLAGS@"
+ Cflags="-I at includedir@ @LIBSSL_CFLAGS@"
  
 +arch=$(/bin/arch)
 +if [ "$arch" = "x86_64" -o "$arch" = "s390x" -o "$arch" = "ppc64" -o "$arch" = "ia64" ] ; then
@@ -13,7 +13,7 @@
 +else
 +	libdir="/usr/lib"
 +fi
-+Libs="-L$libdir @UPSCLI_LIBOBJ@ @SSL_LDFLAGS@"
++Libs="-L$libdir @UPSCLI_LIBOBJ@ @LIBSSL_LDFLAGS@"
 +
 +
  case "$1" in
diff --git a/nut-2.2.0-trippliteusb_476850.patch b/nut-2.2.0-trippliteusb_476850.patch
index b804be6..541ebed 100644
--- a/nut-2.2.0-trippliteusb_476850.patch
+++ b/nut-2.2.0-trippliteusb_476850.patch
@@ -1,7 +1,6 @@
-diff -up nut-2.2.0/drivers/tripplite_usb.c.trippliteusb_476850 nut-2.2.0/drivers/tripplite_usb.c
---- nut-2.2.0/drivers/tripplite_usb.c.trippliteusb_476850	2007-06-23 05:36:15.000000000 +0200
-+++ nut-2.2.0/drivers/tripplite_usb.c	2009-01-05 16:41:02.050817936 +0100
-@@ -25,7 +25,7 @@
+--- a/drivers/tripplite_usb.c	
++++ a/drivers/tripplite_usb.c	
+@@ -25,7 +25,7 @@ 
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
  
@@ -10,16 +9,16 @@ diff -up nut-2.2.0/drivers/tripplite_usb.c.trippliteusb_476850 nut-2.2.0/drivers
  
  /* % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 
   *
-@@ -355,8 +355,6 @@ static int reconnect_ups(void)
- 		upsdebugx(2, "= device has been disconnected, try to reconnect =");
- 		upsdebugx(2, "==================================================");
+@@ -358,8 +358,6 @@ static int reconnect_ups(void)
+ 	upsdebugx(2, "= device has been disconnected, try to reconnect =");
+ 	upsdebugx(2, "==================================================");
  
--		upsdrv_cleanup();
+-	upsdrv_cleanup();
 -
- 		if ((hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher, MODE_REOPEN)) == NULL) {
- 			upslogx(LOG_INFO, "Reconnecting to UPS failed; will retry later...");
- 			dstate_datastale();
-@@ -509,12 +507,10 @@ void usb_comm_fail(int res, const char *
+ 	ret = comm_driver->open(&udev, &curDevice, reopen_matcher, NULL);
+ 	if (ret < 1) {
+ 		upslogx(LOG_INFO, "Reconnecting to UPS failed; will retry later...");
+@@ -515,12 +513,10 @@ void usb_comm_fail(int res, const char *msg)
  		case -EBUSY:
  			upslogx(LOG_WARNING, "%s: Device claimed by another process", msg);
  			fatalx(EXIT_FAILURE, "Terminating: EBUSY");
diff --git a/nut-2.2.2-oldglib2.patch b/nut-2.2.2-oldglib2.patch
new file mode 100644
index 0000000..988ff49
--- /dev/null
+++ b/nut-2.2.2-oldglib2.patch
@@ -0,0 +1,12 @@
+diff -up nut-2.2.2/drivers/main-hal.c.oldglib2 nut-2.2.2/drivers/main-hal.c
+--- nut-2.2.2/drivers/main-hal.c.oldglib2	2011-03-16 15:26:30.505551525 +0100
++++ nut-2.2.2/drivers/main-hal.c	2011-03-16 15:26:30.521551525 +0100
+@@ -333,7 +333,7 @@ int main(int argc, char **argv)
+ 	}
+ 
+ 	/* add a timer for data update */
+-	g_timeout_add_seconds (poll_interval,
++	g_timeout_add (poll_interval*1000,
+ 							(GSourceFunc)update_data,
+ 							NULL);
+ 
diff --git a/nut.spec b/nut.spec
index c1e0f36..c1b0630 100644
--- a/nut.spec
+++ b/nut.spec
@@ -8,8 +8,8 @@
 
 Summary: Network UPS Tools
 Name: nut
-Version: 2.2.0
-Release: 7%{?dist}
+Version: 2.2.2
+Release: 1%{?dist}
 Group: Applications/System
 License: GPLv2+
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -28,6 +28,8 @@ Patch5: nut-2.2.0-trippliteusb_476850.patch
 # for nut <= 2.4.3, rhbz#616375
 Patch6: nut-2.4.3-portcrash.patch
 
+Patch7: nut-2.2.2-oldglib2.patch
+
 Requires: nut-client => 2.0.0 hal dbus-glib shadow-utils
 Requires(post): fileutils chkconfig /sbin/service
 Requires(postun): fileutils chkconfig /sbin/service
@@ -46,6 +48,7 @@ BuildRequires: pkgconfig
 BuildRequires: hal-devel
 BuildRequires: dbus-glib-devel
 BuildRequires: openssl-devel
+BuildRequires: neon-devel
 
 %ifnarch s390 s390x
 BuildRequires: libusb-devel
@@ -93,9 +96,10 @@ necessary to develop NUT client applications.
 %patch1 -p1 -b .multilib
 #%patch2 -p1 -b .udevusb
 %patch3 -p1 -b .open
-%patch4 -p1 -b .wrongssl
+#%patch4 -p1 -b .wrongssl
 %patch5 -p1 -b .trippliteusb_476850
 %patch6 -p1 -b .portcrash
+%patch7 -p1 -b .oldglib2
 
 %build
 %configure \
@@ -149,7 +153,8 @@ install -m 644 man/gamatronic.*  %{buildroot}%{_mandir}/man8/
 install -m 644 scripts/hal/20-ups-nut-device.fdi \
         %{buildroot}%{_datadir}/hal/fdi/information/20thirdparty
 
-mv %{buildroot}%{modeldir}/hald-addon* %{buildroot}%{_libexecdir}
+mv %{buildroot}%{_libdir}/hal/hald-addon* %{buildroot}%{_libexecdir}
+install -m 755 lib/libupsclient-config %{buildroot}%{_bindir}/libupsclient-config
 
 rm -rf %{buildroot}%{_prefix}/html
 rm -f %{buildroot}%{_libdir}/*.la
@@ -255,6 +260,8 @@ rm -rf %{buildroot}
 %{_mandir}/man8/megatec_usb.8.gz
 %{_mandir}/man8/rhino.8.gz
 %{_mandir}/man8/usbhid-ups.8.gz
+%{_mandir}/man8/netxml-ups.8.gz
+
 
 %files client
 %doc COPYING
@@ -304,6 +311,9 @@ rm -rf %{buildroot}
 %{_libdir}/pkgconfig/libupsclient.pc
 
 %changelog
+* Wed Mar 23 2011 Michal Hlavinka <mhlavink at redhat.com> 2.2.2-1
+- update to 2.2.2 (#683538)
+
 * Mon Jul 26 2010 Michal Hlavinka <mhlavink at redhat.com> 2.2.0-7
 - fix crash when port= is ommited (#616375)
 - fix issue where nut fails to restart because it did not finished termination 
diff --git a/sources b/sources
index 0b2d346..852b8a8 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a3570515d80804051d4e7631e8a3eb12  nut-2.2.0.tar.gz
+677a84a83e9be7bc93610413ee696375  nut-2.2.2.tar.gz


More information about the scm-commits mailing list