42985ff
%global _hardened_build 1
cedf9ce
%bcond_with python2
6810be8
81e490e
#TODO: split nut-client so it does not require python
d9f61f1
%global nut_uid 57
d9f61f1
%global nut_gid 57
cvsdist 81ab26c
d9f61f1
%global cgidir  /var/www/nut-cgi-bin
670632e
%global piddir  /run/nut
153ff17
%global modeldir /usr/sbin
f5e8b59
# powerman is retired on Fedora, therefore disable it by default
f5e8b59
%bcond_with powerman
cvsdist 81ab26c
cvsdist bfc54a3
Summary: Network UPS Tools
cvsdist bfc54a3
Name: nut
182c96a
Version: 2.8.1
182c96a
Release: 1%{?dist}
64fdb72
License: GPL-2.0-or-later AND GPL-3.0-or-later
4daa893
Url: https://www.networkupstools.org/
4daa893
Source: https://www.networkupstools.org/source/2.8/%{name}-%{version}.tar.gz
622fc34
Source4: libs.sh
0a29e56
Patch2: nut-2.8.0-piddir-owner.patch
cvsdist 81ab26c
acb3fdc
#quick fix. TODO: fix it properly
59230cd
Patch9: nut-2.6.5-rmpidf.patch
6db1d50
Patch15: nut-c99-strdup.patch
acb3fdc
457d123
Requires(pre): shadow-utils
b48267c
Requires(post): coreutils systemd
b48267c
Requires(preun): systemd
b48267c
Requires(postun): coreutils systemd
dc7efeb
Recommends: nut-xml
aad9df0
d6f674e
BuildRequires: make
9c6ba30
BuildRequires: autoconf
9c6ba30
BuildRequires: automake
f68641b
BuildRequires: augeas-libs
74731fd
BuildRequires: avahi-devel
b48267c
BuildRequires: cppunit-devel
9c6ba30
BuildRequires: dbus-glib-devel
b48267c
BuildRequires: desktop-file-utils
aad9df0
BuildRequires: elfutils-devel
aad9df0
BuildRequires: fontconfig-devel
b48267c
BuildRequires: freeipmi-devel
9c6ba30
BuildRequires: freetype-devel
1281c74
BuildRequires: gcc
b48267c
BuildRequires: gcc-c++
9c6ba30
BuildRequires: gd-devel
f74346c
%if 0%{?fedora} < 39
182c96a
BuildRequires: libgpiod-devel
f74346c
%endif
9c6ba30
BuildRequires: libjpeg-devel
9c6ba30
BuildRequires: libpng-devel
9386720
BuildRequires: libtool
74731fd
BuildRequires: libtool-ltdl-devel
9c6ba30
BuildRequires: libX11-devel
9c6ba30
BuildRequires: libXpm-devel
4868536
BuildRequires: libmodbus-devel
4868536
BuildRequires: libi2c-devel
9386720
BuildRequires: neon-devel
9c6ba30
BuildRequires: net-snmp-devel
9c6ba30
BuildRequires: netpbm-devel
b48267c
BuildRequires: nss-devel
9c6ba30
BuildRequires: openssl-devel
9c6ba30
BuildRequires: pkgconfig
f5e8b59
%if %{with powerman}
ccbffbc
BuildRequires: powerman-devel
f5e8b59
%endif
cedf9ce
BuildRequires: python3-devel
cedf9ce
BuildRequires: python3-setuptools
670632e
BuildRequires: systemd-rpm-macros
ef90b86
ef90b86
%ifnarch s390 s390x
1e27db6
BuildRequires: libusb1-devel
ef90b86
%endif
cvsdist bfc54a3
664ad3b
ExcludeArch: s390 s390x
664ad3b
0a29e56
%global restart_flag %{piddir}/%{name}-restart-after-rpm-install
c54a93d
cvsdist bfc54a3
%description
f9d1f58
These programs are part of a developing project to monitor the assortment
f9d1f58
of UPSes that are found out there in the field. Many models have serial
cvsdist 81ab26c
ports of some kind that allow some form of state checking. This
f9d1f58
capability has been harnessed where possible to allow for safe shutdowns,
cvsdist bfc54a3
live status tracking on web pages, and more.
cvsdist bfc54a3
cvsdist bfc54a3
%package client
cvsdist bfc54a3
Summary: Network UPS Tools client monitoring utilities
b48267c
Requires(post): systemd
b48267c
Requires(preun): systemd
457d123
Requires(pre): shadow-utils
2ef3bf8
%if %{with python2}
6eddf6d
Requires: pygtk2, pygtk2-libglade
81e490e
#only for python and gui part
2ef3bf8
%endif
81e490e
#Requires:
cvsdist bfc54a3
cvsdist bfc54a3
%description client
cvsdist bfc54a3
This package includes the client utilities that are required to monitor a
cvsdist bfc54a3
ups that the client host has access to, but where the UPS is physically
cvsdist bfc54a3
attached to a different computer on the network.
cvsdist bfc54a3
cvsdist bfc54a3
%package cgi
cvsdist bfc54a3
Summary: CGI utilities for the Network UPS Tools
9d928db
Requires: %{name}-client = %{version}-%{release} webserver
457d123
Requires(pre): shadow-utils
cvsdist bfc54a3
cvsdist bfc54a3
%description cgi
cvsdist bfc54a3
This package includes CGI programs for accessing UPS status via a web
cvsdist bfc54a3
browser.
cvsdist 0750536
9386720
%package xml
9386720
Summary: XML UPS driver for the Network UPS Tools
9386720
Requires: %{name}-client = %{version}-%{release}
9386720
9386720
%description xml
9386720
This package adds the netxml-ups driver, that allows NUT to monitor a XML
9386720
capable UPS.
9386720
cvsdist 0750536
%package devel
cvsdist 0750536
Summary: Development files for NUT Client
aed1aac
Requires: %{name}-client = %{version}-%{release} webserver openssl-devel
cvsdist 0750536
cvsdist 0750536
%description devel
cvsdist 0750536
This package contains the development header files and libraries
cvsdist 0750536
necessary to develop NUT client applications.
fd8fc39
cvsdist bfc54a3
%prep
cvsdist bfc54a3
%setup -q
d7132ee
%patch -P2 -p1 -b .piddir-owner
d7132ee
%patch -P9 -p1 -b .rmpidf
d7132ee
%patch -P15 -p1
4dc3498
4868536
sed -i 's|=NUT-Monitor|=nut-monitor|'  scripts/python/app/nut-monitor-py3qt5.desktop
4868536
sed -i "s|sys.argv\[0\]|'%{_datadir}/%{name}/nut-monitor/nut-monitor'|" scripts/python/app/NUT-Monitor-py3qt5.in
81e490e
sed -i 's|LIBSSL_LDFLAGS|LIBSSL_LIBS|' lib/libupsclient-config.in
f5ce65e
sed -i 's|LIBSSL_LDFLAGS|LIBSSL_LIBS|' lib/libupsclient.pc.in
c16730d
f6becc5
# workaround for multilib conflicts - caused by patch changing modification time of scripts
f6becc5
find . -mtime -1 -print0 | xargs -0 touch --reference %{SOURCE0}
f6becc5
182c96a
# fix python site packages check
182c96a
sed -i 's|\(PYTHON3\?_SITE_PACKAGES=\)".*"|\1"%{python3_sitelib}"|' m4/nut_check_python.m4
182c96a
cvsdist bfc54a3
%build
f74346c
#--without-gpio is not enough to stop it complaining about missing library
f74346c
sed -i 's|with_gpio="[^"]*"|with_gpio="no"|g' configure.ac
8adf5c3
autoreconf -i
82e1989
export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS"
8d6ef40
# prevent assignment of default value, it would break configure's tests
8d6ef40
export LDFLAGS="-Wl,-z,now"
cvsdist bfc54a3
%configure \
e7a2e91
    --with-all \
