Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package nut for openSUSE:Factory checked in 
at 2023-02-07 18:48:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nut (Old)
 and      /work/SRC/openSUSE:Factory/.nut.new.4462 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nut"

Tue Feb  7 18:48:43 2023 rev:73 rq:1063449 version:2.8.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/nut/nut.changes  2022-05-16 18:11:28.841419560 
+0200
+++ /work/SRC/openSUSE:Factory/.nut.new.4462/nut.changes        2023-02-07 
18:48:53.343068457 +0100
@@ -1,0 +2,65 @@
+Mon Jan 23 22:09:31 UTC 2023 - Arjen de Korte <suse+bu...@de-korte.org>
+
+- Update to version 2.8.0
+  For more see NEWS and UPGRADING in /usr/share/doc/packages/nut.
+  * NUT now supports more i2c and modbus devices, as well as libusb-1.0
+    support as an alternative to earlier libusb-0.1 (so new
+    dependency-based categories of packages for drivers may be due).
+  * NUT Python modules and scripts (e.g. NUT-Monitor variants) should
+    work with python-2.7 and with python-3.x, so covering historic
+    distro releases as well as new ones (and so your distro can deliver
+    one or both, probably in several packages with different
+    dependencies in the latter case).
+  * NUT provides revised reference systemd and SMF service unit
+    definitions, including support of drivers wrapped into individual
+    service instances with varying dependencies based on different
+    media required (networked stack, USB stack, etc.), and many daemons
+    include -F option for running "in foreground" to avoid extra
+    forking after one already done by a service framework - you may
+    want to use those in your packaged deliverables.
+  * NUT newly provides the "nut-driver-enumerator" script and service,
+    which allows it to follow edition of ups.conf and dynamically
+    define+(re)start and stop+undefine service instances for drivers -
+    there are several ways it can be integrated for different
+    use-cases.
+  * Yhere are several new configuration keywords and CLI options - so
+    while new NUT builds should work with old configs and scripts, the
+    opposite is not necessarily true (old binaries may reject
+    configurations taking advantage of new features).
+  * There are several new protocol keywords - but old and new NUT
+    daemons (data server and clients) should be able to communicate
+    both ways.
+  * It is assumed that API/ABI changes may require third-party NUT
+    clients (library consumers of libnutclient, libupsclient,
+    libnutscan... -- their version info was bumped accordingly) to get
+    rebuilt, in order to work with the new NUT release in a stable
+    fashion.
+  * The dummy-ups driver used in automated testing now processes *.dev
+    filename patterns once and does not loop, like it still does for
+    *.seq and other files (by default).
+  * USB code is now more strict about logical minimum/maximum ranges
+    for data reported from devices, and some devices were already found
+    to make mistakes - so there is also a mechanism for turning a blind
+    eye to known issues and fix-up such report descriptors to produce
+    intended sane values.
+  * New documentation page docs/config-prereqs.txt highlights packaged
+    dependencies installable on a large range of platforms to build as
+    much of NUT as possible (incidentally, ones NUT CI farm uses to
+    test every iteration).
+- Remove upstreamed and obsolete patches:
+  * nut-doc-cables.patch
+  * nut-systemd-dirs.patch
+  * nut-upssched.patch
+  * nutscanner-ftbfs.patch
+  * openssl-1_1.patch
+  * reproducible.patch
+  * use-pkg-config-gdlib.diff
+- Source is no longer GPG signed, so keyring is not needed anymore
+  * nut.keyring
+- Unused additional source file removed (was added as a source, but
+  not packaged)
+  * nut.sleep
+- Don't install Solaris init files univited (PR#
+  * nut-Solaris-init-files.patch
+
+-------------------------------------------------------------------

Old:
----
  nut-2.7.4.tar.gz
  nut-2.7.4.tar.gz.sig
  nut-doc-cables.patch
  nut-systemd-dirs.patch
  nut-upssched.patch
  nut.keyring
  nut.sleep
  nutscanner-ftbfs.patch
  openssl-1_1.patch
  reproducible.patch
  use-pkg-config-gdlib.diff

New:
----
  nut-2.8.0.tar.gz
  nut-2.8.0.tar.gz.sha256
  nut-Solaris-init-files.patch
  nut.rpmlintrc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nut.spec ++++++
--- /var/tmp/diff_new_pack.VyEl3H/_old  2023-02-07 18:48:54.335073788 +0100
+++ /var/tmp/diff_new_pack.VyEl3H/_new  2023-02-07 18:48:54.343073831 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package nut
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,10 +16,8 @@
 #
 
 
-%bcond_with texdoc
-
-%define CGIPATH                %{apache_serverroot}/cgi-bin/nut
-%define HTMLPATH       %{apache_serverroot}/htdocs/nut
+%define CGIPATH                %{apache_serverroot}/cgi-bin/%{name}
+%define HTMLPATH       %{apache_serverroot}/htdocs/%{name}
 %define MODELPATH      %{_libexecdir}/ups/driver
 %define STATEPATH      %{_localstatedir}/lib/ups
 %define CONFPATH       %{_sysconfdir}/ups
