commit 50ba8b2405aa19251546e96139574e85d39a6fcc934d951e8dd789ff7f990205 Author: Adrian Schröter Date: Fri Nov 15 13:59:27 2024 +0100 Sync from SUSE:SLFO:Main nut revision 71ffbff551d77025179c6fa023991893 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/README.SUSE b/README.SUSE new file mode 100644 index 0000000..4c7d4ed --- /dev/null +++ b/README.SUSE @@ -0,0 +1,161 @@ +COnfiguration and use of NUT in SuSE + +NUT in openSUSE comes in several packages: + +- nut - The core package. It features UPS monitoring and network UPS + management. + +and two additional packages: + +- nut-drivers-net - two additional drivers for network communication of + UPS daemons. You will need for advanced configuration (e. g. if you + want to manage shutdown of more computers sharing the same UPS). + +- nut-cgi provides support for monitoring UPS web pages using apache web + browser. Predefined address is http://localhost/nut/index.html + +nut Configuration + +NUT is pre-configured to use a local or remote UPS as far as possible. +But it still requires a minimal manual configuration before the first +use. + +This document contains: +- How to configure local or remote UPS (mandatory reading). +- How to configure to suspend to disk (optional reading). +- What to do in environment with possible service timeouts (optional + reading). + + +The default setup uses one local UPS. You have to define UPS type in +file /etc/ups/ups.conf. + + +It requires only few adoptions before you can start the service: + + + * Configuration of a locally connected UPS: + + In /etc/ups/ups.conf: + - Go to the [myups] section at the end of the file. + - Set driver key to the driver name supporting your UPS. + (see /usr/lib/ups/driver/ for possible drivers. Each driver + has a man page. Many USB UPSes are usbhid-ups.) + - Set port key to the device your UPS is connected to, + e.g. /dev/ttyS0 for first serial port (COM1) or + /dev/usb/hiddev0 + for USB HID UPS. + - Adjust desc key as you want. + + Start the service: + - "/etc/init.d/upsd start" + + + * Configuration of a UPS connected to a remote machine: + + In /etc/ups/ups.conf: + - Comment out or remove the [myups] section at the end of the + file. + + In /etc/ups/upsmon.conf: + - Find the uncommented MONITOR line followed by + "myups@localhost" and change it to: +MONITOR myups@remote_machine 1 upsslave remote_password slave + Where: + remote_machine is a hostname of the remote machine. + remote_password is the password used for upsslave on the + remote machine (you can find it in the remote file + /etc/ups/upsd.users). + + In /etc/ups/hosts.conf: + - Find the uncommented MONITOR line followed by + "myups@localhost". + - Change the hostname from "localhost" to the hostname of + the remote machine. + - Change the description as you want. + + In the remote /etc/ups/upsd.conf: + - Add a rule for the remote clients relevant to your network or + your needs. Standard local networks are: + 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 +ACL my_network 192.168.0.0/16 +ACCEPT my_network + + In the remote /etc/ups/upsd.users: + - Find the line allowfrom for upsslave user. + - Add your local machine name to the allowfrom list. + + In the remote SuSE firewall: + - Enable nut (Network UPS Tools) service (port 3493), e. g. by + "YaST2 firewall". + + Start the service: + - "/etc/init.d/upsd start" on both local and remote machines. + - If you have edited configuration of a running server, run + "/etc/init.d/upsd reload" + + + * Test the configuration using upsc or upslog: + + - "upsc myups@localhost" + Should display information about the UPS status. + + - "upslog -s myups@localhost -l -" + Should display UPS status log every 30 seconds. + (Press Ctrl-C keys to stop upslog). + +Notes: + +- Predefined user upsmaster + + There are two predefined users - upsmaster and upsslave. The passwords + for them are generated during the installation (see the "password" + lines in /etc/ups/upsd.users). + + User upsmaster has privileges to shut down master machine (default for + local UPS), upsslave has privileges to shut down slave machines. + + If you change it, or add another user, don't forget to adopt the + MONITOR lines in upsmon.conf on all machines using this user and + password combination to connect to the upsd. + + + +Suspend to disk + +If you want to configure nut to do suspend to disk instead of shutdown +you should: + +- Verify, that suspend to disk works correctly with your desktop: + sudo systemctl hibernate + (You can lose your unsaved data, if your computer does not support + suspend.) +- Change SHUTDOWNCMD in /etc/ups/upsmon.conf to: +SHUTDOWNCMD "/usr/bin/systemctl hibernate" +- Verify, that your UPS provides reasonable grace period to complete + suspend in all situations. + + + +Environment with possible service timeouts + +In some environments, there is no guarantee, that the machine will +correctly shut down, either because other machines providing critical +services are already down or because some services (e. g. squid) are +stopping too long and battery power is not sufficient. In this case, +you can prefer incorrect but fast shutdown. + +To fix this problem, you need to do: + +- Copy upsd-early-powerdown script to your /etc/init.d/ directory. + +- Edit following lines: + + Replace "FIXME scripts which should not stop before powerdown" by an + appropriate init script list. + + Replace "FIXME scripts which should stop before powerdown" by an + appropriate init script list. + +- Start YaST Runlevel Editor and enable this meta-service in + runlevels, where you want to apply early shutdown. diff --git a/harden_nut-driver.service.patch b/harden_nut-driver.service.patch new file mode 100644 index 0000000..a06e3cb --- /dev/null +++ b/harden_nut-driver.service.patch @@ -0,0 +1,21 @@ +diff -purN a/scripts/systemd/nut-driver@.service.in b/scripts/systemd/nut-driver@.service.in +--- a/scripts/systemd/nut-driver@.service.in 2023-10-07 16:06:44.000000000 +0200 ++++ b/scripts/systemd/nut-driver@.service.in 2023-11-03 19:46:30.856267504 +0100 +@@ -46,6 +46,17 @@ PartOf=nut-driver.target + # Finally note that "nut-driver-enumerator.service" should take care of this. + + [Service] ++# added automatically, for details please see ++# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort ++ProtectSystem=full ++ProtectHome=true ++ProtectHostname=true ++ProtectKernelTunables=true ++ProtectKernelModules=true ++ProtectKernelLogs=true ++ProtectControlGroups=true ++RestrictRealtime=true ++# end of automatic additions + Environment=NUT_IGNORE_NOWAIT=true + EnvironmentFile=-@CONFPATH@/nut.conf + SyslogIdentifier=%N diff --git a/harden_nut-monitor.service.patch b/harden_nut-monitor.service.patch new file mode 100644 index 0000000..c59333f --- /dev/null +++ b/harden_nut-monitor.service.patch @@ -0,0 +1,21 @@ +diff -purN a/scripts/systemd/nut-monitor.service.in b/scripts/systemd/nut-monitor.service.in +--- a/scripts/systemd/nut-monitor.service.in 2023-10-07 16:06:44.000000000 +0200 ++++ b/scripts/systemd/nut-monitor.service.in 2023-11-03 19:48:16.280004811 +0100 +@@ -25,6 +25,17 @@ Wants=nut-server.service + PartOf=nut.target + + [Service] ++# added automatically, for details please see ++# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort ++ProtectSystem=full ++ProtectHome=true ++ProtectHostname=true ++ProtectKernelTunables=true ++ProtectKernelModules=true ++ProtectKernelLogs=true ++ProtectControlGroups=true ++RestrictRealtime=true ++# end of automatic additions + EnvironmentFile=-@CONFPATH@/nut.conf + SyslogIdentifier=%N + ExecStartPre=-@SYSTEMD_TMPFILES_PROGRAM@ --create @systemdtmpfilesdir@/nut-common-tmpfiles.conf diff --git a/harden_nut-server.service.patch b/harden_nut-server.service.patch new file mode 100644 index 0000000..24bacc4 --- /dev/null +++ b/harden_nut-server.service.patch @@ -0,0 +1,21 @@ +diff -purN a/scripts/systemd/nut-server.service.in b/scripts/systemd/nut-server.service.in +--- a/scripts/systemd/nut-server.service.in 2023-10-07 16:06:44.000000000 +0200 ++++ b/scripts/systemd/nut-server.service.in 2023-11-03 19:49:51.496940092 +0100 +@@ -26,6 +26,17 @@ Before=nut-monitor.service + PartOf=nut.target + + [Service] ++# added automatically, for details please see ++# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort ++ProtectSystem=full ++ProtectHome=true ++ProtectHostname=true ++ProtectKernelTunables=true ++ProtectKernelModules=true ++ProtectKernelLogs=true ++ProtectControlGroups=true ++RestrictRealtime=true ++# end of automatic additions + # A busy server can be monitoring a lot of devices as well as replying + # to many clients. The "infinity" definition is actually capped by OS + # settings and hardcoded defaults; typically can be 65535+ nowadays. diff --git a/nut-2.8.2-repack.tar.gz b/nut-2.8.2-repack.tar.gz new file mode 100644 index 0000000..7adf6ba --- /dev/null +++ b/nut-2.8.2-repack.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee2ad73d2c28e761e277177c46545c13639dd76db710ca1dff5b6610bc0c864f +size 5691243 diff --git a/nut-doc-fixed-date.patch b/nut-doc-fixed-date.patch new file mode 100644 index 0000000..e76c854 --- /dev/null +++ b/nut-doc-fixed-date.patch @@ -0,0 +1,28 @@ +diff -purN a/docs/Makefile.am b/docs/Makefile.am +--- a/docs/Makefile.am 2023-10-16 10:06:18.000000000 +0200 ++++ b/docs/Makefile.am 2023-11-03 19:40:55.360576893 +0100 +@@ -248,8 +248,8 @@ solaris-usb.html solaris-usb.chunked sol + 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=docinfodir="$(builddir)" \ + --attribute=iconsdir="$(srcdir)/images" \ +diff -purN a/docs/man/Makefile.am b/docs/man/Makefile.am +--- a/docs/man/Makefile.am 2023-10-24 10:45:21.000000000 +0200 ++++ b/docs/man/Makefile.am 2023-11-03 19:41:55.114481978 +0100 +@@ -999,8 +999,8 @@ DOCBUILD_END = { \ + 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@" \ + --attribute srcdir="$(abs_srcdir)/" \ + --attribute builddir="$(abs_builddir)/" \ diff --git a/nut-notifyflag.patch b/nut-notifyflag.patch new file mode 100644 index 0000000..a1b4918 --- /dev/null +++ b/nut-notifyflag.patch @@ -0,0 +1,19 @@ +diff -purN a/conf/upsmon.conf.sample.in b/conf/upsmon.conf.sample.in +--- a/conf/upsmon.conf.sample.in 2023-10-28 23:36:02.000000000 +0200 ++++ b/conf/upsmon.conf.sample.in 2023-11-03 19:38:24.015393331 +0100 +@@ -364,6 +364,15 @@ POWERDOWNFLAG "@POWERDOWNFLAG@" + # + # If you use IGNORE, don't use any other flags on the same line. + ++NOTIFYFLAG ONLINE SYSLOG ++NOTIFYFLAG COMMOK SYSLOG ++NOTIFYFLAG SHUTDOWN SYSLOG ++NOTIFYFLAG ONBATT SYSLOG+WALL ++NOTIFYFLAG LOWBATT SYSLOG+WALL ++NOTIFYFLAG FSD SYSLOG+WALL ++NOTIFYFLAG NOCOMM SYSLOG+WALL ++NOTIFYFLAG COMMBAD SYSLOG+WALL ++ + # -------------------------------------------------------------------------- + # OFFDURATION - put "OFF" state into effect if it persists for this many seconds + # diff --git a/nut-preconfig.patch b/nut-preconfig.patch new file mode 100644 index 0000000..4ca72eb --- /dev/null +++ b/nut-preconfig.patch @@ -0,0 +1,48 @@ +diff -purN a/conf/hosts.conf.sample b/conf/hosts.conf.sample +--- a/conf/hosts.conf.sample 2023-02-28 13:49:32.000000000 +0100 ++++ b/conf/hosts.conf.sample 2023-11-03 19:28:46.048488997 +0100 +@@ -27,3 +27,5 @@ + # MONITOR myups@localhost "Local UPS" + # MONITOR su2200@10.64.1.1 "Finance department" + # MONITOR matrix@shs-server.example.edu "Sierra High School data room #1" ++ ++MONITOR myups@localhost "Local UPS" +diff -purN a/conf/ups.conf.sample b/conf/ups.conf.sample +--- a/conf/ups.conf.sample 2023-10-28 23:02:42.000000000 +0200 ++++ b/conf/ups.conf.sample 2023-11-03 19:29:35.641548694 +0100 +@@ -214,3 +214,8 @@ maxretry = 3 + # + # To find out if your driver supports any extra settings, start it with + # the -h option and/or read the driver's documentation. ++ ++[myups] ++ driver = undefined ++ port = /dev/undefined ++ desc = "Local UPS" +diff -purN a/conf/upsd.conf.sample b/conf/upsd.conf.sample +--- a/conf/upsd.conf.sample 2023-09-17 16:34:05.000000000 +0200 ++++ b/conf/upsd.conf.sample 2023-11-03 19:30:18.374644467 +0100 +@@ -183,3 +183,11 @@ + # or CLI options, regardless of older logging level being higher or lower + # than the newly found number; a missing (or commented away) value however + # does not change the previously active logging verbosity. ++ ++[upsmaster] ++ password = @UPSD_INITIAL_MASTER_PASSWORD@ ++ upsmon master ++ ++[upsslave] ++ password = @UPSD_INITIAL_SLAVE_PASSWORD@ ++ upsmon slave +diff -purN a/conf/upsmon.conf.sample.in b/conf/upsmon.conf.sample.in +--- a/conf/upsmon.conf.sample.in 2023-10-28 23:36:02.000000000 +0200 ++++ b/conf/upsmon.conf.sample.in 2023-11-03 19:25:57.482732658 +0100 +@@ -117,6 +117,8 @@ + # MONITOR su700@server.example.com 1 monuser secretpass secondary + # MONITOR myups@localhost 1 monuser pass primary # (or secondary) + ++MONITOR myups@localhost 1 upsmaster @UPSD_INITIAL_MASTER_PASSWORD@ master ++ + # -------------------------------------------------------------------------- + # MINSUPPLIES + # diff --git a/nut.changes b/nut.changes new file mode 100644 index 0000000..5d45f34 --- /dev/null +++ b/nut.changes @@ -0,0 +1,1286 @@ +------------------------------------------------------------------- +Sun Sep 29 20:50:24 UTC 2024 - Thorsten Kukuk + +- Add /srv/www directories to filelist [bsc#1231027] + +------------------------------------------------------------------- +Thu Sep 12 13:43:51 UTC 2024 - Antonio Teixeira + +- Eaton scripts were mistakenly shipped by upstream with a proprietary + license. Repack with upstream re-licensing patch (gh#2623). + * nut-2.8.2-repack.tar.gz +- Add missing %service_* calls + +------------------------------------------------------------------- +Sat Apr 6 20:59:56 UTC 2024 - Arjen de Korte + +- Update to version 2.8.2 + For more see NEWS.adoc and UPGRADING.adoc in /usr/share/doc/packages/nut + (the list of changes is too long to list). + +------------------------------------------------------------------- +Sat Nov 4 16:30:32 UTC 2023 - Arjen de Korte + +- Update to version 2.8.1 + For more see NEWS.adoc and UPGRADING.adoc in /usr/share/doc/packages/nut + (the list of changes is too long to list). +- Remove obsolete patch: + * nut-Solaris-init-files.patch + +------------------------------------------------------------------- +Thu Jul 6 20:29:12 UTC 2023 - Antonio Teixeira + +- Fix nut.system-sleep script to allow NUT usage with sleep and + hibernation (bsc#1188990) + +------------------------------------------------------------------- +Fri Jun 30 21:03:35 UTC 2023 - Arjen de Korte + +- Rerelease of package and switch to GPG signed package + + add nut.keyring + +------------------------------------------------------------------- +Wed Mar 1 19:11:17 UTC 2023 - Arjen de Korte + +- Fix reproducible build (remove files only needed for packaging) + +------------------------------------------------------------------- +Mon Jan 23 22:09:31 UTC 2023 - Arjen de Korte + +- 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 + +------------------------------------------------------------------- +Wed May 11 23:01:34 UTC 2022 - Stanislav Brabec + +- Build the basic documentation again (bsc#1197789#c7). +- Make possible to build PDF documentation. + +------------------------------------------------------------------- +Wed Apr 27 12:54:07 UTC 2022 - Jan Engelhardt + +- Resolve rpmlit reports + * libupsclient1.x86_64: E: shlib-policy-name-error SONAME: + libnutclient.so.0, expected package suffix: 0 + * libupsclient1.x86_64: E: shlib-policy-name-error SONAME: + libupsclient.so.4, expected package suffix: 4 + +------------------------------------------------------------------- +Fri Dec 24 08:09:40 UTC 2021 - Antonio Larrosa + +- Use --with-pidpath to set PIDFile to /run in the service file and + get rid of a systemd warning about using the legacy directory + /var/run. + +------------------------------------------------------------------- +Fri Oct 15 07:26:53 UTC 2021 - Johannes Segitz + +- Added hardening to systemd service(s) (bsc#1181400). Added patch(es): + * harden_nut-driver.service.patch + * harden_nut-monitor.service.patch + * harden_nut-server.service.patch + +------------------------------------------------------------------- +Sun Jun 27 11:43:12 UTC 2021 - Arjen de Korte + +- Fix build with GCC11 (as default in GCC11 is now -std=gnu++17) + +------------------------------------------------------------------- +Mon Dec 21 21:34:16 UTC 2020 - Arjen de Korte + +- use pkg-config to determine version of libgd +- use apache-rpm-macros + +------------------------------------------------------------------- +Wed May 6 10:45:51 UTC 2020 - pgajdos@suse.com + +- use /usr/lib instead of %{_libexecdir} for systemd and udev + rules, %{_libexecdir} is dedicated for internal binaries + +------------------------------------------------------------------- +Tue Feb 25 20:40:40 CET 2020 - sbrabec@suse.com + +- Remove obsolete chown from %post. We no more support upgrade from + SUSE Linux 9 (bsc#1157325). + +------------------------------------------------------------------- +Wed Jul 24 14:16:00 UTC 2019 - Tomáš Chvátal + +- Add patch to fix build on TW: + * nutscanner-ftbfs.patch + +------------------------------------------------------------------- +Wed Jul 24 13:25:06 UTC 2019 - matthias.gerstner@suse.com + +- removal of SuSEfirewall2 service, since SuSEfirewall2 has been replaced by + firewalld, see [1]. + +------------------------------------------------------------------- +Tue Nov 27 09:19:23 UTC 2018 - Tomáš Chvátal + +- Give up on packaging the tex docu as it fails to build with + latest texlive + +------------------------------------------------------------------- +Tue Nov 13 09:36:13 UTC 2018 - Tomáš Chvátal + +- Add missing tex dependencies so we can generate the pdf with + newer releases of texlive + +------------------------------------------------------------------- +Tue Nov 13 09:24:40 UTC 2018 - Tomáš Chvátal + +- Drop patch docs-destination-dir.patch which is quite pointless + +------------------------------------------------------------------- +Sun Oct 7 18:53:54 UTC 2018 - suse+build@de-korte.org + +- Remove invalid option 'destination-dir' when generating PDF + files (docs-destination-dir.patch) + +------------------------------------------------------------------- +Wed Aug 1 13:35:20 UTC 2018 - bwiedemann@suse.com + +- Add reproducible.patch to sort input file list + to make package build reproducible (boo#1041090) + +------------------------------------------------------------------- +Sun Jan 21 20:17:50 UTC 2018 - suse+build@de-korte.org + +- Fix clash between Group and %define GROUP by renaming the latter + to NUT_GROUP (and USER to NUT_USER) +- Replace duplicate man files by soft links + +------------------------------------------------------------------- +Fri Dec 1 14:59:25 UTC 2017 - suse+build@de-korte.org + +- Add support for OpenSSL 1.1.0 library, allow TLSv1 and higher + (not just TLSv1) and report TLS version used in debug mode level + 3 and higher (boo#1069988, openssl-1_1.patch) +- Fix missing pointer dereference in upssched (nut-upssched.patch) +- Support for allowfrom parameter was removed in version 2.4.0 + (nut-preconfig.patch) + +------------------------------------------------------------------- +Thu Nov 30 18:01:31 CET 2017 - sbrabec@suse.com + +- No more conflict with apcupsd (boo#1070373). +- Remove smartups references. It is dropped since 2001. + +------------------------------------------------------------------- +Tue Oct 17 19:18:03 UTC 2017 - dimstar@opensuse.org + +- BuildRequire tex(upquote.sty): Generally seen, this dependency + is inaccurate, as our sources do not reference upquote.sty, but + asciidoc does. Adding the dep there though makes asciidoc too + expensive, and recommends are not interpreted when building the + buildroot (boo#1063897). + +------------------------------------------------------------------- +Tue Oct 17 12:42:32 UTC 2017 - dimstar@opensuse.org + +- Buildrequire libnsl-devel for suse_version >= 1330: libnsl was + split out of glibc and needs to be explcitly required if needed. + +------------------------------------------------------------------- +Mon Oct 2 08:25:15 UTC 2017 - tchvatal@suse.com + +- Fix rpm groups +- Reduce the supported distros by keeping sle12+ only +- Convert to pkgconfig style dependencies + +------------------------------------------------------------------- +Tue Sep 26 09:13:30 UTC 2017 - tchvatal@suse.com + +- Drop the aspell dependency, it is only used for verification + of the mans and it is more for devs to do than during the build + wrt fate#323578 + +------------------------------------------------------------------- +Fri Aug 18 08:21:49 UTC 2017 - alarrosa@suse.com + +- Add use-pkg-config-gdlib.diff to fix a build failure due to the + configure scripts using gdlib-config (which is deprecated) to + obtain the CFLAGS/LDFLAGS/LIBS to use when building with gd. With + the patch, nut now uses pkg-config which returns the right values + +------------------------------------------------------------------- +Tue May 9 09:06:52 UTC 2017 - jengelh@inai.de + +- Fix RPM groups and the HTML description +- Do not suppress errors from useradd +- Remove --with-pic that's only for static libs + +------------------------------------------------------------------- +Wed Apr 19 15:28:14 CEST 2017 - sbrabec@suse.com + +- Update to version 2.7.4: + For more see NEWS and UPGRADING in /usr/share/doc/packages/nut. + * New class of device supported: ATS - Automatic Transfer Switch + * NUT command and variable naming scheme changes. + * support for new devices: AEG PROTECT B / NAS APC ATS AP7724 + (should be supported) Asium P700 Eaton ATS Eaton 5E 1100iUSB + Eaton E Series DX UPS 1-20 kVA Eaton Powerware 9125-5000g + Electrys UPS 2500 Fideltronic INIGO Viper 1200 Legrand Keor + Multiplug LYONN CTB-800V Micropower LCD 1000 NHS Laser Senoidal + 5000VA Sweex model P220 TS Shara Various APCUPSD-controlled APC + devices + * snmp-ups improvements. + * Eaton: improvements and fixes of 3ph SNMP, ePDU (G2 and G3) and + XML/PDC. + * Further fixes and improvements of bcmxcp_usb, dummy-ups, + libnutclient, nutdrv_atcl_usb, nutdrv_qx, nut-ipmipsu, solis, + tripplitesu, usbhid-ups. + * nut-scanner: Don't depend on development libraries + (boo#963505). + * Improved SSL support through Mozilla NSS, Augeas support. + * Fixed UPower device matching in recent kernels. + * nut-server.service: Restore systemd relationship (boo#907387, drop + 0001-Restore-systemd-relationship-with-nut-driver-service.patch). + * Network protocol information change. +- Drop dummy init scripts. They are not needed any more + (nut-monitor, nut-server, nut-driver, boo#801542#c2). +- Build and package documentation + (nut-doc-fixed-date.patch, nut-doc-cables.patch). +- Fix dependencies. +- Fix bash-completion path. + +------------------------------------------------------------------- +Tue Jan 19 09:33:47 UTC 2016 - tchvatal@suse.com + +- Cleanup a bit with spec-cleaner +- Install init or systemd files not both at once +- Remove patches used only on sle10: + * nut-powersave.patch + * nut-udev.patch + +------------------------------------------------------------------- +Mon May 18 10:11:40 UTC 2015 - mvyskocil@opensuse.org + +- fix https://github.com/networkupstools/nut/issues/200 + * 0001-Restore-systemd-relationship-with-nut-driver-service.patch + +------------------------------------------------------------------- +Fri May 15 15:10:48 UTC 2015 - mvyskocil@opensuse.org + +- update to 2.7.3 (bugfixes and new devices support) + see NEWS and UPGRADING in /usr/share/doc/packages/nut +- refreshed patches: + * nut-notifyflag.patch: rename of upsmon.conf.sample.in + * nut-preconfig.patch: rename of upsmon.conf.sample.in + * nut-systemd-dirs.patch: refresh to 2.7.3 +- changed keyring to new key 55CA5976 (Arnaud Quette ) + +------------------------------------------------------------------- +Sun Nov 09 19:50:00 UTC 2014 - Led + +- fix bashisms in post script + +------------------------------------------------------------------- +Thu Oct 30 07:22:38 UTC 2014 - mvyskocil@opensuse.org + +- Update to version 2.7.2: + For more see NEWS and UPGRADING in /usr/share/doc/packages/nut. + * upsdrvctl is now installed to $prefix/sbin rather than + $driverexec. This usually means moving from /bin to /sbin, apart + from few exceptions. + * Fix service files paths (boo#907387). + * FreeDesktop Hardware Abstraction Layer (HAL) support was removed. + * This is a good time to point out that for stricter packaging + systems, it may be beneficial to add "--enable-option-checking=fatal" + to the ./configure command line, in order to quickly pick up any + other removed option flags. + Other changes: + * libupsclient had undefined references related to functions of + libcommon.This issue was reported on Debian (bug #731156) and + is now fixed + * support for new devices: + + CABAC UPS-1700DV2 + + Eaton Powerware 3105 + + Emerson Network Power Liebert PSI 1440 + + MicroDowell B.Box LP 500 + + Numeric Digital 800 plus + + OptiUPS VS 575C + + Tripp Lite SU10KRT3/1X + * nutdrv_atcl_usb: new driver for 'ATCL FOR UPS' + * al175: re-introduced this driver (actually, it was in 2.7.1) + * upsdrvctl now provides retry options for upsdrvctl and driver(s) + * snmp-ups: add support for XPPC-MIB and Tripp Lite SU10KRT3/1X. + Also fix erroneous status in HP/Compaq SNMP MIB (with the most + recent HP firmware (1.76) ; + improved various MIBs (APC, HP/Compaq, ...) + * nutdrv_qx: add new 'fallback' Q1 subdriver, with minimal + 'Q1' support. General improvements on all subdrivers. + * mge-shut: partially revert PnP/RTS change, for initializing + the communication with the UPS. Note that nut-scanner similar + function was not modified however. +- dropped nut-hal.patch +- use _smp_mflags macro for make +- build with --enable-option-checking=fatal and remove obsoleted --with-hal + and --with-linux-hiddev configure options + +------------------------------------------------------------------- +Fri Jun 13 18:52:58 CEST 2014 - sbrabec@suse.cz + +- Fix Summary. + +------------------------------------------------------------------- +Thu Apr 3 16:19:56 CEST 2014 - sbrabec@suse.cz + +- Replace powersave support by systemd (bnc#871406). + +------------------------------------------------------------------- +Thu Mar 27 11:20:30 CET 2014 - ro@suse.de + +- explicitly require udev to fix buildenvironment issues + +------------------------------------------------------------------- +Fri Feb 14 20:15:04 CET 2014 - sbrabec@suse.cz + +- Replace pm-utils support by systemd (FATE#316824). + +------------------------------------------------------------------- +Tue Nov 26 20:48:34 CET 2013 - sbrabec@suse.cz + +- Update to version 2.7.1: + For more see NEWS and UPGRADING in /usr/share/doc/packages/nut. + Potentially incompatible changes: + * First release after the transition from Subversion to Git. + * The linkman:apcsmart[8] driver has been replaced by a new + implementation. There is a new parameter, 'ttymode'. In case + of issues with this new version, users can revert to + apcsmart-old. + * The linkman:nutdrv_qx[8] driver will eventually supersede + blazer_ser and blazer_usb. Options are not exactly the same, + but are documented in the nutdrv_qx man page. + * Mozilla NSS support has been added. + * linkman:upsrw[8] now prints out the maximum size of + variables. + Other changes: + * Added a new driver, nutdrv_qx, for Megatec/Qx devices. This + driver will eventually replace the blazer_ser and blazer_usb + drivers. In particular, it adds support for Voltronic Power + devices. + * Increased USB_TIMEOUT to standards-compliant 5.000 seconds in + most drivers. This should reduce the number of timeouts on + low-speed USB 1.1 devices. + * Added many devices to the HCL. Of particular note are many + Tripp Lite USB HID PDC models which were tested against NUT by + Tripp Lite. + * Reworked some visual elements of the HCL. + * Also increased timeouts and added redundant commands to improve + reliability of mge-utalk driver. + * Added the apcupsd-ups driver to interoperate with apcupsd + installations. + * Added documentation on creating subdrivers for snmp-ups and + nutdrv_qx. + * Added new drivers for the Riello UPS product line + (riello_ser/riello_usb). + * Many improvements to the BCM/XCP. + * Added a few variables to the Powercom HID mappings. + * Updated the apcsmart driver, and renamed the previous driver to + apcsmart-old. + * Fixed the battery percentage calculation in the bestfcom + driver. + * libnutclient has been added as a C++ alternative to + libupsclient. + * Fix shutdown of Eaton HID, using usbhid-ups and mge-shut + * usbhid-ups: final fix for APC Back UPS ES. + * nut-scanner: fix crash + * IPMI support can handle more different versions of FreeIPMI + * Support power supplies scan over the network nut-scanner can + now scan for power supplies with IPMI over LAN. This is + currently limited to IPMI 1.5 only + * Improve systemd integration + * snmp-ups: Fixed a crash on outlet management, and added + delta_ups MIB support. Also fixed mappings for + upsBypassVoltage, upsBypassCurrent, and upsBypassPower in + three-phase IETF MIB. +- Enable FreeIPMI. + +------------------------------------------------------------------- +Tue Jan 29 21:14:30 CET 2013 - sbrabec@suse.cz + +- Turn systemd integration on (nut-systemd-dirs.patch). +- Fix README.SUSE. +- nut-preconfig.patch: Fix UID recommendation. + +------------------------------------------------------------------- +Mon Nov 19 21:22:52 CET 2012 - sbrabec@suse.cz + +- Verify GPG signature. + +------------------------------------------------------------------- +Sat Nov 17 09:54:35 UTC 2012 - aj@suse.de + +- Fix useradd invocation: -o is useless without -u and newer + versions of pwdutils/shadowutils fail on this now. +- Fix provides/obsoletes + +------------------------------------------------------------------- +Tue Sep 4 12:06:57 CEST 2012 - sbrabec@suse.cz + +- Update to version 2.6.5: + * Fix regression in upssched. + * Support for new devices: Eaton ePDU Switched, Online Zinto A, + REDi Blazer 400VA / 600VA / 800VA, UNITEK Alpha650ipF and + Alpha650ipE, AEG Power Solutions PROTECT HOME, more APC SNMP + cards, ATEK Defensor range, all Borri models, all COVER ENERGY + SA, CyberPower OR700LCDRM1U, PR6000LCDRTXL5U and CP1000PFCLCD, + Dell UPS Network Management Card, Dynamix 1000VA USB, Eaton + Management Card Contact (ref 66104), EVER POWERLINE RT / 11 / + 31 and DUO II Pro, GE Digital Energy GT Series 1000-3000 VA, + Gtec models, all recent HP serial / USB UPS (G2, G3 and R/T + models) and HP UPS Management Module, Ippon INNOVA RT, KOLFF + BLACK NOVA, Lexis X-power Tigra 1kVA, Microline C-Lion Innova, + Online Yunto YQ450, PowerShield Defender 1200VA, PowerWalker + Online VFI LCD, Line-Interactive VI LCD and Line-Interactive + VI, Riello Netman Plus 102 SNMP Card, Tripp-Lite OMNISMART500. + * mge-shut driver has been replaced by a new implementation. + * Support for integration with VMware ESXI 5.0. + * IPMI support. + * snmp-ups: high precision values for APC, more variables. + * The NUT variables and commands namespace has been fixed and + completed. + * Support of ranges of values for writable variables added. + * Static source code analysis fixes by RedHat using Coverity. + * Add new "LIST CLIENTS" and "NETVER" commands to NUT network + protocol. + * bcmxcp has improved support for battery status, and better + supports PW9120 units. + * bestfortress has improved Best Fortress LI675VA support. + * blazer_ser and blazer_usb now try to automatically estimate high + and low voltages; support for online Innova UPS (T, RT and 3/1 + T); Best UPS support has been improved. + * bestups fixes, but will soon be deprecated. + * newmge-shut has been heavilly improved. + * oneac 0.80 improves support for all families of Oneac. + * usbhid-ups: for Eaton devices, ups.start.auto is now + automatically adjusted for shutdown.{return,stayoff}; Liebert + firmwares with incorrect exponents have also been addressed. + * snmp-ups now provides support for UPS shutdown. Composite + commands are also supported now; Eaton/MGE MIB has been cleaned + and completed; 3-phases support has been added to Socomec + Netvision MIB; HP/Compaq MIB has been completed. + * nut-scanner now also has libupsclient has a weak runtime + dependency. + * Provide an Uncomplicated Firewall (UFW) profile. + * Riello protocols have been officially published in NUT + protocols library. + * Duplicate instances of upsd / upsmon are now detected. + * upslog now comes with logrotate configuration. + * more devices embed NUT for power protection, now including + Thecus NAS range. + * PyNUT.py has been updated to version 1.2.2. + * Bugfixes, cleanup and improvements. + +------------------------------------------------------------------- +Thu May 31 17:36:17 CEST 2012 - sbrabec@suse.cz + +- Fix random network data crash (bnc#764699, CVE-2012-2944). + +------------------------------------------------------------------- +Wed May 30 20:19:10 CEST 2012 - sbrabec@suse.cz + +- Upgrade to version 2.6.3: + * nut-scanner is now improved and more portable. + * pkg-config support + * Support for new devices: Cyber Power Systems with SNMP RMCARD + (100, 201, 202 and 301); Dynamix 650VA USB; LDLC UPS-1200D; + Tecnoware UPS ERA LCD 0.65; Powercom BNT-xxxAP (USB ID + 0d9f:0004); Various USB devices using UPSilon 2000 software. + * bcmxcp_usb now handles disconnection and reconnection. + * blazer_usb enables again inclusion of buggy IDs. + * upsd doesn't anymore fail where either IPv4 or IPv6 is + disabled, and no explicit LISTEN directive has been specified. + * Avahi support is now automatically enabled, upon detection. + * jNut (NUT Java interface) adds device discovery support. + * Many bugfixes, cleanup and improvements. + +------------------------------------------------------------------- +Sun Nov 20 06:26:37 UTC 2011 - coolo@suse.com + +- add libtool as buildrequire to avoid implicit dependency + +------------------------------------------------------------------- +Wed Nov 2 18:45:31 CET 2011 - sbrabec@suse.cz + +- Patch real source files to get missing devices (bnc#719292#c7). + +------------------------------------------------------------------- +Tue Nov 1 20:56:52 CET 2011 - sbrabec@suse.cz + +- Added missing USB devices (bnc#719292). +- Build without IPMI (openSUSE 12.1 does not contain freeipmi). +- Build without powerman for older products. +- Trigger udev to apply newly installed rules (bnc#727396). + +------------------------------------------------------------------- +Wed Sep 21 19:00:42 CEST 2011 - sbrabec@suse.cz + +- Build without IPMI for older products. + +------------------------------------------------------------------- +Mon Sep 19 19:09:52 UTC 2011 - jw@suse.com + +- Upgrade to version 2.6.2 (requested by christoph.walter@countr.de) + * NUT can now monitor power supply units (PSU) in servers + * NUT now provides 'nut-scanner', to discover supported devices + * NUT now provides a Java interface called 'jNut'. + * support for: Eaton 3S ; Cyber Power Systems CP1000AVRLCD ; + various APC models equiped with APC AP9618 management card, including APC + Smart-UPS RT XL ; Orvaldi 750 / 900SP ; POWEREX VI 1000 LED ; PowerWalker + VI 850 LCD ; SVEN Power Pro+ series (USB ID ffff:0000). + * Avahi support has been added + * many updates and fixes. + +------------------------------------------------------------------- +Thu Jun 16 18:47:47 CEST 2011 - sbrabec@suse.cz + +- Upgrade to version 2.6.1 (bnc#698152): + * NUT now propose a variable to expose UPS efficiency. + * Various recent USB regressions have been definitely fixed. + * NUT now propose a variable to expose UPS efficiency. + * Support for new devices: Eaton Ellipse ECO, Powerware 9140, + Eaton 5 PX, and ambient sensor on Eaton ePDU managed, GE EP + series, Inform Sinus SS 210, IPAR Mini Energy ME 800, Mustek + Yukai PowerMust 1000 USB, Numeric 3000 SW, SVEN Power Pro+ + series (recent models), Vivaldi EA200 LED. + * Improved Liebert ESP II support, PowerCom BNT 1500A and + BNT-other, blazer + * apcsmart has more improved UPS poweroff support and options. + * usbhid-ups has completed a bit supported variables for APC and + Eaton/MGE. + * Documentation updates. +- Drop nut-hal and merge nut-classic back to nut (bnc#697028). + +------------------------------------------------------------------- +Tue Jun 14 20:10:53 CEST 2011 - sbrabec@suse.cz + +- Fixed command order during hibernate to prevent UPS communication + locks and failures (bnc#660236). + +------------------------------------------------------------------- +Wed Feb 9 15:21:54 CET 2011 - sbrabec@suse.cz + +- Do not force move hal addons - fix configure check instead - + different SUSE versions need different path. + +------------------------------------------------------------------- +Tue Feb 8 10:16:54 UTC 2011 - coolo@novell.com + +- do not hardcode location of lsusb + +------------------------------------------------------------------- +Sat Jan 29 11:46:57 UTC 2011 - poletti.marco@gmail.com + +- Upgrade to 2.6.0. + * WARNING: Users of the megatec and megatec_usb drivers must respectively + switch to blazer_ser and blazer_usb. + * WARNING: Users of the liebertgxt2 driver are advised that the driver name + has changed to liebert-esp2. + * Greatly improve documentation. + * Add Augeas support. + * Added support for new devices. + * Many other fixes and improvements. + +------------------------------------------------------------------- +Fri Aug 7 15:13:55 CEST 2009 - sbrabec@suse.cz + +- Updated to version 2.4.1: + * Support for new devices: MicroDowell Enterprise B8, B10, N8, + N11, N15, N20, N22, N30, N40, N50, N60 and HiBox ST. + * NUT-Monitor now better handles the ups.status field. + * Support for Power Distribution Units (PDUs), including: Eaton + ePDUs (Managed and Monitored), some Aphel models, some Raritan + PDUs, and the whole list of Powerman supported devices, + Chloride Desk Power 650, Cyber Power Systems Value + 400E/600E/800E (USB models), Delta GES602N, Digitus DN-170020, + the whole Eaton ranges (mostly composed of MGE Office + Protection Systems and Powerware units) including BladeUPS, + Forza Power Technologies SL-1001, HP PowerTrust 2997A, HP R/T + 2200 G2, Infosec XP 1000 and XP 500, Ippon Back Power Pro + (serial and USB), Kebo 1200D/D Series, Liebert PowerSure + Personal XT, MGE Office Protection Systems Protection Station, + Neus 400va and 600va, Phasak 400VA and 600VA, Plexus 500VA, + Powercom Black Knight PRO / King PRO and Imperial, + PowerKinetics BlackOut Buster, Sweex 1000 USB, UNITEK Alpha + 500, WinPower CPM-800. + * NUT now embeds Python client support through the PyNUTClient + module and the NUT-Monitor application. + * The dummy-ups driver now support a "repeater" mode. + * tcp-wrappers support has been added to the upsd server. + * The nut.conf file has been introduced. + * NUT now ships a bash completion function for 'upsc' command. + * Many internal changes to improve maintenability: + * the USB information automatic extraction to generate the + various USB helper files, + * the upsdrv_info_t structure to track more driver + information, and remove the need for the upsdrv_banner() + function, + * common USB code refactoring, as it is done for the serial + functions. + * Tons of bugfixes, cleanup and improvements. + +------------------------------------------------------------------- +Tue Jul 14 10:03:39 CEST 2009 - coolo@novell.com + +- fix hal directories + +------------------------------------------------------------------- +Mon Feb 2 14:38:25 CET 2009 - sbrabec@suse.cz + +- Removed obsolete dbus configuration for powersave (bnc#468391). + +------------------------------------------------------------------- +Wed Jan 28 15:51:40 CET 2009 - crrodriguez@suse.de + +- remove static libraries and "la" files +- add missing openssl-devel to Requires of -devel package + +------------------------------------------------------------------- +Tue Jan 27 00:37:47 CET 2009 - ro@suse.de + +- pass --with-udev-dir to configure to fix build + (hal does not own /etc/udev anymore) + +------------------------------------------------------------------- +Wed Dec 17 18:51:44 CET 2008 - sbrabec@suse.cz + +- Fixed Suspend to Disc documentation (bnc#449861). +- Support Suspend to Disc in scriptlets. +- Turn UPS down during emergency Suspend to Disc (bnc#449862). +- Fixed locations of pm-utils stuff (bnc#449866). +- upssched-cmd moved to /bin (bnc#449828). +- Fixed incorrect path to upssched-cmd (bnc#449869). +- Fixed files listed twice. + +------------------------------------------------------------------- +Tue Dec 9 12:26:59 CET 2008 - ro@suse.de + +- add pre script for classic package to add the user also + before this package is installed + +------------------------------------------------------------------- +Fri Sep 26 14:58:20 CEST 2008 - sbrabec@suse.cz + +- Fixed PreReq, useradd must be installed for %pre (bnc#429557). +- Sync permissions in scriptlets and file list. + +------------------------------------------------------------------- +Wed May 28 15:56:12 CEST 2008 - sbrabec@suse.cz + +- nut-cgi: Fixed and documented URLs (bnc#354388#c10). +- README.SUSE: Fixed name of the most common USB HID driver. + +------------------------------------------------------------------- +Mon May 26 15:09:50 CEST 2008 - sbrabec@suse.cz + +- Provide and Require nut-package (bnc#337059#c3). + +------------------------------------------------------------------- +Fri May 9 16:07:28 CEST 2008 - sbrabec@suse.cz + +- Added suspend hook (bnc#230267). +- Updated to final version 2.2.2 (bnc#385133): + * added two models supported by megatec + * includes build fixes from patches + +------------------------------------------------------------------- +Wed Apr 30 14:28:33 CEST 2008 - sbrabec@suse.cz + +- Added hardware modaliases for solver. +- Fixed generating of NUT firewall rule (bnc#385111). +- Installed HAL FDI to disable hald-addon-hid-ups (bnc#385253). +- Split nut-classic and hut-hal variants to separate subpackages + (bnc#337059). +- Split networking drivers and web server into separate packages to + reduce dependencies (bnc#156614). +- Split shared library according to shared library policy. +- Updated README.SuSE. +- Updated to version 2.2.2-pre3 (bnc#385133): + * support for new devices: APC BACK-UPS XS LCD, Atlantis Land, + Mustek Powermust Office 650, Oneac XAU models, Powerware PW5115 + and PW9120 (USB), Nitram Elite 2005. + * Advanced Integrated Power Management (NUT HAL integration). + * Shutdown handling has been reworked. + * Support for MGE UPS SYSTEMS 3 phases units has been added. + * snmp-ups now supports MGE* Environment Sensor (ref 66 846). + * The ambient.temperature reporting has also been fixed for units + other than APC. + * the netxml-ups driver has appeared to support MGE* network + HTTP/XML cards. + * The shared library installed by default. + * powerpanel has reach a new step toward the replacement of + nitram and cpsups drivers. + * many changes, cleanup and fixes to the NUT core and various + drivers. + +------------------------------------------------------------------- +Thu Apr 24 17:03:22 CEST 2008 - sbrabec@suse.cz + +- Updated to version 2.2.1: + * support for new devices: all MGE Office Protection Systems + units, Advice TopGuard 2000, Belkin F6H375-USB, Dynamix + UPS1700D, Effekta RM2000MH, Jageson Technology Jasuny USPS, + Powercom SMK-1500A and SXL-1500A, PowerWalker Line-Interactive + VI 400/800 and 600, Powerware 9110, UNITEK Alpha 2600, UPSonic + CXR1000, some vintage serial APC UPSs. + * Improvements, fixes and backports to usbhid-ups. + * Updated udev rules. + * megatec and megatec_usb drivers backported. + * development files improved. + +------------------------------------------------------------------- +Mon Apr 14 16:28:56 CEST 2008 - schwab@suse.de + +- Work around misuse of libtool. + +------------------------------------------------------------------- +Thu Oct 25 18:35:53 CEST 2007 - sbrabec@suse.cz + +- Fixed use of uninitialized memory (#331749#c13). + +------------------------------------------------------------------- +Tue Oct 23 17:46:28 CEST 2007 - sbrabec@suse.cz + +- Renamed web pages to prevent conflicts. + +------------------------------------------------------------------- +Mon Oct 22 17:39:41 CEST 2007 - sbrabec@suse.cz + +- Fixed udev USB rules for current kernels (#331749). +- Added SuSEfirewall2 rule and fixed documentation (#335466). + +------------------------------------------------------------------- +Tue Aug 7 19:08:04 CEST 2007 - sbrabec@suse.cz + +- Updated to version 2.2.0: + * New build infrastructure, with shared library. + * Support for HAL and Plug and Play. + * New drivers. + * Support for many new devices. + * IPv6 support. + * Client commands now defaults to localhost. + * Driver improvements. + * Documentation improvements. + +------------------------------------------------------------------- +Wed May 16 21:32:29 CEST 2007 - olh@suse.de + +- Buildrequires libusb -> libusb-devel + +------------------------------------------------------------------- +Tue Feb 20 16:57:57 CET 2007 - mvaner@suse.cz + +- Comparison with string literal (bug #232417) + - setcmd-literal.patch + +------------------------------------------------------------------- +Mon Sep 18 15:24:30 CEST 2006 - anosek@suse.cz + +- fixed compiler warning: array subscript out of range [#204417] + (overflow.patch) + +------------------------------------------------------------------- +Fri Sep 1 10:19:07 CEST 2006 - anosek@suse.cz + +- updated to 2.0.4 + * A bug has been fixed in NUT core to support resuming from + suspend-to-disk. This should also fix other similar issues, + like time synchronisation through the NTP. + * The mge-shut driver now better detects the Low Battery status, + support new models and fixes some wrong status and data. + It also fixes some issue where the UPS wasn't restarting + (refer to mge-shut manpage). + * The genericups custom configuration through ups.conf + is working again + * The genericups driver type 22 also support CyberPower 725SL + (and maybe others SL models) + * The new megatec driver, which will replace a bunch of drivers + by nut 2.2 (refer to docs/megatec.txt and UPGRADING) has been + backported from the trunk (Development tree). The powermust + driver has also received some attention. + * The new rhino driver was added to support Microsol Rhino UPS + hardware. The solis has also been improved for solaris + compatibility, and internal / external shutdown programming. + Solis can now save external shutdown programming to ups, + and support new cables for solis 3 +- dropped obsolete patch (nut-2.0.4-memset.patch) +- fixed subscript out of range [#185610] (overflow.patch) + +------------------------------------------------------------------- +Fri Jun 23 11:18:12 CEST 2006 - sbrabec@suse.cz + +- Typo fix in the init script. + +------------------------------------------------------------------- +Thu Apr 27 13:40:30 CEST 2006 - sbrabec@suse.cz + +- Work correctly, if port is a symlink (168611#c6). + +------------------------------------------------------------------- +Tue Apr 25 19:16:15 CEST 2006 - sbrabec@suse.cz + +- Fixed init script to behave correctly for port = auto (#168611). + +------------------------------------------------------------------- +Fri Mar 24 13:56:16 CET 2006 - sbrabec@suse.cz + +- Typo fixes. + +------------------------------------------------------------------- +Tue Mar 21 11:39:44 CET 2006 - sbrabec@suse.cz + +- Added D-BUS policy file (#159668). + +------------------------------------------------------------------- +Mon Mar 20 17:56:33 CET 2006 - sbrabec@suse.cz + +- Support for UPS powerdown using HALT_POWERDOWN_INSERT. +- Added upsd-early-powerdown template and improved README.SUSE. +- Remove obsolete /etc/sysconfig/smartups in %post. + +------------------------------------------------------------------- +Fri Mar 17 13:28:10 CET 2006 - sbrabec@suse.cz + +- README.SUSE fixes (Marius Tomaschewski). +- Init script fix. +- Install all driver manual pages. +- Use new powersave-notify path. + +------------------------------------------------------------------- +Wed Mar 15 18:01:35 CET 2006 - sbrabec@suse.cz + +- Build all available drivers. + +------------------------------------------------------------------- +Tue Mar 14 19:31:14 CET 2006 - sbrabec@suse.cz + +- Improved README.SUSE and predefined configuration. +- Checks and fixes in the init script. +- Improved notify flags, integrate with powersave. + (Some fixes provided by Marius Tomaschewski.) + +------------------------------------------------------------------- +Fri Mar 10 17:25:00 CET 2006 - sbrabec@suse.cz + +- Fixed memset error in upsrw.c. +- Fixed upsmon typo in the init script. +- Preconfigure upsd with one local UPS as default. + +------------------------------------------------------------------- +Thu Mar 9 19:01:50 CET 2006 - sbrabec@suse.cz + +- Updated to version 2.0.3. +- Removed SuSEconfig, wrote new init script + (#27721, #141948, #156614). + +------------------------------------------------------------------- +Mon Feb 20 15:27:51 CET 2006 - mmarek@suse.cz + +- fix array index out of range + [#133610] (overflow.patch) + +------------------------------------------------------------------- +Wed Jan 25 21:38:51 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Thu Jan 12 20:23:43 CET 2006 - sbrabec@suse.cz + +- Updated to version 2.0.3-pre2. + +------------------------------------------------------------------- +Wed Nov 2 23:04:50 CET 2005 - dmueller@suse.de + +- don't build as root + +------------------------------------------------------------------- +Mon Aug 1 15:58:42 CEST 2005 - sbrabec@suse.cz + +- Updated to version 2.0.2. + +------------------------------------------------------------------- +Fri Jan 21 15:48:35 CET 2005 - sbrabec@suse.cz + +- Updated to version 2.0.1-pre4. + +------------------------------------------------------------------- +Mon Aug 23 15:17:12 CEST 2004 - sbrabec@suse.cz + +- Updated to version 2.0.0. + +------------------------------------------------------------------- +Mon Apr 19 01:45:49 CEST 2004 - ro@suse.de + +- build with apache2 + +------------------------------------------------------------------- +Wed Apr 14 08:23:44 CEST 2004 - aj@suse.de + +- build without kernel-source. + +------------------------------------------------------------------- +Tue Mar 23 14:53:43 CET 2004 - sbrabec@suse.cz + +- Force-define HID_MAX_USAGES (kernel 2.6.4 include file bug, should + be fixed in later kernels). + +------------------------------------------------------------------- +Mon Feb 09 16:24:35 CET 2004 - sbrabec@suse.cz + +- Updated to version 1.4.1. + +------------------------------------------------------------------- +Thu Oct 2 11:14:28 CEST 2003 - stark@suse.de + +- adapted pre-configuration and startscript to reflect changes + in 1.4.0 +- changed file-permissions + +------------------------------------------------------------------- +Mon Sep 29 13:13:17 CEST 2003 - stark@suse.de + +- update to 1.4.0 + +------------------------------------------------------------------- +Tue Aug 19 11:29:46 CEST 2003 - mmj@suse.de + +- Add sysconfig metadata [#28939] + +------------------------------------------------------------------- +Thu Jun 26 13:54:30 CEST 2003 - stark@suse.de + +- update to 1.2.2 +- removed config-check in init-script + +------------------------------------------------------------------- +Fri Jun 20 23:45:07 CEST 2003 - ro@suse.de + +- added directories to filelist + +------------------------------------------------------------------- +Tue May 13 15:02:19 CEST 2003 - mmj@suse.de + +- use %defattr + +------------------------------------------------------------------- +Thu Feb 20 19:53:03 CET 2003 - mmj@suse.de + +- Add sysconfig metadata [#22688] + +------------------------------------------------------------------- +Tue Aug 6 10:53:57 CEST 2002 - olh@suse.de + +- use X-UnitedLinux-Should-Start + +------------------------------------------------------------------- +Mon Aug 5 14:30:12 CEST 2002 - olh@suse.de + +- Required-start: setserial, add Prereq + +------------------------------------------------------------------- +Fri Aug 2 01:06:47 CEST 2002 - ro@suse.de + +- adapt server-root + +------------------------------------------------------------------- +Sat Jul 27 21:52:59 CEST 2002 - kukuk@suse.de + +- fix SuSEconfig.nut: + - don't include rc.config [Bug #17267] + - use correct path to sysconfig directory + +------------------------------------------------------------------- +Fri Jul 26 23:03:11 CEST 2002 - adrian@suse.de + +- fix neededforbuild + +------------------------------------------------------------------- +Tue May 28 15:20:18 CEST 2002 - stark@suse.de + +- update to 0.50.0 +- changed init-script to use upsdrvctl + (make it possible to change config-files manually without + changing /etc/sysconfig/smartups) + +------------------------------------------------------------------- +Tue Apr 9 12:35:40 CEST 2002 - stark@suse.de + +- update to 0.45.5 +- fixed SuSEconfig.nut to sysconfig scheme + +------------------------------------------------------------------- +Fri Feb 1 00:26:13 CET 2002 - ro@suse.de + +- changed neededforbuild to + +------------------------------------------------------------------- +Sat Jan 12 11:02:37 CET 2002 - stark@suse.de + +- little ifarch fix again :-( + +------------------------------------------------------------------- +Fri Jan 11 09:54:37 CET 2002 - stark@suse.de + +- changed rc.config.d leftover in rcups +- build hidups on all archs excluding s390 (finally) + +------------------------------------------------------------------- +Tue Jan 8 10:19:59 CET 2002 - stark@suse.de + +- build hidups only on i386 + +------------------------------------------------------------------- +Thu Jan 3 11:00:43 CET 2002 - stark@suse.de + +- build hidups driver for EXPERIMENTAL USB usage + +------------------------------------------------------------------- +Wed Dec 12 09:46:49 CET 2001 - stark@suse.de + +- updated to 0.45.3 +- removed START_SMARTUPS +- renamed package to nut +- b2zipped sources +- moved rc.config.d/smartups.rc.config -> sysconfig/smartups + +------------------------------------------------------------------- +Mon Oct 22 09:16:58 CEST 2001 - stark@suse.de + +- fixed init-script to POWERDOWN correctly (#11909) +- added rc.config variable UPSLOG_INTERVAL + +------------------------------------------------------------------- +Tue Sep 18 07:24:17 CEST 2001 - stark@suse.de + +- changed STATEPATH to /var/lib/ups according to FHS (#8678) + +------------------------------------------------------------------- +Fri Sep 7 11:40:27 CEST 2001 - stark@suse.de + +- added Conflicts: apcupsd + (/usr/local/httpd/cgi-bin/multimon.cgi is in both packages) + +------------------------------------------------------------------- +Mon Sep 3 10:17:32 CEST 2001 - stark@suse.de + +- added a patch to be able to write the POWERDOWNFLAG to + only-root-writable directories + +------------------------------------------------------------------- +Mon Aug 13 11:26:17 CEST 2001 - stark@suse.de + +- update to 0.45.1 + +------------------------------------------------------------------- +Mon Jun 18 09:12:25 CEST 2001 - stark@suse.de + +- update to 0.45.0 + +------------------------------------------------------------------- +Fri Apr 27 12:29:36 CEST 2001 - stark@suse.de + +- minor changes in init-script to avoid premature aborts + +------------------------------------------------------------------- +Thu Apr 19 07:44:34 CEST 2001 - stark@suse.de + +- minor changes on %config-files and %clean +- changed upsd-exec-group to uucp +- added libjpeg freetype2 freetype2-devel xf86 + to neededforbuild + +------------------------------------------------------------------- +Tue Apr 17 09:11:58 CEST 2001 - stark@suse.de + +- init-script cleanup: try-restart and exitcodes + +------------------------------------------------------------------- +Fri Mar 23 10:18:32 CET 2001 - stark@suse.de + +- update to 0.44.3 + +------------------------------------------------------------------- +Fri Mar 16 09:17:56 CET 2001 - stark@suse.de + +- minor changes in init-script and documentation + +------------------------------------------------------------------- +Thu Jan 4 09:31:34 CET 2001 - stark@suse.de + +- update to 0.44.2 + +------------------------------------------------------------------- +Thu Dec 14 08:26:53 CET 2000 - stark@suse.de + +- fixed case in rc-script +- move SuSE scripts and configs out of the diff +- minor changes in config for insserv (use macros) + +------------------------------------------------------------------- +Mon Nov 27 12:41:28 CET 2000 - stark@suse.de + +- moved /sbin/init.d -> /etc/init.d + +------------------------------------------------------------------- +Fri Nov 24 08:26:23 CET 2000 - stark@suse.de + +- init script more LSB compliant + +------------------------------------------------------------------- +Wed Nov 22 09:54:41 CET 2000 - stark@suse.de + +- improved runlevel position +- spec now uses %{_tmppath} + +------------------------------------------------------------------- +Tue Nov 21 10:04:07 CET 2000 - stark@suse.de + +- removed runlevel-links from spec-file and moved to insserv +- added init information to rc-script + +------------------------------------------------------------------- +Mon Nov 20 11:15:26 CET 2000 - stark@suse.de + +- minor changes in rc-script (status) + +------------------------------------------------------------------- +Wed Nov 15 18:29:49 CET 2000 - ro@suse.de + +- fixed neededforbuild gdlib -> gd gd-devel + +------------------------------------------------------------------- +Thu Nov 9 10:00:17 CET 2000 - ro@suse.de + +- neededforbuild gd -> perl-GD + +------------------------------------------------------------------- +Wed Nov 8 12:31:00 CET 2000 - stark@suse.de + +- adapted rc-script to use rc.status + +------------------------------------------------------------------- +Thu Oct 5 13:46:46 CEST 2000 - stark@suse.de + +- fixed typo in SuSEconfig.smartups + +------------------------------------------------------------------- +Mon Sep 18 10:27:20 CEST 2000 - stark@suse.de + +- update to 0.44.1 +- new spec-file (with buildroot etc.) +- fixed rc-script for server/client +- added SuSEconfig.smartups + +------------------------------------------------------------------- +Thu Sep 14 13:16:49 CEST 2000 - stark@suse.de + +- fixed rc-script (added . /etc/rc.config) + +------------------------------------------------------------------- +Tue Jul 11 20:47:27 CEST 2000 - lemsi@suse.de + +- bugfix in ups start-script +- changed /etc/rc.config to /etc/rc.config.d/smartups.rc.config + +------------------------------------------------------------------- +Mon Feb 28 15:30:35 CET 2000 - kukuk@suse.de + +- Move most variables from rc.config -> rc.config.d + +------------------------------------------------------------------- +Thu Feb 24 10:08:44 CET 2000 - lemsi@suse.de + +- new version +- the orginal source is renamed, new name is nut-0.XX.X.tar.gz +- added 2 new variables in rc.config; GENERICUPS_MODEL; SMARTUPS_MASTER +- model check in rcups for genericups +- starting all 4 deamons in rcups +- new binary-installpath /usr/sbin +------------------------------------------------------------------- +Wed Nov 10 12:29:40 CET 1999 - ro@suse.de + +- fixed postinstall: (its post and not pre) + +------------------------------------------------------------------- +Tue Oct 26 15:19:09 CEST 1999 - lemsi@suse.de + +- added 2 new variables in rc.config; SMARTUPS_DEVICE; SMARTUPS_MODEL +- modified rcups and smartups.spec +- sending mail after instalation +------------------------------------------------------------------- +Fri Oct 15 02:02:34 CEST 1999 - ro@suse.de + +- added libpng to neededforbuild (now needed for libgd) + +------------------------------------------------------------------- +Fri Oct 15 00:26:28 CEST 1999 - ro@suse.de + +- fixed patch arg + +------------------------------------------------------------------- +Thu Oct 14 16:45:15 CEST 1999 - ray@suse.de + +- new package diff --git a/nut.keyring b/nut.keyring new file mode 100644 index 0000000..1a7b41d --- /dev/null +++ b/nut.keyring @@ -0,0 +1,167 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Comment: B834 59F7 76B9 0224 988F 36C0 DE01 84DA 7043 DCF7 +Comment: Jim Klimov (Doing FOSS since last millennium) = 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.8.2 +Release: 0 +Summary: Network UPS Tools Core (Uninterruptible Power Supply Monitoring) +License: GPL-2.0-or-later +Group: Hardware/UPS +URL: https://www.networkupstools.org/ +# Repack with upstream PR #2623 patched in due to files with proprietary license +Source0: %{name}-%{version}-repack.tar.gz +Source2: README.SUSE +Source3: nut.rpmlintrc +Source4: nut.keyring +Source6: nut.system-sleep +Patch0: nut-preconfig.patch +Patch1: nut-notifyflag.patch +# PATCH-FEATURE-OPENSUSE nut-doc-fixed-date.patch sbrabec@suse.cz -- Make doc builds reproducible. +Patch2: nut-doc-fixed-date.patch +Patch3: harden_nut-driver.service.patch +Patch4: harden_nut-monitor.service.patch +Patch5: harden_nut-server.service.patch +BuildRequires: apache-rpm-macros +BuildRequires: asciidoc +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: libcppunit-devel +BuildRequires: libtool +BuildRequires: libxml2-tools +BuildRequires: libxslt-tools +BuildRequires: net-snmp-devel +BuildRequires: pkgconfig +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(libgpiod) >= 1.0.0 +BuildRequires: pkgconfig(libpowerman) +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(libusb-1.0) +BuildRequires: pkgconfig(neon) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(udev) +Requires: logrotate +Requires: usbutils +Requires(post): udev +# Package provides driver for USB HID UPSes, but people can live with hal addon: +Enhances: %{USBHIDDRIVERS} +# Package provides the only avalailable driver for other USB UPSes: +Supplements: %{USBNONHIDDRIVERS} +# for update from openSUSE <= 11.3, SLE <= 11 +Provides: nut-classic = %{version} +Obsoletes: nut-classic < %{version} +Obsoletes: nut-hal < %{version} +%{?systemd_requires} +%if %{with libfreeipmi} +BuildRequires: pkgconfig(libfreeipmi) +%endif +%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 +%else +# Obsolete all the docu stuff with disabled tex dependencies +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. + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +%package drivers-net +Summary: Network UPS Tools - Extra Networking Drivers (for Network Monitoring) +Group: Hardware/UPS +Requires: %{name} = %{version} +Enhances: %{name} + +%description drivers-net +Networking drivers for the Network UPS Tools. You will need them +together with nut to provide UPS networking support. + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +%package -n libnutclient2 +Summary: Network UPS Tools Library (Uninterruptible Power Supply Monitoring) +Group: System/Libraries +Conflicts: libupsclient1 + +%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 libnutscan2 +Summary: Network UPS Tools Library (Uninterruptible Power Supply Monitoring) +Group: System/Libraries +Conflicts: libupsclient1 + +%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 libupsclient6 +Summary: Network UPS Tools Library (Uninterruptible Power Supply Monitoring) +Group: System/Libraries +Conflicts: libupsclient1 + +%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 +interface for monitoring and administering UPS hardware. + +%package cgi +Summary: Network UPS Tools Web Server Support (UPS Status Pages) +Group: Hardware/UPS +Requires: %{name} = %{version} +Enhances: %{name} +Supplements: (%{name} and apache2) + +%description cgi +Web server support package for the Network UPS Tools. + +Predefined URL is http://localhost/nut/index.html + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +%package devel +Summary: Network UPS Tools (Uninterruptible Power Supply Monitoring) +Group: Development/Libraries/C and C++ +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 +interface for monitoring and administering UPS hardware. + +%package doc-asciidoc +Summary: Network UPS Tools - Documentation in AsciiDoc Format +Group: Documentation/Other +Requires: %{name}-doc-images = %{version} +Recommends: %{name} = %{version} +Enhances: %{name} +BuildArch: noarch + +%description doc-asciidoc +NUT manuals in AsciiDoc format (human readable source). + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +%package devel-doc-html +Summary: Network UPS Tools - Documentation in HTML +# For CSS files: +Group: Documentation/HTML +Requires: %{name}-doc-html = %{version} +Requires: %{name}-doc-images = %{version} +Recommends: %{name} = %{version} +Enhances: %{name} +BuildArch: noarch + +%description devel-doc-html +Developer manual in HTML format. + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +%package doc-html +Summary: Network UPS Tools - Documentation in HTML +Group: Documentation/HTML +Requires: %{name}-doc-images = %{version} +Recommends: %{name} = %{version} +Enhances: %{name} +BuildArch: noarch + +%description doc-html +User manual in HTML format. + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +%package doc-images +Summary: Network UPS Tools - Images for Documentation +Group: Documentation/Other +Requires: %{name}-doc-images = %{version} +Recommends: %{name} = %{version} +Enhances: %{name} +BuildArch: noarch + +%description doc-images +Images for the documentation. It is a supplementary package for some NUT +documentation packages. + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +%if %{with texdoc} +%package doc-pdf +Summary: Network UPS Tools - Documentation in PDF +Group: Documentation/Other +Recommends: %{name} = %{version} +Enhances: %{name} +BuildArch: noarch + +%description doc-pdf +User manual in PDF format. + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +%package devel-doc-pdf +Summary: Network UPS Tools - Documentation in PDF +Group: Documentation/Other +Recommends: %{name} = %{version} +Enhances: %{name} +BuildArch: noarch + +%description devel-doc-pdf +Developer manual in PDF format. + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. +%endif + +%prep +%autosetup -p1 +cp -a %{SOURCE2} . +sed -i s/@now@/`date -r ChangeLog +%%Y-%%m-%%d`/g docs/docinfo.xml.in + +%build +autoreconf -fvi +%configure \ + --disable-static \ + --sysconfdir=%{CONFPATH} \ + --datadir=%{_datadir}/%{name} \ + --with-all \ +%if %{with texdoc} + --with-doc="man html-single html-chunked pdf" \ +%else + --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 \ +%endif +%if %{without libfreeipmi} + --without-ipmi \ +%endif +%if %{without libi2c} + --without-i2c +%endif + --with-htmlpath=%{HTMLPATH} \ + --with-cgipath=%{CGIPATH} \ + --with-statepath=%{STATEPATH} \ + --with-drvpath=%{MODELPATH} \ + --with-pidpath=%{PIDPATH} \ + --with-user=%{NUT_USER} \ + --with-group=%{NUT_GROUP} \ + --with-udev-dir=%{_udevrulesdir}/.. \ + --enable-option-checking=fatal + +# does not create reproducible output with parallelism +%make_build -j1 + +%install +%make_install +find %{buildroot} -type f -name "*.la" -delete -print +mkdir -p %{buildroot}%{STATEPATH} +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 +rename .sample "" %{buildroot}%{_sysconfdir}/ups/*.sample + +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 +cp -a docs/*.txt docs/cables docs/images %{buildroot}%{_docdir}/%{name}/ +cp -a docs/*.css docs/*.html %{buildroot}%{_docdir}/%{name}/ +%if %{with texdoc} +cp -a docs/*.pdf %{buildroot}%{_docdir}/%{name}/ +%endif + +# Not needed for packaged contents: +rm -f %{buildroot}%{_docdir}/%{name}/packager-guide.* +rm -f %{buildroot}%{_docdir}/%{name}/cables/Makefile* +rm -f %{buildroot}%{_docdir}/%{name}/cables/*.txt-prepped + +# Create symlinks for man pages +%fdupes -s %{buildroot}%{_mandir} + +%pre +%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-server.service nut-monitor.service nut-driver-enumerator.path nut-driver-enumerator.service nut-driver.target nut.target nut-driver-enumerator-daemon-activator.path nut-driver-enumerator-daemon-activator.service nut-driver-enumerator-daemon.service + +%post +# Generate initial passwords. +if grep -q "password = @UPSD_INITIAL_MASTER_PASSWORD@" %{CONFPATH}/upsmon.conf %{CONFPATH}/upsd.users; then + UPSD_INITIAL_MASTER_PASSWORD=$(head -c 20 /dev/urandom | md5sum | head -c 10) + sed -i s/@UPSD_INITIAL_MASTER_PASSWORD@/$UPSD_INITIAL_MASTER_PASSWORD/ %{CONFPATH}/upsmon.conf %{CONFPATH}/upsd.users +fi +if grep -q "password = @UPSD_INITIAL_SLAVE_PASSWORD@" %{CONFPATH}/upsd.users ; then + UPSD_INITIAL_SLAVE_PASSWORD=$(head -c 20 /dev/urandom | md5sum | head -c 10) + sed -i s/@UPSD_INITIAL_SLAVE_PASSWORD@/$UPSD_INITIAL_SLAVE_PASSWORD/ %{CONFPATH}/upsd.users +fi +# Migrate Suspend to Disc to the new convention (bnc#449861 and later bnc#871406): +# It was never on by default, but documentation up to 11.0 recommends +# "shutdown -z +0" for suspend to disc. It was discontinued before 11.0. +# Documentation since 11.0 up to 13.1 recommends /powersave -U. +# pm-utils (and powersave) were obsoleted after 13.1 in favor of systemd. +if grep "shutdown -z +0" %{_sysconfdir}/ups/upsmon.conf ; then + sed -i 's:/sbin/shutdown -z +0:%{_bindir}/systemctl hibernate:;s:shutdown -z +0:%{_bindir}/systemctl hibernate:' %{_sysconfdir}/ups/upsmon.conf +fi +if grep "powersave -U" %{_sysconfdir}/ups/upsmon.conf ; then + sed -i 's:%{_bindir}/powersave -U:%{_bindir}/systemctl hibernate:;s:powersave -U:%{_bindir}/systemctl hibernate:' %{_sysconfdir}/ups/upsmon.conf +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-server.service nut-monitor.service nut-driver-enumerator.path nut-driver-enumerator.service nut-driver.target nut.target nut-driver-enumerator-daemon-activator.path nut-driver-enumerator-daemon-activator.service nut-driver-enumerator-daemon.service +%tmpfiles_create %{_tmpfilesdir}/%{name}-common-tmpfiles.conf + +%preun +%service_del_preun nut-server.service nut-monitor.service nut-driver-enumerator.path nut-driver-enumerator.service nut-driver.target nut.target nut-driver-enumerator-daemon-activator.path nut-driver-enumerator-daemon-activator.service nut-driver-enumerator-daemon.service + +%postun +%service_del_postun nut-server.service nut-monitor.service nut-driver-enumerator.path nut-driver-enumerator.service nut-driver.target nut.target nut-driver-enumerator-daemon-activator.path nut-driver-enumerator-daemon-activator.service nut-driver-enumerator-daemon.service + +%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.adoc README.adoc README.SUSE UPGRADING.adoc +%license COPYING +%config %{_sysconfdir}/logrotate.d/* +%{_bindir}/* +%{_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 +%python_sitearch/PyNUT.py +%{_sbindir}/* +%{_udevrulesdir}/*.rules +%config(noreplace) %{CONFPATH}/hosts.conf +%config(noreplace) %attr(600,%{NUT_USER},root) %{CONFPATH}/upsd.conf +%config(noreplace) %attr(600,%{NUT_USER},root) %{CONFPATH}/upsd.users +%config(noreplace) %attr(600,%{NUT_USER},root) %{CONFPATH}/upsmon.conf +%dir %{CONFPATH} +%config(noreplace) %{CONFPATH}/nut.conf +%config(noreplace) %{CONFPATH}/ups.conf +%config(noreplace) %{CONFPATH}/upsset.conf +%config(noreplace) %{CONFPATH}/upssched.conf +%dir %{MODELPATH} +%{MODELPATH}/* +%exclude %{MODELPATH}/snmp-ups +%exclude %{MODELPATH}/netxml-ups +%dir %attr(700,%{NUT_USER},%{NUT_GROUP}) %{STATEPATH} +%{_unitdir}/*.path +%{_unitdir}/*.target +%{_unitdir}/*.service +%{systemdsystemdutildir}/system-shutdown/* +%{systemdsystemdutildir}/system-sleep/%{name}.sh +%{bashcompletionsdir}/* +%{_tmpfilesdir}/%{name}-common-tmpfiles.conf +%ghost %{_rundir}/%{name} +%ghost %attr(700,%{NUT_USER},%{NUT_GROUP}) %{STATEPATH}/upssched + +%files drivers-net +%{MODELPATH}/snmp-ups +%{MODELPATH}/netxml-ups +%{_mandir}/man8/netxml-ups*%{ext_man} +%{_mandir}/man8/snmp-ups*%{ext_man} + +%files -n libnutclient2 +%{_libdir}/libnutclient.so.* + +%files -n libnutclientstub1 +%{_libdir}/libnutclientstub.so.* + +%files -n libnutscan2 +%{_libdir}/libnutscan.so.* + +%files -n libupsclient6 +%{_libdir}/libupsclient.so.* + +%files cgi +%dir %{apache_serverroot} +%dir %{apache_serverroot}/cgi-bin +%dir %{apache_serverroot}/htdocs +%{CGIPATH} +%{HTMLPATH} +%config(noreplace) %{CONFPATH}/upsstats-single.html +%config(noreplace) %{CONFPATH}/upsstats.html + +%files devel +%{_includedir}/*.h +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +%{_libexecdir}/sockdebug +%{_mandir}/man3/*%{ext_man} +%python_sitearch/test_nutclient.py + +%files doc-asciidoc +%doc %dir %{_docdir}/%{name}{,/cables} +%{_docdir}/%{name}/*.txt +%{_docdir}/%{name}/cables/*.txt + +%files devel-doc-html +%{_docdir}/%{name}/developer-guide.html + +%files doc-html +%{_docdir}/%{name}/ChangeLog.html +%{_docdir}/%{name}/FAQ.html +%{_docdir}/%{name}/cables.html +%{_docdir}/%{name}/release-notes.html +%{_docdir}/%{name}/solaris-usb.html +%{_docdir}/%{name}/user-manual.html +%{_docdir}/%{name}/*.css + +%files doc-images +%doc %dir %{_docdir}/%{name} +%{_docdir}/%{name}/images + +%if %{with texdoc} +%files doc-pdf +%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 diff --git a/nut.system-sleep b/nut.system-sleep new file mode 100644 index 0000000..caeb4fb --- /dev/null +++ b/nut.system-sleep @@ -0,0 +1,17 @@ +#!/bin/bash + +# Always stop nut before sleep, but do not initiate powerdown for hybrid-sleep. +if [ "$1" = pre ] && ( [ "$2" = hibernate ] || [ "$2" = hybrid-sleep ] ) ; then + /usr/bin/systemctl stop nut-server.service +fi +if [ "$1" = pre ] && [ "$2" = hibernate ] ; then + # FIXME: All hibernate quirks are called in parallel. To be on a safest side, we should initiate powerdown grace period when they terminate. + sleep 5 + if test -n "$POWERDOWNFLAG" -a -f "$POWERDOWNFLAG" ; then + export UPSD_POWERDOWN_CONDITION=1 + /usr/sbin/upsdrvctl shutdown + fi +fi +if [ "$1" = post ] && ( [ "$2" = hibernate ] || [ "$2" = hybrid-sleep ] ) ; then + /usr/bin/systemctl start nut-server.service +fi