f5e8b59
%if %{without powerman}
f5e8b59
    --without-powerman \
f5e8b59
%endif
74731fd
    --with-libltdl \
625fa20
%if (0%{?fedora} && 0%{?fedora} < 33) || 0%{?el8}
00c6080
    --with-nss \
625fa20
%endif
b62a6d2
    --without-wrap \
e7a2e91
    --with-cgi \
182c96a
    --with-python=%{python3} \
182c96a
    --with-python3=%{python3} \
182c96a
    --without-python2 \
81e490e
    --datadir=%{_datadir}/%{name} \
cvsdist 81ab26c
    --with-user=%{name} \
47df70e
    --with-group=dialout \
0a29e56
    --with-statepath=%{piddir} \
0a29e56
    --with-pidpath=%{piddir} \
0a29e56
    --with-altpidpath=%{piddir} \
cvsdist bfc54a3
    --sysconfdir=%{_sysconfdir}/ups \
cvsdist 991b2c6
    --with-cgipath=%{cgidir} \
cvsdist 81ab26c
    --with-drvpath=%{modeldir} \
f74346c
%if 0%{?fedora} < 39
f74346c
    --without-gpio \
f74346c
%endif
d9f61f1
    --with-systemdsystemunitdir=%{_unitdir} \
4868536
    --with-systemdshutdowndir=/lib/systemd/system-shutdown \
ccbffbc
    --with-pkgconfig-dir=%{_libdir}/pkgconfig \
9c6ba30
    --disable-static \
ef206e9
    --with-udev-dir=%{_usr}/lib/udev \
64cdce1
    --libdir=%{_libdir}
aae62ef
#    --with-doc # does not work in 2.7.1
cvsdist bfc54a3
182c96a
# for rhbz#838139 check if still needed?
69288dd
sh %{SOURCE4} >>include/config.h
622fc34
ccbffbc
#remove rpath
8adf5c3
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
8adf5c3
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
42985ff
%make_build LDFLAGS="%{__global_ldflags}"
cvsdist bfc54a3
cvsdist bfc54a3
%install
cvsdist 0750536
mkdir -p %{buildroot}%{modeldir} \
580885a
         %{buildroot}%{_sysconfdir}/udev/rules.d \
