public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michal Hlavinka <mhlavink@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/nut] f43: fix nut monitor spin CPU after upsd closed connection (rhbz#2539831)
Date: Wed, 07 Oct 2026 15:16:07 GMT	[thread overview]
Message-ID: <179138616750.1.4530853403056390616.rpms-nut-ab5d1edc5acb@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/nut
Branch : f43
Commit : ab5d1edc5acb8c7d1368a3a30e647c5878347f2f
Author : Michal Hlavinka <mhlavink@redhat.com>
Date   : 2026-10-07T17:08:20+02:00
Stats  : +24/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/nut/c/ab5d1edc5acb8c7d1368a3a30e647c5878347f2f?branch=f43

Log:
fix nut monitor spin CPU after upsd closed connection (rhbz#2539831)

---
diff --git a/nut-2.8.5-3e675fed.patch b/nut-2.8.5-3e675fed.patch
new file mode 100644
index 0000000..6e572d1
--- /dev/null
+++ b/nut-2.8.5-3e675fed.patch
@@ -0,0 +1,16 @@
+diff --git a/scripts/python/module/PyNUT.py.in b/scripts/python/module/PyNUT.py.in
+index 3296d082b4..783a6c9e8f 100644
+--- a/scripts/python/module/PyNUT.py.in
++++ b/scripts/python/module/PyNUT.py.in
+@@ -721,7 +721,10 @@ certhost    : Optional dict or list of dict/lists: {hostname: [certname, certver
+         while True:
+             data_end_index = data.find(finished_reading_data)
+             if data_end_index == -1:
+-                data += self.__srv_handler.recv(50)  # nut_telnetlib.py uses 50
++                chunk = self.__srv_handler.recv(50)  # nut_telnetlib.py uses 50
++                if not chunk:
++                    raise EOFError("Connection closed by server")
++                data += chunk
+             else:
+                 break
+         data_end_index += len(finished_reading_data)

diff --git a/nut.spec b/nut.spec
index 79c855d..c8f47cf 100644
--- a/nut.spec
+++ b/nut.spec
@@ -13,7 +13,7 @@
 Summary: Network UPS Tools
 Name: nut
 Version: 2.8.5
-Release: 8%{?dist}
+Release: 9%{?dist}
 License: GPL-2.0-or-later AND GPL-3.0-or-later
 Url: https://www.networkupstools.org/
 Source: https://www.networkupstools.org/source/2.8/%{name}-%{version}.tar.gz
@@ -25,6 +25,9 @@ Patch9: nut-2.6.5-rmpidf.patch
 Patch15: nut-c99-strdup.patch
 Patch16: nut-2.8-rhinoname.patch
 Patch17: nut-2.8.5-nutuser.patch
+# from upstream, for <= 2.8.5, rhbz#2539831
+# https://github.com/networkupstools/nut/commit/3e675fedbbec7f8a38b477e20bb85f00d9a42226
+Patch18: nut-2.8.5-3e675fed.patch
 
 Requires(post): coreutils systemd
 Requires(preun): systemd
@@ -141,6 +144,7 @@ necessary to develop NUT client applications.
 #patch -P 15 -p1
 %patch -P 16 -p2 -b .rhinoname
 %patch -P 17 -p2 -b .nutuser
+%patch -P 18 -p1 -b .3e675fed
 
 sed -i 's|LIBSSL_LDFLAGS|LIBSSL_LIBS|' lib/libupsclient-config.in
 sed -i 's|LIBSSL_LDFLAGS|LIBSSL_LIBS|' lib/libupsclient.pc.in
@@ -536,6 +540,9 @@ fi
 %{_libdir}/pkgconfig/libnutscan.pc
 
 %changelog
+* Wed Oct 07 2026 Michal Hlavinka <mhlavink@redhat.com> - 2.8.5-9
+- fix nut monitor spin CPU after upsd closed connection (rhbz#2539831)
+
 * Tue Aug 25 2026 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 2.8.5-8.2
 - Explicitly set no rpath options for ldflags in pkg-config files
 

                 reply	other threads:[~2026-10-07 15:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179138616750.1.4530853403056390616.rpms-nut-ab5d1edc5acb@fedoraproject.org \
    --to=mhlavink@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox