Compare commits

..

131 commits

Author SHA1 Message Date
Orion Poplawski
98284f631b Add missing || : to preinstall scriptlet (rhbz#241964) 2025-12-05 18:34:11 -07:00
Michal Hlavinka
77706a32be 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
2025-09-30 12:11:02 +02:00
Python Maint
069b76a3a8 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 12:33:37 +02:00
Python Maint
7164fc2d6d Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 13:02:57 +02:00
Michal Hlavinka
4870df85c6 updated to 2.8.4 (#2387244) 2025-08-14 12:13:59 +02:00
Fedora Release Engineering
cc9daebf1e Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 23:02:13 +00:00
Python Maint
38f34fb51d Rebuilt for Python 3.14 2025-06-02 19:58:22 +02:00
Michal Hlavinka
1f502ae93a rename rhino to nutdrv_rhino to prevent file conflict (rhbz#2367057) 2025-05-21 13:43:14 +02:00
Michal Hlavinka
9867e18241 add needed buildrequire jq 2025-04-29 17:37:37 +02:00
Michal Hlavinka
760ad72a05 updated to 2.8.3 (#2352734) 2025-04-29 16:46:04 +02:00
Zbigniew Jędrzejewski-Szmek
91e5a19370 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.
2025-02-11 16:33:00 +01:00
Michal Hlavinka
ce21c14155 add back git snapshot part of release number 2025-01-31 21:00:34 +01:00
Michal Hlavinka
7d3c0ad65d 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
2025-01-29 00:09:31 +01:00
Fedora Release Engineering
b278271309 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-17 20:31:55 +00:00
Orion Poplawski
3cb725a9a6 Add BR systemd-devel to enable systemd notification support 2024-11-15 16:08:05 -07:00
Fedora Release Engineering
02a191e840 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 19:52:32 +00:00
Michal Hlavinka
810e8f234e fix python FTBFS, uses git snapshot as of 20240703 with PR 2505 2024-07-03 12:59:09 +02:00
Python Maint
59f9744317 Rebuilt for Python 3.13 2024-06-07 08:33:13 +02:00
Michal Hlavinka
ada5bd73a7 updated to 2.8.2(2272586) 2024-04-03 11:56:12 +02:00
Fedora Release Engineering
17e960e140 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 09:32:03 +00:00
Fedora Release Engineering
03a2bff29b Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 10:02:08 +00:00
Michal Hlavinka
9b811d0688 fix gpio check conditions 2023-12-06 12:29:26 +01:00
Orion Poplawski
0089d11277 Re-add nut.target to nut-client (bz#2156504) 2023-11-30 11:52:01 -07:00
Michal Hlavinka
f74346c47d libgpiod v2 is not compatible, disable for now 2023-11-02 11:55:02 +01:00
Michal Hlavinka
182c96a020 updated to 2.8.1(2247337) 2023-11-01 22:31:34 +01:00
Michal Hlavinka
f9d1f583d7 spec cleanup, based on PR#14 by Orion Poplawski 2023-10-10 00:11:39 +02:00
Fedora Release Engineering
2572132723 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 17:01:05 +00:00
Orion Poplawski
d4f6d893fc Drop BR on /usr/bin/pathfix.py 2023-06-14 20:56:01 -06:00
Python Maint
ea13be436a Rebuilt for Python 3.12 2023-06-13 20:23:11 +02:00
Michal Hlavinka
d7132ee907 use new patch macro format, with epel compatibility 2023-05-03 12:26:49 +02:00
Michal Hlavinka
64fdb72282 update license tag format (SPDX migration) for https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_1 2023-04-26 10:57:21 +02:00
Michal Hlavinka
dc7efebac0 add nut-xml to nut recommends (#2151810) 2023-02-14 22:19:17 +01:00
Fedora Release Engineering
aad68762c3 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 21:54:34 +00:00
Michal Hlavinka
8debbe8226 move upslog to nut-client, some small spec file changes (#2156504) 2023-01-04 13:12:09 +01:00
Michal Hlavinka
4daa893965 use https for urls 2022-12-06 22:31:17 +01:00
Charles R. Anderson
0a29e563e3 Fix STATEPATH/PIDPATH/ALTPIDPATH directory creation and ownership
use piddir for specifying restart_flag location
use piddir for specifying configure --with-statepath/pidpath/altpidpath
add nut-2.8.0-piddir-owner.patch for upstream tmpfiles config creation to not append /nut and always use owner root
update nut-2.6.3-tmpfiles.patch to use correct tmpfiles config file name
remove unused downstream tmpfiles source and code
2022-12-03 12:24:08 -05:00
Florian Weimer
6db1d50203 Port configure script to C99
Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2022-11-27 22:18:05 +01:00
Michal Hlavinka
670632e3fd update pid path 2022-08-31 12:36:18 +02:00
Fedora Release Engineering
c1478deaf5 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 00:57:20 +00:00
Python Maint
8f6b572231 Rebuilt for Python 3.11 2022-06-13 14:51:42 +02:00
Michal Hlavinka
a136d9db58 drop unused solaris init script pulling unnecessary dependency 2022-06-07 16:14:41 +02:00
Michal Hlavinka
f68641b430 add missing BR 2022-06-07 11:50:21 +02:00
Michal Hlavinka
1e27db6337 change libusb reguirement to libusb1 2022-06-07 10:09:17 +02:00
Michal Hlavinka
4868536690 updated to 2.8.0 2022-06-06 22:39:25 +02:00
Fedora Release Engineering
5c64b71173 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 21:31:57 +00:00
Miro Hrončok
d08ed319dd Don't own /usr/lib/python3.X/site-packages 2021-09-23 13:31:07 +02:00
Sahana Prasad
cdbcbed29f Rebuilt with OpenSSL 3.0.0 2021-09-14 19:09:20 +02:00
Fedora Release Engineering
99495edf47 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 16:26:14 +00:00
Michal Hlavinka
c8d877dae3 drop snmp-ups support for DES, as required net-snmp no longer supports it 2021-06-08 14:08:15 +02:00
Python Maint
4db73a7664 Rebuilt for Python 3.10 2021-06-04 20:13:20 +02:00
Zbigniew Jędrzejewski-Szmek
4fe949d473 Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
2021-03-02 16:13:17 +01:00
Fedora Release Engineering
b05fc4a3e4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 21:47:42 +00:00
Tom Stellard
d6f674e2d5 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-07 06:05:39 +00:00
Jeff Law
82e198976e Force C++14 as this code is not C++17 ready 2020-09-15 14:11:00 -06:00
Josef Řídký
e056aaaff8 Resolves: #1865077 - FTBFS in Fedora 33 2020-09-02 10:28:01 +02:00
Fedora Release Engineering
7c2f27590b - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-08-01 06:34:34 +00:00
Fedora Release Engineering
beee923bc5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 11:59:39 +00:00
Jeff Law
d0c4065968 Revert "- Do not link nut_scanner against libcommon."
This reverts commit 24127d18ec.
2020-07-22 00:21:05 -06:00
Jeff Law
24127d18ec - Do not link nut_scanner against libcommon. 2020-07-21 23:59:27 -06:00
Michal Hlavinka
be87309685 nut user needs tty group for wall (#1774591) 2020-06-02 20:09:33 +02:00
Michal Hlavinka
c06083e691 update tmpfiles nut run directory 2020-06-02 19:57:29 +02:00
Orion Poplawski
457d12308e Drop old udev requires/scriptlet 2020-05-26 20:46:54 -06:00
Orion Poplawski
625fa20c1a Add upstream patch for OpenSSL 1.1.0 support, enable for Fedora >= 33 2020-05-26 20:44:46 -06:00
Miro Hrončok
19a1c7c163 Rebuilt for Python 3.9 2020-05-26 02:54:31 +02:00
Fedora Release Engineering
102a89ce81 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 19:21:07 +00:00
Michal Hlavinka
2ef3bf834e drop pygtk2 requirements 2019-10-04 09:45:54 +02:00
Michal Hlavinka
cedf9ce549 drop python 2 requirements including nut-monitor app 2019-10-03 16:17:01 +02:00
Fedora Release Engineering
6d6c4240b6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 22:41:08 +00:00
Michal Hlavinka
e7cad98650 add missing requirements for nut monitor
fix file descriptor leak for notifycmd
2019-03-25 23:41:39 +01:00
Michal Hlavinka
6eddf6d649 add misssing requires for nut-monitor 2019-03-25 22:47:31 +01:00
Fedora Release Engineering
128086ff93 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 16:38:42 +00:00
Orion Poplawski
42985ff562 Cleanup and modernize spec
Fix ownership/permissions of /var/run/nut (bug #1584330, #1580082)
Fix python shbangs
2018-10-16 11:55:26 -06:00
Peter Robinson
b48267cde3 Updates dependencies, modernise spec, use %%license, Python build fixes 2018-10-16 15:33:01 +01:00
Igor Gnatenko
d7d9d2abad
%{python_sitelib} → %{python2_sitelib}
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-07-29 23:12:05 +02:00
Adam Williamson
51d7394f5a Rebuild for new net-snmp 2018-07-24 14:53:51 -07:00
Igor Gnatenko
4364ace568 add BuildRequires: gcc-c++
Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
2018-07-19 20:56:44 +02:00
Fedora Release Engineering
12a28d2b1f - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 14:34:46 +00:00
Jason Tibbitts
d745e84a4b Remove needless use of %defattr 2018-07-10 02:12:51 -05:00
Xavier Bachelot
691b15bd51 Add changelog entry 2018-04-17 12:35:57 +02:00
Xavier Bachelot
397e5c41fe Add BR: cppunit-devel 2018-04-17 12:35:53 +02:00
Xavier Bachelot
41b09c38c8 Remove unneeded CRLF EOL fix 2018-04-17 12:35:49 +02:00
Xavier Bachelot
b62a6d2d82 Explicitely disable tcpwrapper support 2018-04-17 12:35:44 +02:00
Xavier Bachelot
69892ba5b7 Remove unrecognized configure option --without-hal 2018-04-17 12:35:36 +02:00
Michal Hlavinka
1281c745ae add gcc buildrequire 2018-03-07 16:40:19 +01:00
Iryna Shcherbina
51d283e2d5 Update Python 2 dependency declarations to new packaging standards 2018-02-14 17:17:24 +01:00
Igor Gnatenko
5deb951b81
Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-14 07:23:25 +01:00
Fedora Release Engineering
f4583adfb4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-08 08:34:22 +00:00
Igor Gnatenko
494b207577 Remove old crufty coreutils requires
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-11-07 16:33:21 +01:00
Michal Hlavinka
6f70070a28 rebuild for freeipmi update 2017-08-30 12:05:31 +02:00
Fedora Release Engineering
2cfc729677 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 04:10:12 +00:00
Fedora Release Engineering
af0741e201 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 01:21:34 +00:00
Michal Hlavinka
00c608028f enable nss crypto (#1463071) 2017-06-22 12:11:35 +02:00
Michal Hlavinka
076835845e update following patch 2017-05-24 13:46:12 +02:00
Michal Hlavinka
ecd6fdf42b fix location of tmpfiles.d in service files (#1399602) 2017-05-24 13:30:31 +02:00
Fedora Release Engineering
89398326b0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 00:24:14 +00:00
Sandro Mani
2de1898467 Rebuild (libwebp) 2017-02-01 19:26:19 +01:00
Michal Hlavinka
274d5184cc use %_tmpfilesdir macro (#1394009) 2016-11-11 17:06:13 +01:00
Till Maas
5b55cc8deb Remove unused patches 2016-09-15 21:47:08 +02:00
Till Maas
f5e8b59a7a Disable powerman support, powerman was retired on Fedora 2016-09-15 21:46:26 +02:00
Michal Hlavinka
43c04986c9 make sure tmpfiles creation is executped before ups driver (#1365904,#1349362) 2016-08-11 18:02:32 +02:00
Fedora Release Engineering
91e73784db - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages 2016-07-19 08:04:37 +00:00
Michal Hlavinka
32c24a124f nut updated to 2.7.4 2016-03-12 00:30:27 +01:00
Fedora Release Engineering
61c166bea2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-04 10:59:55 +00:00
Kalev Lember
75aa58ef26 Rebuilt for libfreeipmi soname bump 2015-12-05 13:53:26 +01:00
Tom Callaway
d3ed363b62 rebuild for libvpx 1.5.0 2015-12-01 16:25:54 -05:00
Dennis Gilmore
3cf2ea1483 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-17 23:27:24 +00:00
Kalev Lember
b83609e44a Rebuilt for GCC 5 C++11 ABI change 2015-05-03 00:03:28 +02:00
Michal Hlavinka
91dcbb61f1 start nut driver before the daemon 2015-04-28 10:00:45 +02:00
Michal Hlavinka
8d6ef40a5f nut updated to 2.7.3 2015-04-23 17:42:32 +02:00
Tom Callaway
6810be8ca8 disable hardened build 2015-04-07 15:46:15 -04:00
Tom Callaway
64cdce1a9e fPIC 2015-04-07 15:38:01 -04:00
Tom Callaway
aae62efcb7 debug 2015-04-07 15:29:27 -04:00
Tom Callaway
3b235a326d debug 2015-04-07 15:25:30 -04:00
Tom Callaway
bb77561444 revert 2015-04-07 15:16:23 -04:00
Tom Callaway
9b89e67466 fix BR 2015-04-07 15:06:47 -04:00
Tom Callaway
223a546742 fix changelog date 2015-04-07 14:58:22 -04:00
Tom Callaway
9314b026f0 rebuild for libvpx 1.4.0 2015-04-06 16:24:33 -04:00
Michal Hlavinka
4dc3498017 spec cleanup 2014-10-16 15:54:44 +02:00
Michal Hlavinka
4a8e9a8d14 spec cleanup 2014-10-15 13:34:08 +02:00
Peter Robinson
8471d1bdb1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-17 12:31:23 +00:00
Dennis Gilmore
0435df0031 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 10:18:03 -05:00
Michal Hlavinka
153ff17ed8 nut updated to 2.7.2 2014-04-22 15:50:06 +02:00
Michal Hlavinka
f6becc5e50 fix multilib issue (#831429) 2014-04-17 08:53:45 +02:00
Michal Hlavinka
ef206e9d2f fix path of nut-driver executable (#1072076)
- fix location of udev rules
2014-03-06 15:51:32 +01:00
Michal Hlavinka
d6655ef281 fix undefined references in libupsclient (#1071919) 2014-03-06 15:01:57 +01:00
Michal Hlavinka
0b850eb3a8 nut updated to 2.7.1 2014-02-27 15:26:42 +01:00
Michal Hlavinka
2ff1cacec5 rebuilt with updated freeipmi (1.3.2) 2013-09-24 12:27:56 +02:00
Michal Hlavinka
40260657ac rebuilt with updated freeipmi 2013-09-03 18:17:00 +02:00
Dennis Gilmore
ac90527835 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-03 09:36:59 -05:00
Remi Collet
1af2bd06c3 rebuild for new GD 2.1.0 2013-06-11 11:35:09 +02:00
Michal Hlavinka
c54a93dcc0 do not let upsmon run during update (#916472)
- make binaries hardened (#955157)
2013-04-22 17:20:14 +02:00
13 changed files with 535 additions and 489 deletions

6
.gitignore vendored
View file

@ -7,5 +7,11 @@ nut-2.4.3.tar.gz
/nut-2.6.5.tar.gz
/nut-2.7.1.tar.gz
/nut-2.7.2.tar.gz
/nut-2.7.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
/nut-2.8.2.1.tar.gz
/nut-2.8.3.tar.gz
/nut-2.8.4.tar.gz

View file

@ -28,5 +28,5 @@ do
echo "#define $( echo "$l" | tr '[a-z]-' '[A-Z]_')_PATH \"$rp\""
done
VINFO=$(sed -e '/version-info/!d' -e 's/#.*$//' -e 's/^.*-version-info//' -e 's/[[:space:]]//g' clients/Makefile)
VINFO=$(sed -e '/version-info/!d' -e 's/#.*$//' -e 's/^.*-version-info//' -e 's/[[:space:]]//g' -e 's/\\//g' clients/Makefile)
echo "#define LIBUPSCLIENT_PATH \"libupsclient.so.$(( ${VINFO%%:*}-${VINFO##*:} ))\""

View file

@ -1,18 +1,18 @@
diff -up nut-2.8.0/clients/upsmon.c.rmpidf nut-2.8.0/clients/upsmon.c
--- nut-2.8.0/clients/upsmon.c.rmpidf 2022-04-23 13:56:06.000000000 +0200
+++ nut-2.8.0/clients/upsmon.c 2022-05-09 17:22:34.329547283 +0200
@@ -2314,6 +2314,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.0/common/common.c.rmpidf nut-2.8.0/common/common.c
--- nut-2.8.0/common/common.c.rmpidf 2022-05-09 17:22:34.329547283 +0200
+++ nut-2.8.0/common/common.c 2022-05-09 17:26:48.671847245 +0200
@@ -358,6 +358,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.0/common/common.c.rmpidf nut-2.8.0/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.0/include/common.h.rmpidf nut-2.8.0/include/common.h
--- nut-2.8.0/include/common.h.rmpidf 2022-05-09 17:22:34.329547283 +0200
+++ nut-2.8.0/include/common.h 2022-05-09 17:25:47.439740973 +0200
@@ -103,6 +103,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 - <name> is a full pathname *or* just the program name */
void writepid(const char *name);
@ -46,14 +46,13 @@ diff -up nut-2.8.0/include/common.h.rmpidf nut-2.8.0/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.0/server/upsd.c.rmpidf nut-2.8.0/server/upsd.c
--- nut-2.8.0/server/upsd.c.rmpidf 2022-04-23 13:56:07.000000000 +0200
+++ nut-2.8.0/server/upsd.c 2022-05-09 17:22:34.330547269 +0200
@@ -1515,6 +1515,7 @@ int main(int argc, char **argv)
ssl_cleanup();
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);
upslogx(LOG_INFO, "Signal %d: exiting", exit_flag);
ssl_cleanup();
+ if (*pidfn) cleanpid(pidfn);
return EXIT_SUCCESS;
}

View file

@ -1,40 +0,0 @@
diff -up nut-2.8.0/scripts/python/app/NUT-Monitor-py3qt5.in.unreachable nut-2.8.0/scripts/python/app/NUT-Monitor-py3qt5.in
--- nut-2.8.0/scripts/python/app/NUT-Monitor-py3qt5.in.unreachable 2022-05-09 17:20:11.629621005 +0200
+++ nut-2.8.0/scripts/python/app/NUT-Monitor-py3qt5.in 2022-05-09 17:20:52.674024537 +0200
@@ -693,6 +693,11 @@ along with this program. If not, see <h
self.gui_status_notification( _("Device '%s' not found on server") % self.__current_ups, "warning.png" )
return
+ if not self.__ups_handler.CheckUPSAvailable( self.__current_ups ):
+ self.gui_status_message( _("UPS '{0}' is not reachable").format( self.__current_ups ) )
+ self.gui_status_notification( _("UPS '{0}' is not reachable").format( self.__current_ups ), "warning.png" )
+ return
+
self.__connected = True
self.__widgets["ups_connect"].hide()
self.__widgets["ups_disconnect"].show()
diff -up nut-2.8.0/scripts/python/module/PyNUT.py.in.unreachable nut-2.8.0/scripts/python/module/PyNUT.py.in
--- nut-2.8.0/scripts/python/module/PyNUT.py.in.unreachable 2022-05-09 17:20:32.100323526 +0200
+++ nut-2.8.0/scripts/python/module/PyNUT.py.in 2022-05-09 17:21:35.505402117 +0200
@@ -170,6 +170,21 @@ available vars.
return( ups_vars )
+ def CheckUPSAvailable( self, ups="") :
+ """ Check whether UPS is reachable
+
+Just tries to contact UPS with safe command.
+The result is True (rechable) or False (unreachable)
+ """
+ self.__srv_handler.write( "LIST CMD %s\n" % ups )
+ result = self.__srv_handler.read_until( "\n" )
+ if result != "BEGIN LIST CMD %s\n" % ups :
+ return False
+
+ self.__srv_handler.read_until( "END LIST CMD %s\n" % ups )
+ return True
+
+
def GetUPSCommands( self, ups="" ) :
""" Get all available commands for the specified UPS

View file

@ -1,48 +1,50 @@
diff -up nut-2.8.0/configure.ac.piddir-owner nut-2.8.0/configure.ac
--- nut-2.8.0/configure.ac.piddir-owner 2022-04-26 18:03:36.000000000 -0400
+++ nut-2.8.0/configure.ac 2022-11-30 13:29:58.418038393 -0500
@@ -2833,23 +2833,23 @@ AS_IF([test -n "$systemdtmpfilesdir"],
[mkdir -p "${TOP_BUILDDIR}"/scripts/systemd
cat > "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF
# State file (e.g. upsd to driver) and pidfile location for NUT:
-d @STATEPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
-X @STATEPATH@/nut
diff -up nut-2.8.1/configure.ac.piddir-owner nut-2.8.1/configure.ac
--- nut-2.8.1/configure.ac.piddir-owner 2023-11-01 09:39:24.267596406 +0100
+++ nut-2.8.1/configure.ac 2023-11-01 10:00:35.425987029 +0100
@@ -4451,7 +4451,7 @@ AS_IF([test -n "$systemdtmpfilesdir"],
# See also: https://github.com/networkupstools/nut/wiki/Technicalities:-Work-with-PID-and-state-file-paths#pidpath-altpidpath-statepath
# State file (e.g. upsd to driver pipes) and PID file location for NUT:
-d @STATEPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
+d @STATEPATH@ 0770 root @RUN_AS_GROUP@ - -
+X @STATEPATH@
EOF
AS_IF([test "$STATEPATH" != "$PIDPATH"],
[cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF
-d @PIDPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
-X @PIDPATH@/nut
# Default PIPEFN and LOCKFN locations per upssched.conf:
d @STATEPATH@/upssched 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
X @STATEPATH@
@@ -4461,7 +4461,7 @@ EOF
[*/run|*/tmp|*/shm], [], dnl Do not intrude into system paths; TODO: add more if appropriate for some Linux distro
[cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common-tmpfiles.conf.in << EOF
# Primarily used by upsmon and upslog, possibly running as root:
-d @PIDPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
+d @PIDPATH@ 0770 root @RUN_AS_GROUP@ - -
+X @PIDPATH@
EOF])
AS_IF([test -n "$ALTPIDPATH" && test "$STATEPATH" != "$ALTPIDPATH" && test "$PIDPATH" != "$ALTPIDPATH"],
[cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF
-d @ALTPIDPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
-X @ALTPIDPATH@/nut
X @PIDPATH@
EOF
])])
@@ -4469,14 +4469,14 @@ EOF
[cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common-tmpfiles.conf.in << EOF
# Should be used as upsd and driver PID file location for NUT
# (if ALTPIDPATH differs from STATEPATH):
-d @ALTPIDPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
+d @ALTPIDPATH@ 0770 root @RUN_AS_GROUP@ - -
+X @ALTPIDPATH@
X @ALTPIDPATH@
EOF])
dnl Generally added to support some forks
AS_IF([test -n "$ALTSTATEPATH" && test "$STATEPATH" != "$ALTSTATEPATH" && test "$ALTSTATEPATH" != "$ALTPIDPATH" && test "$PIDPATH" != "$ALTSTATEPATH"],
[cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF
-d @ALTSTATEPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
-X @ALTSTATEPATH@/nut
[cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common-tmpfiles.conf.in << EOF
# Some NUT variants also maintain an ALTSTATEPATH:
-d @ALTSTATEPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
+d @ALTSTATEPATH@ 0770 root @RUN_AS_GROUP@ - -
+X @ALTSTATEPATH@
X @ALTSTATEPATH@
EOF])
])
AC_MSG_RESULT([done])
diff -up nut-2.8.0/scripts/systemd/nut-common.tmpfiles.in.piddir-owner nut-2.8.0/scripts/systemd/nut-common.tmpfiles.in
--- nut-2.8.0/scripts/systemd/nut-common.tmpfiles.in.piddir-owner 2022-04-26 18:06:27.000000000 -0400
+++ nut-2.8.0/scripts/systemd/nut-common.tmpfiles.in 2022-11-30 13:30:11.651106256 -0500
@@ -1,5 +1,5 @@
# State file (e.g. upsd to driver) and pidfile location for NUT:
-d @STATEPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
-X @STATEPATH@/nut
-d @PIDPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
-X @PIDPATH@/nut
diff -up nut-2.8.1/scripts/systemd/nut-common-tmpfiles.conf.in.piddir-owner nut-2.8.1/scripts/systemd/nut-common-tmpfiles.conf.in
--- nut-2.8.1/scripts/systemd/nut-common-tmpfiles.conf.in.piddir-owner 2023-10-31 23:05:03.000000000 +0100
+++ nut-2.8.1/scripts/systemd/nut-common-tmpfiles.conf.in 2023-11-01 10:03:46.970845553 +0100
@@ -5,7 +5,7 @@
# See also: https://github.com/networkupstools/nut/wiki/Technicalities:-Work-with-PID-and-state-file-paths#pidpath-altpidpath-statepath
# State file (e.g. upsd to driver pipes) and PID file location for NUT:
-d @STATEPATH@ 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
+d @STATEPATH@ 0770 root @RUN_AS_GROUP@ - -
+X @STATEPATH@
+d @PIDPATH@ 0770 root @RUN_AS_GROUP@ - -
+X @PIDPATH@
# Default PIPEFN and LOCKFN locations per upssched.conf:
d @STATEPATH@/upssched 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - -
X @STATEPATH@

23
nut-2.8.3-rhinoname.patch Normal file
View file

@ -0,0 +1,23 @@
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 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 ve-direct
if HAVE_LINUX_SERIAL_H
@@ -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
+nutdrv_rhino_LDADD = $(LDADD) -lm
safenet_SOURCES = safenet.c
nutdrv_siemens_sitop_SOURCES = nutdrv_siemens_sitop.c
solis_SOURCES = solis.c

View file

@ -1,60 +0,0 @@
Fix several issues with the AX_C_PRINTF_STRING_NULL check:
Adjust quoting in the AX_C_PRINTF_STRING_NULL definition. Switch to
strstr from strcasestr (a GNU extension, requires -D_GNU_SOURCE)
and include <string.h> instead of <strings.h>. Add missing braces
and parentheses. Use double-quote for string literals.
Submitted upstream: <https://github.com/networkupstools/nut/pull/1720>
diff --git a/m4/ax_c_pragmas.m4 b/m4/ax_c_pragmas.m4
index 53c1aebf8ea35a1e..14ecd596d3b36573 100644
--- a/m4/ax_c_pragmas.m4
+++ b/m4/ax_c_pragmas.m4
@@ -943,32 +943,32 @@ if test -z "${nut_have_ax_c_printf_string_null_seen}"; then
dnl ### To be sure, bolt the language
AC_LANG_PUSH([C])
- AC_CACHE_CHECK([for practical support to pritnf("%s", NULL)],
+ AC_CACHE_CHECK([for practical support to printf("%s", NULL)],
[ax_cv__printf_string_null],
[AX_RUN_OR_LINK_IFELSE(
[AC_LANG_PROGRAM([dnl
#include <stdio.h>
-#include <strings.h>
-], [dnl
+#include <string.h>
+], [[
char buf[128];
char *s = NULL;
int res = snprintf(buf, sizeof(buf), "%s", s);
buf[sizeof(buf)-1] = '\0';
if (res < 0) {
- printf(stderr, "FAILED to snprintf() a NULL string argument");
- exit 1;
+ fprintf(stderr, "FAILED to snprintf() a NULL string argument\n");
+ return 1;
}
-if (buf[0] == '\0')
- printf(stderr, "RETURNED empty string from snprintf() with a NULL string argument");
- exit 0;
+if (buf[0] == '\0') {
+ fprintf(stderr, "RETURNED empty string from snprintf() with a NULL string argument\n");
+ return 0;
}
-if (strcasestr(buf, 'null') == NULL)
- printf(stderr, "RETURNED some string from snprintf() with a NULL string argument: '%s'", buf);
- exit 0;
+if (strstr(buf, "null") == NULL) {
+ fprintf(stderr, "RETURNED some string from snprintf() with a NULL string argument: '%s'\n", buf);
+ return 0;
}
-printf(stderr, "SUCCESS: RETURNED a string that contains something like 'null' from snprintf() with a NULL string argument: '%s'", buf);
-exit 0;
- ])],
+fprintf(stderr, "SUCCESS: RETURNED a string that contains something like 'null' from snprintf() with a NULL string argument: '%s'\n", buf);
+return 0;
+ ]])],
[ax_cv__printf_string_null=yes],
[ax_cv__printf_string_null=no]
)]

View file

@ -1,17 +0,0 @@
Call the defined foo function instead of the undeclared func function.
Submitted upstream: <https://github.com/networkupstools/nut/pull/1720>
diff --git a/m4/ax_c___attribute__.m4 b/m4/ax_c___attribute__.m4
index 0e952e7841c35b60..780bc2bb14ac5a78 100644
--- a/m4/ax_c___attribute__.m4
+++ b/m4/ax_c___attribute__.m4
@@ -67,7 +67,7 @@ AC_DEFUN([AX_C___ATTRIBUTE__], [
foo(__attribute__ ((unused)) int i) {
return;
}
- ]], [func(1);])],
+ ]], [foo(1);])],
[ax_cv___attribute__unused_arg=yes],
[ax_cv___attribute__unused_arg=no]
)

View file

@ -1 +0,0 @@
D /run/nut 0750 nut nut -

597
nut.spec
View file

@ -1,6 +1,4 @@
%global _hardened_build 1
#global with_python2 0
%bcond_with python2
#TODO: split nut-client so it does not require python
%global nut_uid 57
@ -8,34 +6,33 @@
%global cgidir /var/www/nut-cgi-bin
%global piddir /run/nut
%global modeldir /usr/sbin
%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.0
Release: 2%{?dist}
License: GPLv2+ and GPLv3+
Version: 2.8.4
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
Source4: libs.sh
Patch1: nut-2.6.3-tmpfiles.patch
Patch2: nut-2.8.0-piddir-owner.patch
#quick fix. TODO: fix it properly
Patch8: nut-2.6.5-unreachable.patch
Patch9: nut-2.6.5-rmpidf.patch
Patch13: nut-c99-c_attribute.patch
Patch14: nut-c99-ax_c_printf_null.patch
Patch15: nut-c99-strdup.patch
Patch16: nut-2.8.3-rhinoname.patch
Requires(pre): shadow-utils
Requires(post): coreutils systemd
Requires(preun): systemd
Requires(postun): coreutils systemd
Obsoletes: nut-hal < 2.6.0-7
Recommends: nut-xml
Requires: group(dialout)
Requires: group(tty)
BuildRequires: asciidoc
BuildRequires: make
BuildRequires: autoconf
BuildRequires: automake
@ -51,12 +48,18 @@ BuildRequires: freetype-devel
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gd-devel
BuildRequires: jq
%if 0%{?fedora} < 39
BuildRequires: libgpiod-devel
%endif
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtool
BuildRequires: libtool-ltdl-devel
BuildRequires: libX11-devel
BuildRequires: libXpm-devel
BuildRequires: libmodbus-devel
BuildRequires: libi2c-devel
BuildRequires: neon-devel
BuildRequires: net-snmp-devel
BuildRequires: netpbm-devel
@ -68,11 +71,11 @@ BuildRequires: powerman-devel
%endif
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: /usr/bin/pathfix.py
#BuildRequires: systemd-rpm-macros
BuildRequires: systemd-devel
BuildRequires: systemd-rpm-macros
%ifnarch s390 s390x
BuildRequires: libusb-devel
BuildRequires: libusb1-devel
%endif
ExcludeArch: s390 s390x
@ -80,22 +83,18 @@ ExcludeArch: s390 s390x
%global restart_flag %{piddir}/%{name}-restart-after-rpm-install
%description
These programs are part of a developing project to monitor the assortment
of UPSes that are found out there in the field. Many models have serial
These programs are part of a developing project to monitor the assortment
of UPSes that are found out there in the field. Many models have serial
ports of some kind that allow some form of state checking. This
capability has been harnessed where possible to allow for safe shutdowns,
capability has been harnessed where possible to allow for safe shutdowns,
live status tracking on web pages, and more.
%package client
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,12 +104,19 @@ 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
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}
@ -129,25 +135,34 @@ necessary to develop NUT client applications.
%prep
%setup -q
%patch1 -p1 -b .tmpfiles
%patch2 -p1 -b .piddir-owner
%patch8 -p1 -b .unreachable
%patch9 -p1 -b .rmpidf
%patch13 -p1
%patch14 -p1
%patch15 -p1
#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
sed -i 's|LIBSSL_LDFLAGS|LIBSSL_LIBS|' lib/libupsclient-config.in
sed -i 's|LIBSSL_LDFLAGS|LIBSSL_LIBS|' lib/libupsclient.pc.in
# workaround for multilib conflicts - caused by patch changing modification time of scripts
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 <<EOF
u nut %{nut_uid} 'Network UPS Tools' %{_localstatedir}/lib/ups /bin/false
m nut dialout
m nut tty
EOF
%build
%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
autoreconf -i
export CXXFLAGS="-std=c++11 $RPM_OPT_FLAGS"
export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS"
# prevent assignment of default value, it would break configure's tests
export LDFLAGS="-Wl,-z,now"
%configure \
@ -156,14 +171,14 @@ 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 \
--without-modbus \
--without-linux-i2c \
--with-cgi \
--with-python3 \
--with-python=%{python3} \
--with-python3=%{python3} \
--without-python2 \
--datadir=%{_datadir}/%{name} \
--with-user=%{name} \
--with-group=dialout \
@ -173,14 +188,19 @@ export LDFLAGS="-Wl,-z,now"
--sysconfdir=%{_sysconfdir}/ups \
--with-cgipath=%{cgidir} \
--with-drvpath=%{modeldir} \
%if 0%{?fedora}
--without-gpio \
%endif
--with-systemdsystemunitdir=%{_unitdir} \
--with-systemdshutdowndir=/lib/systemd/system-shutdown \
--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?
sh %{SOURCE4} >>include/config.h
#remove rpath
@ -198,7 +218,7 @@ mkdir -p %{buildroot}%{modeldir} \
%make_install
mv %{buildroot}%{_tmpfilesdir}/nut-common.tmpfiles %{buildroot}%{_tmpfilesdir}/nut-common.conf
#mv %{buildroot}%{_tmpfilesdir}/nut-common.tmpfiles %{buildroot}%{_tmpfilesdir}/nut-common.conf
rm -rf %{buildroot}%{_prefix}/html
rm -f %{buildroot}%{_libdir}/*.la
@ -206,7 +226,7 @@ rm -rf docs/man
rm -rf %{buildroot}%{_datadir}/nut/solaris-init
find docs/ -name 'Makefile*' -delete
pushd conf;
pushd conf;
%make_install
for file in %{buildroot}%{_sysconfdir}/ups/*.sample
do
@ -226,110 +246,125 @@ do
mv -f $fe.new $fe
done
# install PyNUT
# 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
%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
chmod 0644 %{buildroot}/%{piddir}/upsmon.pid
install -m0644 -D nut.sysusers.conf %{buildroot}%{_sysusersdir}/nut.conf
%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}
# do not let upsmon run during upgrade rhbz#916472
# 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
%post
/sbin/ldconfig
%systemd_post nut-driver.service nut-server.service
%systemd_post nut-driver-enumerator.path nut-driver-enumerator.service nut-driver.target nut-server.service nut.target
%preun
%systemd_preun nut-driver.service nut-server.service
%systemd_preun nut-driver-enumerator.path nut-driver-enumerator.service nut-driver.target nut-server.service nut.target
%postun
/sbin/ldconfig
%systemd_postun_with_restart nut-driver.service nut-server.service
%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
/sbin/ldconfig
%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
/sbin/ldconfig
%systemd_postun_with_restart nut-monitor.service
%posttrans
# phase 2: start upsmon again
if [ -e %restart_flag ]; then
/bin/systemctl restart nut-monitor.service >/dev/null 2>&1 || :
rm -f %restart_flag
if [ -e %restart_flag ]; then
/bin/systemctl restart nut-monitor.service >/dev/null 2>&1 || :
rm -f %restart_flag
else
# maybe we did not stop it - if we reinstalled just nut-client
/bin/systemctl try-restart nut-monitor.service >/dev/null 2>&1 || :
fi
/bin/systemctl try-restart nut-monitor.service >/dev/null 2>&1 || :
fi
%files
%license COPYING LICENSE-GPL2 LICENSE-GPL3
%doc ChangeLog AUTHORS MAINTAINERS README docs UPGRADING INSTALL NEWS
%config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/nut.conf
%doc ChangeLog AUTHORS MAINTAINERS README docs INSTALL NEWS
%config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/ups.conf
%config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upsd.conf
%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
%{_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
%{_presetdir}/nut-systemd.preset
%{_unitdir}/enphase-monitor@.service
%{_unitdir}/nut-logger.service
%{_unitdir}/nut-udev-settle.service
%{_sbindir}/upsd
%{_bindir}/nutconf
%{_bindir}/nut-scanner
%{_bindir}/upslog
%{_sbindir}/upsdrvctl
%{_sbindir}/upsdrvsvcctl
%{_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
%{_datadir}/%{name}/driver.list
%{_mandir}/man5/nut.conf.5.gz
%{_mandir}/man5/ups.conf.5.gz
%{_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
%{_mandir}/man8/al175.8.gz
%{_mandir}/man8/apcsmart.8.gz
%{_mandir}/man8/apcsmart-old.8.gz
%{_mandir}/man8/apcupsd-ups.8.gz
%{_mandir}/man8/asem.8.gz
%{_mandir}/man8/bcmxcp.8*
%{_mandir}/man8/bcmxcp_usb.8.gz
%{_mandir}/man8/belkin.8.gz
@ -338,26 +373,38 @@ 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
%{_mandir}/man8/clone-outlet.8.gz
%{_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
%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
%{_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_hashx.8.gz
%{_mandir}/man8/nutdrv_siemens_sitop.8.gz
%{_mandir}/man8/nut-driver-enumerator.8.gz
%{_mandir}/man8/nut-ipmipsu.8.gz
@ -366,65 +413,87 @@ fi
%{_mandir}/man8/nutdrv_qx.8.gz
%{_mandir}/man8/oneac.8.gz
%{_mandir}/man8/optiups.8.gz
%{_mandir}/man8/phoenixcontact_modbus.8.gz
%{_mandir}/man8/pijuice.8.gz
%{_mandir}/man8/powercom.8.gz
%if %{with powerman}
%{_mandir}/man8/powerman-pdu.8.gz
%endif
%{_mandir}/man8/powerpanel.8.gz
%{_mandir}/man8/rhino.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
%{_mandir}/man8/riello_usb.8.gz
%{_mandir}/man8/safenet.8.gz
%{_mandir}/man8/sms_ser.8.gz
%{_mandir}/man8/snmp-ups.8.gz
%{_mandir}/man8/solis.8*
%{_mandir}/man8/sockdebug.8.gz
%{_mandir}/man8/socomec_jbus.8.gz
%{_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/upslog.8.gz
%{_mandir}/man8/usbhid-ups.8.gz
%{_mandir}/man8/victronups.8.gz
%{_mandir}/man8/ve-direct.8.gz
%{_sysusersdir}/nut.conf
%files client
%license COPYING LICENSE-GPL2 LICENSE-GPL3
%dir %{_sysconfdir}/ups
%config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/nut.conf
%config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upsmon.conf
%config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upssched.conf
%{_tmpfilesdir}/nut-common.conf
%{_tmpfilesdir}/nut-common-tmpfiles.conf
%dir %attr(750,nut,nut) %{_localstatedir}/lib/ups
# upsmon.pid is written as root, so root needs access for now
%ghost %attr(770,root,nut) %{piddir}
%dir %attr(770,root,dialout) %{piddir}
%attr(644,nut,nut) %verify(not size mtime md5) /run/%{name}/upsmon.pid
%{_bindir}/upsc
%{_bindir}/upscmd
%{_bindir}/upslog
%{_bindir}/upsrw
%{_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
/lib/systemd/system-shutdown/nutshutdown
%{_libdir}/libupsclient.so.*
%{_libdir}/libnutclient.so.*
%{_libdir}/libnutclientstub.so.*
%{_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
%{_mandir}/man8/upsrw.8.gz
%{_mandir}/man8/upsmon.8.gz
%{_mandir}/man8/upssched.8.gz
#%%pycached %%{python3_sitelib}/PyNUT.py
# use glob list, as %%pycached does not work...
%{python3_sitelib}/*
%{_datadir}/nut
%if %{with python2}
%{_sysusersdir}/nut.conf
%files monitor
%{_bindir}/nut-monitor
%{_datadir}/pixmaps/nut-monitor.png
%{_bindir}/NUT-Monitor
%{_datadir}/applications/nut-monitor.desktop
%endif
%{_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
%files cgi
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/ups/hosts.conf
@ -452,39 +521,298 @@ 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 Dec 06 2022 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-2
- fix STATEPATH location and creation (#2024651)
- merged C99 related changes to configure from fedora
- trim changelog
* Sat Dec 06 2025 Orion Poplawski <orion@nwra.com> - 2.8.4-5
- Add missing || : to preinstall scriptlet (rhbz#2419644)
* Tue Sep 13 2022 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-1
- update to 2.8.0
* Tue Sep 30 2025 Michal Hlavinka <mhlavink@redhat.com> - 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
* Tue Jun 02 2020 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-3
- update nut run directories
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 2.8.4-3
- Rebuilt for Python 3.14.0rc3 bytecode
* Tue May 26 2020 Orion Poplawski <orion@nwra.com> - 2.7.4-2
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 2.8.4-2
- Rebuilt for Python 3.14.0rc2 bytecode
* Thu Aug 14 2025 Michal Hlavinka <mhlavink@redhat.com> - 2.8.4-1
- updated to 2.8.4 (#2387244)
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 2.8.3-3
- Rebuilt for Python 3.14
* Wed May 21 2025 Michal Hlavinka <mhlavink@redhat.com> - 2.8.3-2
- rename rhino to nutdrv_rhino to prevent file conflict (rhbz#2367057)
* Tue Apr 29 2025 Michal Hlavinka <mhlavink@redhat.com> - 2.8.3-1
- updated to 2.8.3 (#2352734)
* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 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 <mhlavink@redhat.com> - 2.8.2.1-4.1.git20240703pr2505
- fix ftbfs, make it build with unified bin/sbin
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.2.1-3.1.git20240703pr2505
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Fri Nov 15 2024 Orion Poplawski <orion@nwra.com> - 2.8.2.1-2.1.git20240703pr2505
- Add BR systemd-devel to enable systemd notification support
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.2.1-1.1.git20240703pr2505
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Jul 03 2024 Michal Hlavinka <mhlavink@redhat.com> - 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 <python-maint@redhat.com> - 2.8.2-2
- Rebuilt for Python 3.13
* Wed Apr 03 2024 Michal Hlavinka <mhlavink@redhat.com> - 2.8.2-1
- updated to 2.8.2(2272586)
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Nov 30 2023 Orion Poplawski <orion@nwra.com> - 2.8.1-2
- Re-add nut.target to nut-client (bz#2156504)
* Wed Nov 01 2023 Michal Hlavinka <mhlavink@redhat.com> - 2.8.1-1
- updated to 2.8.1 (#2247337)
* Tue Oct 10 2023 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-14
- spec cleanup, based on PR#14 by Orion Poplawski
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 2.8.0-12
- Rebuilt for Python 3.12
* Wed Apr 26 2023 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-11
- update license tag format (SPDX migration) for https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_1
* Tue Feb 14 2023 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-10
- add nut-xml to nut recommends (#2151810)
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jan 04 2023 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-8
- move upslog to nut-client, some small spec file changes (#2156504)
* Wed Nov 30 2022 Charles R. Anderson <cra@alum.wpi.edu> - 2.8.0-7
- use piddir for specifying restart_flag location
- use piddir for specifying configure --with-statepath/pidpath/altpidpath
- add nut-2.8.0-piddir-owner.patch for upstream tmpfiles config creation to not append /nut and always use owner root
- update nut-2.6.3-tmpfiles.patch to use correct tmpfiles config file name
- remove unused downstream tmpfiles source and code
* Sun Nov 27 2022 Florian Weimer <fweimer@redhat.com> - 2.8.0-6
- Port configure script to C99
* Wed Aug 31 2022 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-5
- update pid path
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.8.0-3
- Rebuilt for Python 3.11
* Tue Jun 07 2022 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-2
- drop unused solaris init script pulling unnecessary dependency
* Mon May 09 2022 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-1
- updated to 2.8.0
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Sep 23 2021 Miro Hrončok <mhroncok@redhat.com> - 2.7.4-43
- Don't own /usr/lib/python3.X/site-packages
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 2.7.4-42
- Rebuilt with OpenSSL 3.0.0
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jun 08 2021 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-40
- drop snmp-ups support for DES, as required net-snmp no longer supports it
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.7.4-39
- Rebuilt for Python 3.10
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.7.4-38
- Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Sep 15 2020 Jeff Law <law@redhat.com> - 2.7.4-36
- Force C++14 as this code is not C++17 ready
* Wed Sep 02 2020 Josef Ridky <jridky@redhat.com> - 2.7.4-35
- Resolves: #1865077 - FTBFS in Fedora 33
- Rebuilt for new release of net-snmp
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-34
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jun 02 2020 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-32
- nut user needs tty group for wall (#1774591)
* Tue Jun 02 2020 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-31
- update tmpfiles nut run directory
* Tue May 26 2020 Orion Poplawski <orion@nwra.com> - 2.7.4-30
- Drop old udev requires/scriptlet
- Add upstream patch for TLS > 1.0 support
* Tue May 26 2020 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-1
* Tue May 26 2020 Orion Poplawski <orion@nwra.com> - 2.7.4-29
- Add upstream patch for OpenSSL 1.1.0 support, enable for Fedora >= 33
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.7.4-28
- Rebuilt for Python 3.9
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Oct 04 2019 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-26
- drop pygtk2 requirements
* Thu Oct 03 2019 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-25
- drop python 2 requirements including nut-monitor app
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Mar 25 2019 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-23
- add missing requirements for nut monitor
- fix file descriptor leak for notifycmd
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Oct 16 2018 Orion Poplawski <orion@nwra.com> - 2.7.4-21
- Cleanup and modernize spec
- Fix ownership/permissions of /var/run/nut (bug #1584330, #1580082)
- Fix python shbangs
* Sun Oct 14 2018 Peter Robinson <pbrobinson@fedoraproject.org> 2.7.4-20
- Updates dependencies, modernise spec, use %%license
- Python build fixes
* Tue Jul 24 2018 Adam Williamson <awilliam@redhat.com> - 2.7.4-19
- Rebuild for new net-snmp
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Apr 17 2018 Xavier Bachelot <xavier@bachelot.org> - 2.7.4-17
- Remove unrecognized configure option --without-hal
- Explicitely disable tcpwrapper support
- Remove unneeded CRLF EOL fix
- Add BR: cppunit-devel
* Wed Mar 07 2018 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-16
- add gcc buildrequire
* Wed Feb 14 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.7.4-15
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Tue Nov 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.7.4-13
- Remove old crufty coreutils requires
* Wed Aug 30 2017 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-12
- rebuild for freeipmi update
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Thu Jun 22 2017 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-9
- enable nss crypto (#1463071)
* Wed May 24 2017 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-8
- fix location of tmpfiles.d in service files (#1399602)
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Feb 01 2017 Sandro Mani <manisandro@gmail.com> - 2.7.4-6
- Rebuild (libwebp)
* Fri Nov 11 2016 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-5
- use %%_tmpfilesdir macro (#1394009)
* Thu Sep 15 2016 Till Maas <opensource@till.name> - 2.7.4-4
- Disable powerman support, powerman was retired on Fedora
* Thu Aug 11 2016 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-3
- make sure tmpfiles creation is executped before ups driver (#1365904,#1349362)
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.4-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Sat Mar 12 2016 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-1
- nut updated to 2.7.4
* Fri May 11 2018 Michal Hlavinka <mhlavink@redhat.com> - 2.7.2-4
- rebuilt with updated freeipmi
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Feb 23 2015 Michal Hlavinka <mhlavink@redhat.com> - 2.7.2-3
- nut driver needs tmpfiles.d too (#1187286)
* Sat Dec 05 2015 Kalev Lember <klember@redhat.com> - 2.7.3-6
- Rebuilt for libfreeipmi soname bump
* Tue Aug 26 2014 Michal Hlavinka <mhlavink@redhat.com> - 2.7.2-2
- build without powerman as it is not available in epel7
* Tue Dec 1 2015 Tom Callaway <spot@fedoraproject.org> - 2.7.3-5
- rebuild for libvpx 1.5.0
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.7.3-3
- Rebuilt for GCC 5 C++11 ABI change
* Tue Apr 28 2015 Michal Hlavinka <mhlavink@redhat.com> - 2.7.3-2
- start nut driver before the daemon
* Thu Apr 23 2015 Michal Hlavinka <mhlavink@redhat.com> - 2.7.3-1
- nut updated to 2.7.3
* Mon Apr 6 2015 Tom Callaway <spot@fedoraproject.org> - 2.7.2-4
- rebuild against libvpx 1.4.0
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue Apr 22 2014 Michal Hlavinka <mhlavink@redhat.com> - 2.7.2-1
- nut updated to 2.7.2
@ -530,42 +858,3 @@ fi
* Mon Jan 07 2013 Michal Hlavinka <mhlavink@redhat.com> - 2.6.5-8
- do not traceback when ups is not reachable
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 2.6.5-7
- rebuild against new libjpeg
* Fri Sep 14 2012 Michal Hlavinka <mhlavink@redhat.com> - 2.6.5-6
- use new systemd macros (#857416)
* Tue Sep 11 2012 Michal Hlavinka <mhlavink@redhat.com> - 2.6.5-5
- add support for foreground mode
* Tue Sep 11 2012 Michal Hlavinka <mhlavink@redhat.com> - 2.6.5-4
- do not forget to restart nut-driver.service in postun
* Thu Sep 06 2012 Michal Hlavinka <mhlavink@redhat.com> - 2.6.5-3
- do not depend on devel files (#838139)
* Mon Sep 03 2012 Michal Hlavinka <mhlavink@redhat.com> - 2.6.5-2
- rebuilt with updated freeipmi
* Fri Aug 10 2012 Michal Hlavinka <mhlavink@redhat.com> - 2.6.5-1
- nut updated to 2.6.5
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Jun 14 2012 Michal Hlavinka <mhlavink@redhat.com> - 2.6.4-1
- nut updated to 2.6.4
* Thu May 31 2012 Michal Hlavinka <mhlavink@redhat.com> - 2.6.3-4
- fix heap-based buffer overflow due improper processing of non-printable
characters in random network data (CVE-2012-2944)
* Mon May 28 2012 Michal Hlavinka <mhlavink@redhat.com> - 2.6.3-3
- bump release nubmer to fix upgrade path
* Mon Apr 16 2012 Michal Hlavinka <mhlavink@redhat.com> - 2.6.3-2
- do not forget to create /var/run/nut before starting service (#812825)
* Thu Jan 05 2012 Michal Hlavinka <mhlavink@redhat.com> - 2.6.3-1
- nut updated to 2.6.3

View file

@ -1 +1 @@
SHA512 (nut-2.8.0.tar.gz) = 3c413ae54088045a713eb80cf1bdda474f41bb3b67c7c0248aa7a0c4d441dce1ff42627a2735273d7e36892d1f2eeb895220cf28af63fec2fa0c7a267f82d577
SHA512 (nut-2.8.4.tar.gz) = 0d87c0006608f92ae54f8a500f93d9a81eac1d9abf57f32e7718dd72f265b8293a0b6cdba04c802b81eaf8907b52669c36b47b6875a4377f9752845ac6c5e8fa

147
ups.init
View file

@ -1,147 +0,0 @@
#! /bin/bash
#
# ups: Starts the Network UPS Tools
#
# chkconfig: - 26 74
# description: Network UPS Tools is a collection of programs which provide a common \
# interface for monitoring and administering UPS hardware.
# processname: upsd
# config: /etc/ups/
# config: /etc/sysconfig/ups
#
### BEGIN INIT INFO
# Provides: ups
# Required-Start: $syslog $network $named
# Required-Stop: $local_fs
# Default-Stop: 0 1 6
# Short-Description: Starts the Network UPS tools
# Description: Network UPS Tools is a collection of programs which provide a common \
# interface for monitoring and administering UPS hardware.
### END INIT INFO
# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
else
exit 0
fi
# Get config.
if [ -f /etc/sysconfig/ups ]; then
. /etc/sysconfig/ups
else
SERVER="no"
fi
start() {
if [ "$SERVER" = "yes" ]; then
echo -n $"Starting UPS driver controller: "
daemon /sbin/upsdrvctl start > /dev/null 2>&1 && success || failure
RETVAL=$?
echo
prog="upsd"
echo -n $"Starting $prog: "
daemon /usr/sbin/upsd $UPSD_OPTIONS > /dev/null 2>&1 && success || failure
if [ "$RETVAL" = 0 ]; then
RETVAL=$?
fi
echo
echo -n $"Starting UPS monitor (master): "
daemon --pidfile /var/run/nut/upsmon.pid /usr/sbin/upsmon > /dev/null 2>&1 && success || failure
if [ "$RETVAL" = 0 ]; then
RETVAL=$?
fi
echo
else
echo -n $"Starting UPS monitor (slave): "
daemon --pidfile /var/run/nut/upsmon.pid /usr/sbin/upsmon > /dev/null 2>&1 && success || failure
echo
fi
[ "$RETVAL" = 0 ] && touch /var/lock/subsys/ups
}
stop() {
echo -n $"Stopping UPS monitor: "
killproc -p /var/run/nut/upsmon.pid upsmon
echo
if [ "$SERVER" = "yes" ]; then
prog="upsd"
echo -n $"Stopping $prog: "
killproc upsd > /dev/null 2>&1 && success || failure
RETVAL=$?
echo
echo -n $"Shutting down UPS driver controller: "
/sbin/upsdrvctl stop > /dev/null 2>&1 && success || failure
if [ "$RETVAL" = 0 ]; then
RETVAL=$?
fi
echo
fi
[ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/ups
}
restart() {
stop
waitmore=5
while [ -n "$(ls /var/run/nut/)" -a $waitmore -ge 1 ]
do
sleep 1
waitmore=$((waitmore-1))
done
start
}
reload() {
# FIXME: upsd and upsmon always return 0
# => can't tell if reload was successful
if [ "$SERVER" = "yes" ]; then
action "Reloading upsd:" /usr/sbin/upsd -c reload
RETVAL=$?
fi
action "Reloading upsmon:" /usr/sbin/upsmon -c reload
if [ "$RETVAL" = 0 ]; then
RETVAL=$?
fi
}
# See how we are called.
case "$1" in
start)
start ;;
stop)
stop ;;
restart)
restart ;;
try-restart)
[ -f /var/lock/subsys/ups ] && restart || :
;;
reload)
reload ;;
force-reload)
restart ;;
status)
if [ "$SERVER" = "yes" ]; then
status upsd
fi
status upsmon
;;
*)
echo $"Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status}"
RETVAL=3
esac
exit $RETVAL

View file

@ -1,8 +0,0 @@
# If the UPS is locally attached set it to "yes"
SERVER=yes
# Any options to pass to upsd
UPSD_OPTIONS=
# This *must* be the same as in /etc/ups/upsmon.conf
POWERDOWNFLAG=/etc/killpower
#
# [End]