@@ -35,57 +33,67 @@
 %define USBNONHIDDRIVERS %(zcat %{SOURCE0} | tr a-z A-Z | grep -a -A1 _USB     
  | sed -n 
's/.*ATTR{IDVENDOR}==%{QUOTE}%{BACKSLASH}%{LBRACE}[^%{QUOTE}]*%{BACKSLASH}%{RBRACE}%{QUOTE},
 
ATTR{IDPRODUCT}==%{QUOTE}%{BACKSLASH}%{LBRACE}[^%{QUOTE}]*%{BACKSLASH}%{RBRACE}%{QUOTE},
 
MODE=.*/modalias%{LBRACE}usb:v%{BACKSLASH}1p%{BACKSLASH}2d*dc*dsc*dp*ic*isc*ip*%{RBRACE}/p'
 | tr '%{BACKSLASH}n' ' ')
 %define systemdsystemdutildir %(pkg-config --variable=systemdutildir systemd)
 %define bashcompletionsdir %(pkg-config bash-completion 
--variable=completionsdir)
+%bcond_with texdoc
+%if 0%{?suse_version} >= 1500
+%bcond_without libi2c
+%else
+%bcond_with libi2c
+%endif
+%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400
+%bcond_without libmodbus
+%else
+%bcond_with libmodbus
+%endif
+%if 0%{?suse_version} == 1500
+%bcond_without libnsl
+%else
+%bcond_with libnsl
+%endif
+%ifarch %{ix86} x86_64 ia64
+%bcond_without libfreeipmi
+%else
+%bcond_with libfreeipmi
+%endif
 Name:           nut
-Version:        2.7.4
+Version:        2.8.0
 Release:        0
 Summary:        Network UPS Tools Core (Uninterruptible Power Supply 
Monitoring)
 License:        GPL-2.0-or-later
 Group:          Hardware/UPS
-URL:            http://www.networkupstools.org/
-Source:         
http://www.networkupstools.org/source/2.7/%{name}-%{version}.tar.gz
+URL:            https://www.networkupstools.org/
+Source0:        
https://github.com/networkupstools/nut/releases/download/v2.8.0/%{name}-%{version}.tar.gz
+Source1:        
https://github.com/networkupstools/nut/releases/download/v2.8.0/%{name}-%{version}.tar.gz.sha256
 Source2:        README.SUSE
+Source3:        nut.rpmlintrc
 Source6:        nut.system-sleep
-Source7:        nut.sleep
-Source8:        
http://www.networkupstools.org/source/2.7/%{name}-%{version}.tar.gz.sig
-Source9:        %{name}.keyring
 Patch0:         nut-preconfig.patch
-Patch3:         nut-notifyflag.patch
-# PATCH-FIX-UPSTREAM nut-systemd-dirs.patch sbra...@suse.cz -- Fix systemd 
targets.
-Patch7:         nut-systemd-dirs.patch
+Patch1:         nut-notifyflag.patch
 # PATCH-FEATURE-OPENSUSE nut-doc-fixed-date.patch sbra...@suse.cz -- Make doc 
builds reproducible.
-Patch8:         nut-doc-fixed-date.patch
-# PATCH-FIX-UPSTREAM nut-doc-cables.patch sbra...@suse.cz -- Build HTML 
documentation of cables.
-Patch9:         nut-doc-cables.patch
-# PATCH-FIX-UPSTREAM use-pkg-config-gdlib.diff alarr...@suse.com -- Use 
pkg-config to obtain CFLAGS and LDFLAGS to use when building with gd
-Patch10:        use-pkg-config-gdlib.diff
-Patch11:        openssl-1_1.patch
-Patch12:        nut-upssched.patch
-Patch13:        reproducible.patch
-Patch14:        nutscanner-ftbfs.patch
-Patch15:        harden_nut-driver.service.patch
-Patch16:        harden_nut-monitor.service.patch
-Patch17:        harden_nut-server.service.patch
+Patch2:         nut-doc-fixed-date.patch
+# PATCH-FIX-UPSTREAM - do not install Solaris init files uninvited
+Patch3:         nut-Solaris-init-files.patch
+Patch10:        harden_nut-driver.service.patch
+Patch11:        harden_nut-monitor.service.patch
+Patch12:        harden_nut-server.service.patch
 BuildRequires:  apache-rpm-macros
 BuildRequires:  asciidoc
-BuildRequires:  avahi-devel
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
 BuildRequires:  libcppunit-devel
 BuildRequires:  libtool
-%if 0%{?suse_version} >= 1500
-BuildRequires:  libnsl-devel
-%endif
-BuildRequires:  libusb-devel
 BuildRequires:  libxml2-tools
 BuildRequires:  libxslt-tools
 BuildRequires:  net-snmp-devel
 BuildRequires:  pkgconfig
-BuildRequires:  source-highlight
 BuildRequires:  tcpd-devel
+BuildRequires:  pkgconfig(avahi-client)
+BuildRequires:  pkgconfig(avahi-core)
+BuildRequires:  pkgconfig(bash-completion)
 BuildRequires:  pkgconfig(dbus-glib-1)
 BuildRequires:  pkgconfig(gdlib)
 BuildRequires:  pkgconfig(libpowerman)
 BuildRequires:  pkgconfig(libsystemd)
+BuildRequires:  pkgconfig(libusb-1.0)
 BuildRequires:  pkgconfig(neon)
 BuildRequires:  pkgconfig(openssl)
 BuildRequires:  pkgconfig(udev)
@@ -101,12 +109,17 @@
 Obsoletes:      nut-classic < %{version}
 Obsoletes:      nut-hal < %{version}
 %{?systemd_requires}
-BuildRequires:  pkgconfig(bash-completion)
-%ifarch %{ix86} x86_64 ia64
+%if %{with libfreeipmi}
 BuildRequires:  pkgconfig(libfreeipmi)
 %endif
