From 65e797e06e42da87fce08027dfa2f15c7e6c4c55 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Wed, 27 Nov 2024 12:44:49 +0100 Subject: [PATCH] updated to 2.8.2 --- libs.sh | 2 +- nut-2.6.5-rmpidf.patch | 39 ++++++------ nut-2.8.0-piddir-owner.patch | 80 +++++++++++------------ nut.spec | 120 +++++++++++++++++++++-------------- sources | 2 +- 5 files changed, 136 insertions(+), 107 deletions(-) diff --git a/libs.sh b/libs.sh index a6ca8a8..35a736b 100644 --- a/libs.sh +++ b/libs.sh @@ -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/\\$//' -e 's/[[:space:]]//g' clients/Makefile) echo "#define LIBUPSCLIENT_PATH \"libupsclient.so.$(( ${VINFO%%:*}-${VINFO##*:} ))\"" diff --git a/nut-2.6.5-rmpidf.patch b/nut-2.6.5-rmpidf.patch index 54c6e1e..7755382 100644 --- a/nut-2.6.5-rmpidf.patch +++ b/nut-2.6.5-rmpidf.patch @@ -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.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[]) upslogx(LOG_INFO, "Signal %d: exiting", exit_flag); + upsnotify(NOTIFY_STATE_STOPPING, "Signal %d: exiting", exit_flag); upsmon_cleanup(); + cleanpid(prog); 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.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) 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.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); /* write a pid file - 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.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) + 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; } - diff --git a/nut-2.8.0-piddir-owner.patch b/nut-2.8.0-piddir-owner.patch index 61fa75d..53e639d 100644 --- a/nut-2.8.0-piddir-owner.patch +++ b/nut-2.8.0-piddir-owner.patch @@ -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@ diff --git a/nut.spec b/nut.spec index f099346..908465d 100644 --- a/nut.spec +++ b/nut.spec @@ -13,20 +13,16 @@ Summary: Network UPS Tools Name: nut -Version: 2.8.0 -Release: 5%{?dist} -License: GPLv2+ and GPLv3+ +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 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 Requires(pre): shadow-utils @@ -51,12 +47,17 @@ 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 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 @@ -80,10 +81,10 @@ 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 @@ -129,13 +130,9 @@ 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 -P2 -p1 -b .piddir-owner +%patch -P9 -p1 -b .rmpidf +%patch -P15 -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 @@ -160,10 +157,12 @@ export LDFLAGS="-Wl,-z,now" --with-nss \ %endif --without-wrap \ - --without-modbus \ + --with-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,6 +172,9 @@ export LDFLAGS="-Wl,-z,now" --sysconfdir=%{_sysconfdir}/ups \ --with-cgipath=%{cgidir} \ --with-drvpath=%{modeldir} \ +%if 0%{?fedora} > 38 + --without-gpio \ +%endif --with-systemdsystemunitdir=%{_unitdir} \ --with-systemdshutdowndir=/lib/systemd/system-shutdown \ --with-pkgconfig-dir=%{_libdir}/pkgconfig \ @@ -181,6 +183,7 @@ export LDFLAGS="-Wl,-z,now" --libdir=%{_libdir} # --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 +201,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 +209,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,8 +229,8 @@ do mv -f $fe.new $fe done -# install PyNUT -install -p -D -m 644 scripts/python/module/PyNUT.py %{buildroot}%{python3_sitelib}/PyNUT.py +# install PyNUT +install -p -D -m 644 scripts/python/module/PyNUT.py %{buildroot}%{python3_sitearch}/PyNUT.py # install nut-monitor %if %{with python2} mkdir -p %{buildroot}%{_datadir}/nut/nut-monitor/pixmaps @@ -239,6 +242,10 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications scripts/python/a ln -s %{_datadir}/nut/nut-monitor/nut-monitor %{buildroot}%{_bindir}/nut-monitor %endif +# Setup permissions for pid file +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 || : @@ -254,15 +261,13 @@ 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} \ @@ -275,30 +280,27 @@ fi /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 @@ -308,23 +310,30 @@ 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 -%{_bindir}/upslog %{_libdir}/libnutscan.so.* %{_libexecdir}/nut-driver-enumerator.sh +%{_libexecdir}/sockdebug %{_datadir}/augeas/lenses/dist/nut* %{_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 @@ -345,7 +354,12 @@ fi %{_mandir}/man8/everups.8.gz %{_mandir}/man8/etapro.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/huawei-ups2000.8.gz %{_mandir}/man8/isbmex.8.gz %{_mandir}/man8/ivtscd.8.gz %{_mandir}/man8/liebert.8.gz @@ -366,6 +380,7 @@ 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/powercom.8.gz %if %{with powerman} %{_mandir}/man8/powerman-pdu.8.gz @@ -376,8 +391,11 @@ fi %{_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 @@ -386,37 +404,44 @@ fi %{_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 %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 %{_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}/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 +%pycached %{python3_sitearch}/PyNUT.py +%pycached %{python3_sitearch}/test_nutclient.py %{_datadir}/nut %if %{with python2} %{_bindir}/nut-monitor @@ -457,6 +482,9 @@ fi %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Wed Nov 27 2024 Michal Hlavinka - 2.8.2-1 +- updated to 2.8.2 + * Wed Nov 29 2023 Michal Hlavinka - 2.8.0-5 - fix tmpfiles path in unit file (#2227107) diff --git a/sources b/sources index 3574636..474d28c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nut-2.8.0.tar.gz) = 3c413ae54088045a713eb80cf1bdda474f41bb3b67c7c0248aa7a0c4d441dce1ff42627a2735273d7e36892d1f2eeb895220cf28af63fec2fa0c7a267f82d577 +SHA512 (nut-2.8.2.tar.gz) = b6f8f22318e4a4fcb8073a63132b1cb083952c665191b82a7d6765a61b859575a4b0c2ba84ed17cfb8c88d34179876d64520dd2f75f02fe8707b406da2c0821c