From 6e8a8195eca375186582adc4c558049bf17ba581 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Wed, 1 Feb 2023 12:52:09 +0100 Subject: [PATCH 01/25] fix 2.8.0 cyberpower regression (#2162568) --- nut-2.8.0-cyberpowertable.patch | 42 +++++++++++++++++++++++++++++++++ nut.spec | 7 +++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 nut-2.8.0-cyberpowertable.patch diff --git a/nut-2.8.0-cyberpowertable.patch b/nut-2.8.0-cyberpowertable.patch new file mode 100644 index 0000000..fa61ee4 --- /dev/null +++ b/nut-2.8.0-cyberpowertable.patch @@ -0,0 +1,42 @@ +From 6a6888e9b5fd995e79e3db335ff4c9c524f31b51 Mon Sep 17 00:00:00 2001 +From: Jim Klimov +Date: Tue, 24 May 2022 00:51:58 +0200 +Subject: [PATCH] Update cyberpower-mib.c + +Closes: #1427 +--- + drivers/cyberpower-mib.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/drivers/cyberpower-mib.c b/drivers/cyberpower-mib.c +index aa43295a31..cff6d64d88 100644 +--- a/drivers/cyberpower-mib.c ++++ b/drivers/cyberpower-mib.c +@@ -24,7 +24,7 @@ + + #include "cyberpower-mib.h" + +-#define CYBERPOWER_MIB_VERSION "0.51" ++#define CYBERPOWER_MIB_VERSION "0.52" + #define CYBERPOWER_OID_MODEL_NAME ".1.3.6.1.4.1.3808.1.1.1.1.1.1.0" + + /* CPS-MIB::ups */ +@@ -33,7 +33,6 @@ + /* https://www.cyberpowersystems.com/products/software/mib-files/ */ + /* Per CPS MIB 2.9 upsBaseOutputStatus OBJECT-TYPE: */ + static info_lkp_t cyberpower_power_status[] = { +- { 1, "NULL", NULL, NULL }, /* unknown */ + { 2, "OL", NULL, NULL }, /* onLine */ + { 3, "OB", NULL, NULL }, /* onBattery */ + { 4, "OL BOOST", NULL, NULL }, /* onBoost */ +@@ -44,6 +43,10 @@ static info_lkp_t cyberpower_power_status[] = { + { 9, "OL BYPASS", NULL, NULL }, /* onBypass */ + { 10, "OL TRIM", NULL, NULL }, /* onBuck */ + { 11, "OL OVER", NULL, NULL }, /* onOverload */ ++ ++ /* Note: a "NULL" string must be last due to snmp-ups.c parser logic */ ++ { 1, "NULL", NULL, NULL }, /* unknown */ ++ + { 0, NULL, NULL, NULL } + } ; + diff --git a/nut.spec b/nut.spec index 059600d..b9810e1 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.0 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2+ and GPLv3+ Url: https://www.networkupstools.org/ Source: https://www.networkupstools.org/source/2.8/%{name}-%{version}.tar.gz @@ -35,6 +35,7 @@ Patch12: nut-2.7.4-scratchdes.patch Patch13: nut-c99-c_attribute.patch Patch14: nut-c99-ax_c_printf_null.patch Patch15: nut-c99-strdup.patch +Patch16: nut-2.8.0-cyberpowertable.patch Requires(pre): shadow-utils Requires(post): coreutils systemd @@ -150,6 +151,7 @@ necessary to develop NUT client applications. %patch13 -p1 %patch14 -p1 %patch15 -p1 +%patch16 -p1 -b .cyberpowertable sed -i 's|=NUT-Monitor|=nut-monitor|' scripts/python/app/nut-monitor-py3qt5.desktop sed -i "s|sys.argv\[0\]|'%{_datadir}/%{name}/nut-monitor/nut-monitor'|" scripts/python/app/NUT-Monitor-py3qt5.in @@ -481,6 +483,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Wed Feb 01 2023 Michal Hlavinka - 2.8.0-9 +- fix 2.8.0 cyberpower regression (#2162568) + * Wed Jan 04 2023 Michal Hlavinka - 2.8.0-8 - move upslog to nut-client, some small spec file changes (#2156504) From f74346c47dee28cf818f8e0b7aa51de763c68b57 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Thu, 2 Nov 2023 11:55:02 +0100 Subject: [PATCH 02/25] libgpiod v2 is not compatible, disable for now --- nut.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/nut.spec b/nut.spec index 547cc10..158e680 100644 --- a/nut.spec +++ b/nut.spec @@ -46,7 +46,9 @@ BuildRequires: freetype-devel BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gd-devel +%if 0%{?fedora} < 39 BuildRequires: libgpiod-devel +%endif BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libtool @@ -142,6 +144,8 @@ find . -mtime -1 -print0 | xargs -0 touch --reference %{SOURCE0} sed -i 's|\(PYTHON3\?_SITE_PACKAGES=\)".*"|\1"%{python3_sitelib}"|' m4/nut_check_python.m4 %build +#--without-gpio is not enough to stop it complaining about missing library +sed -i 's|with_gpio="[^"]*"|with_gpio="no"|g' configure.ac autoreconf -i export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS" # prevent assignment of default value, it would break configure's tests @@ -169,6 +173,9 @@ export LDFLAGS="-Wl,-z,now" --sysconfdir=%{_sysconfdir}/ups \ --with-cgipath=%{cgidir} \ --with-drvpath=%{modeldir} \ +%if 0%{?fedora} < 39 + --without-gpio \ +%endif --with-systemdsystemunitdir=%{_unitdir} \ --with-systemdshutdowndir=/lib/systemd/system-shutdown \ --with-pkgconfig-dir=%{_libdir}/pkgconfig \ @@ -345,7 +352,9 @@ fi %{_mandir}/man8/gamatronic.8.gz %{_mandir}/man8/generic_modbus.8.gz %{_mandir}/man8/genericups.8.gz +%if 0%{?fedora} < 39 %{_mandir}/man8/generic_gpio.8.gz +%endif %{_mandir}/man8/huawei-ups2000.8.gz %{_mandir}/man8/isbmex.8.gz %{_mandir}/man8/ivtscd.8.gz @@ -469,7 +478,7 @@ fi %changelog * Wed Nov 01 2023 Michal Hlavinka - 2.8.1-1 -- updated to 2.8.1(2247337) +- updated to 2.8.1 (#2247337) * Tue Oct 10 2023 Michal Hlavinka - 2.8.0-14 - spec cleanup, based on PR#14 by Orion Poplawski From 0089d1127728a3c7310830c441db2a62e5b5e76e Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Thu, 30 Nov 2023 11:52:01 -0700 Subject: [PATCH 03/25] Re-add nut.target to nut-client (bz#2156504) --- nut.spec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/nut.spec b/nut.spec index 158e680..14f79cb 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.1 -Release: 1%{?dist} +Release: 2%{?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 @@ -281,10 +281,10 @@ fi /usr/sbin/usermod -G dialout,tty %{name} %post client -%systemd_post nut-monitor.service +%systemd_post nut-monitor.service nut.target %preun client -%systemd_preun nut-monitor.service +%systemd_preun nut-monitor.service nut.target %postun client %systemd_postun_with_restart nut-monitor.service @@ -422,6 +422,8 @@ fi %{_sbindir}/upssched %{_bindir}/upssched-cmd %{_unitdir}/nut-monitor.service +# nut-monitor.service also needs nut.target +%{_unitdir}/nut.target /lib/systemd/system-shutdown/nutshutdown %{_libdir}/libupsclient.so.* %{_libdir}/libnutclient.so.* @@ -477,6 +479,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Thu Nov 30 2023 Orion Poplawski - 2.8.1-2 +- Re-add nut.target to nut-client (bz#2156504) + * Wed Nov 01 2023 Michal Hlavinka - 2.8.1-1 - updated to 2.8.1 (#2247337) From 9b811d068831d168b2d4b3e3a4743b08ac625905 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Wed, 6 Dec 2023 12:29:26 +0100 Subject: [PATCH 04/25] fix gpio check conditions --- nut.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nut.spec b/nut.spec index 14f79cb..53018a6 100644 --- a/nut.spec +++ b/nut.spec @@ -144,8 +144,10 @@ find . -mtime -1 -print0 | xargs -0 touch --reference %{SOURCE0} sed -i 's|\(PYTHON3\?_SITE_PACKAGES=\)".*"|\1"%{python3_sitelib}"|' m4/nut_check_python.m4 %build +%if 0%{?fedora} > 38 #--without-gpio is not enough to stop it complaining about missing library sed -i 's|with_gpio="[^"]*"|with_gpio="no"|g' configure.ac +%endif autoreconf -i export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS" # prevent assignment of default value, it would break configure's tests @@ -173,7 +175,7 @@ export LDFLAGS="-Wl,-z,now" --sysconfdir=%{_sysconfdir}/ups \ --with-cgipath=%{cgidir} \ --with-drvpath=%{modeldir} \ -%if 0%{?fedora} < 39 +%if 0%{?fedora} > 38 --without-gpio \ %endif --with-systemdsystemunitdir=%{_unitdir} \ From 03a2bff29ba0f1d36b7d6b7bd36d32645457f31d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 10:02:08 +0000 Subject: [PATCH 05/25] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- nut.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nut.spec b/nut.spec index 53018a6..21983cf 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.1 -Release: 2%{?dist} +Release: 3%{?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 @@ -481,6 +481,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 2.8.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Nov 30 2023 Orion Poplawski - 2.8.1-2 - Re-add nut.target to nut-client (bz#2156504) From 17e960e14007eb3c6a4ce489719c5c9127cb7278 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 09:32:03 +0000 Subject: [PATCH 06/25] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- nut.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nut.spec b/nut.spec index 21983cf..eb5d704 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.1 -Release: 3%{?dist} +Release: 4%{?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 @@ -481,6 +481,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 2.8.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 2.8.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From ada5bd73a723fa4a5e1c19a31ef83e73877f8793 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Wed, 3 Apr 2024 11:56:12 +0200 Subject: [PATCH 07/25] updated to 2.8.2(2272586) --- .gitignore | 1 + nut.spec | 13 +++++++++++-- sources | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 152bf81..61da205 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ nut-2.4.3.tar.gz /nut-2.7.4.tar.gz /nut-2.8.0.tar.gz /nut-2.8.1.tar.gz +/nut-2.8.2.tar.gz diff --git a/nut.spec b/nut.spec index eb5d704..8b68b23 100644 --- a/nut.spec +++ b/nut.spec @@ -13,8 +13,8 @@ Summary: Network UPS Tools Name: nut -Version: 2.8.1 -Release: 4%{?dist} +Version: 2.8.2 +Release: 1%{?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 @@ -313,11 +313,15 @@ fi %exclude %{modeldir}/netxml-ups %{_unitdir}/nut-driver-enumerator.path %{_unitdir}/nut-driver-enumerator.service +%{_unitdir}/nut-driver-enumerator-daemon-activator.path +%{_unitdir}/nut-driver-enumerator-daemon-activator.service +%{_unitdir}/nut-driver-enumerator-daemon.service %{_unitdir}/nut-driver@.service %{_unitdir}/nut-driver.target %{_unitdir}/nut-server.service %{_unitdir}/nut.target %{_sbindir}/upsd +%{_bindir}/nutconf %{_bindir}/nut-scanner %{_libdir}/libnutscan.so.* %{_libexecdir}/nut-driver-enumerator.sh @@ -329,6 +333,8 @@ fi %{_mandir}/man5/upsd.conf.5.gz %{_mandir}/man5/upsd.users.5.gz +%{_mandir}/man8/nutconf.8.gz + %{_mandir}/man8/adelsystem_cbi.8.gz %{_mandir}/man8/apc_modbus.8.gz @@ -481,6 +487,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Wed Apr 03 2024 Michal Hlavinka - 2.8.2-1 +- updated to 2.8.2(2272586) + * Thu Jan 25 2024 Fedora Release Engineering - 2.8.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index df09b8e..474d28c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nut-2.8.1.tar.gz) = 32bff67749ef28cf57860bb5859d06b0a76daeada7f22eba59962f1695edb1f0f444d912fc4ae8c14ac3af5ab08b9cdb64d0ed65884fd38adc4bc8e470ce2a4c +SHA512 (nut-2.8.2.tar.gz) = b6f8f22318e4a4fcb8073a63132b1cb083952c665191b82a7d6765a61b859575a4b0c2ba84ed17cfb8c88d34179876d64520dd2f75f02fe8707b406da2c0821c From 59f9744317892c15b4612c3130c53e5da7b46cbd Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 08:33:13 +0200 Subject: [PATCH 08/25] Rebuilt for Python 3.13 --- nut.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nut.spec b/nut.spec index 8b68b23..0fc584b 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.2 -Release: 1%{?dist} +Release: 2%{?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 @@ -487,6 +487,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Fri Jun 07 2024 Python Maint - 2.8.2-2 +- Rebuilt for Python 3.13 + * Wed Apr 03 2024 Michal Hlavinka - 2.8.2-1 - updated to 2.8.2(2272586) From 810e8f234e416e1e588860ca355472832580a21d Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Wed, 3 Jul 2024 12:59:09 +0200 Subject: [PATCH 09/25] fix python FTBFS, uses git snapshot as of 20240703 with PR 2505 --- .gitignore | 1 + nut-2.6.5-rmpidf.patch | 34 +++++++++++++++++----------------- nut.spec | 16 +++++++++++----- sources | 2 +- 4 files changed, 30 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 61da205..56f7b98 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ nut-2.4.3.tar.gz /nut-2.8.0.tar.gz /nut-2.8.1.tar.gz /nut-2.8.2.tar.gz +/nut-2.8.2.1.tar.gz diff --git a/nut-2.6.5-rmpidf.patch b/nut-2.6.5-rmpidf.patch index 7755382..40365b8 100644 --- a/nut-2.6.5-rmpidf.patch +++ b/nut-2.6.5-rmpidf.patch @@ -1,18 +1,18 @@ -diff -up nut-2.8.1/clients/upsmon.c.rmpidf nut-2.8.1/clients/upsmon.c ---- nut-2.8.1/clients/upsmon.c.rmpidf 2023-11-01 10:10:03.039782733 +0100 -+++ nut-2.8.1/clients/upsmon.c 2023-11-01 10:14:48.824806113 +0100 -@@ -3059,6 +3059,7 @@ int main(int argc, char *argv[]) +diff -up nut-2.8.2.1/clients/upsmon.c.rmpidf nut-2.8.2.1/clients/upsmon.c +--- nut-2.8.2.1/clients/upsmon.c.rmpidf 2024-07-03 12:18:04.788135176 +0200 ++++ nut-2.8.2.1/clients/upsmon.c 2024-07-03 12:19:33.164964473 +0200 +@@ -3309,6 +3309,7 @@ int main(int argc, char *argv[]) upslogx(LOG_INFO, "Signal %d: exiting", exit_flag); upsnotify(NOTIFY_STATE_STOPPING, "Signal %d: exiting", exit_flag); upsmon_cleanup(); + cleanpid(prog); + upsdebugx(1, "Finally exiting due to signal %d", exit_flag); exit(EXIT_SUCCESS); - } -diff -up nut-2.8.1/common/common.c.rmpidf nut-2.8.1/common/common.c ---- nut-2.8.1/common/common.c.rmpidf 2023-10-30 00:02:33.000000000 +0100 -+++ nut-2.8.1/common/common.c 2023-11-01 10:10:03.040782744 +0100 -@@ -519,6 +519,20 @@ pid_t parsepid(const char *buf) +diff -up nut-2.8.2.1/common/common.c.rmpidf nut-2.8.2.1/common/common.c +--- nut-2.8.2.1/common/common.c.rmpidf 2024-07-03 12:14:56.000000000 +0200 ++++ nut-2.8.2.1/common/common.c 2024-07-03 12:18:04.788135176 +0200 +@@ -1338,6 +1338,20 @@ pid_t parsepid(const char *buf) return pid; } @@ -33,10 +33,10 @@ diff -up nut-2.8.1/common/common.c.rmpidf nut-2.8.1/common/common.c /* open pidfn, get the pid, then send it sig * returns negative codes for errors, or * zero for a successfully sent signal -diff -up nut-2.8.1/include/common.h.rmpidf nut-2.8.1/include/common.h ---- nut-2.8.1/include/common.h.rmpidf 2023-10-24 10:45:21.000000000 +0200 -+++ nut-2.8.1/include/common.h 2023-11-01 10:10:03.040782744 +0100 -@@ -211,6 +211,9 @@ void chroot_start(const char *path); +diff -up nut-2.8.2.1/include/common.h.rmpidf nut-2.8.2.1/include/common.h +--- nut-2.8.2.1/include/common.h.rmpidf 2024-07-03 12:14:56.000000000 +0200 ++++ nut-2.8.2.1/include/common.h 2024-07-03 12:18:04.788135176 +0200 +@@ -262,6 +262,9 @@ int checkprocname(pid_t pid, const char /* write a pid file - is a full pathname *or* just the program name */ void writepid(const char *name); @@ -46,10 +46,10 @@ diff -up nut-2.8.1/include/common.h.rmpidf nut-2.8.1/include/common.h /* parses string buffer into a pid_t if it passes * a few sanity checks; returns -1 on error */ pid_t parsepid(const char *buf); -diff -up nut-2.8.1/server/upsd.c.rmpidf nut-2.8.1/server/upsd.c ---- nut-2.8.1/server/upsd.c.rmpidf 2023-11-01 10:10:03.040782744 +0100 -+++ nut-2.8.1/server/upsd.c 2023-11-01 10:15:57.176529218 +0100 -@@ -2137,5 +2137,6 @@ int main(int argc, char **argv) +diff -up nut-2.8.2.1/server/upsd.c.rmpidf nut-2.8.2.1/server/upsd.c +--- nut-2.8.2.1/server/upsd.c.rmpidf 2024-07-03 12:14:56.000000000 +0200 ++++ nut-2.8.2.1/server/upsd.c 2024-07-03 12:18:04.789135186 +0200 +@@ -2304,5 +2304,6 @@ int main(int argc, char **argv) upsnotify(NOTIFY_STATE_STOPPING, "Signal %d: exiting", exit_flag); ssl_cleanup(); diff --git a/nut.spec b/nut.spec index 0fc584b..5e9b504 100644 --- a/nut.spec +++ b/nut.spec @@ -13,8 +13,8 @@ Summary: Network UPS Tools Name: nut -Version: 2.8.2 -Release: 2%{?dist} +Version: 2.8.2.1 +Release: 0%{?dist}.1.git20240703pr2505 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 @@ -128,9 +128,9 @@ necessary to develop NUT client applications. %prep %setup -q -%patch -P2 -p1 -b .piddir-owner -%patch -P9 -p1 -b .rmpidf -%patch -P15 -p1 +%patch -P 2 -p1 -b .piddir-owner +%patch -P 9 -p1 -b .rmpidf +%patch -P 15 -p1 sed -i 's|=NUT-Monitor|=nut-monitor|' scripts/python/app/nut-monitor-py3qt5.desktop sed -i "s|sys.argv\[0\]|'%{_datadir}/%{name}/nut-monitor/nut-monitor'|" scripts/python/app/NUT-Monitor-py3qt5.in @@ -327,6 +327,7 @@ fi %{_libexecdir}/nut-driver-enumerator.sh %{_libexecdir}/sockdebug %{_datadir}/augeas/lenses/dist/nut* +%{_datadir}/augeas/lenses/dist/tests/test_nut.aug %{_datadir}/%{name}/cmdvartab %{_datadir}/%{name}/driver.list %{_mandir}/man5/ups.conf.5.gz @@ -351,6 +352,7 @@ fi %{_mandir}/man8/bestfortress.8.gz %{_mandir}/man8/bestups.8.gz %{_mandir}/man8/bestuferrups.8.gz +%{_mandir}/man8/bicker_ser.8.gz %{_mandir}/man8/blazer_ser.8.gz %{_mandir}/man8/blazer_usb.8.gz %{_mandir}/man8/clone.8.gz @@ -363,6 +365,7 @@ fi %if 0%{?fedora} < 39 %{_mandir}/man8/generic_gpio.8.gz %endif +%{_mandir}/man8/hwmon_ina219.8.gz %{_mandir}/man8/huawei-ups2000.8.gz %{_mandir}/man8/isbmex.8.gz %{_mandir}/man8/ivtscd.8.gz @@ -487,6 +490,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Wed Jul 03 2024 Michal Hlavinka - 2.8.2.1-0.1.git20240703pr2505 +- fix python FTBFS, uses git snapshot as of 20240703 with PR 2505 + * Fri Jun 07 2024 Python Maint - 2.8.2-2 - Rebuilt for Python 3.13 diff --git a/sources b/sources index 474d28c..379e679 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nut-2.8.2.tar.gz) = b6f8f22318e4a4fcb8073a63132b1cb083952c665191b82a7d6765a61b859575a4b0c2ba84ed17cfb8c88d34179876d64520dd2f75f02fe8707b406da2c0821c +SHA512 (nut-2.8.2.1.tar.gz) = 62457781758be939919d1c9bbed4b2895d2c434c73ec6d36ab6120898f84a24131cf7796d320117c5f8780e63da1aa6966e59156466ff78f20267b0a4eed1652 From 02a191e84075841c913ce7a77d4cf5e5602681a1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 19:52:32 +0000 Subject: [PATCH 10/25] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- nut.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nut.spec b/nut.spec index 5e9b504..a59d7b0 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.2.1 -Release: 0%{?dist}.1.git20240703pr2505 +Release: 1%{?dist}.1.git20240703pr2505 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 @@ -490,6 +490,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 2.8.2.1-1.1.git20240703pr2505 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed Jul 03 2024 Michal Hlavinka - 2.8.2.1-0.1.git20240703pr2505 - fix python FTBFS, uses git snapshot as of 20240703 with PR 2505 From 3cb725a9a6c01ad316d99206f6b084a019020e2a Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 15 Nov 2024 16:08:05 -0700 Subject: [PATCH 11/25] Add BR systemd-devel to enable systemd notification support --- nut.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nut.spec b/nut.spec index a59d7b0..16d14a0 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.2.1 -Release: 1%{?dist}.1.git20240703pr2505 +Release: 2%{?dist}.1.git20240703pr2505 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 @@ -68,6 +68,7 @@ BuildRequires: powerman-devel %endif BuildRequires: python3-devel BuildRequires: python3-setuptools +BuildRequires: systemd-devel BuildRequires: systemd-rpm-macros %ifnarch s390 s390x @@ -490,6 +491,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Fri Nov 15 2024 Orion Poplawski - 2.8.2.1-2.1.git20240703pr2505 +- Add BR systemd-devel to enable systemd notification support + * Thu Jul 18 2024 Fedora Release Engineering - 2.8.2.1-1.1.git20240703pr2505 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From b278271309d8cf3d09befa772e3cb3fbbbabb9dc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 20:31:55 +0000 Subject: [PATCH 12/25] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- nut.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nut.spec b/nut.spec index 16d14a0..d3f0edc 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.2.1 -Release: 2%{?dist}.1.git20240703pr2505 +Release: 3%{?dist}.1.git20240703pr2505 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 @@ -491,6 +491,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 2.8.2.1-3.1.git20240703pr2505 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Nov 15 2024 Orion Poplawski - 2.8.2.1-2.1.git20240703pr2505 - Add BR systemd-devel to enable systemd notification support From 7d3c0ad65dd96dc0a6a0be8052c55a13bfcff8a3 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Wed, 29 Jan 2025 00:09:31 +0100 Subject: [PATCH 13/25] fix ftbfs, make it build with unified bin/sbin fix ftbfs, make it build with unified bin/sbin fix ftbfs, make it build with unified bin/sbin fix ftbfs, make it build with unified bin/sbin fix ftbfs, make it build with unified bin/sbin --- nut.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nut.spec b/nut.spec index d3f0edc..68cc7d3 100644 --- a/nut.spec +++ b/nut.spec @@ -7,14 +7,14 @@ %global cgidir /var/www/nut-cgi-bin %global piddir /run/nut -%global modeldir /usr/sbin +%global modeldir %{_sbindir} # powerman is retired on Fedora, therefore disable it by default %bcond_with powerman Summary: Network UPS Tools Name: nut Version: 2.8.2.1 -Release: 3%{?dist}.1.git20240703pr2505 +Release: 4%{?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 @@ -491,6 +491,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Wed Jan 29 2025 Michal Hlavinka - 2.8.2.1-4 +- fix ftbfs, make it build with unified bin/sbin + * Fri Jan 17 2025 Fedora Release Engineering - 2.8.2.1-3.1.git20240703pr2505 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From ce21c14155b825c63c8217d9446a4dea1ba681f3 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Fri, 31 Jan 2025 21:00:34 +0100 Subject: [PATCH 14/25] add back git snapshot part of release number --- nut.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nut.spec b/nut.spec index 68cc7d3..5aa094d 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.2.1 -Release: 4%{?dist} +Release: 4%{?dist}.1.git20240703pr2505 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 @@ -491,7 +491,7 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog -* Wed Jan 29 2025 Michal Hlavinka - 2.8.2.1-4 +* Wed Jan 29 2025 Michal Hlavinka - 2.8.2.1-4.1.git20240703pr2505 - fix ftbfs, make it build with unified bin/sbin * Fri Jan 17 2025 Fedora Release Engineering - 2.8.2.1-3.1.git20240703pr2505 From 91e5a19370127ef353d8f2f1a970253c2eee6085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 11 Feb 2025 15:53:26 +0100 Subject: [PATCH 15/25] Add sysusers.d config file to allow rpm to create users/groups automatically See https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers. -cgi requires -client, so it doesn't need it's copy of the file. setup Provides group(dialout) and group(tty), but let's add the Requires for clarity. --- nut.spec | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/nut.spec b/nut.spec index 5aa094d..2d04cd3 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.2.1 -Release: 4%{?dist}.1.git20240703pr2505 +Release: 5%{?dist}.1.git20240703pr2505 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,11 +25,12 @@ Patch2: nut-2.8.0-piddir-owner.patch Patch9: nut-2.6.5-rmpidf.patch Patch15: nut-c99-strdup.patch -Requires(pre): shadow-utils Requires(post): coreutils systemd Requires(preun): systemd Requires(postun): coreutils systemd Recommends: nut-xml +Requires: group(dialout) +Requires: group(tty) BuildRequires: make BuildRequires: autoconf @@ -90,12 +91,12 @@ live status tracking on web pages, and more. Summary: Network UPS Tools client monitoring utilities Requires(post): systemd Requires(preun): systemd -Requires(pre): shadow-utils %if %{with python2} Requires: pygtk2, pygtk2-libglade #only for python and gui part %endif -#Requires: +Requires: group(dialout) +Requires: group(tty) %description client This package includes the client utilities that are required to monitor a @@ -105,7 +106,6 @@ attached to a different computer on the network. %package cgi Summary: CGI utilities for the Network UPS Tools Requires: %{name}-client = %{version}-%{release} webserver -Requires(pre): shadow-utils %description cgi This package includes CGI programs for accessing UPS status via a web @@ -144,6 +144,13 @@ find . -mtime -1 -print0 | xargs -0 touch --reference %{SOURCE0} # fix python site packages check sed -i 's|\(PYTHON3\?_SITE_PACKAGES=\)".*"|\1"%{python3_sitelib}"|' m4/nut_check_python.m4 +# Create a sysusers.d config file +cat >nut.sysusers.conf < 38 #--without-gpio is not enough to stop it complaining about missing library @@ -250,11 +257,9 @@ ln -s %{_datadir}/nut/nut-monitor/nut-monitor %{buildroot}%{_bindir}/nut-monitor touch %{buildroot}/%{piddir}/upsmon.pid chmod 0644 %{buildroot}/%{piddir}/upsmon.pid -%pre -/usr/sbin/useradd -c "Network UPS Tools" -u %{nut_uid} \ - -s /bin/false -r -d %{_localstatedir}/lib/ups %{name} 2> /dev/null || : -/usr/sbin/usermod -G dialout,tty %{name} +install -m0644 -D nut.sysusers.conf %{buildroot}%{_sysusersdir}/nut.conf +%pre # do not let upsmon run during upgrade rhbz#916472 # phase 1: stop upsmon before upsd changes if [ "$1" = "2" ]; then @@ -273,15 +278,7 @@ fi %postun %systemd_postun_with_restart nut-driver.target nut-server.service -%pre client -/usr/sbin/useradd -c "Network UPS Tools" -u %{nut_uid} \ - -s /bin/false -r -d %{_localstatedir}/lib/ups %{name} 2> /dev/null || : -/usr/sbin/usermod -G dialout,tty %{name} -%pre cgi -/usr/sbin/useradd -c "Network UPS Tools" -u %{nut_uid} \ - -s /bin/false -r -d %{_localstatedir}/lib/ups %{name} 2> /dev/null || : -/usr/sbin/usermod -G dialout,tty %{name} %post client %systemd_post nut-monitor.service nut.target @@ -414,6 +411,7 @@ fi %{_mandir}/man8/upsdrvctl.8.gz %{_mandir}/man8/upsdrvsvcctl.8.gz %{_mandir}/man8/usbhid-ups.8.gz +%{_sysusersdir}/nut.conf %files client %license COPYING LICENSE-GPL2 LICENSE-GPL3 @@ -457,6 +455,7 @@ fi %{_datadir}/pixmaps/nut-monitor.png %{_datadir}/applications/nut-monitor.desktop %endif +%{_sysusersdir}/nut.conf %files cgi %config(noreplace) %attr(644,root,root) %{_sysconfdir}/ups/hosts.conf @@ -491,6 +490,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 2.8.2.1-5.1.git20240703pr2505 +- Add sysusers.d config file to allow rpm to create users/groups automatically + * Wed Jan 29 2025 Michal Hlavinka - 2.8.2.1-4.1.git20240703pr2505 - fix ftbfs, make it build with unified bin/sbin From 760ad72a05c80afc4eabe4e4191dde6bf16bb9c3 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Tue, 29 Apr 2025 16:46:04 +0200 Subject: [PATCH 16/25] updated to 2.8.3 (#2352734) --- .gitignore | 1 + nut.spec | 18 ++++++++++++++++-- sources | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 56f7b98..cae0d0a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ nut-2.4.3.tar.gz /nut-2.8.1.tar.gz /nut-2.8.2.tar.gz /nut-2.8.2.1.tar.gz +/nut-2.8.3.tar.gz diff --git a/nut.spec b/nut.spec index 2d04cd3..29c2656 100644 --- a/nut.spec +++ b/nut.spec @@ -13,8 +13,8 @@ Summary: Network UPS Tools Name: nut -Version: 2.8.2.1 -Release: 5%{?dist}.1.git20240703pr2505 +Version: 2.8.3 +Release: 1%{?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 @@ -318,12 +318,18 @@ fi %{_unitdir}/nut-driver.target %{_unitdir}/nut-server.service %{_unitdir}/nut.target +%{_presetdir}/nut-systemd.preset +%{_unitdir}/enphase-monitor@.service +%{_unitdir}/nut-logger.service +%{_unitdir}/nut-udev-settle.service %{_sbindir}/upsd %{_bindir}/nutconf %{_bindir}/nut-scanner %{_libdir}/libnutscan.so.* +%{_libdir}/libnutconf.so.* %{_libexecdir}/nut-driver-enumerator.sh %{_libexecdir}/sockdebug +%{_libexecdir}/enphase-monitor %{_datadir}/augeas/lenses/dist/nut* %{_datadir}/augeas/lenses/dist/tests/test_nut.aug %{_datadir}/%{name}/cmdvartab @@ -354,6 +360,7 @@ fi %{_mandir}/man8/blazer_ser.8.gz %{_mandir}/man8/blazer_usb.8.gz %{_mandir}/man8/clone.8.gz +%{_mandir}/man8/clone-outlet.8.gz %{_mandir}/man8/dummy-ups.8.gz %{_mandir}/man8/everups.8.gz %{_mandir}/man8/etapro.8.gz @@ -369,12 +376,14 @@ fi %{_mandir}/man8/ivtscd.8.gz %{_mandir}/man8/liebert.8.gz %{_mandir}/man8/liebert-esp2.8.gz +%{_mandir}/man8/liebert-gxe.8.gz %{_mandir}/man8/masterguard.8.gz %{_mandir}/man8/metasys.8.gz %{_mandir}/man8/microdowell.8.gz %{_mandir}/man8/microsol-apc.8.gz %{_mandir}/man8/mge-utalk.8.gz %{_mandir}/man8/mge-shut.8.gz +%{_mandir}/man8/nhs_ser.8.gz %{_mandir}/man8/nutupsdrv.8.gz %{_mandir}/man8/nutdrv_atcl_usb.8.gz %{_mandir}/man8/nutdrv_siemens_sitop.8.gz @@ -483,13 +492,18 @@ fi %{_libdir}/libupsclient.so %{_libdir}/libnutclient.so %{_libdir}/libnutclientstub.so +%{_libdir}/libnutconf.so %{_libdir}/libnutscan.so %{_libdir}/pkgconfig/libupsclient.pc %{_libdir}/pkgconfig/libnutclient.pc +%{_libdir}/pkgconfig/libnutconf.pc %{_libdir}/pkgconfig/libnutclientstub.pc %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Tue Apr 29 2025 Michal Hlavinka - 2.8.3-1 +- updated to 2.8.3 (#2352734) + * Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 2.8.2.1-5.1.git20240703pr2505 - Add sysusers.d config file to allow rpm to create users/groups automatically diff --git a/sources b/sources index 379e679..f63aad6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nut-2.8.2.1.tar.gz) = 62457781758be939919d1c9bbed4b2895d2c434c73ec6d36ab6120898f84a24131cf7796d320117c5f8780e63da1aa6966e59156466ff78f20267b0a4eed1652 +SHA512 (nut-2.8.3.tar.gz) = 0aeafad02ab323b02041a370c586dede91483cab57e0a9d1256a685716ca9f0d0f114df904ef472d48fa53ac1896690b7878828eb3b00934959c7aeaa63af99f From 9867e182417607deb337c2112a8f1c45f4e33179 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Tue, 29 Apr 2025 17:37:37 +0200 Subject: [PATCH 17/25] add needed buildrequire jq --- nut.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/nut.spec b/nut.spec index 29c2656..2945107 100644 --- a/nut.spec +++ b/nut.spec @@ -47,6 +47,7 @@ BuildRequires: freetype-devel BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gd-devel +BuildRequires: jq %if 0%{?fedora} < 39 BuildRequires: libgpiod-devel %endif From 1f502ae93a12806f866df25d2c9860b1b790a656 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Wed, 21 May 2025 13:43:14 +0200 Subject: [PATCH 18/25] rename rhino to nutdrv_rhino to prevent file conflict (rhbz#2367057) --- nut-2.8.3-rhinoname.patch | 23 +++++++++++++++++++++++ nut.spec | 12 ++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 nut-2.8.3-rhinoname.patch diff --git a/nut-2.8.3-rhinoname.patch b/nut-2.8.3-rhinoname.patch new file mode 100644 index 0000000..5e978c0 --- /dev/null +++ b/nut-2.8.3-rhinoname.patch @@ -0,0 +1,23 @@ +diff -up nut-2.8.3-build/nut-2.8.3/drivers/Makefile.am.rhinoname nut-2.8.3-build/nut-2.8.3/drivers/Makefile.am +--- nut-2.8.3-build/nut-2.8.3/drivers/Makefile.am.rhinoname 2025-05-21 13:16:02.566975097 +0200 ++++ nut-2.8.3-build/nut-2.8.3/drivers/Makefile.am 2025-05-21 13:17:07.563528645 +0200 +@@ -62,7 +62,7 @@ NUTSW_DRIVERLIST = $(NUTSW_DRIVERLIST_DU + SERIAL_DRIVERLIST = al175 bcmxcp belkin belkinunv bestfcom \ + bestfortress bestuferrups bestups etapro everups \ + gamatronic genericups isbmex liebert liebert-esp2 liebert-gxe masterguard metasys \ +- mge-utalk microdowell microsol-apc mge-shut oneac optiups powercom rhino \ ++ mge-utalk microdowell microsol-apc mge-shut oneac optiups powercom nutdrv_rhino \ + safenet nutdrv_siemens-sitop solis tripplite tripplitesu upscode2 victronups powerpanel \ + blazer_ser ivtscd apcsmart apcsmart-old riello_ser sms_ser bicker_ser + if HAVE_LINUX_SERIAL_H +@@ -182,8 +182,8 @@ powercom_SOURCES = powercom.c + powercom_LDADD = $(LDADD) -lm + powerpanel_SOURCES = powerpanel.c powerp-bin.c powerp-txt.c + powerpanel_LDADD = $(LDADD) -lm +-rhino_SOURCES = rhino.c +-rhino_LDADD = $(LDADD) -lm ++nutdrv_rhino_SOURCES = rhino.c ++nutdrv_rhino_LDADD = $(LDADD) -lm + safenet_SOURCES = safenet.c + nutdrv_siemens_sitop_SOURCES = nutdrv_siemens_sitop.c + solis_SOURCES = solis.c diff --git a/nut.spec b/nut.spec index 2945107..4e922f8 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.3 -Release: 1%{?dist} +Release: 2%{?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 @@ -24,6 +24,7 @@ Patch2: nut-2.8.0-piddir-owner.patch #quick fix. TODO: fix it properly Patch9: nut-2.6.5-rmpidf.patch Patch15: nut-c99-strdup.patch +Patch16: nut-2.8.3-rhinoname.patch Requires(post): coreutils systemd Requires(preun): systemd @@ -133,6 +134,7 @@ necessary to develop NUT client applications. %patch -P 2 -p1 -b .piddir-owner %patch -P 9 -p1 -b .rmpidf %patch -P 15 -p1 +%patch -P 16 -p2 -b .rhinoname sed -i 's|=NUT-Monitor|=nut-monitor|' scripts/python/app/nut-monitor-py3qt5.desktop sed -i "s|sys.argv\[0\]|'%{_datadir}/%{name}/nut-monitor/nut-monitor'|" scripts/python/app/NUT-Monitor-py3qt5.in @@ -241,6 +243,9 @@ do mv -f $fe.new $fe done +# rename rhino to nutdrv_rhino to prevent file conflict (rhbz#2367057) +mv %{buildroot}%{_mandir}/man8/rhino.8 %{buildroot}%{_mandir}/man8/nutdrv_rhino.8 + # install PyNUT install -p -D -m 644 scripts/python/module/PyNUT.py %{buildroot}%{python3_sitelib}/PyNUT.py # install nut-monitor @@ -402,7 +407,7 @@ fi %{_mandir}/man8/powerman-pdu.8.gz %endif %{_mandir}/man8/powerpanel.8.gz -%{_mandir}/man8/rhino.8.gz +%{_mandir}/man8/nutdrv_rhino.8.gz %{_mandir}/man8/richcomm_usb.8.gz %{_mandir}/man8/riello_ser.8.gz %{_mandir}/man8/riello_usb.8.gz @@ -502,6 +507,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Wed May 21 2025 Michal Hlavinka - 2.8.3-2 +- rename rhino to nutdrv_rhino to prevent file conflict (rhbz#2367057) + * Tue Apr 29 2025 Michal Hlavinka - 2.8.3-1 - updated to 2.8.3 (#2352734) From 38f34fb51d56b22b5711bdaa510da1f5bdbbbd05 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 19:58:22 +0200 Subject: [PATCH 19/25] Rebuilt for Python 3.14 --- nut.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nut.spec b/nut.spec index 4e922f8..84cb6e9 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.3 -Release: 2%{?dist} +Release: 3%{?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 @@ -507,6 +507,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Mon Jun 02 2025 Python Maint - 2.8.3-3 +- Rebuilt for Python 3.14 + * Wed May 21 2025 Michal Hlavinka - 2.8.3-2 - rename rhino to nutdrv_rhino to prevent file conflict (rhbz#2367057) From cc9daebf1e3d7a6ebe0e4fd8c62cae1ebb88761a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 23:02:13 +0000 Subject: [PATCH 20/25] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- nut.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nut.spec b/nut.spec index 84cb6e9..f2d0381 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.3 -Release: 3%{?dist} +Release: 4%{?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 @@ -507,6 +507,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 2.8.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Jun 02 2025 Python Maint - 2.8.3-3 - Rebuilt for Python 3.14 From 4870df85c6f447c4a0956d8728ecee5c9101901b Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Thu, 14 Aug 2025 12:13:59 +0200 Subject: [PATCH 21/25] updated to 2.8.4 (#2387244) --- .gitignore | 1 + nut-2.8.3-rhinoname.patch | 20 ++++++++++---------- nut.spec | 23 +++++++++++++++++------ sources | 2 +- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index cae0d0a..a737052 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ nut-2.4.3.tar.gz /nut-2.8.2.tar.gz /nut-2.8.2.1.tar.gz /nut-2.8.3.tar.gz +/nut-2.8.4.tar.gz diff --git a/nut-2.8.3-rhinoname.patch b/nut-2.8.3-rhinoname.patch index 5e978c0..71be46d 100644 --- a/nut-2.8.3-rhinoname.patch +++ b/nut-2.8.3-rhinoname.patch @@ -1,19 +1,19 @@ -diff -up nut-2.8.3-build/nut-2.8.3/drivers/Makefile.am.rhinoname nut-2.8.3-build/nut-2.8.3/drivers/Makefile.am ---- nut-2.8.3-build/nut-2.8.3/drivers/Makefile.am.rhinoname 2025-05-21 13:16:02.566975097 +0200 -+++ nut-2.8.3-build/nut-2.8.3/drivers/Makefile.am 2025-05-21 13:17:07.563528645 +0200 -@@ -62,7 +62,7 @@ NUTSW_DRIVERLIST = $(NUTSW_DRIVERLIST_DU +diff -up nut-2.8.4-build/nut-2.8.4/drivers/Makefile.am.rhinoname nut-2.8.4-build/nut-2.8.4/drivers/Makefile.am +--- nut-2.8.4-build/nut-2.8.4/drivers/Makefile.am.rhinoname 2025-08-14 11:08:48.763700333 +0200 ++++ nut-2.8.4-build/nut-2.8.4/drivers/Makefile.am 2025-08-14 11:29:43.803846801 +0200 +@@ -74,7 +74,7 @@ NUTSW_DRIVERLIST = $(NUTSW_DRIVERLIST_DU SERIAL_DRIVERLIST = al175 bcmxcp belkin belkinunv bestfcom \ bestfortress bestuferrups bestups etapro everups \ gamatronic genericups isbmex liebert liebert-esp2 liebert-gxe masterguard metasys \ -- mge-utalk microdowell microsol-apc mge-shut oneac optiups powercom rhino \ -+ mge-utalk microdowell microsol-apc mge-shut oneac optiups powercom nutdrv_rhino \ +- mge-utalk microdowell microsol-apc mge-shut nutdrv_hashx oneac optiups powercom powervar_cx_ser rhino \ ++ mge-utalk microdowell microsol-apc mge-shut nutdrv_hashx oneac optiups powercom powervar_cx_ser nutdrv_rhino \ safenet nutdrv_siemens-sitop solis tripplite tripplitesu upscode2 victronups powerpanel \ - blazer_ser ivtscd apcsmart apcsmart-old riello_ser sms_ser bicker_ser + blazer_ser ivtscd apcsmart apcsmart-old riello_ser sms_ser bicker_ser ve-direct if HAVE_LINUX_SERIAL_H -@@ -182,8 +182,8 @@ powercom_SOURCES = powercom.c - powercom_LDADD = $(LDADD) -lm - powerpanel_SOURCES = powerpanel.c powerp-bin.c powerp-txt.c +@@ -198,8 +198,8 @@ powerpanel_SOURCES = powerpanel.c powerp powerpanel_LDADD = $(LDADD) -lm + powervar_cx_ser_SOURCES = powervar_cx_ser.c powervar_cx.c + powervar_cx_ser_CFLAGS = $(AM_CFLAGS) -DPVAR_SERIAL=1 -rhino_SOURCES = rhino.c -rhino_LDADD = $(LDADD) -lm +nutdrv_rhino_SOURCES = rhino.c diff --git a/nut.spec b/nut.spec index f2d0381..f88dc36 100644 --- a/nut.spec +++ b/nut.spec @@ -13,8 +13,8 @@ Summary: Network UPS Tools Name: nut -Version: 2.8.3 -Release: 4%{?dist} +Version: 2.8.4 +Release: 1%{?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 @@ -33,6 +33,7 @@ Recommends: nut-xml Requires: group(dialout) Requires: group(tty) +BuildRequires: asciidoc BuildRequires: make BuildRequires: autoconf BuildRequires: automake @@ -131,9 +132,9 @@ necessary to develop NUT client applications. %prep %setup -q -%patch -P 2 -p1 -b .piddir-owner +#patch -P 2 -p1 -b .piddir-owner %patch -P 9 -p1 -b .rmpidf -%patch -P 15 -p1 +#patch -P 15 -p1 %patch -P 16 -p2 -b .rhinoname sed -i 's|=NUT-Monitor|=nut-monitor|' scripts/python/app/nut-monitor-py3qt5.desktop @@ -194,7 +195,8 @@ export LDFLAGS="-Wl,-z,now" --with-pkgconfig-dir=%{_libdir}/pkgconfig \ --disable-static \ --with-udev-dir=%{_usr}/lib/udev \ - --libdir=%{_libdir} + --libdir=%{_libdir} \ + --enable-docs-changelog=no # --with-doc # does not work in 2.7.1 # for rhbz#838139 check if still needed? @@ -370,6 +372,7 @@ fi %{_mandir}/man8/dummy-ups.8.gz %{_mandir}/man8/everups.8.gz %{_mandir}/man8/etapro.8.gz +%{_mandir}/man8/failover.8.gz %{_mandir}/man8/gamatronic.8.gz %{_mandir}/man8/generic_modbus.8.gz %{_mandir}/man8/genericups.8.gz @@ -392,6 +395,7 @@ fi %{_mandir}/man8/nhs_ser.8.gz %{_mandir}/man8/nutupsdrv.8.gz %{_mandir}/man8/nutdrv_atcl_usb.8.gz +%{_mandir}/man8/nutdrv_hashx.8.gz %{_mandir}/man8/nutdrv_siemens_sitop.8.gz %{_mandir}/man8/nut-driver-enumerator.8.gz %{_mandir}/man8/nut-ipmipsu.8.gz @@ -407,6 +411,8 @@ fi %{_mandir}/man8/powerman-pdu.8.gz %endif %{_mandir}/man8/powerpanel.8.gz +%{_mandir}/man8/powervar_cx_ser.8.gz +%{_mandir}/man8/powervar_cx_usb.8.gz %{_mandir}/man8/nutdrv_rhino.8.gz %{_mandir}/man8/richcomm_usb.8.gz %{_mandir}/man8/riello_ser.8.gz @@ -420,12 +426,13 @@ fi %{_mandir}/man8/tripplite.8.gz %{_mandir}/man8/tripplite_usb.8.gz %{_mandir}/man8/tripplitesu.8.gz -%{_mandir}/man8/victronups.8.gz %{_mandir}/man8/upscode2.8* %{_mandir}/man8/upsd.8.gz %{_mandir}/man8/upsdrvctl.8.gz %{_mandir}/man8/upsdrvsvcctl.8.gz %{_mandir}/man8/usbhid-ups.8.gz +%{_mandir}/man8/victronups.8.gz +%{_mandir}/man8/ve-direct.8.gz %{_sysusersdir}/nut.conf %files client @@ -456,6 +463,7 @@ fi %{_mandir}/man5/nut.conf.5.gz %{_mandir}/man5/upsmon.conf.5.gz %{_mandir}/man5/upssched.conf.5.gz +%{_mandir}/man7/nut.7.gz %{_mandir}/man8/upsc.8.gz %{_mandir}/man8/upscmd.8.gz %{_mandir}/man8/upslog.8.gz @@ -507,6 +515,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Thu Aug 14 2025 Michal Hlavinka - 2.8.4-1 +- updated to 2.8.4 (#2387244) + * Thu Jul 24 2025 Fedora Release Engineering - 2.8.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index f63aad6..5f00a02 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nut-2.8.3.tar.gz) = 0aeafad02ab323b02041a370c586dede91483cab57e0a9d1256a685716ca9f0d0f114df904ef472d48fa53ac1896690b7878828eb3b00934959c7aeaa63af99f +SHA512 (nut-2.8.4.tar.gz) = 0d87c0006608f92ae54f8a500f93d9a81eac1d9abf57f32e7718dd72f265b8293a0b6cdba04c802b81eaf8907b52669c36b47b6875a4377f9752845ac6c5e8fa From 7164fc2d6d1759622c72b07eda35a07e217864af Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 13:02:57 +0200 Subject: [PATCH 22/25] Rebuilt for Python 3.14.0rc2 bytecode --- nut.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nut.spec b/nut.spec index f88dc36..ff9aa07 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.4 -Release: 1%{?dist} +Release: 2%{?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 @@ -515,6 +515,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Fri Aug 15 2025 Python Maint - 2.8.4-2 +- Rebuilt for Python 3.14.0rc2 bytecode + * Thu Aug 14 2025 Michal Hlavinka - 2.8.4-1 - updated to 2.8.4 (#2387244) From 069b76a3a8ee7a2e188b0e8e936758f7b811f8dc Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 12:33:37 +0200 Subject: [PATCH 23/25] Rebuilt for Python 3.14.0rc3 bytecode --- nut.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nut.spec b/nut.spec index ff9aa07..40f63d1 100644 --- a/nut.spec +++ b/nut.spec @@ -14,7 +14,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.4 -Release: 2%{?dist} +Release: 3%{?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 @@ -515,6 +515,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Fri Sep 19 2025 Python Maint - 2.8.4-3 +- Rebuilt for Python 3.14.0rc3 bytecode + * Fri Aug 15 2025 Python Maint - 2.8.4-2 - Rebuilt for Python 3.14.0rc2 bytecode From 77706a32be789aa4285c7626aa024b30fd7fd414 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Tue, 30 Sep 2025 12:11:02 +0200 Subject: [PATCH 24/25] based on PR#18 by Orion Poplawski Build NUT-Monitor and ship in separate nut-monitor package (rhbz#2359149) Move UPS drivers into /usr/libexec/nut --- nut.spec | 80 +++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 30 deletions(-) diff --git a/nut.spec b/nut.spec index 40f63d1..aecfb12 100644 --- a/nut.spec +++ b/nut.spec @@ -1,5 +1,4 @@ %global _hardened_build 1 -%bcond_with python2 #TODO: split nut-client so it does not require python %global nut_uid 57 @@ -7,14 +6,14 @@ %global cgidir /var/www/nut-cgi-bin %global piddir /run/nut -%global modeldir %{_sbindir} +%global modeldir %{_libexecdir}/%{name} # powerman is retired on Fedora, therefore disable it by default %bcond_with powerman Summary: Network UPS Tools Name: nut Version: 2.8.4 -Release: 3%{?dist} +Release: 4%{?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 @@ -94,10 +93,6 @@ live status tracking on web pages, and more. Summary: Network UPS Tools client monitoring utilities Requires(post): systemd Requires(preun): systemd -%if %{with python2} -Requires: pygtk2, pygtk2-libglade -#only for python and gui part -%endif Requires: group(dialout) Requires: group(tty) @@ -114,6 +109,14 @@ Requires: %{name}-client = %{version}-%{release} webserver This package includes CGI programs for accessing UPS status via a web browser. +%package monitor +Summary: Network UPS Tools monitor application +BuildRequires: python3-pyqt6 + +%description monitor +This package contain the Python NUT-Monitor GUI application to +monitor a UPS. + %package xml Summary: XML UPS driver for the Network UPS Tools Requires: %{name}-client = %{version}-%{release} @@ -137,8 +140,6 @@ necessary to develop NUT client applications. #patch -P 15 -p1 %patch -P 16 -p2 -b .rhinoname -sed -i 's|=NUT-Monitor|=nut-monitor|' scripts/python/app/nut-monitor-py3qt5.desktop -sed -i "s|sys.argv\[0\]|'%{_datadir}/%{name}/nut-monitor/nut-monitor'|" scripts/python/app/NUT-Monitor-py3qt5.in sed -i 's|LIBSSL_LDFLAGS|LIBSSL_LIBS|' lib/libupsclient-config.in sed -i 's|LIBSSL_LDFLAGS|LIBSSL_LIBS|' lib/libupsclient.pc.in @@ -156,7 +157,7 @@ m nut tty EOF %build -%if 0%{?fedora} > 38 +%if 0%{?fedora} #--without-gpio is not enough to stop it complaining about missing library sed -i 's|with_gpio="[^"]*"|with_gpio="no"|g' configure.ac %endif @@ -170,7 +171,7 @@ export LDFLAGS="-Wl,-z,now" --without-powerman \ %endif --with-libltdl \ -%if (0%{?fedora} && 0%{?fedora} < 33) || 0%{?el8} +%if 0%{?el8} --with-nss \ %endif --without-wrap \ @@ -187,7 +188,7 @@ export LDFLAGS="-Wl,-z,now" --sysconfdir=%{_sysconfdir}/ups \ --with-cgipath=%{cgidir} \ --with-drvpath=%{modeldir} \ -%if 0%{?fedora} > 38 +%if 0%{?fedora} --without-gpio \ %endif --with-systemdsystemunitdir=%{_unitdir} \ @@ -250,16 +251,20 @@ mv %{buildroot}%{_mandir}/man8/rhino.8 %{buildroot}%{_mandir}/man8/nutdrv_rhino. # install PyNUT install -p -D -m 644 scripts/python/module/PyNUT.py %{buildroot}%{python3_sitelib}/PyNUT.py -# install nut-monitor -%if %{with python2} -mkdir -p %{buildroot}%{_datadir}/nut/nut-monitor/pixmaps -install -p -m 755 scripts/python/app/NUT-Monitor %{buildroot}%{_datadir}/nut/nut-monitor/nut-monitor -install -p -m 644 scripts/python/app/gui-1.3.glade %{buildroot}%{_datadir}/nut/nut-monitor -install -p -m 644 scripts/python/app/pixmaps/* %{buildroot}%{_datadir}/nut/nut-monitor/pixmaps/ -install -p -D scripts/python/app/nut-monitor.png %{buildroot}%{_datadir}/pixmaps/nut-monitor.png -desktop-file-install --dir=%{buildroot}%{_datadir}/applications scripts/python/app/nut-monitor.desktop -ln -s %{_datadir}/nut/nut-monitor/nut-monitor %{buildroot}%{_bindir}/nut-monitor -%endif +# add lowercase name +ln %{buildroot}%{_bindir}/{NUT-Monitor,nut-monitor} +# install desktop file +mkdir -p %{buildroot}%{_datadir}/applications +desktop-file-install \ + --dir=%{buildroot}%{_datadir}/applications \ + %{buildroot}%{_datadir}/nut-monitor/app/nut-monitor.desktop +# install icons +for res in 256x256 48x48 64x64 scalable +do + mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${res}/apps + ln %{buildroot}%{_datadir}/nut-monitor/app/icons/${res}/nut-monitor.* \ + %{buildroot}%{_datadir}/icons/hicolor/${res}/apps/ +done # Setup permissions for pid file touch %{buildroot}/%{piddir}/upsmon.pid @@ -315,7 +320,9 @@ fi %config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upsd.users %attr(644,root,root) %{_usr}/lib/udev/rules.d/62-nut-usbups.rules %attr(644,root,root) %{_usr}/lib/udev/rules.d/62-nut-ipmipsu.rules -%{modeldir}/* +%{modeldir}/ +# dummy-ups requires libupsclient +%exclude %{modeldir}/dummy-ups %exclude %{modeldir}/netxml-ups %{_unitdir}/nut-driver-enumerator.path %{_unitdir}/nut-driver-enumerator.service @@ -333,6 +340,8 @@ fi %{_sbindir}/upsd %{_bindir}/nutconf %{_bindir}/nut-scanner +%{_sbindir}/upsdrvctl +%{_sbindir}/upsdrvsvcctl %{_libdir}/libnutscan.so.* %{_libdir}/libnutconf.so.* %{_libexecdir}/nut-driver-enumerator.sh @@ -453,6 +462,8 @@ fi %{_sbindir}/upsmon %{_sbindir}/upssched %{_bindir}/upssched-cmd +# dummy-ups requires libupsclient +%{modeldir}/dummy-ups %{_unitdir}/nut-monitor.service # nut-monitor.service also needs nut.target %{_unitdir}/nut.target @@ -470,15 +481,19 @@ fi %{_mandir}/man8/upsrw.8.gz %{_mandir}/man8/upsmon.8.gz %{_mandir}/man8/upssched.8.gz +%{_datadir}/nut +%{_sysusersdir}/nut.conf + +%files monitor +%{_bindir}/nut-monitor +%{_bindir}/NUT-Monitor +%{_datadir}/applications/nut-monitor.desktop +%{_datadir}/icons/hicolor/*/apps/nut-monitor.png +%{_datadir}/icons/hicolor/scalable/apps/nut-monitor.svg +%{_datadir}/nut-monitor/ +%{_mandir}/man8/NUT-Monitor*.8.gz %pycached %{python3_sitelib}/PyNUT.py %pycached %{python3_sitelib}/test_nutclient.py -%{_datadir}/nut -%if %{with python2} -%{_bindir}/nut-monitor -%{_datadir}/pixmaps/nut-monitor.png -%{_datadir}/applications/nut-monitor.desktop -%endif -%{_sysusersdir}/nut.conf %files cgi %config(noreplace) %attr(644,root,root) %{_sysconfdir}/ups/hosts.conf @@ -515,6 +530,11 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Tue Sep 30 2025 Michal Hlavinka - 2.8.4-4 +- based on PR#18 by Orion Poplawski +- Build NUT-Monitor and ship in separate nut-monitor package (rhbz#2359149) +- Move UPS drivers into /usr/libexec/nut + * Fri Sep 19 2025 Python Maint - 2.8.4-3 - Rebuilt for Python 3.14.0rc3 bytecode From 98284f631bc0248fc780cc86b979cf8470d4d83c Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 5 Dec 2025 18:34:11 -0700 Subject: [PATCH 25/25] Add missing || : to preinstall scriptlet (rhbz#241964) --- nut.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nut.spec b/nut.spec index aecfb12..dba51af 100644 --- a/nut.spec +++ b/nut.spec @@ -13,7 +13,7 @@ Summary: Network UPS Tools Name: nut Version: 2.8.4 -Release: 4%{?dist} +Release: 5%{?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 @@ -277,8 +277,8 @@ install -m0644 -D nut.sysusers.conf %{buildroot}%{_sysusersdir}/nut.conf # phase 1: stop upsmon before upsd changes if [ "$1" = "2" ]; then rm -f %restart_flag - /bin/systemctl is-active nut-monitor.service >/dev/null 2>&1 && touch %restart_flag ||: - /bin/systemctl stop nut-monitor.service >/dev/null 2>&1 + /bin/systemctl is-active nut-monitor.service >/dev/null 2>&1 && touch %restart_flag || : + /bin/systemctl stop nut-monitor.service >/dev/null 2>&1 || : fi @@ -530,6 +530,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Sat Dec 06 2025 Orion Poplawski - 2.8.4-5 +- Add missing || : to preinstall scriptlet (rhbz#2419644) + * Tue Sep 30 2025 Michal Hlavinka - 2.8.4-4 - based on PR#18 by Orion Poplawski - Build NUT-Monitor and ship in separate nut-monitor package (rhbz#2359149)