-%if 0%{?suse_version} >= 1500
-Requires(pre):  user(upsd)
+%if %{with libi2c}
+BuildRequires:  libi2c0-devel
+%endif
+%if %{with libmodbus}
+BuildRequires:  pkgconfig(libmodbus)
+%endif
+%if %{with libnsl}
+BuildRequires:  pkgconfig(libnsl)
 %endif
 %if %{with texdoc}
 BuildRequires:  asciidoc-latex-backend
@@ -115,6 +128,10 @@
 Obsoletes:      %{name}-devel-doc-pdf <= %{version}
 Obsoletes:      %{name}-doc-pdf <= %{version}
 %endif
+%if 0%{?suse_version} >= 1500
+BuildRequires:  source-highlight
+Requires(pre):  user(upsd)
+%endif
 
 %description
 Core package of Network UPS Tools.
@@ -135,34 +152,45 @@
 Network UPS Tools is a collection of programs which provide a common
 interface for monitoring and administering UPS hardware.
 
-%package -n libnutclient0
+%package -n libnutclient2
 Summary:        Network UPS Tools Library (Uninterruptible Power Supply 
Monitoring)
 Group:          System/Libraries
 Conflicts:      libupsclient1
 
-%description -n libnutclient0
+%description -n libnutclient2
 Shared library for the Network UPS Tools.
 
 Network UPS Tools is a collection of programs which provide a common
 interface for monitoring and administering UPS hardware.
 
-%package -n libnutscan1
+%package -n libnutscan2
 Summary:        Network UPS Tools Library (Uninterruptible Power Supply 
Monitoring)
 Group:          System/Libraries
 Conflicts:      libupsclient1
 
-%description -n libnutscan1
+%description -n libnutscan2
 Shared library for the Network UPS Tools.
 
 Network UPS Tools is a collection of programs which provide a common
 interface for monitoring and administering UPS hardware.
 
-%package -n libupsclient4
+%package -n libupsclient6
 Summary:        Network UPS Tools Library (Uninterruptible Power Supply 
Monitoring)
 Group:          System/Libraries
 Conflicts:      libupsclient1
 
-%description -n libupsclient4
+%description -n libupsclient6
+Shared library for the Network UPS Tools.
+
+Network UPS Tools is a collection of programs which provide a common
+interface for monitoring and administering UPS hardware.
+
+%package -n libnutclientstub1
+Summary:        Network UPS Tools Library (Uninterruptible Power Supply 
Monitoring)
+Group:          System/Libraries
+Conflicts:      libupsclient1
+
+%description -n libnutclientstub1
 Shared library for the Network UPS Tools.
 
 Network UPS Tools is a collection of programs which provide a common
@@ -173,7 +201,7 @@
 Group:          Hardware/UPS
 Requires:       %{name} = %{version}
 Enhances:       %{name}
-Supplements:    packageand(%{name}:apache2)
+Supplements:    (%{name} and apache2)
 
 %description cgi
 Web server support package for the Network UPS Tools.
@@ -186,10 +214,11 @@
 %package devel
 Summary:        Network UPS Tools (Uninterruptible Power Supply Monitoring)
 Group:          Development/Libraries/C and C++
-Requires:       libnutclient0 = %{version}-%{release}
-Requires:       libnutscan1 = %{version}-%{release}
-Requires:       libupsclient4 = %{version}-%{release}
-Requires:       openssl-devel
+Requires:       libnutclient2 = %{version}-%{release}
+Requires:       libnutclientstub1 = %{version}-%{release}
+Requires:       libnutscan2 = %{version}-%{release}
+Requires:       libupsclient6 = %{version}-%{release}
+Requires:       pkgconfig(openssl)
 
 %description devel
 Network UPS Tools is a collection of programs which provide a common
@@ -280,51 +309,40 @@
 
 Network UPS Tools is a collection of programs which provide a common
 interface for monitoring and administering UPS hardware.
-
 %endif
 
 %prep
-%setup -q
-cp -a %{SOURCE2} %{SOURCE6} %{SOURCE7} .
-%patch0
-%patch3
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
+%autosetup -p1
+cp -a %{SOURCE2} .
 sed -i s/@now@/`date -r ChangeLog +%%Y-%%m-%%d`/g docs/docinfo.xml.in
-%patch15 -p1
-%patch16 -p1
-%patch17 -p1
-
-sed -i s:%{_prefix}/local/ups/bin:/bin: conf/upssched.conf.sample.in
 
 %build
 autoreconf -fvi
-%if 0%{?suse_version} > 1500
-export CXXFLAGS="%{optflags} -std=gnu++14"
-%endif
 %configure \
        --disable-static \
        --sysconfdir=%{CONFPATH} \
-       --datadir=%{_datadir}/nut \
+       --datadir=%{_datadir}/%{name} \
        --with-all \
 %if %{with texdoc}
-       --with-doc \
+       --with-doc="man html-single html-chunked pdf" \
 %else
-       --with-doc="html-single html-chunked" \
+       --with-doc="man html-single html-chunked" \
 %endif
        --with-ssl \
        --with-openssl \
        --without-nss \
+%if %{without libmodbus}
+       --without-modbus \
+%endif
+%if %{with libnsl}
        --with-wrap \
-%ifnarch %{ix86} x86_64 ia64
+%endif
+%if %{without libfreeipmi}
        --without-ipmi \
 %endif
+%if %{without libi2c}
+       --without-i2c
+%endif
        --with-htmlpath=%{HTMLPATH} \
        --with-cgipath=%{CGIPATH} \
        --with-statepath=%{STATEPATH} \
