diff --git a/nut-2.4.3-bz575334.patch b/nut-2.4.3-bz575334.patch new file mode 100644 index 0000000..b14f8c0 --- /dev/null +++ b/nut-2.4.3-bz575334.patch @@ -0,0 +1,21 @@ +diff -up nut-2.4.3/drivers/libhid.c.bz575334 nut-2.4.3/drivers/libhid.c +--- nut-2.4.3/drivers/libhid.c.bz575334 2010-03-22 17:34:16.251422549 +0100 ++++ nut-2.4.3/drivers/libhid.c 2010-03-22 17:34:16.278422151 +0100 +@@ -141,7 +141,7 @@ static int refresh_report_buffer(reportb + { + int id = pData->ReportID; + int r; +- unsigned char buf[SMALLBUF]; ++ unsigned char buf[8]; + + if (rbuf->ts[id] + age > time(NULL)) { + /* buffered report is still good; nothing to do */ +@@ -469,7 +469,7 @@ bool_t HIDSetItemValue(hid_dev_handle_t + */ + int HIDGetEvents(hid_dev_handle_t udev, HIDData_t **event, int eventsize) + { +- unsigned char buf[SMALLBUF]; ++ unsigned char buf[8]; + int itemCount = 0; + int buflen, r, i; + HIDData_t *pData; diff --git a/nut-2.4.3-udev.patch b/nut-2.4.3-udev.patch new file mode 100644 index 0000000..e0dd95b --- /dev/null +++ b/nut-2.4.3-udev.patch @@ -0,0 +1,21 @@ +change BUS to SUBSYSTEMS in udev rules + +There is one missing change in nut-usbups.rules.in: BUS -> SUBSYSTEMS. +Previous change (rev2071) missed this. Now, the latest udev started to complain: +... udevd[31526]: BUS= will be removed in a future udev version ... +Information about udev change can be found in udev repo: +http://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h=95776dc6ec174f47fa4dd4d8abf5d457223e5dd4 + +Index: nut/scripts/udev/nut-usbups.rules.in +=================================================================== +--- nut/scripts/udev/nut-usbups.rules.in (revision 2405) ++++ new/scripts/udev/nut-usbups.rules.in (working copy) +@@ -3,7 +3,7 @@ + ACTION!="add", GOTO="nut-usbups_rules_end" + SUBSYSTEM=="usb_device", GOTO="nut-usbups_rules_real" + SUBSYSTEM=="usb", GOTO="nut-usbups_rules_real" +-BUS!="usb", GOTO="nut-usbups_rules_end" ++SUBSYSTEMS!="usb", GOTO="nut-usbups_rules_end" + + LABEL="nut-usbups_rules_real" + # Krauler UP-M500VA - megatec_usb diff --git a/nut.spec b/nut.spec index 30b8cc8..16abba8 100644 --- a/nut.spec +++ b/nut.spec @@ -9,7 +9,7 @@ Summary: Network UPS Tools Name: nut Version: 2.4.3 -Release: 1%{?dist} +Release: 3%{?dist} Group: Applications/System License: GPLv2+ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -23,6 +23,12 @@ Patch0: nut-2.2.1-conf.patch #rejected upstream Patch1: nut-2.2.2-halpath.patch +#from upstream, required for nut <= 2.4.3, bz#575334 +Patch2: nut-2.4.3-bz575334.patch + +#sent upstream, rhbz#573806 +Patch3: nut-2.4.3-udev.patch + Requires: nut-client => 2.4.0 hal Requires(pre): hal Requires(post): fileutils chkconfig initscripts @@ -116,6 +122,8 @@ necessary to develop NUT client applications. %setup -q %patch0 -p1 -b .conf %patch1 -p1 -b .halpath +%patch2 -p1 -b .bz575334 +%patch3 -p1 -b .udevpatch %build autoreconf -i @@ -356,6 +364,13 @@ rm -rf %{buildroot} %{_libdir}/pkgconfig/libupsclient.pc %changelog +* Fri Mar 26 2010 Michal Hlavinka - 2.4.3-3 +- replace BUS with SUBSYSTEMS in udev rules (#573806) + +* Mon Mar 23 2010 Michal Hlavinka - 2.4.3-2 +- reduced size of buffer to maximum size supported by low-speed USB devices +- fixes #575334 + * Wed Feb 24 2010 Michal Hlavinka - 2.4.3-1 - cyberpower driver was replaced by the powerpanel driver - general USB support has been vastly improved, including many bug