1cd3506
         %{buildroot}%{_sysconfdir}/ups \
2943cd5
         %{buildroot}%{piddir} \
cvsdist 0750536
         %{buildroot}%{_localstatedir}/lib/ups \
aaf9c3b
         %{buildroot}%{_libexecdir}
cvsdist 991b2c6
42985ff
%make_install
cvsdist 13f7bca
182c96a
#mv %{buildroot}%{_tmpfilesdir}/nut-common.tmpfiles %{buildroot}%{_tmpfilesdir}/nut-common.conf
f3baac8
96caa1e
rm -rf %{buildroot}%{_prefix}/html
9d928db
rm -f %{buildroot}%{_libdir}/*.la
47759db
rm -rf docs/man
a136d9d
rm -rf %{buildroot}%{_datadir}/nut/solaris-init
47759db
find docs/ -name 'Makefile*' -delete
96caa1e
f9d1f58
pushd conf;
42985ff
%make_install
cvsdist 81ab26c
for file in %{buildroot}%{_sysconfdir}/ups/*.sample
cvsdist 81ab26c
do
cvsdist 81ab26c
   mv $file %{buildroot}%{_sysconfdir}/ups/`basename $file .sample`
cvsdist 81ab26c
done
9c6ba30
popd
cvsdist 81ab26c
467b1ba
#fix collision with virtualbox
8d6ef40
#mv %{buildroot}/%{_usr}/lib/udev/rules.d/52-nut-usbups.rules %{buildroot}/%{_usr}/lib/udev/rules.d/62-nut-usbups.rules
ef206e9
mv %{buildroot}/%{_usr}/lib/udev/rules.d/52-nut-ipmipsu.rules %{buildroot}/%{_usr}/lib/udev/rules.d/62-nut-ipmipsu.rules
d559962
9c6ba30
# fix encoding
9c6ba30
for fe in ./docs/cables/powerware.txt
9c6ba30
do
9c6ba30
  iconv -f iso-8859-1 -t utf-8 <$fe >$fe.new
9c6ba30
  touch -r $fe $fe.new
9c6ba30
  mv -f $fe.new $fe
9c6ba30
done
9c6ba30
f9d1f58
# install PyNUT
cedf9ce
install -p -D -m 644 scripts/python/module/PyNUT.py %{buildroot}%{python3_sitelib}/PyNUT.py
81e490e
# install nut-monitor
cedf9ce
%if %{with python2}
81e490e
mkdir -p %{buildroot}%{_datadir}/nut/nut-monitor/pixmaps
81e490e
install -p -m 755 scripts/python/app/NUT-Monitor %{buildroot}%{_datadir}/nut/nut-monitor/nut-monitor
81e490e
install -p -m 644 scripts/python/app/gui-1.3.glade %{buildroot}%{_datadir}/nut/nut-monitor
81e490e
install -p -m 644 scripts/python/app/pixmaps/* %{buildroot}%{_datadir}/nut/nut-monitor/pixmaps/
81e490e
install -p -D scripts/python/app/nut-monitor.png %{buildroot}%{_datadir}/pixmaps/nut-monitor.png
81e490e
desktop-file-install --dir=%{buildroot}%{_datadir}/applications scripts/python/app/nut-monitor.desktop
81e490e
ln -s %{_datadir}/nut/nut-monitor/nut-monitor %{buildroot}%{_bindir}/nut-monitor
cedf9ce
%endif
9c6ba30
f9d1f58
# Setup permissions for pid file
f9d1f58
touch %{buildroot}/%{piddir}/upsmon.pid
f9d1f58
chmod 0644 %{buildroot}/%{piddir}/upsmon.pid
f9d1f58
cvsdist 81ab26c
%pre
d50269d
/usr/sbin/useradd -c "Network UPS Tools" -u %{nut_uid}  \
cvsdist 81ab26c
        -s /bin/false -r -d %{_localstatedir}/lib/ups %{name} 2> /dev/null || :
be87309
/usr/sbin/usermod -G dialout,tty %{name}
cvsdist 81ab26c
c54a93d
# do not let upsmon run during upgrade rhbz#916472
c54a93d
# phase 1: stop upsmon before upsd changes
c54a93d
if [ "$1" = "2" ]; then
c54a93d
  rm -f %restart_flag
c54a93d
  /bin/systemctl is-active nut-monitor.service >/dev/null 2>&1 && touch %restart_flag ||:
c54a93d
  /bin/systemctl stop nut-monitor.service >/dev/null 2>&1
c54a93d
fi
c54a93d
c54a93d
3cb065c
%post
f9d1f58
%systemd_post nut-driver-enumerator.path nut-driver-enumerator.service nut-driver.target nut-server.service nut.target
3cb065c
3cb065c
%preun
f9d1f58
%systemd_preun nut-driver-enumerator.path nut-driver-enumerator.service nut-driver.target nut-server.service nut.target
3cb065c
f9d1f58
%postun
f9d1f58
%systemd_postun_with_restart nut-driver.target nut-server.service
3cb065c
cvsdist 81ab26c
%pre client
d50269d
/usr/sbin/useradd -c "Network UPS Tools" -u %{nut_uid} \
cvsdist 81ab26c
        -s /bin/false -r -d %{_localstatedir}/lib/ups %{name} 2> /dev/null || :
be87309
/usr/sbin/usermod -G dialout,tty %{name}
cvsdist 81ab26c
cvsdist 0750536
%pre cgi
d50269d
/usr/sbin/useradd -c "Network UPS Tools" -u %{nut_uid} \
cvsdist 0750536
        -s /bin/false -r -d %{_localstatedir}/lib/ups %{name} 2> /dev/null || :
be87309
/usr/sbin/usermod -G dialout,tty %{name}
cvsdist 0750536
cvsdist bfc54a3
%post client
7ffce64
%systemd_post nut-monitor.service
cvsdist bfc54a3
cvsdist bfc54a3
%preun client
7ffce64
%systemd_preun nut-monitor.service
cvsdist bfc54a3
cvsdist bfc54a3
%postun client
4dc3498
%systemd_postun_with_restart nut-monitor.service
c54a93d
c54a93d
%posttrans
c54a93d
# phase 2: start upsmon again
f9d1f58
if [ -e %restart_flag ]; then
f9d1f58
  /bin/systemctl restart nut-monitor.service >/dev/null 2>&1 || :
f9d1f58
  rm -f %restart_flag
c54a93d
else
c54a93d
  # maybe we did not stop it - if we reinstalled just nut-client
f9d1f58
  /bin/systemctl try-restart nut-monitor.service >/dev/null 2>&1 || :
f9d1f58
fi
cvsdist bfc54a3
cvsdist bfc54a3
%files
b48267c
%license COPYING LICENSE-GPL2 LICENSE-GPL3
182c96a
%doc ChangeLog AUTHORS MAINTAINERS README docs INSTALL NEWS
737048d
%config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/ups.conf
737048d
%config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upsd.conf
cvsdist 9470c79
%config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upsd.users
ef206e9
%attr(644,root,root) %{_usr}/lib/udev/rules.d/62-nut-usbups.rules
ef206e9
%attr(644,root,root) %{_usr}/lib/udev/rules.d/62-nut-ipmipsu.rules
cvsdist 991b2c6
%{modeldir}/*
9386720
%exclude %{modeldir}/netxml-ups
4868536
%{_unitdir}/nut-driver-enumerator.path
4868536
%{_unitdir}/nut-driver-enumerator.service
4868536
%{_unitdir}/nut-driver@.service
4868536
%{_unitdir}/nut-driver.target
d9f61f1
%{_unitdir}/nut-server.service
4868536
%{_unitdir}/nut.target
cvsdist 726fc72
%{_sbindir}/upsd
467b1ba
%{_bindir}/nut-scanner
467b1ba
%{_libdir}/libnutscan.so.*
4868536
%{_libexecdir}/nut-driver-enumerator.sh
182c96a
%{_libexecdir}/sockdebug
4868536
%{_datadir}/augeas/lenses/dist/nut*
81e490e
%{_datadir}/%{name}/cmdvartab
81e490e
%{_datadir}/%{name}/driver.list
cvsdist 0750536
%{_mandir}/man5/ups.conf.5.gz
cvsdist 0750536
%{_mandir}/man5/upsd.conf.5.gz
cvsdist 0750536
%{_mandir}/man5/upsd.users.5.gz
4868536
4868536
%{_mandir}/man8/adelsystem_cbi.8.gz
182c96a
%{_mandir}/man8/apc_modbus.8.gz
4868536
0b850eb
%{_mandir}/man8/al175.8.gz
cvsdist 0750536
%{_mandir}/man8/apcsmart.8.gz
467b1ba
%{_mandir}/man8/apcsmart-old.8.gz
0b850eb
%{_mandir}/man8/apcupsd-ups.8.gz
4868536
%{_mandir}/man8/asem.8.gz
ccbffbc
%{_mandir}/man8/bcmxcp.8*
ccbffbc
%{_mandir}/man8/bcmxcp_usb.8.gz
cvsdist 0750536
%{_mandir}/man8/belkin.8.gz
ccbffbc
%{_mandir}/man8/bestfcom.8.gz
ccbffbc
%{_mandir}/man8/belkinunv.8.gz
f012f36
%{_mandir}/man8/bestfortress.8.gz
cvsdist 0750536
%{_mandir}/man8/bestups.8.gz
cvsdist 0750536
%{_mandir}/man8/bestuferrups.8.gz
0b850eb
%{_mandir}/man8/blazer_ser.8.gz
0b850eb
%{_mandir}/man8/blazer_usb.8.gz
f012f36
%{_mandir}/man8/clone.8.gz
ccbffbc
%{_mandir}/man8/dummy-ups.8.gz
cvsdist 0750536
%{_mandir}/man8/everups.8.gz
cvsdist 0750536
%{_mandir}/man8/etapro.8.gz
ccbffbc
%{_mandir}/man8/gamatronic.8.gz
4868536
%{_mandir}/man8/generic_modbus.8.gz
cvsdist 0750536
%{_mandir}/man8/genericups.8.gz
f74346c
%if 0%{?fedora} < 39
182c96a
%{_mandir}/man8/generic_gpio.8.gz
f74346c
%endif
4868536
%{_mandir}/man8/huawei-ups2000.8.gz
cvsdist 0750536
%{_mandir}/man8/isbmex.8.gz
f012f36
%{_mandir}/man8/ivtscd.8.gz
cvsdist 0750536
%{_mandir}/man8/liebert.8.gz
e7a2e91
%{_mandir}/man8/liebert-esp2.8.gz
cvsdist 0750536
%{_mandir}/man8/masterguard.8.gz
ccbffbc
%{_mandir}/man8/metasys.8.gz
6ad2e0e
%{_mandir}/man8/microdowell.8.gz
4868536
%{_mandir}/man8/microsol-apc.8.gz
cvsdist 0750536
%{_mandir}/man8/mge-utalk.8.gz
ccbffbc
%{_mandir}/man8/mge-shut.8.gz
cvsdist 0750536
%{_mandir}/man8/nutupsdrv.8.gz
153ff17
%{_mandir}/man8/nutdrv_atcl_usb.8.gz
4868536
%{_mandir}/man8/nutdrv_siemens_sitop.8.gz
4868536
%{_mandir}/man8/nut-driver-enumerator.8.gz
467b1ba
%{_mandir}/man8/nut-ipmipsu.8.gz
47759db
%{_mandir}/man8/nut-recorder.8.gz
467b1ba
%{_mandir}/man8/nut-scanner.8.gz
0b850eb
%{_mandir}/man8/nutdrv_qx.8.gz
cvsdist 0750536
%{_mandir}/man8/oneac.8.gz
ccbffbc
%{_mandir}/man8/optiups.8.gz
4868536
%{_mandir}/man8/phoenixcontact_modbus.8.gz
4868536
%{_mandir}/man8/pijuice.8.gz
cvsdist 0750536
%{_mandir}/man8/powercom.8.gz
f5e8b59
%if %{with powerman}
ccbffbc
%{_mandir}/man8/powerman-pdu.8.gz
f5e8b59
%endif
ccbffbc
%{_mandir}/man8/powerpanel.8.gz
ccbffbc
%{_mandir}/man8/rhino.8.gz
ccbffbc
%{_mandir}/man8/richcomm_usb.8.gz
0b850eb
%{_mandir}/man8/riello_ser.8.gz
0b850eb
%{_mandir}/man8/riello_usb.8.gz
ccbffbc
%{_mandir}/man8/safenet.8.gz
182c96a
%{_mandir}/man8/sms_ser.8.gz
ccbffbc
%{_mandir}/man8/snmp-ups.8.gz
ccbffbc
%{_mandir}/man8/solis.8*
182c96a
%{_mandir}/man8/sockdebug.8.gz
4868536
%{_mandir}/man8/socomec_jbus.8.gz
cvsdist 0750536
%{_mandir}/man8/tripplite.8.gz
ccbffbc
%{_mandir}/man8/tripplite_usb.8.gz
cvsdist 0750536
%{_mandir}/man8/tripplitesu.8.gz
cvsdist 0750536
%{_mandir}/man8/victronups.8.gz
ccbffbc
%{_mandir}/man8/upscode2.8*
cvsdist 0750536
%{_mandir}/man8/upsd.8.gz
cvsdist 0750536
%{_mandir}/man8/upsdrvctl.8.gz
4868536
%{_mandir}/man8/upsdrvsvcctl.8.gz
9d928db
%{_mandir}/man8/usbhid-ups.8.gz
aad9df0
cvsdist bfc54a3
%files client
b48267c
%license COPYING LICENSE-GPL2 LICENSE-GPL3
57784ca
%dir %{_sysconfdir}/ups
8debbe8
%config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/nut.conf
737048d
%config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upsmon.conf
737048d
%config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upssched.conf
182c96a
%{_tmpfilesdir}/nut-common-tmpfiles.conf
cvsdist 0750536
%dir %attr(750,nut,nut) %{_localstatedir}/lib/ups
42985ff
# upsmon.pid is written as root, so root needs access for now
f9d1f58
%dir %attr(770,root,dialout) %{piddir}
f9d1f58
%attr(644,nut,nut) %verify(not size mtime md5) /run/%{name}/upsmon.pid
cvsdist bfc54a3
%{_bindir}/upsc
cvsdist bfc54a3
%{_bindir}/upscmd
8debbe8
%{_bindir}/upslog
cvsdist 81ab26c
%{_bindir}/upsrw
cvsdist 726fc72
%{_sbindir}/upsmon
cvsdist 726fc72
%{_sbindir}/upssched
9d928db
%{_bindir}/upssched-cmd
d9f61f1
%{_unitdir}/nut-monitor.service
1cd3506
/lib/systemd/system-shutdown/nutshutdown
9d928db
%{_libdir}/libupsclient.so.*
0b850eb
%{_libdir}/libnutclient.so.*
4868536
%{_libdir}/libnutclientstub.so.*
8debbe8
%{_mandir}/man5/nut.conf.5.gz
cvsdist 0750536
%{_mandir}/man5/upsmon.conf.5.gz
cvsdist 0750536
%{_mandir}/man5/upssched.conf.5.gz
cvsdist 0750536
%{_mandir}/man8/upsc.8.gz
cvsdist 0750536
%{_mandir}/man8/upscmd.8.gz
8debbe8
%{_mandir}/man8/upslog.8.gz
cvsdist 0750536
%{_mandir}/man8/upsrw.8.gz
cvsdist 0750536
%{_mandir}/man8/upsmon.8.gz
cvsdist 0750536
%{_mandir}/man8/upssched.8.gz
d08ed31
%pycached %{python3_sitelib}/PyNUT.py
182c96a
%pycached %{python3_sitelib}/test_nutclient.py
81e490e
%{_datadir}/nut
cedf9ce
%if %{with python2}
cedf9ce
%{_bindir}/nut-monitor
81e490e
%{_datadir}/pixmaps/nut-monitor.png
81e490e
%{_datadir}/applications/nut-monitor.desktop
cedf9ce
%endif
cvsdist bfc54a3
cvsdist bfc54a3
%files cgi
cvsdist 0750536
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/ups/hosts.conf
cvsdist 0750536
%config(noreplace) %attr(600,nut,root) %{_sysconfdir}/ups/upsset.conf
cvsdist 81ab26c
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/ups/upsstats.html
cvsdist 81ab26c
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/ups/upsstats-single.html
aad9df0
%{cgidir}/
cvsdist 0750536
%{_mandir}/man5/hosts.conf.5.gz
cvsdist 0750536
%{_mandir}/man5/upsstats.html.5.gz
cvsdist 0750536
%{_mandir}/man5/upsset.conf.5.gz
cvsdist 0750536
%{_mandir}/man8/upsimage.cgi.8.gz
cvsdist 0750536
%{_mandir}/man8/upsstats.cgi.8.gz
cvsdist 0750536
%{_mandir}/man8/upsset.cgi.8.gz
cvsdist bfc54a3
9386720
%files xml
9386720
%{modeldir}/netxml-ups
9386720
%doc %{_mandir}/man8/netxml-ups.8.gz
9386720
aad9df0
%files devel
aad9df0
%{_includedir}/*
9d928db
%{_mandir}/man3/upscli*
74731fd
%{_mandir}/man3/nutscan*
0b850eb
%{_mandir}/man3/nutclient*
0b850eb
%{_mandir}/man3/libnutclient*
9d928db
%{_libdir}/libupsclient.so
0b850eb
%{_libdir}/libnutclient.so
4868536
%{_libdir}/libnutclientstub.so
467b1ba
%{_libdir}/libnutscan.so
aad9df0
%{_libdir}/pkgconfig/libupsclient.pc
0b850eb
%{_libdir}/pkgconfig/libnutclient.pc
4868536
%{_libdir}/pkgconfig/libnutclientstub.pc
74731fd
%{_libdir}/pkgconfig/libnutscan.pc
aad9df0
cvsdist bfc54a3
%changelog
182c96a
* Wed Nov 01 2023 Michal Hlavinka <mhlavink@redhat.com> - 2.8.1-1
f74346c
- updated to 2.8.1 (#2247337)
182c96a
f9d1f58
* Tue Oct 10 2023 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-14
f9d1f58
- spec cleanup, based on PR#14 by Orion Poplawski
f9d1f58
2572132
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-13
2572132
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
2572132
ea13be4
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 2.8.0-12
ea13be4
- Rebuilt for Python 3.12
ea13be4
64fdb72
* Wed Apr 26 2023 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-11
64fdb72
- update license tag format (SPDX migration) for https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_1
64fdb72
dc7efeb
* Tue Feb 14 2023 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-10
dc7efeb
- add nut-xml to nut recommends (#2151810)
dc7efeb
aad6876
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-9
aad6876
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
aad6876
8debbe8
* Wed Jan 04 2023 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-8
8debbe8
- move upslog to nut-client, some small spec file changes (#2156504)
8debbe8
0a29e56
* Wed Nov 30 2022 Charles R. Anderson <cra@alum.wpi.edu> - 2.8.0-7
0a29e56
- use piddir for specifying restart_flag location
0a29e56
- use piddir for specifying configure --with-statepath/pidpath/altpidpath
0a29e56
- add nut-2.8.0-piddir-owner.patch for upstream tmpfiles config creation to not append /nut and always use owner root
f9d1f58
- update nut-2.6.3-tmpfiles.patch to use correct tmpfiles config file name
0a29e56
- remove unused downstream tmpfiles source and code
0a29e56
6db1d50
* Sun Nov 27 2022 Florian Weimer <fweimer@redhat.com> - 2.8.0-6
6db1d50
- Port configure script to C99
6db1d50
670632e
* Wed Aug 31 2022 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-5
670632e
- update pid path
670632e
c1478de
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-4
c1478de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
c1478de
8f6b572
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.8.0-3
8f6b572
- Rebuilt for Python 3.11
8f6b572
a136d9d
* Tue Jun 07 2022 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-2
a136d9d
- drop unused solaris init script pulling unnecessary dependency
a136d9d
4868536
* Mon May 09 2022 Michal Hlavinka <mhlavink@redhat.com> - 2.8.0-1
4868536
- updated to 2.8.0
4868536
5c64b71
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-44
5c64b71
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
5c64b71
d08ed31
* Thu Sep 23 2021 Miro Hrončok <mhroncok@redhat.com> - 2.7.4-43
d08ed31
- Don't own /usr/lib/python3.X/site-packages
d08ed31
cdbcbed
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 2.7.4-42
cdbcbed
- Rebuilt with OpenSSL 3.0.0
cdbcbed
99495ed
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-41
99495ed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
99495ed
c8d877d
* Tue Jun 08 2021 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-40
c8d877d
- drop snmp-ups support for DES, as required net-snmp no longer supports it
c8d877d
4db73a7
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.7.4-39
4db73a7
- Rebuilt for Python 3.10
4db73a7
4fe949d
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.7.4-38
4fe949d
- Rebuilt for updated systemd-rpm-macros
4fe949d
  See https://pagure.io/fesco/issue/2583.
4fe949d
b05fc4a
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-37
b05fc4a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
b05fc4a
82e1989
* Tue Sep 15 2020 Jeff Law <law@redhat.com> - 2.7.4-36
82e1989
- Force C++14 as this code is not C++17 ready
82e1989
e056aaa
* Wed Sep 02 2020 Josef Ridky <jridky@redhat.com> - 2.7.4-35
e056aaa
- Resolves: #1865077 - FTBFS in Fedora 33
e056aaa
- Rebuilt for new release of net-snmp
e056aaa
7c2f275
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-34
7c2f275
- Second attempt - Rebuilt for
7c2f275
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
7c2f275
beee923
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-33
beee923
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
beee923
be87309
* Tue Jun 02 2020 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-32
be87309
- nut user needs tty group for wall (#1774591)
be87309
c06083e
* Tue Jun 02 2020 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-31
c06083e
- update tmpfiles nut run directory
c06083e
457d123
* Tue May 26 2020 Orion Poplawski <orion@nwra.com> - 2.7.4-30
457d123
- Drop old udev requires/scriptlet
457d123
625fa20
* Tue May 26 2020 Orion Poplawski <orion@nwra.com> - 2.7.4-29
625fa20
- Add upstream patch for OpenSSL 1.1.0 support, enable for Fedora >= 33
625fa20
19a1c7c
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.7.4-28
19a1c7c
- Rebuilt for Python 3.9
19a1c7c
102a89c
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-27
102a89c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
102a89c
2ef3bf8
* Fri Oct 04 2019 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-26
2ef3bf8
- drop pygtk2 requirements
2ef3bf8
cedf9ce
* Thu Oct 03 2019 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-25
cedf9ce
- drop python 2 requirements including nut-monitor app
cedf9ce
6d6c424
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-24
6d6c424
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
6d6c424
e7cad98
* Mon Mar 25 2019 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-23
e7cad98
- add missing requirements for nut monitor
e7cad98
- fix file descriptor leak for notifycmd
e7cad98
128086f
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-22
128086f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
128086f
42985ff
* Tue Oct 16 2018 Orion Poplawski <orion@nwra.com> - 2.7.4-21
42985ff
- Cleanup and modernize spec
42985ff
- Fix ownership/permissions of /var/run/nut (bug #1584330, #1580082)
42985ff
- Fix python shbangs
42985ff
b48267c
* Sun Oct 14 2018 Peter Robinson <pbrobinson@fedoraproject.org> 2.7.4-20
b48267c
- Updates dependencies, modernise spec, use %%license
b48267c
- Python build fixes
b48267c
51d7394
* Tue Jul 24 2018 Adam Williamson <awilliam@redhat.com> - 2.7.4-19
51d7394
- Rebuild for new net-snmp
51d7394
12a28d2
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-18
12a28d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
12a28d2
691b15b
* Tue Apr 17 2018 Xavier Bachelot <xavier@bachelot.org> - 2.7.4-17
691b15b
- Remove unrecognized configure option --without-hal
691b15b
- Explicitely disable tcpwrapper support
691b15b
- Remove unneeded CRLF EOL fix
691b15b
- Add BR: cppunit-devel
691b15b
1281c74
* Wed Mar 07 2018 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-16
1281c74
- add gcc buildrequire
1281c74
51d283e
* Wed Feb 14 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.7.4-15
51d283e
- Update Python 2 dependency declarations to new packaging standards
51d283e
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
51d283e
f4583ad
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-14
f4583ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f4583ad
494b207
* Tue Nov 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.7.4-13
494b207
- Remove old crufty coreutils requires
494b207
6f70070
* Wed Aug 30 2017 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-12
6f70070
- rebuild for freeipmi update
6f70070
2cfc729
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-11
2cfc729
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
2cfc729
af0741e
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-10
af0741e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
af0741e
00c6080
* Thu Jun 22 2017 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-9
00c6080
- enable nss crypto (#1463071)
00c6080
ecd6fdf
* Wed May 24 2017 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-8
ecd6fdf
- fix location of tmpfiles.d in service files (#1399602)
ecd6fdf
8939832
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.4-7
8939832
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8939832
2de1898
* Wed Feb 01 2017 Sandro Mani <manisandro@gmail.com> - 2.7.4-6
2de1898
- Rebuild (libwebp)
2de1898
274d518
* Fri Nov 11 2016 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-5
274d518
- use %%_tmpfilesdir macro (#1394009)
274d518
f5e8b59
* Thu Sep 15 2016 Till Maas <opensource@till.name> - 2.7.4-4
f5e8b59
- Disable powerman support, powerman was retired on Fedora
f5e8b59
43c0498
* Thu Aug 11 2016 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-3
43c0498
- make sure tmpfiles creation is executped before ups driver (#1365904,#1349362)
43c0498
91e7378
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.4-2
91e7378
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
91e7378
32c24a1
* Sat Mar 12 2016 Michal Hlavinka <mhlavink@redhat.com> - 2.7.4-1
32c24a1
- nut updated to 2.7.4
32c24a1
61c166b
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.3-7
61c166b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
61c166b
75aa58e
* Sat Dec 05 2015 Kalev Lember <klember@redhat.com> - 2.7.3-6
75aa58e
- Rebuilt for libfreeipmi soname bump
75aa58e
d3ed363
* Tue Dec  1 2015 Tom Callaway <spot@fedoraproject.org> - 2.7.3-5
d3ed363
- rebuild for libvpx 1.5.0
d3ed363
3cf2ea1
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.3-4
3cf2ea1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
3cf2ea1
b83609e
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.7.3-3
b83609e
- Rebuilt for GCC 5 C++11 ABI change
b83609e
91dcbb6
* Tue Apr 28 2015 Michal Hlavinka <mhlavink@redhat.com> - 2.7.3-2
91dcbb6
- start nut driver before the daemon
91dcbb6
8d6ef40
* Thu Apr 23 2015 Michal Hlavinka <mhlavink@redhat.com> - 2.7.3-1
8d6ef40
- nut updated to 2.7.3
8d6ef40
223a546
* Mon Apr  6 2015 Tom Callaway <spot@fedoraproject.org> - 2.7.2-4
9314b02
- rebuild against libvpx 1.4.0
9314b02
8471d1b
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.2-3
8471d1b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
8471d1b
0435df0
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.2-2
0435df0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0435df0
153ff17
* Tue Apr 22 2014 Michal Hlavinka <mhlavink@redhat.com> - 2.7.2-1
153ff17
- nut updated to 2.7.2
153ff17
f6becc5
* Thu Apr 17 2014 Michal Hlavinka <mhlavink@redhat.com> - 2.7.1-4
f6becc5
- fix multilib issue (#831429)
f6becc5
ef206e9
* Thu Mar 06 2014 Michal Hlavinka <mhlavink@redhat.com> - 2.7.1-3
ef206e9
- fix path of nut-driver executable (#1072076)
ef206e9
- fix location of udev rules
ef206e9
d6655ef
* Thu Mar 06 2014 Michal Hlavinka <mhlavink@redhat.com> - 2.7.1-2
d6655ef
- fix undefined references in libupsclient (#1071919)
d6655ef
0b850eb
* Thu Feb 27 2014 Michal Hlavinka <mhlavink@redhat.com> - 2.7.1-1
0b850eb
- nut updated to 2.7.1
0b850eb
2ff1cac
* Tue Sep 24 2013 Michal Hlavinka <mhlavink@redhat.com> - 2.6.5-16
2ff1cac
- rebuilt with updated freeipmi (1.3.2)
2ff1cac
4026065
* Tue Sep 03 2013 Michal Hlavinka <mhlavink@redhat.com> - 2.6.5-15
4026065
- rebuilt with updated freeipmi
4026065
ac90527
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.5-14
ac90527
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
ac90527
1af2bd0
* Tue Jun 11 2013 Remi Collet <rcollet@redhat.com> - 2.6.5-13
1af2bd0
- rebuild for new GD 2.1.0
1af2bd0
c54a93d
* Mon Apr 22 2013 Michal Hlavinka <mhlavink@redhat.com> - 2.6.5-12
c54a93d
- do not let upsmon run during update (#916472)
c54a93d
- make binaries hardened (#955157)
c54a93d
b902697
* Thu Feb 28 2013 Michal Hlavinka <mhlavink@redhat.com> - 2.6.5-11
59230cd
- clean pid file on exit (#916468)
59230cd
a84ae1b
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.5-10
a84ae1b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a84ae1b
Adam Tkac 378d23a
* Mon Jan 21 2013 Adam Tkac <atkac redhat com> - 2.6.5-9
Adam Tkac 378d23a
- rebuild due to "jpeg8-ABI" feature drop
Adam Tkac 378d23a
3c9fea3
* Mon Jan 07 2013 Michal Hlavinka <mhlavink@redhat.com> - 2.6.5-8
3c9fea3
- do not traceback when ups is not reachable
3c9fea3