[nut/el4] update to 2.2.2 (#690144)
Michal Hlavinka
mhlavink at fedoraproject.org
Thu Dec 22 10:38:06 UTC 2011
commit 9200d0112357531af682f8976bee11969c648e0b
Author: Michal Hlavinka <mhlavink at redhat.com>
Date: Thu Dec 22 11:37:59 2011 +0100
update to 2.2.2 (#690144)
.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 | 25 +++++++++++++++----------
sources | 2 +-
8 files changed, 50 insertions(+), 45 deletions(-)
---
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 d0f7688..1545ddc 100644
--- a/nut.spec
+++ b/nut.spec
@@ -8,8 +8,8 @@
Summary: Network UPS Tools
Name: nut
-Version: 2.2.0
-Release: 4%{?dist}
+Version: 2.2.2
+Release: 1%{?dist}
Group: Applications/System
License: GPLv2+
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -24,6 +24,7 @@ Patch2: nut-2.2.0-udevusb.patch
Patch3: nut-2.2.0-glibcopen.patch
Patch4: nut-2.2.0-wrongssl.patch
Patch5: nut-2.2.0-trippliteusb_476850.patch
+Patch7: nut-2.2.2-oldglib2.patch
Requires: nut-client => 2.0.0 dbus-glib shadow-utils
Requires(post): fileutils chkconfig /sbin/service
@@ -40,6 +41,7 @@ BuildRequires: libjpeg-devel
BuildRequires: fontconfig-devel
BuildRequires: pkgconfig
BuildRequires: openssl-devel
+BuildRequires: neon-devel
%ifnarch s390 s390x
BuildRequires: libusb-devel
@@ -85,10 +87,11 @@ necessary to develop NUT client applications.
%setup -q
%patch0 -p1 -b .conf
%patch1 -p1 -b .multilib
-%patch2 -p1 -b .udevusb
+#%patch2 -p1 -b .udevusb
%patch3 -p1 -b .open
-%patch4 -p1 -b .wrongssl
+#%patch4 -p1 -b .wrongssl
%patch5 -p1 -b .trippliteusb_476850
+%patch7 -p1 -b .oldglib2
%build
%configure \
@@ -100,12 +103,9 @@ necessary to develop NUT client applications.
--sysconfdir=%{_sysconfdir}/ups \
--with-cgipath=%{cgidir} \
--with-drvpath=%{modeldir} \
- --with-serial \
- --with-usb \
- --with-snmp \
- --with-cgi \
- --with-lib \
- --with-ssl \
+ --with-all \
+ --without-hal \
+ --without-neonxml \
--with-ipv6 \
--with-gd-libs \
--with-linux-hiddev=%{_includedir}/linux/hiddev.h \
@@ -145,6 +145,8 @@ install -m 755 %{SOURCE1} %{buildroot}%{initdir}/ups
install -m 644 man/gamatronic.* %{buildroot}%{_mandir}/man8/
+install -m 755 lib/libupsclient-config %{buildroot}%{_bindir}/libupsclient-config
+
rm -rf %{buildroot}%{_prefix}/html
rm -f %{buildroot}%{_libdir}/*.la
@@ -297,6 +299,9 @@ rm -rf %{buildroot}
%{_libdir}/pkgconfig/libupsclient.pc
%changelog
+* Wed Dec 21 2011 Michal Hlavinka <mhlavink at redhat.com> - 2.2.2-1
+- update to 2.2.2 (#690144)
+
* Mon Jan 05 2009 Michal Hlavinka <mhlavink at redhat.com> 2.2.0-4
- fix #476850 - tripplite_usb driver segfaults when UPS on battery
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