@@ -336,31 +354,27 @@
        --enable-option-checking=fatal
 
 # does not create reproducible output with parallelism
-make -j1
+%make_build -j1
 
 %install
 %make_install
 find %{buildroot} -type f -name "*.la" -delete -print
-
 mkdir -p %{buildroot}%{STATEPATH}
-# initscript
+mkdir -p %{buildroot}%{_docdir}/%{name}
 mkdir -p %{buildroot}%{_sbindir}
+
+# initscript
 ln -s service %{buildroot}%{_sbindir}/rcnut-driver
 ln -s service %{buildroot}%{_sbindir}/rcnut-server
 ln -s service %{buildroot}%{_sbindir}/rcnut-monitor
-mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
-install -m 644 scripts/logrotate/nutlogd 
%{buildroot}%{_sysconfdir}/logrotate.d/nut
-mkdir -p %{buildroot}%{STATEPATH}
 rename .sample "" %{buildroot}%{_sysconfdir}/ups/*.sample
+mv %{buildroot}%{_tmpfilesdir}/nut-common.{tmpfiles,conf}
 
-install -d %{buildroot}/usr/lib/systemd/system-sleep
-install nut.system-sleep %{buildroot}/usr/lib/systemd/system-sleep/%{name}.sh
-
-mkdir -p %{buildroot}%{bashcompletionsdir}
-install -m0644 scripts/misc/nut.bash_completion 
%{buildroot}%{bashcompletionsdir}/nut
+install -D -m 750 %{SOURCE6} 
%{buildroot}%{systemdsystemdutildir}/system-sleep/%{name}.sh
+install -D -m 644 scripts/logrotate/nutlogd 
%{buildroot}%{_sysconfdir}/logrotate.d/%{name}
+install -D -m 644 scripts/misc/nut.bash_completion 
%{buildroot}%{bashcompletionsdir}/%{name}
 
 # Documentation
-mkdir -p %{buildroot}%{_docdir}/%{name}
 cp -a docs/*.txt docs/cables docs/images %{buildroot}%{_docdir}/%{name}/
 cp -a docs/*.css docs/*.html %{buildroot}%{_docdir}/%{name}/
 %if %{with texdoc}
@@ -368,7 +382,8 @@
 %endif
 
 # Not needed for packaged contents:
-rm %{buildroot}%{_docdir}/%{name}/packager-guide.*
+rm -f %{buildroot}%{_docdir}/%{name}/packager-guide.*
+rm -f %{buildroot}%{_docdir}/%{name}/cables/Makefile.am
 
 # Create symlinks for man pages
 %fdupes -s %{buildroot}%{_mandir}
@@ -377,7 +392,7 @@
 %if 0%{?suse_version} < 1330
 getent passwd %{NUT_USER} >/dev/null || useradd -r -g %{NUT_GROUP} -s 
/bin/false -c "UPS daemon" -d /sbin %{NUT_USER} 2>/dev/null
 %endif
-%service_add_pre nut-driver.service nut-server.service nut-monitor.service
+%service_add_pre nut-server.service nut-monitor.service 
nut-driver-enumerator.path nut-driver-enumerator.service nut-driver.target 
nut.target
 
 %post
 # Generate initial passwords.
@@ -402,32 +417,43 @@
 fi
 # And finally trigger udev to set permissions according to newly installed 
rules files.
 udevadm trigger --subsystem-match=usb --property-match=DEVTYPE=usb_device
-%service_add_post nut-driver.service nut-server.service nut-monitor.service
+%service_add_post nut-server.service nut-monitor.service 
nut-driver-enumerator.path nut-driver-enumerator.service nut-driver.target 
nut.target
+%tmpfiles_create %{_tmpfilesdir}/%{name}-common.conf
 
 %preun
-%service_del_preun nut-driver.service nut-server.service nut-monitor.service
+%service_del_preun nut-server.service nut-monitor.service 
nut-driver-enumerator.path nut-driver-enumerator.service nut-driver.target 
nut.target
 
 %postun
-%service_del_postun nut-driver.service nut-server.service nut-monitor.service
+%service_del_postun nut-server.service nut-monitor.service 
nut-driver-enumerator.path nut-driver-enumerator.service nut-driver.target 
nut.target
 
-%post   -n libnutclient0 -p /sbin/ldconfig
-%postun -n libnutclient0 -p /sbin/ldconfig
-%post   -n libnutscan1 -p /sbin/ldconfig
-%postun -n libnutscan1 -p /sbin/ldconfig
-%post   -n libupsclient4 -p /sbin/ldconfig
-%postun -n libupsclient4 -p /sbin/ldconfig
+%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150400
+%ldconfig_scriptlets -n libnutclient2
+%ldconfig_scriptlets -n libnutclientstub1
+%ldconfig_scriptlets -n libnutscan2
+%ldconfig_scriptlets -n libupsclient6
+%else
+%post   -n libnutclient2 -p /sbin/ldconfig
+%postun -n libnutclient2 -p /sbin/ldconfig
+%post   -n libnutclientstub1 -p /sbin/ldconfig
+%postun -n libnutclientstub1 -p /sbin/ldconfig
+%post   -n libnutscan2 -p /sbin/ldconfig
+%postun -n libnutscan2 -p /sbin/ldconfig
+%post   -n libupsclient6 -p /sbin/ldconfig
+%postun -n libupsclient6 -p /sbin/ldconfig
+%endif
 
 %files
 %doc AUTHORS ChangeLog MAINTAINERS NEWS README README.SUSE UPGRADING
 %license COPYING
 %config %{_sysconfdir}/logrotate.d/*
 %{_bindir}/*
-%{_datadir}/nut
+%{_datadir}/%{name}
 %{_mandir}/man5/*%{ext_man}
 %{_mandir}/man8/*%{ext_man}
 %exclude %{_mandir}/man8/netxml-ups*.*
 %exclude %{_mandir}/man8/snmp-ups*.*
 %dir %{_libexecdir}/ups
+%{_libexecdir}/nut-driver-enumerator.sh
 %{_sbindir}/*
 %{_udevrulesdir}/*.rules
 %config(noreplace) %{CONFPATH}/hosts.conf
@@ -443,11 +469,16 @@
 %{MODELPATH}/*
 %exclude %{MODELPATH}/snmp-ups
 %exclude %{MODELPATH}/netxml-ups
-%attr(700,%{NUT_USER},%{NUT_GROUP}) %{STATEPATH}
+%dir %attr(700,%{NUT_USER},%{NUT_GROUP}) %{STATEPATH}
+%{_unitdir}/*.path
+%{_unitdir}/*.target
 %{_unitdir}/*.service
 %{systemdsystemdutildir}/system-shutdown/*
-/usr/lib/systemd/system-sleep/%{name}.sh
+%{systemdsystemdutildir}/system-sleep/%{name}.sh
 %{bashcompletionsdir}/*
+%{_tmpfilesdir}/%{name}-common.conf
+%ghost %{_rundir}/%{name}
+%ghost %attr(700,%{NUT_USER},%{NUT_GROUP}) %{STATEPATH}/%{name}
 
 %files drivers-net
 %{MODELPATH}/snmp-ups
@@ -455,13 +486,16 @@
 %{_mandir}/man8/netxml-ups*%{ext_man}
 %{_mandir}/man8/snmp-ups*%{ext_man}
 
-%files -n libnutclient0
+%files -n libnutclient2
 %{_libdir}/libnutclient.so.*
 
-%files -n libnutscan1
+%files -n libnutclientstub1
+%{_libdir}/libnutclientstub.so.*
+
+%files -n libnutscan2
 %{_libdir}/libnutscan.so.*
 
-%files -n libupsclient4
+%files -n libupsclient6
 %{_libdir}/libupsclient.so.*
 
 %files cgi
@@ -487,6 +521,7 @@
 %files doc-html
 %{_docdir}/%{name}/FAQ.html
 %{_docdir}/%{name}/cables.html
+%{_docdir}/%{name}/solaris-usb.html
 %{_docdir}/%{name}/user-manual.html
 %{_docdir}/%{name}/*.css
 
@@ -499,12 +534,12 @@
 %doc %dir %{_docdir}/%{name}
 %{_docdir}/%{name}/FAQ.pdf
 %{_docdir}/%{name}/cables.pdf
+%{_docdir}/%{name}/solaris-usb.pdf
 %{_docdir}/%{name}/user-manual.pdf
 
 %files devel-doc-pdf
 %doc %dir %{_docdir}/%{name}
 %{_docdir}/%{name}/developer-guide.pdf
-
 %endif
 
 %changelog

++++++ harden_nut-driver.service.patch ++++++
--- /var/tmp/diff_new_pack.VyEl3H/_old  2023-02-07 18:48:54.399074132 +0100
+++ /var/tmp/diff_new_pack.VyEl3H/_new  2023-02-07 18:48:54.403074154 +0100
@@ -1,9 +1,9 @@
 Index: nut-2.7.4/scripts/systemd/nut-driver.service.in
 ===================================================================
---- nut-2.7.4.orig/scripts/systemd/nut-driver.service.in
-+++ nut-2.7.4/scripts/systemd/nut-driver.service.in
-@@ -4,6 +4,17 @@ After=local-fs.target network.target
- StopWhenUnneeded=yes
+--- a/scripts/systemd/nut-dri...@.service.in
++++ b/scripts/systemd/nut-dri...@.service.in
+@@ -38,6 +38,17 @@
+ # Finally note that "nut-driver-enumerator.service" should take care of this.
  
  [Service]
 +# added automatically, for details please see
@@ -17,7 +17,7 @@
 +ProtectControlGroups=true
 +RestrictRealtime=true
 +# end of automatic additions 
- ExecStart=@SBINDIR@/upsdrvctl start
- ExecStop=@SBINDIR@/upsdrvctl stop
- Type=forking
+ EnvironmentFile=-@CONFPATH@/nut.conf
+ SyslogIdentifier=%N
+ ExecStart=/bin/sh -c 'NUTDEV="`@NUT_LIBEXECDIR@/nut-driver-enumerator.sh 
--get-device-for-service %i`" && [ -n "$NUTDEV" ] || { echo "FATAL: Could not 
find a NUT device section for service unit %i" >&2 ; exit 1 ; } ; 
@SBINDIR@/upsdrvctl start "$NUTDEV"'
 

++++++ harden_nut-monitor.service.patch ++++++
--- /var/tmp/diff_new_pack.VyEl3H/_old  2023-02-07 18:48:54.419074240 +0100
+++ /var/tmp/diff_new_pack.VyEl3H/_new  2023-02-07 18:48:54.423074261 +0100
@@ -1,9 +1,9 @@
 Index: nut-2.7.4/scripts/systemd/nut-monitor.service.in
 ===================================================================
---- nut-2.7.4.orig/scripts/systemd/nut-monitor.service.in
-+++ nut-2.7.4/scripts/systemd/nut-monitor.service.in
-@@ -3,6 +3,17 @@ Description=Network UPS Tools - power de
- After=local-fs.target network.target nut-server.service
+--- a/scripts/systemd/nut-monitor.service.in
++++ b/scripts/systemd/nut-monitor.service.in
+@@ -3,6 +3,17 @@
+ PartOf=nut.target
  
  [Service]
 +# added automatically, for details please see
@@ -17,7 +17,7 @@
 +ProtectControlGroups=true
 +RestrictRealtime=true
 +# end of automatic additions 
- ExecStart=@SBINDIR@/upsmon
- PIDFile=@PIDPATH@/upsmon.pid
- Type=forking
+ EnvironmentFile=-@CONFPATH@/nut.conf
+ SyslogIdentifier=%N
+ ExecStart=@SBINDIR@/upsmon -F
 

++++++ harden_nut-server.service.patch ++++++
--- /var/tmp/diff_new_pack.VyEl3H/_old  2023-02-07 18:48:54.439074347 +0100
+++ /var/tmp/diff_new_pack.VyEl3H/_new  2023-02-07 18:48:54.443074368 +0100
@@ -2,8 +2,8 @@
 ===================================================================
 --- nut-2.7.4.orig/scripts/systemd/nut-server.service.in
 +++ nut-2.7.4/scripts/systemd/nut-server.service.in
-@@ -8,6 +8,17 @@ Wants=nut-driver.service
- Before=nut-monitor.service
+@@ -18,6 +18,17 @@
+ PartOf=nut.target
  
  [Service]
 +# added automatically, for details please see
@@ -17,7 +17,7 @@
 +ProtectControlGroups=true
 +RestrictRealtime=true
 +# end of automatic additions 
- ExecStart=@SBINDIR@/upsd 
- Type=forking
- 
+ EnvironmentFile=-@CONFPATH@/nut.conf
+ SyslogIdentifier=%N
+ # Note: foreground mode by default skips writing a PID file (and
 

++++++ nut-2.7.4.tar.gz -> nut-2.8.0.tar.gz ++++++
++++ 246290 lines of diff (skipped)

++++++ nut-2.8.0.tar.gz.sha256 ++++++
c3e5a708da797b7c70b653d37b1206a000fcb503b85519fe4cdf6353f792bfe5  
nut-2.8.0.tar.gz

++++++ nut-Solaris-init-files.patch ++++++
>From 05ccf412f9212b8206ea33a56e5dde2e2a8016b8 Mon Sep 17 00:00:00 2001
From: Jim Klimov <j...@jimklimov.com>
Date: Sun, 14 Aug 2022 22:03:57 +0200
Subject: [PATCH] configure.ac, scripts/Solaris/Makefile.am: introduce
 WITH_SOLARIS_INIT and depend WITH_SOLARIS_SMF on whether we want packaging
 for Solaris/illumos [#1554]

---
 configure.ac                | 104 ++++++++++++++++++++++++++----------
 scripts/Solaris/Makefile.am |  17 +-----
 2 files changed, 79 insertions(+), 42 deletions(-)

diff --git a/configure.ac b/configure.ac
index 065fcd76f1..d9b3859c42 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2090,34 +2090,8 @@ else
 fi
 AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgconfigdir}")
 
-AC_MSG_CHECKING(whether to install Solaris SMF files)
-solarissmf="auto"
-AC_ARG_WITH([solaris-smf],
-       AS_HELP_STRING([--with-solaris-smf=(yes|auto|no)], [Enable installation 
of NUT scripts and manifests for Solaris Service Management Framework (auto)]),
-[
-       case "${withval}" in
-       auto|"")
-               solarissmf="auto"
-               ;;
-       yes|no)
-               solarissmf="${withval}"
-               ;;
-       *)
-               AC_MSG_ERROR([Unexpected argument for 
--with-solaris-smf=${withval}])
-               ;;
-       esac
-], [])
-
-if test x"$solarissmf" = xauto ; then
-       if test -x /usr/sbin/svcadm && test -x /usr/sbin/svccfg && test -x 
/usr/bin/svcs ; then
-               solarissmf="yes"
-       else
-               solarissmf="no"
-       fi
-fi
-AC_MSG_RESULT([${solarissmf}])
-AM_CONDITIONAL(WITH_SOLARIS_SMF, test x"$solarissmf" = x"yes")
 
+dnl Options for Solaris/illumos `make install` and `make package`
 AC_MSG_CHECKING(whether to make Solaris SVR4 packages)
 solarispkg_svr4="auto"
 AC_ARG_WITH([solaris-pkg-svr4],
@@ -2146,6 +2120,7 @@ fi
 AC_MSG_RESULT([${solarispkg_svr4}])
 AM_CONDITIONAL(WITH_SOLARIS_PKG_SVR4, test x"$solarispkg_svr4" = x"yes")
 
+
 AC_MSG_CHECKING(whether to make Solaris IPS packages)
 solarispkg_ips="auto"
 AC_ARG_WITH([solaris-pkg-ips],
@@ -2174,6 +2149,81 @@ fi
 AC_MSG_RESULT([${solarispkg_ips}])
 AM_CONDITIONAL(WITH_SOLARIS_PKG_IPS, test x"$solarispkg_ips" = x"yes")
 
+
+dnl NOTE: Be sure to customize e.g.  --datarootdir=/usr/share/nut to install
+dnl these scripts not into default location as e.g. /usr/share/solaris-smf
+AC_MSG_CHECKING(whether to install Solaris SMF files)
+solarissmf="auto"
+AC_ARG_WITH([solaris-smf],
+       AS_HELP_STRING([--with-solaris-smf=(yes|auto|no)], [Enable installation 
of NUT scripts and manifests for Solaris Service Management Framework (auto)]),
+[
+       case "${withval}" in
+       auto|"")
+               solarissmf="auto"
+               ;;
+       yes|no)
+               solarissmf="${withval}"
+               ;;
+       *)
+               AC_MSG_ERROR([Unexpected argument for 
--with-solaris-smf=${withval}])
+               ;;
+       esac
+], [])
+
+if test x"$solarissmf" = xauto ; then
+       if test -x /usr/sbin/svcadm && test -x /usr/sbin/svccfg && test -x 
/usr/bin/svcs ; then
+               solarissmf="yes"
+       else
+               case "${solarispkg_ips}${solarispkg_svr4}" in
+                       *yes*) solarisinit="yes" ;; dnl Want to install so we 
can generally package
+                       *) solarissmf="no" ;; dnl Target not solarish
+               esac
+       fi
+fi
+AC_MSG_RESULT([${solarissmf}])
+AM_CONDITIONAL(WITH_SOLARIS_SMF, test x"$solarissmf" = x"yes")
+
+
+AC_MSG_CHECKING(whether to install Solaris SVR4 (legacy) init-script files)
+solarisinit="auto"
+AC_ARG_WITH([solaris-init],
+       AS_HELP_STRING([--with-solaris-init=(yes|auto|no)], [Enable 
installation of NUT legacy init-scripts for Solaris/illumos (auto)]),
+[
+       case "${withval}" in
+       auto|"")
+               solarisinit="auto"
+               ;;
+       yes|no)
+               solarisinit="${withval}"
+               ;;
+       *)
+               AC_MSG_ERROR([Unexpected argument for 
--with-solaris-init=${withval}])
+               ;;
+       esac
+], [])
+
+if test x"$solarisinit" = xauto ; then
+       dnl Depends on usability of SMF or making for packaging
+       case "${solarispkg_ips}${solarispkg_svr4}" in
+               *yes*) solarisinit="yes" ;; dnl Want to install so we can 
generally package
+               *)
+                       case ${target_os} in
+                               solaris*|sunos*|SunOS*|illumos*)
+                                       if test "$solarissmf" = x"yes" ; then
+                                               dnl no need on modern OSes
+                                               solarisinit="no"
+                                       else
+                                               solarisinit="yes"
+                                       fi
+                                       ;;
+                               *) solarisinit="no" ;; dnl Some other OS
+                       esac
+                       ;;
+       esac
+fi
+AC_MSG_RESULT([${solarisinit}])
+AM_CONDITIONAL(WITH_SOLARIS_INIT, test x"$solarisinit" = x"yes")
+
 dnl Note: Currently there is no reliable automatic detection -
 dnl users have to ask they want systemd units installed, or
 dnl risk auto-detection like seen below.
diff --git a/scripts/Solaris/Makefile.am b/scripts/Solaris/Makefile.am
--- a/scripts/Solaris/Makefile.am       2022-04-23 13:56:07.000000000 +0200
+++ b/scripts/Solaris/Makefile.am       2023-01-25 19:46:38.925491136 +0100
@@ -29,8 +29,10 @@ sbin_SCRIPTS = ../upsdrvsvcctl/upsdrvsvc
 SOLARIS_CHECK_TARGETS += check-local-solaris-smf
 endif
 
+if WITH_SOLARIS_INIT
 solarisinitscriptdir = @datadir@/solaris-init
 solarisinitscript_SCRIPTS = nut
+endif
 
 SOLARIS_PACKAGE_TARGETS =
 

++++++ nut-doc-fixed-date.patch ++++++
--- /var/tmp/diff_new_pack.VyEl3H/_old  2023-02-07 18:48:55.451079786 +0100
+++ /var/tmp/diff_new_pack.VyEl3H/_new  2023-02-07 18:48:55.455079808 +0100
@@ -2,30 +2,30 @@
 ===================================================================
 --- nut-2.7.4.orig/docs/Makefile.am
 +++ nut-2.7.4/docs/Makefile.am
-@@ -92,8 +92,8 @@ packager-guide.html packager-guide.chunk
- #   $ ASCIIDOC_VERBOSE=-v make
- A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \
-     --xsltproc-opts "--nonet" \
--    --xsltproc-opts "--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d`\"" 
\
--    --xsltproc-opts "--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S`\"" 
\
+@@ -165,8 +165,8 @@ packager-guide.html packager-guide.chunk
+ A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) \
+     --attribute=icons \
+     --xsltproc-opts="--nonet" \
+-    --xsltproc-opts="--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d`\"" 
\
+-    --xsltproc-opts="--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S`\"" 
\
 +    --xsltproc-opts "--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d -r 
$(top_srcdir)/ChangeLog`\"" \
 +    --xsltproc-opts "--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S -r 
$(top_srcdir)/ChangeLog`\"" \
-     --xsltproc-opts "--stringparam nut.nutversion \"@PACKAGE_VERSION@\"" \
-     --attribute iconsdir=$(srcdir)/images \
+     --xsltproc-opts="--stringparam nut.nutversion \"@PACKAGE_VERSION@\"" \
+     --attribute=iconsdir="$(srcdir)/images" \
      --attribute=badges \
 Index: nut-2.7.4/docs/man/Makefile.am
 ===================================================================
 --- nut-2.7.4.orig/docs/man/Makefile.am
 +++ nut-2.7.4/docs/man/Makefile.am
-@@ -591,8 +591,8 @@ if HAVE_ASCIIDOC
- 
- .txt.html:
-       $(ASCIIDOC) --backend=xhtml11 \
--              --attribute localdate=`TZ=UTC date +%Y-%m-%d` \
--              --attribute localtime=`TZ=UTC date +%H:%M:%S` \
+@@ -924,8 +924,8 @@ if HAVE_ASCIIDOC
+        echo "  DOC-MAN-HTML Generating $@"; \
+        $(DOCBUILD_BEGIN) ; RES=0; \
+        $(ASCIIDOC) --backend=xhtml11 $${A2X_VERBOSE} \
+-              --attribute localdate="`TZ=UTC date +%Y-%m-%d`" \
+-              --attribute localtime="`TZ=UTC date +%H:%M:%S`" \
 +              --attribute localdate=`TZ=UTC date +%Y-%m-%d -r 
$(top_srcdir)/ChangeLog` \
 +              --attribute localtime=`TZ=UTC date +%H:%M:%S -r 
$(top_srcdir)/ChangeLog` \
                --attribute nutversion="@PACKAGE_VERSION@" \
-               -o $@ $<
- 
+               --attribute srcdir="$(abs_srcdir)" \
+               --attribute builddir="$(abs_builddir)" \
 

++++++ nut-notifyflag.patch ++++++
--- /var/tmp/diff_new_pack.VyEl3H/_old  2023-02-07 18:48:55.471079894 +0100
+++ /var/tmp/diff_new_pack.VyEl3H/_new  2023-02-07 18:48:55.479079937 +0100
@@ -1,6 +1,6 @@
---- conf/upsmon.conf.sample.in
-+++ conf/upsmon.conf.sample.in
-@@ -243,6 +243,15 @@
+--- a/conf/upsmon.conf.sample.in
++++ b/conf/upsmon.conf.sample.in
+@@ -312,6 +312,15 @@
  # IGNORE - Don't do anything
  #
  # If you use IGNORE, don't use any other flags on the same line.

++++++ nut-preconfig.patch ++++++
--- /var/tmp/diff_new_pack.VyEl3H/_old  2023-02-07 18:48:55.499080044 +0100
+++ /var/tmp/diff_new_pack.VyEl3H/_new  2023-02-07 18:48:55.503080066 +0100
@@ -1,14 +1,14 @@
---- conf/hosts.conf.sample
-+++ conf/hosts.conf.sample
+--- a/conf/hosts.conf.sample
++++ b/conf/hosts.conf.sample
 @@ -27,3 +27,5 @@
  # MONITOR myups@localhost "Local UPS"
  # MONITOR su2200@10.64.1.1 "Finance department"
  # MONITOR mat...@shs-server.example.edu "Sierra High School data room #1"
 +
 +MONITOR myups@localhost "Local UPS"
---- conf/ups.conf.sample
-+++ conf/ups.conf.sample
-@@ -102,3 +102,8 @@
+--- a/conf/ups.conf.sample
++++ b/conf/ups.conf.sample
+@@ -200,3 +200,8 @@
  #
  # To find out if your driver supports any extra settings, start it with
  # the -h option and/or read the driver's documentation.
@@ -17,12 +17,12 @@
 +      driver = undefined
 +      port = /dev/undefined
 +      desc = "Local UPS"
---- conf/upsd.users.sample
-+++ conf/upsd.users.sample
-@@ -62,3 +62,11 @@
- # The matching MONITOR line in your upsmon.conf would look like this:
+--- a/conf/upsd.users.sample
++++ b/conf/upsd.users.sample
+@@ -73,3 +73,11 @@
  #
- # MONITOR myups@localhost 1 upsmon pass master        (or slave)
+ # See comments in the upsmon.conf(.sample) file for details about this
+ # keyword and the difference of NUT secondary and primary systems.
 +
 +[upsmaster]
 +      password = @UPSD_INITIAL_MASTER_PASSWORD@
@@ -31,11 +31,11 @@
 +[upsslave]
 +      password = @UPSD_INITIAL_SLAVE_PASSWORD@
 +      upsmon slave
---- conf/upsmon.conf.sample.in
-+++ conf/upsmon.conf.sample.in
-@@ -84,6 +84,8 @@
- # MONITOR su...@server.example.com 1 upsmon secretpass slave
- # MONITOR myups@localhost 1 upsmon pass master        (or slave)
+--- a/conf/upsmon.conf.sample.in
++++ b/conf/upsmon.conf.sample.in
+@@ -116,6 +116,8 @@
+ # MONITOR su...@server.example.com 1 upsmon secretpass secondary
+ # MONITOR myups@localhost 1 upsmon pass primary       # (or secondary)
  
 +MONITOR myups@localhost 1 upsmaster @UPSD_INITIAL_MASTER_PASSWORD@ master
 +

++++++ nut.rpmlintrc ++++++
addFilter("binary-or-shlib-calls-gethostbyname 
/usr/libexec/ups/driver/apcupsd-ups")
addFilter("logrotate-log-dir-not-packaged /var/log$")
addFilter("obsolete-not-provided nut-devel-doc-pdf")
addFilter("obsolete-not-provided nut-doc-pdf")
addFilter("obsolete-not-provided nut-hal")
addFilter("potential-bashisms /usr/libexec/nut-driver-enumerator.sh")

Reply via email to