diff --git a/.obs/workflows.yml b/.obs/workflows.yml new file mode 100644 index 0000000000..ce2247f91f --- /dev/null +++ b/.obs/workflows.yml @@ -0,0 +1,23 @@ +# See https://openbuildservice.org/help/manuals/obs-user-guide/cha-obs-scm-ci-workflow-integration#sec.obs.obs_scm_ci_workflow_integration.setup.token_authentication.how_to_authenticate_scm_with_obs + +main_workflow: + steps: + - branch_package: + source_project: home:jimklimov + source_package: nut + target_project: networkupstools + filters: + event: pull_request + +rebuild_master: + steps: + - trigger_services: + project: networkupstools + package: nut + filters: + event: + - push + - tag_push + branches: + only: + - master diff --git a/Makefile.am b/Makefile.am index 0646b54128..8fc1436077 100644 --- a/Makefile.am +++ b/Makefile.am @@ -650,6 +650,7 @@ SPELLCHECK_DIRS_MOST = \ spellcheck/scripts/external_apis \ spellcheck/scripts/hotplug \ spellcheck/scripts/installer \ + spellcheck/scripts/obs \ spellcheck/scripts/python \ spellcheck/scripts/systemd \ spellcheck/scripts/udev \ diff --git a/NEWS.adoc b/NEWS.adoc index 60602dccad..367eb36e77 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -232,6 +232,11 @@ several `FSD` notifications into one executed action. [PR #3097] - Updated `docs/*.txt`: add asciidoc comments with links to nut-website rendered contents of most interesting pages. [#3095] + - Source directory `data/html` was renamed to `data/htmlcgi` in order to + better reflect its contents and purpose, compared to documentation-oriented + `html*` directories (and recipe variable names). This may impact some + packaging recipes which do not rely on `make install` alone. [#3049] + - Dropped the `compile` script from Git sources. It originates from automake and is added to work area (if missing) during `autogen.sh` rituals anyway. It is still distributed as part of `make dist` tarball. [#1209] @@ -265,6 +270,13 @@ several `FSD` notifications into one executed action. [PR #3097] - The `configure` script should now try harder to report specifically the "purelib" location as `PYTHON*_SITE_PACKAGES`. [#1209] + - Upstreamed reference packaging recipes (DEB, RPM) from the 42ITy project + which can be used with OBS (Open Build Service by SUSE), both to support + end-user testing of NUT development, and to have a yet another NUT CI farm + player with a distinct opinion on code quality. Many of the changes listed + above happened thanks to this effort, and due to concerns raised by OBS + build agents with various Linux distributions. [#1209, #1316, #3144] + - Revised use of NUT macros for USB Vendor IDs listed in different drivers, so the names would be better exposed in generated `udev.rules` and similar files. [PR #3139] diff --git a/UPGRADING.adoc b/UPGRADING.adoc index 1b70fb432a..9414a63f51 100644 --- a/UPGRADING.adoc +++ b/UPGRADING.adoc @@ -40,6 +40,11 @@ Changes from 2.8.4 to 2.8.5 help distributions that place `*.conf.sample` files into docs or other locations. [#3131] +- Source directory `data/html` was renamed to `data/htmlcgi` in order to better + reflect its contents and purpose, compared to documentation-oriented `html*` + directories (and recipe variable names). This may impact some packaging + recipes which do not rely on `make install` alone. [#3049] + - Dropped the `compile` script from Git sources. It originates from automake and is added to work area (if missing) during `autogen.sh` rituals anyway (as `make` says, `'automake --add-missing' can install 'compile'` when you diff --git a/ci_build.sh b/ci_build.sh index adec0daa92..a2a2fbfa4c 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -1478,6 +1478,8 @@ if [ -z "$BUILD_TYPE" ] ; then win|windows|cross-windows-mingw) BUILD_TYPE="cross-windows-mingw" ; shift ;; + pkg*) BUILD_TYPE="$1" ; shift ;; + spellcheck|spellcheck-interactive|spellcheck-quick|spellcheck-interactive-quick) # Note: this is a little hack to reduce typing # and scrolling in (docs) developer iterations. @@ -2869,6 +2871,42 @@ cross-windows-mingw*) ./build-mingw-nut.sh $cmd ;; +pkg-rpm|pkg-spec) + echo "WARNING: package build recipes manipulate directly your current workspace" >&2 + echo " and would remove any git-ignored files, might leave trash afterwards!" >&2 + echo " Press Ctrl+C to abort if this is a problem" >&2 + sleep 5 + + rm -f nut.spec nut.changes || true + git clean -fdX || true + cp -f scripts/obs/nut.spec scripts/obs/nut.changes . + sed -e 's,^(Version:).*$,\1 '"`NUT_VERSION_QUERY=VER50 ./tools/gitlog2version.sh`," \ + -i nut.spec + rpmbuild -ba nut.spec \ + && find . -name '*rpm' + ;; + +pkg-deb|pkg-dsc) + echo "WARNING: package build recipes manipulate directly your current workspace" >&2 + echo " and would remove any git-ignored files, might leave trash afterwards!" >&2 + echo " Press Ctrl+C to abort if this is a problem" >&2 + sleep 5 + + rm -rf debian config.*cdbs* nut.dsc || true + git clean -fdX || true + mkdir -p debian + (cd scripts/obs || exit + for F in debian.* ; do + ln -s "../scripts/obs/$F" "../../debian/`echo "$F" | sed 's/debian.//'`" || exit + done) || exit + cp -f scripts/obs/nut.dsc . + sed -e 's,^\(Version:\).*$,\1 '"`NUT_VERSION_QUERY=VER50 ./tools/gitlog2version.sh`," \ + -i nut.dsc + dpkg-checkbuilddeps || sudo mk-build-debs -i + yes | debuild \ + && find . -name '*deb' + ;; + *) pushd "./builds/${BUILD_TYPE}" && REPO_DIR="$(dirs -l +1)" ./ci_build.sh ;; diff --git a/configure.ac b/configure.ac index 96e1757c66..d06c73f83f 100644 --- a/configure.ac +++ b/configure.ac @@ -6808,6 +6808,7 @@ AC_CONFIG_FILES([ scripts/HP-UX/nut.psf scripts/installer/Makefile scripts/misc/nut.bash_completion + scripts/obs/Makefile scripts/python/Makefile scripts/python/module/Makefile scripts/python/module/PyNUT.py diff --git a/docs/nut.dict b/docs/nut.dict index dcc4f726da..a4468e1a40 100644 --- a/docs/nut.dict +++ b/docs/nut.dict @@ -1,4 +1,4 @@ -personal_ws-1.1 en 3566 utf-8 +personal_ws-1.1 en 3576 utf-8 AAC AAS ABI @@ -148,6 +148,7 @@ Breiland Brownell Bs BuildBot +BuildRequires Buildbot Bxx ByPass @@ -1412,6 +1413,7 @@ Uncomment Unices Unitek Upsonic +Upstreamed Ut V'ger VALIGN @@ -2764,6 +2766,7 @@ optimizations optiups oq os +osc ostream other's otheruser @@ -2876,6 +2879,7 @@ prio priv privPassword privProtocol +prjconf problemMatcher probu proc diff --git a/docs/qa-guide.adoc b/docs/qa-guide.adoc index 22a657c2a0..43f4494d7f 100644 --- a/docs/qa-guide.adoc +++ b/docs/qa-guide.adoc @@ -520,6 +520,21 @@ gcc and clang, C standards, and requiring to pass builds at least in a mode without warnings (and checking the other cases where any warnings are made fatal). +Open Build Service (OBS) +~~~~~~~~~~~~~~~~~~~~~~~~ +[[NUT_CI_OBS]] + +The SuSE-backed software suite and on-line instance of the Open Build +Service (OBS) allows building packages for a wide range of Linux (and +potentially non-Linux) operating system distributions. + +This can be seen as an additional CI test for multi-platform portability, +but mainly allows NUT users to get recent development builds as "proper" +packages. + +* https://build.opensuse.org/ +* https://openbuildservice.org/ + Continuous Integration (NUT CI farm) build agent preparation ------------------------------------------------------------ [[NUTCI_farm_agents]] diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 748aff54cb..0c60ce9a77 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -30,9 +30,9 @@ EXTRA_DIST = \ valgrind/valgrind.sh.in \ Windows/halt.c -SUBDIRS = augeas devd hotplug installer python systemd udev ufw Solaris Windows upsdrvsvcctl external_apis +SUBDIRS = augeas devd hotplug installer obs python systemd udev ufw Solaris Windows upsdrvsvcctl external_apis -SPELLCHECK_SRC = README.adoc RedHat/README.adoc usb_resetter/README.adoc valgrind/README.adoc +SPELLCHECK_SRC = README.adoc RedHat/README.adoc usb_resetter/README.adoc valgrind/README.adoc obs/README.adoc # NOTE: Due to portability, we do not use a GNU percent-wildcard extension. # We also have to export some variables that may be tainted by relative diff --git a/scripts/obs/Makefile.am b/scripts/obs/Makefile.am new file mode 100644 index 0000000000..012c32697d --- /dev/null +++ b/scripts/obs/Makefile.am @@ -0,0 +1,121 @@ +# Network UPS Tools: obs (root) + +EXTRA_DIST = README.adoc _service _config + +# Also EXTRA_DIST the recipe-related files (so OBS can use tarballs if they like) + +# Debian/Ubuntu recipes: +EXTRA_DIST += \ + debian.Makefile.am \ + debian.NEWS \ + debian.changelog \ + debian.compat \ + debian.control \ + debian.copyright \ + debian.description.subst \ + debian.gbp.conf \ + debian.hotplug \ + debian.libnutclient-dev.install \ + debian.libnutclient-dev.manpages \ + debian.libnutclient1.install \ + debian.libnutclient1.lintian-overrides \ + debian.libnutclientstub-dev.install \ + debian.libnutclientstub1.install \ + debian.libnutclientstub1.lintian-overrides \ + debian.libnutscan-dev.install \ + debian.libnutscan1.install \ + debian.libups-nut-perl.install \ + debian.libupsclient-dev.install \ + debian.libupsclient-dev.manpages \ + debian.libupsclient4.install \ + nut.changes \ + debian.nut-cgi.README.Debian \ + debian.nut-cgi.docs \ + debian.nut-cgi.install \ + debian.nut-cgi.manpages \ + debian.nut-cgi.postinst \ + debian.nut-cgi.postrm \ + debian.nut-client.init.in \ + debian.nut-client.install \ + debian.nut-client.links \ + debian.nut-client.lintian-overrides \ + debian.nut-client.maintscript \ + debian.nut-client.manpages \ + debian.nut-client.postinst \ + debian.nut-client.preinst \ + debian.nut-client.prerm \ + debian.nut-common.install \ + debian.nut-common.postinst.in \ + debian.nut-common.prerm.in \ + debian.nut-common.tmpfiles.in \ + debian.nut-doc.doc-base.nut-developer-guide \ + debian.nut-doc.doc-base.nut-faq \ + debian.nut-doc.doc-base.nut-packager-guide \ + debian.nut-doc.doc-base.nut-user-manual \ + debian.nut-doc.install \ + debian.nut-ipmi.install \ + debian.nut-ipmi.manpages \ + debian.nut-linux-i2c.install \ + debian.nut-linux-i2c.manpages \ + debian.nut-modbus.install \ + debian.nut-modbus.manpages \ + debian.nut-monitor.install \ + debian.nut-monitor.menu \ + debian.nut-monitor.xpm \ + debian.nut-powerman-pdu.install \ + debian.nut-powerman-pdu.manpages \ + debian.nut-server.dirs \ + debian.nut-server.init.in \ + debian.nut-server.install \ + debian.nut-server.manpages \ + debian.nut-server.postinst \ + debian.nut-server.postrm \ + debian.nut-server.preinst \ + debian.nut-server.prerm.in \ + debian.nut-snmp.docs \ + debian.nut-snmp.install \ + debian.nut-snmp.manpages \ + debian.nut-xml.install \ + debian.nut-xml.manpages \ + debian.nut.README.Debian \ + debian.nut.TODO.Debian \ + debian.nut.docs \ + debian.python-nut.install \ + debian.rules \ + debian.series \ + debian.watch \ + nut.dsc + +# RedHAT/Fedora/CentOS/... recipes: +EXTRA_DIST += \ + nut.spec + +# PKGSRC recipes: +EXTRA_DIST += \ + pkgsrc.obs + +SPELLCHECK_SRC = README.adoc + +# NOTE: Due to portability, we do not use a GNU percent-wildcard extension. +# We also have to export some variables that may be tainted by relative +# paths when parsing the other makefile (e.g. MKDIR_P that may be defined +# via expanded $(top_builddir)/install-sh): +#%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) +# +$(MAKE) $(AM_MAKEFLAGS) -s -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +# NOTE: Portable suffix rules do not allow prerequisites, so we shim them here +# by a wildcard target in case the make implementation can put the two together. +*-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) + +.sample.sample-spellchecked: + +$(MAKE) $(AM_MAKEFLAGS) -s -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +.in.in-spellchecked: + +$(MAKE) $(AM_MAKEFLAGS) -s -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC_ONE="$<" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +spellcheck spellcheck-interactive spellcheck-sortdict: + +$(MAKE) $(AM_MAKEFLAGS) -f $(top_builddir)/docs/Makefile MKDIR_P="$(MKDIR_P)" builddir="$(builddir)" srcdir="$(srcdir)" top_builddir="$(top_builddir)" top_srcdir="$(top_srcdir)" SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_SRCDIR="$(srcdir)" SPELLCHECK_BUILDDIR="$(builddir)" $@ + +CLEANFILES = *-spellchecked + +MAINTAINERCLEANFILES = Makefile.in .dirstamp diff --git a/scripts/obs/README.adoc b/scripts/obs/README.adoc new file mode 100644 index 0000000000..c43a66ab61 --- /dev/null +++ b/scripts/obs/README.adoc @@ -0,0 +1,66 @@ += Packaging recipes for OBS + +== Overview + +This directory holds reference NUT packaging recipes for RPM, DEB and +other formats, and is primarily aimed at automation of builds with the +link:https://openbuildservice.org/[Open Build Service (OBS)]. + +Note that beside the on-line service, the software is open-source and +any project may install and run their own server instance. The `osc build` +command can also be used on a workstation to iterate recipe nuances for +different distributions. In theory, back-end scripts may be added to +support more operating systems over time (even not necessarily Linux). + +NOTE: The layout of files and directories here is dictated by current +expectations of the OBS software (if at some point it has to be a flat +mess with no structure -- so be it). + +== Practical setup + +The copy of `_service` file represents the directly maintained OBS recipe +in an OBS packaging project, and is the only file needed there (triggering +service runs updates the temporary tarball from git). + +Beside that, a `_config` file in the OBS project repository or live settings +in `osc meta prjconf --edit` can be used to specify unambiguous preferences +for certain packages, when a distro actually offers a choice via conditional +`BuildRequires` statements (and other options), e.g.: + +---- +Prefer: libusbx-devel +Prefer: libusb-1.0-dev +Prefer: neon-devel +---- + +* For more details on this, see + https://openbuildservice.org/help/manuals/obs-user-guide/cha-obs-prjconfig + +A parent project must be used to define OBS Repositories we build for, which +should usually include a layer with `openSUSE:Tools` to have the OBS helper +scripts needed for package and tarball transformations in the build area, +for example: https://build.opensuse.org/projects/home:jimklimov/meta + +The list of known distros and repositories massaged with these tools can be +seen at https://build.opensuse.org/repositories/openSUSE:Tools + +For some historical and/or practical details see: + +* https://github.com/networkupstools/nut/issues/1209 + +== Other notes + +The recipe files themselves would likely cross-pollinate with popular +distributions, to allow easier replacement of standard, supported and +stale package builds with those of experimental development iterations. + +This should be in part facilitated by the NUT Semantic Versioning scheme (see +linkdoc:developer-guide[NUT Semantic Versioning,versioning,docs/nut-versioning.adoc]) +which adds version number components to expose the "age" of each such +iteration as a number of commits merged into the common development trunk +since a preceding release, and a number of commits unique to a feature +branch. + +Maybe some way of pre-making a dist tarball (with `VERSION_DEFAULT`, man +pages pre-built, etc.) and using that would be better, to be explored +(ideally if we can do this within OBS). diff --git a/scripts/obs/_config b/scripts/obs/_config new file mode 100644 index 0000000000..c53e0ce56c --- /dev/null +++ b/scripts/obs/_config @@ -0,0 +1,16 @@ +# OBS prjconf for NUT builds +# See https://openbuildservice.org/help/manuals/obs-user-guide/cha-obs-prjconfig + +# Unambiguous preference if "Requires: (A or B)" offered both hits: +Prefer: libusbx-devel +Prefer: libusb-1.0-dev +Prefer: neon-devel + +%if "x%{_repository}" == "xRaspbian_11" +%else +# Use ccache or sccache (let OBS pick its preference) for faster (re-)builds: +BuildFlags: useccache:nut +%endif + +# Embed GIT URL into package metadata: +BuildFlags: setvcs diff --git a/scripts/obs/_service b/scripts/obs/_service new file mode 100644 index 0000000000..81a37d0ecf --- /dev/null +++ b/scripts/obs/_service @@ -0,0 +1,59 @@ + + + https://github.com/jimklimov/nut.git + git + FTY-obs + + + + @PARENT_TAG@.@TAG_OFFSET@ + v(.*) + .git + nut + + scripts/obs/nut.dsc + scripts/obs/nut.spec + scripts/obs/pkgsrc.* + + enable + + + + + + + + + + *.tar + */scripts/obs/debian.* + + + *.tar + */scripts/obs/nut*.changes + + + + + nut + + + + *.tar + gz + + \ No newline at end of file diff --git a/scripts/obs/debian.Makefile.am b/scripts/obs/debian.Makefile.am new file mode 100644 index 0000000000..68fdb08494 --- /dev/null +++ b/scripts/obs/debian.Makefile.am @@ -0,0 +1,9 @@ +EXTRA_DIST = changelog control copyright description.subst hotplug \ + nut-cgi.config nut-cgi.docs nut-cgi.examples nut-cgi.postinst nut-cgi.postrm \ + nut-cgi.preinst nut-cgi.README.Debian nut-cgi.templates nut.config \ + nut.default nut.dirs nut.docs nut.examples nut-hal-drivers.docs \ + nut-server.init nut-client.init nut-client.links \ + nut.postinst nut.postrm nut.preinst nut.prerm nut.README.Debian \ + nut.templates nut.TODO.Debian rules watch \ + po/ca.po po/cs.po po/de.po po/fr.po po/POTFILES.in \ + po/pt.po po/pt_BR.po po/templates.pot po/vi.po diff --git a/scripts/obs/debian.NEWS b/scripts/obs/debian.NEWS new file mode 100644 index 0000000000..e42605c871 --- /dev/null +++ b/scripts/obs/debian.NEWS @@ -0,0 +1,6 @@ +nut (2.6.5-1) experimental; urgency=low + + mge-shut driver has been replaced by a new implementation (newmge-shut). + In case of issue with this new version, users can revert to oldmge-shut. + + -- Laurent Bigonville Mon, 13 Aug 2012 00:32:18 +0200 diff --git a/scripts/obs/debian.changelog b/scripts/obs/debian.changelog new file mode 100644 index 0000000000..092c093c21 --- /dev/null +++ b/scripts/obs/debian.changelog @@ -0,0 +1,1943 @@ +nut (2.8.4-1) UNRELEASED; urgency=high + + * Revising recipes for OBS builds + + -- Jim Klimov Sun, 5 Oct 2025 14:00:00 +0200 + +nut (2.7.4-14) UNRELEASED; urgency=high + + * Ported packaging recipes over upstream NUT, commented away DMF + + -- Jim Klimov Wed, 9 Feb 2022 14:00:00 +0200 + +nut (2.7.4-13) UNRELEASED; urgency=high + + * Base on daisychain+DMF branch from vyskocilm fork @ github + removed patches + * 0024-snmp-ups-Eaton-3ph-UPS-improvements.patch + * 0025-Fix-nut-scanner-compilation-in-some-environments.patch + * 0026-snmp-ups-support-Raritan-Dominion-PX2-PDU.patch + can't be merged, upstream change + * 0028-nut-scanner-additional-search-path.patch + * 0029-netvision-mib-uses-0-as-dfl.patch + daisy chain is upstream + * 0030-daisychain.patch + * 0031-daisychain-complement.patch + * 0032-snmp-ups-fix-some-regression-due-to-daisychain.patch + * 0033-snmp-ups-fix-memory-leaks.patch + part of daisychain+DMF branch + * 0035-daisychain+DMF.patch + * 0036-post-carlos-dmf-fixes.patch + + -- Michal Vyskocil Tue, 16 Aug 2016 11:29:12 +0200 + +nut (2.7.4-12) UNRELEASED; urgency=high + + * Add 0036-post-carlos-dmf-fixes.patch + this fixes bug introduced by Carlos after DMF support was validated + Pushed upstream (DMF branch) as + https://github.com/networkupstools/nut/pull/304 + + -- Michal Vyskocil Mon, 15 Aug 2016 15:25:11 +0200 + +nut (2.7.4-11) UNRELEASED; urgency=high + + * Add 0035-daisychain+DMF.patch + this is combination of daisychain+DMF vyskocilm branch on gh + some + polishing to apply cleanly + + -- Michal Vyskocil Fri, 12 Aug 2016 15:15:18 +0200 + +nut (2.7.4-10) UNRELEASED; urgency=high + + * Add 0034-fix_xmlv4_segfault.patch + + -- Arnaud Quette Tue, 28 Jun 2016 14:17:57 +0200 + +nut (2.7.4-9) UNRELEASED; urgency=high + + * Add 0033-snmp-ups-fix-memory-leaks.patch + + -- Arnaud Quette Thu, 09 Jun 2016 10:36:07 +0200 + +nut (2.7.4-8) UNRELEASED; urgency=high + + * Add 0032-snmp-ups-fix-some-regression-due-to-daisychain.patch + + -- Arnaud Quette Tue, 07 Jun 2016 16:59:19 +0200 + +nut (2.7.4-7) UNRELEASED; urgency=high + + * Add the complementary patch 0031-daisychain-complement.patch + + -- Arnaud Quette Tue, 31 May 2016 16:23:23 +0200 + +nut (2.7.4-6) UNRELEASED; urgency=high + + * Add again patch 0030-daisychain.patch + + -- Arnaud Quette Fri, 27 May 2016 15:46:43 +0200 + +nut (2.7.4-5) UNRELEASED; urgency=high + + * Add patch 0029-netvision-mib-uses-0-as-dfl.patch and + 0030-daisychain.patch + + -- Arnaud Quette Thu, 19 May 2016 13:36:45 +0200 + +nut (2.7.4-4) UNRELEASED; urgency=high + + * Add patch 0028-nut-scanner-additional-search-path.patch + + -- Arnaud Quette Mon, 11 Apr 2016 09:34:15 +0200 + +nut (2.7.4-3) UNRELEASED; urgency=high + + * Add patch 0027-snmp-ups-support-APC-PDU.patch + + -- Tomas Halman Wed, 06 Apr 2016 16:21:47 +0200 + +nut (2.7.4-2) UNRELEASED; urgency=high + + * Add patch 0026-snmp-ups-support-Raritan-Dominion-PX2-PDU.patch + + -- Arnaud Quette Wed, 06 Apr 2016 16:21:47 +0200 + +nut (2.7.4-1) UNRELEASED; urgency=high + + * updated to 2.7.4 + dropped following no longer needed patches: + 0009-systemd.patch + 0010-libnutscanner-2pass-crash.patch + 0012-nutclient-socket-read.patch + 0013-Fix-dummy-ups-for-external-value-changes.patch + 0016-Eaton-ePDU.patch + 0017-Eaton-ePDU-groups.patch + 0018-Eaton-3phase-alarms.patch + 0019-stale-comm-recovery.patch + 0020-stale-comm-detection.patch + 0022-3ph_temp_hum_internal_th.patch + 0023-3ph-outputsource.patch + * Add patch 0024-snmp-ups-Eaton-3ph-UPS-improvements.patch + + -- Arnaud Quette Thu, 10 Mar 2016 11:11:28 +0100 + +nut (2.7.3-23) UNRELEASED; urgency=high + + * Patch SNMP for Eaton 3ph output source status + + -- Arnaud Quette Mon, 08 Feb 2016 11:56:24 +0100 + +nut (2.7.3-22) UNRELEASED; urgency=high + + * Patch SNMP for Eaton 3ph temperature and humidity (internal and external) + + -- Arnaud Quette Wed, 03 Feb 2016 16:21:10 +0100 + +nut (2.7.3-21) UNRELEASED; urgency=high + + * Patch XML scan to actually limit to 3 attempt, and not loop infinitly + + -- Arnaud Quette Tue, 02 Feb 2016 13:01:12 +0100 + +nut (2.7.3-20) UNRELEASED; urgency=high + + * Patch snmp-ups to improve stale communication detection + + -- Arnaud Quette Thu, 14 Jan 2016 15:48:13 +0100 + +nut (2.7.3-19) UNRELEASED; urgency=high + + * Patch snmp-ups to improve stale communication recovery + + -- Arnaud Quette Thu, 07 Jan 2016 13:34:15 +0100 + +nut (2.7.3-18) UNRELEASED; urgency=high + + * Fix typo in nut-driver@.service + + -- Michal Hrusecky Thu, 1 Oct 2015 13:28:07 +0200 + +nut (2.7.3-17) UNRELEASED; urgency=high + + * Add 0018-Eaton-3phase-alarms.patch for 3phase UPS alarms + + -- Arnaud Quette Mon, 28 Sep 2015 16:27:48 +0200 + +nut (2.7.3-16) UNRELEASED; urgency=high + + * Add 0017-Eaton-ePDU-groups.patch for ePDU outlet groups management + and others SNMP improvements + + -- Arnaud Quette Fri, 11 Sep 2015 15:48:36 +0200 + +nut (2.7.3-15) UNRELEASED; urgency=high + + * Complete 0016-Eaton-ePDU.patch for ePDU alarms and SNMP improvements + + -- Arnaud Quette Fri, 11 Sep 2015 15:48:36 +0200 + +nut (2.7.3-14) UNRELEASED; urgency=high + + * added 0016-Eaton-ePDU.patch for ePDU alarms and SNMP improvements + + -- Arnaud Quette Mon, 07 Sep 2015 14:55:11 +0200 + +nut (2.7.3-13) UNRELEASED; urgency=high + + * added 0015-Use-target-for-drivers-in-systemd.patch to implement more + granular systemd support + + -- Michal Hrusecky Fri, 21 Aug 2015 12:15:07 +0200 + +nut (2.7.3-12) UNRELEASED; urgency=high + + * putting 0013-Fix-dummy-ups-for-external-value-changes.patch back + for remote settings through upsrw (for GreenDataNet) + * including 0014-upsrdvctl-nowait.patch. Provides an option to start + The nowait flag allow to tell upsdrvctl to not wait at all for the + driver(s) to execute the request command. The default behavior, when + this variable is omitted, is to wait 'maxstartdelay' seconds + + -- Tomas Halman Mon, 11 Aug 2015 9:20:00 +0100 + +nut (2.7.3-11) UNRELEASED; urgency=high + + * removed 0013-Fix-dummy-ups-for-external-value-changes.patch + probably causes nut unstability + + -- Tomas Halman Mon, 11 Aug 2015 9:20:00 +0100 + +nut (2.7.3-10) UNRELEASED; urgency=high + + * 0013-Fix-dummy-ups-for-external-value-changes.patch: fix dummy-ups + for remote settings through upsrw (for GreenDataNet) + + -- Arnaud Quette Mon, 10 Aug 2015 09:41:28 +0200 + +nut (2.7.3-9) UNRELEASED; urgency=high + + * 0012-nutclient-socket-read.patch fix socket reading + + -- Tomas Halman Mon, 3 Aug 2015 13:12:00 +0100 + +nut (2.7.3-8) UNRELEASED; urgency=low + + * Drop bogus headers from libupsclient-dev + + -- Michal Hrusecky Tue, 30 Jun 2015 8:13:08 +0100 + +nut (2.7.3-7) UNRELEASED; urgency=low + + * 0011-libnutscanner-scan-one-ip-xml-http.patch + + -- Michal Vyskocil Tue, 23 Jun 2015 10:13:08 +0100 + +nut (2.7.3-6) UNRELEASED; urgency=low + + * fix nutscan library crash on second call + + -- Tomas Halman Thu, 18 Jun 2015 8:54:38 +0100 + +nut (2.7.3-5) UNRELEASED; urgency=low + + * add mising dependency between libraries + + -- Michal Hrusecky Wed, 17 Jun 2015 8:54:38 +0100 + +nut (2.7.3-4) UNRELEASED; urgency=low + + * add mising header file for scanner + + -- Michal Hrusecky Mon, 15 Jun 2015 10:54:38 +0100 + +nut (2.7.3-3) UNRELEASED; urgency=low + + * drop static libraries + * add nut-scanner + + -- Michal Hrusecky Fri, 12 Jun 2015 16:54:38 +0100 + +nut (2.7.3-2) UNRELEASED; urgency=low + + * add 0009-systemd.patch + + -- Michal Hrusecky Wed, 13 May 2015 16:54:38 +0100 + +nut (2.7.3-1) UNRELEASED; urgency=low + + * to ease the maintenance switched to OBS format + * updated to 2.7.3 + dropped following no longer needed patches: + 0007-killpower-path.patch + 0009-nut-epdu-input.patch + + -- Michal Hrusecky Wed, 5 May 2015 16:54:38 +0100 + +nut (2.7.2-3) UNRELEASED; urgency=low + + * added 0009-nut-epdu-input.patch + + -- Arnaud Quette Wed, 4 Feb 2015 16:54:38 +0100 + +nut (2.7.2-2) UNRELEASED; urgency=low + + * debian/control: add new packages libnutclient0 and libnutclient-dev + * debian/rules: adapted for the new packages + * debian/libnutclient0.install, debian/libnutclient0.symbols, + debian/libnutclient-dev.install, debian/libnutclient-dev.manpages: + created for the new packages + + -- Arnaud Quette Mon, 20 Oct 2014 20:41:47 +0200 + +nut (2.7.2-1) unstable; urgency=low + + * New upstream release + - Fix the undefined references (Closes: #731156) + - debian/patches/0004-fix-systemd-service.patch: Refreshed + - Drop d/p/0005-Provide-retry-options-for-upsdrvctl-and-drivers.patch: + Merged upstream + - debian/nut-server.install: Upstream is now installing upsdrvctl /sbin + - Rename package libupsclient3 to libupsclient4, soname got bumped again + * debian/rules, debian/control, d/p/0004-fix-systemd-service.patch: Use a + symlink instead of an Alias= to mask the SysV initscript + * debian/control: Bump Standards-Version to 3.9.5 (no further changes) + * debian/tests/control: Add lsb-release and netcat to the dependencies + (Closes: #733189) + * debian/control, debian/rules: Call dh-autoreconf and pass LDFLAGS to + minimize runtime dependencies + * debian/patches/0008-drop-w3c-icons.patch: Remove the link to external W3C + icons to prevent privacy breach (privacy-breach-w3c-valid-html) + * debian/nut-server.install, debian/nut-server.manpages: Install new + nutdrv_atcl_usb driver + + -- Laurent Bigonville Tue, 22 Apr 2014 22:46:12 +0200 + +nut (2.7.1-1) unstable; urgency=low + + * New upstream release (Closes: #730183) + - Refresh debian/patches/0004-fix-systemd-service.patch + - Rename libupsclient1 to libupsclient3 following the soname bump, rename + libupsclient1-dev to libupsclient-dev, the package is not co-installable + anyway + * debian/rules, debian/control: Enable SSL support using libnss3 + * d/p/0005-Provide-retry-options-for-upsdrvctl-and-drivers.patch, + d/p/0006-ups-conf-maxretry.patch: By default, retry to start the drivers + up-to three times, this should mitigate races with slow devices + (Closes: #694717) + * debian/nut-server.install, debian/nut-server.manpages: Install new drivers + * Move bash-completion file to /usr/share/bash-completion/ + * debian/patches/0007-killpower-path.patch: Revert POWERDOWNFLAG back to + /etc/killpower + * debian/nut-client.lintian-overrides: Add override for + systemd-no-service-for-init-script ups-monitor + * debian/rules: Drop static ordering for the initscripts and pass + --restart-after-upgrade option to dh_installinit and dh_systemd_start to + minimize the downtime of the daemons + + -- Laurent Bigonville Sun, 24 Nov 2013 20:57:51 +0100 + +nut (2.6.5-4) unstable; urgency=low + + * debian/control: Do not build nut-ipmi on hurd-i386 as freeipmi is not + available on that platform. + + -- Laurent Bigonville Thu, 11 Jul 2013 12:29:58 +0200 + +nut (2.6.5-3) unstable; urgency=low + + [ Laurent Bigonville ] + * debian/control: + - Move libupsclient1 package to libs Section + - Add libgd-dev to the Build-Depends, keep the other alternatives to ease + the backports + - Bump Standards-Version to 3.9.4 (no further changes) + - Add autotools-dev to the build-dependencies so config.{guess,sub} are + getting updated during build + - Use canonical URL for the VCS-* fields + - Add build-dependency against dh-systemd and bump minimal cdbs version so + systemd helpers are called during build. + * Added dep-8-tests to improve QA (from Ubuntu, closes: #708130) + * debian/nut-monitor.menu, nut-monitor.xpm: Add Debian menu entry (Closes: + #708813) + * debian/rules: Drop manual creation of .service files symlink, this should + be handled by dh_systemd now + * debian/patches/0004-fix-systemd-service.patch: Also add Wants/Before for + systemd-udev-settle.service in the nut-driver.service as it got renamed + after udev merge + * debian/patches/0004-fix-systemd-service.patch: Fix path for upsdrvctl in + scripts/systemd/nutshutdown.in + + [ Ivo De Decker ] + * debian/nut-client.preinst: also revert /etc/nut/nut.conf mangling done + by postinst during upgrade from lenny to squeeze (Really closes: #677054) + Thanks to Andreas Beckmann for the review. + + -- Laurent Bigonville Thu, 11 Jul 2013 00:50:06 +0200 + +nut (2.6.5-2) experimental; urgency=low + + [ Laurent Bigonville ] + * debian/control: Move the nut-monitor Suggests from nut-server to + nut-client + * Restore proper SELinux context for runtime created /var/run/nut directory + * debian/control: Fix typo in package description + * debian/watch: Update watch file URL (Thanks to Bart Martens) + * debian/rules: Alias systemd nut-monitor service file to nut-client to + prevent it from running twice + * d/p/0004-fix-systemd-service.patch: Fix systemd service file for Debian + * Install tmpfiles conf files to create /run/nut directory during boot + + [ Sébastien Villemot ] + * debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older + versions of the postinst (Closes: #677054) + + [ Ivo De Decker ] + * Only fix permissions of configfiles on first install. + * Only remove /etc/init.d/nut from previous versions of nut in nut-server + postinst if there are no local changes. + * Also remove /etc/init.d/nut in nut-client postinst. Thanks to + Laurent Bigonville for the hint. + + -- Laurent Bigonville Thu, 31 Jan 2013 21:51:31 +0100 + +nut (2.6.5-1) experimental; urgency=low + + [ Arnaud Quette ] + * debian/control, debian/nut-ipmi.{install,manpages}: create IPMI + support package + * debian/nut-server.install: only install USB udev rules + + [ Laurent Bigonville ] + * New upstream release + - Drop debian/patches/0001-fix-upsmon-regression.patch, applied upstream + * Follow multi-arch policy + * Install systemd .service files (Closes: #679450) + * debian/nut-server.install: Drop newmge-shut, renamed upstream to mge-shut + and install the old implementation (oldmge-shut) instead + * debian/control: Drop ancient Conflicts/Provides/Replaces + * Install all development files under /usr + + -- Laurent Bigonville Mon, 13 Aug 2012 01:59:18 +0200 + +nut (2.6.4-2) unstable; urgency=low + + * debian/rules: Stop the nut-client before nut-server on systems using static + boot ordering (Closes: #679451) + * debian/nut-server.postinst: Remove /etc/init.d/nut on upgrade + (Closes: #677822) + * Rename nut-server.lintian-overrides to nut-client.lintian-overrides and + adjust overrides now that ups-monitor is shipped in nut-client package + (Closes: #677947) + * Add debian/patches/0001-fix-upsmon-regression.patch: Fix upsmon/upssched + regression (Taken from upstream) (Closes: #679513) + * Move nut metapackage to Section: metapackages + * Also create nut user when installing nut-client package and do not delete + it on purge anymore (Closes: #682000) + * Drop /etc/default/nut → /etc/nut/nut.conf migration code, migration + happends before squeeze release and this was against policy to have a + maintainer script modifying a conffile in the first place (Closes: #684392) + * Add dependency against adduser and lsb-base on nut-client package + * Be sure that client is stopped before the server also when using + dependencies based boot + * Fix package descriptions (Closes: #678068) + * Also install /bin/upssched-cmd in nut-client package as this script is + referenced in default upssched.conf config file + * debian/watch: Update watch file + * Be sure that all maintainer scripts are returning 0 at their end + + -- Laurent Bigonville Sun, 12 Aug 2012 20:38:52 +0200 + +nut (2.6.4-1) unstable; urgency=high + + * New upstream release (Closes: #671444) + * acknowledges NMU (Closes: #613643) + * debian/nut-client.init: fix action "start" and use of log_*_*msg + LSB log functions (Closes: #675619) + * debian/nut-server.preinst: remove obsolete file(s) left in + /etc/udev/rules.d and related processing: udev files are now located + in /lib/udev/rules, and there is no reason to modify the dedicated + USB UPS rules (52-nut-usbups.rules) (Closes: #660072) + + -- Arnaud Quette Wed, 06 Jun 2012 21:03:50 +0200 + +nut (2.6.3-2) unstable; urgency=low + + * debian/nut-server.init: rewrite to match upsd / drivers startup scope + * debian/nut-client.init: created to match upsmon startup scope + (Closes: #634858) + * debian/nut.TODO.Debian, debian/Makefile.am: updated to reflect the above + * debian/rules: install nut-client.init, and update to reflect the above + * debian/control, debian/Makefile.am: updated to reflect the above + * debian/control: + - add Breaks on nut-server (<< 2.6.3-1~) + - bump Standards-Version to 3.9.3 + * debian/nut-client.links: renamed from debian/nut-server.links, since + ups-monitor is now provided by nut-client initscript + * debian/nut.README.Debian: renamed from nut-server.README.Debian, + to provide it with both client and server packages + * debian/nut-server.install: add missing drivers (clone-outlet, + liebert-esp2 and microdowell) + * debian/nut-server.manpages: add missing manual pages (apcsmart-old, + ivtscd, liebert-esp2 and microdowell) + + -- Arnaud Quette Tue, 24 Jan 2012 13:14:59 +0100 + +nut (2.6.3-1) unstable; urgency=low + + * New upstream release (Closes: #635186, #598741, #633756, #638221) + * debian/nut-server.{install,manpages}: add richcomm_usb + * debian/nut-server.install, debian/rules: install Avahi service file + * debian/rules, nut-client.install: install Augeas lenses + * debian/nut-server.README.Debian: clarify udev explanation (Closes: #529664) + * debian/patches/0001-fix_spelling_and_typo.patch, + debian/patches/0003-libupsclient-version.patch: removed since these are now + fixed upstream + * debian/patches/series: updated + + -- Arnaud Quette Tue, 24 Jan 2012 13:14:59 +0100 + +nut (2.6.2-1) unstable; urgency=low + + * New upstream release (Closes: #594989) + * debian/control: + - remove legacy Build-Depends for nut-hal-drivers on libdbus and libglib + - Build-Depends-Indep on docbook-xsl for offline document + generation (Closes: #635347) + * debian/nut-server.install: add apcsmart-old + * debian/nut-server.init: + - add udev as Required-Start/Stop (Closes: #642412) + - remove legacy support for /etc/default/nut (Closes: #638021) + * debian/patches/0003-libupsclient-version.patch: added to fix the missing + libupsclient version info bump + * debian/libupsclient1-dev.links: update link name + * debian/libupsclient1.symbols: add with upscli_tryconnect + * debian/nut.TODO.Debian: update and complete the TODO list + + -- Arnaud Quette Thu, 29 Sep 2011 18:39:16 +0200 + +nut (2.6.1-2) unstable; urgency=low + + * debian/nut.README.Debian: Adjust udev rules naming for permissions override + (Closes: #529664) + * Re-add and refresh debian/patches/0001-fix_spelling_and_typo.patch: + Some typos and spelling errors remain. + * Split nut package into nut-client and nut-server, keep nut package as + metapackage + * Generate PDF and html doc and install it in nut-doc package + * debian/rules: + - List non-installed files + - Includes python-module.mk + - Add flags to build documentation and install it + * debian/control: + - Add python-nut package and add python build-dependency + - Set nut-powerman-pdu priority to extras + - Add nut-monitor package + - Add nut-doc package and add required C/R/P + - Add libups-nut-perl package + * debian/nut-server.prerm: Remove /var/run/nut during removal + + -- Laurent Bigonville Sun, 17 Jul 2011 19:03:18 +0200 + +nut (2.6.1-1) unstable; urgency=low + + * New upstream release (Closes: #595953, #614842, #595773) + * debian/patches/*.patch: removed since these are now fixed upstream + [Laurent Bigonville] + * Drop HAL package and build-dependencies (Closes: #613197) + * debian/control: + - Bump Standards-Version to 3.9.2 (no further changes) + - Drop autotools build-dependencies (not needed anymore) + - Drop non-existing build-dependencies + * debian/rules: + - Correctly pass flags to configure + + -- Arnaud Quette Wed, 01 Jun 2011 22:34:28 +0200 + +nut (2.6.0-2) unstable; urgency=low + + * debian/nut-snmp.docs: Distribute snmp.txt doc file (Closes: #548295) + * d/p/0001-fix_spelling_and_typo.patch: Update and refresh + * debian/nut.lintian-overrides: Fix typo + * debian/patch/0002-fix_libupsclient_pc.patch: Fix libupsclient.pc (Closes: + #624255) + * debian/rules: + - Switch to cdbs + - Remove not existing configure options (Closes: #611813) + - Drop Phony rules (Closes: #613699) + * debian/control: + - Add cdbs build-dependency + + -- Laurent Bigonville Sun, 08 May 2011 21:23:46 +0200 + +nut (2.6.0-1) unstable; urgency=low + + * New upstream release (Closes: #575176, #588648, #609597, #687985) + * debian/patches/*.patch: removed since these are now fixed upstream + * debian/patches/0001-fix_spelling_and_typo.patch, + debian/patches/series: reworked to match the new upstream release + * debian/nut.install, debian/nut.manpages: remove obsolete reference to + megatec and megatec_usb, now respectively replaced by blazer_ser and + blazer_usb + * debian/nut.docs: limit distributed documentation + + -- Arnaud Quette Wed, 16 Feb 2011 22:55:26 +0100 + +nut (2.4.3-3) UNRELEASED; urgency=low + + * debian/control: + - Wrap build-dependencies + - Change nut-cgi Recommends to apache2 | httpd-cgi + * debian/nut.postinst: Only trigger USB subsystem, should Closes: #574769 + * debian/patches/0002-fix_udev_action.patch: Use SUBSYSTEM instead of BUS + + -- Laurent Bigonville Tue, 11 Jan 2011 22:24:07 +0100 + +nut (2.4.3-2) unstable; urgency=medium + + * debian/control: + - Bump Standards-Version to 3.9.1 + - Update Vcs-* fields to new GIT repository + - Add myself as Uploaders + * Switch to dpkg-source 3.0 (quilt) format (Closes: #573601) + * debian/patches/0001-low_speed_usb_ups.patch: Use patch system for changes + that were applied directly in the source + * Add debian/gbp.conf file + * debian/watch: Bump version to 3 + * Add debian/patches/0002-fix_udev_action.patch: Also set permission for + "change" udev ACTION (Closes: #557178) + * debian/nut.postrm: Do not try to remove nut user is deluser is not + installed anymore + * debian/nut.manpages: Install manpage nut.conf.5 (Closes: #528222) + * debian/copyright: Fix copyright-with-old-dh-make-debian-copyright + * Remove nut-snmp.lintian-overrides, not needed anymore + * debian/patches/0003-fix_spelling_and_typo.patch: Fix some spelling errors + * Add debian/libupsclient1.symbols file + * Add debian/nut.links: Re-add /etc/init.d/ups-monitor that was lost for + some reasons (Closes: #592351) + * debian/nut.lintian-overrides: Add override for + init.d-script-does-not-provide-itself /etc/init.d/ups-monitor + * Drop libupsclient1.post{inst,rm}: ldconfig call is added automatically by + debhelper + * debian/libupsclient1-dev.install: Do not ship /lib/libupsclient.la anymore + * debian/rules: Remove dpatch logic as we are using package source version + '3.0 (quilt)' + * debian/compat: Bump debhelper compatibility to 8 + + -- Laurent Bigonville Fri, 24 Dec 2010 11:46:22 +0100 + +nut (2.4.3-1.1) unstable; urgency=low + + * Non-maintainer upload. + * drivers/libhid.c: Apply r2407 from upstream to fix bug with some + low speed UPS devices. (Closes: #583371) + + -- Tim Retout Fri, 15 Oct 2010 19:31:39 +0100 + +nut (2.4.3-1) unstable; urgency=low + + * New upstream release (Closes: #544390, #528222, #539747, #526811, + #562064) + * debian/nut.install, debian/nut.manpages: + - remove cyberpower driver and manpage + - add bestfortress, clone and ivtscd drivers and manpages + * debian/rules: + - change udev dir to /lib/udev (Closes: #522327) + - replace deprecated calls to 'dh_clean -k' by dh_prep (Closes: #536599) + * debian/rules, debian/nut.install, debian/nut.install, + debian/nut.README.Debian: install configuration files, without the + sample suffix (Closes: #528641) + * debian/nut.links: restored (Closes: #522506) + * debian/nut.init: + - source nut.conf instead of default/nut for POWEROFF_WAIT(Closes: + #538173) + - fix status checking (Closes: #538785) + - improve detection of non configured system and beautify related + output (Closes: #563112) + - use 'invoke-rc.d' instead of calling the reboot script directly + - add $remote_fs to Required-Start and Required-Stop + * debian/nut.postrm: remove udev files and simplify cleanup (Closes: + #541629) + * debian/control: + - remove Luca Filipozzi from the Uploaders list (Closes: #568987) + - update Standards-Version to 3.8.4 + - remove the debconf dependency + - bump debhelper version to (>= 7) in Build-Depends, for dh_prep + - add Breaks on nut-hal-drivers to ensure we have correct udev version + * Remove debconf support since it was related to really old nut + version (Closes: #518056): + - remove nut-cgi.config, nut.config, nut-cgi.templates, nut.templates, + and po/ directory + - update nut-cgi.postinst + * debian/nut.dirs: remove /var/run/nut to conform to Debian Policy + * debian/nut.postint: + - create /var/run/nut if needed + - improve security checks + * debian/nut.README.Debian: add a security note for ups.conf + * debian/watch: URL update + + -- Arnaud Quette Wed, 24 Feb 2010 22:58:53 +0100 + +nut (2.4.1-3.2) unstable; urgency=low + + * Non-maintainer upload. + * nut.postinst: fix post-processing of nut.conf to avoid overriding + user settings (Closes: #531220) + + -- Stefano Zacchiroli Thu, 26 Nov 2009 09:30:45 +0100 + +nut (2.4.1-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix length of extended descriptions of packages + in debian/control + * Fix pending l10n issues. Debconf translations: + - Galician (marce villarino). Closes: #524263 + - Spanish (Noel David Torres Taño). Closes: #525125 + - Vietnamese (Clytie Siddall). Closes: #548170 + + -- Christian Perrier Tue, 20 Oct 2009 21:45:21 +0200 + +nut (2.4.1-3) unstable; urgency=low + + * Debconf templates and debian/control reviewed by the debian-l10n- + english team as part of the Smith review project. Closes: #520591 + * [Debconf translation updates] + - Japanese. Closes: #521350, #518602 + - Czech. Closes: #521662 + - German. Closes: #518005 + - Basque. Closes: #522390 + - French. Closes: #522677 + - Finnish. Closes: #522837 + - Swedish. Closes: #522973 + - Italian. Closes: #522987 + - Russian. Closes: #523122 + - Portuguese. Closes: #523600 + + -- Christian Perrier Sat, 21 Mar 2009 08:08:59 +0100 + +nut (2.4.1-2) unstable; urgency=low + + * debian/control: + - add Build-Depends libwrap0-dev to enable TCP wrappers support, + - remove again dpatch from Build-Depends, + - move back debconf to Depends since we don't use it anymore in the preinst, + - add udev to nut-hal-drivers Depends so that it can use udevadm. + * debian/rules: + - pre merge the needed changes for Ubuntu (udev path and version), + - deactivate again dpatch rules + - move the nut-cgi HTML files off /var/www to /usr/share/nut/www + - set dh_installdocs to ignore Makefile + - remove dh_installexamples + * debian/patches/*: removed since it doesn't address the issue + * debian/nut-snmp.lintian-overrides: added to address NetSNMP overlinking + * debian/nut.install: + - add an precise list of the configuration files (Closes: #254355), + - use a wildcard to specify the udev rules installation path + * debian/nut-hal-drivers.install: use a wildcard to specify the udev rules + installation path (either /etc or /lib) + * debian/nut-cgi.install: add an precise list of the configuration files + * debian/nut.preinst: + - remove previous udev rule if unchanged, otherwise move to new filename (ie + with a dash), + - don't call adduser or addgroup *at all*, since these operations should be + handled in the postinst, + - migrate /etc/default/nut content to /etc/nut/nut.conf (part #1) + * debian/nut-cgi.preinst: removed since its content is addressed by postinst. + * debian/nut-hal-drivers.preinst: + - remove previous udev rule if unchanged, otherwise move to new filename (ie + with a dash), + * debian/nut-hal-drivers.postinst: + - reinstate since it was lost in the 2.2.2-10 merge, + - use the safe way to install udev rules (udevadm trigger --action=change). + * debian/nut.postinst: + - use the safe way to install udev rules, as for nut-hal-drivers.postinst + (udevadm trigger --action=change) + - rework the user/group creation, and a commented add to the dialout group, + - migrate /etc/default/nut content to /etc/nut/nut.conf (part #2) + * debian/nut-cgi.postinst: rework the user/group creation, and a commented add + to the dialout group. + * debian/nut.postinst: reactivate the nut user removal upon purge + * debian/nut.init: + - use nut.conf instead of /etc/default/nut to start the right component(s) + - enforce the configuration checking + - add basic support for the status option (as required per LSB) + * debian/nut.default: removed since its content has been incorporated into + nut.conf + * debian/{nut-cgi,nut}.examples: removed since the sample configuration files + are now installed. + * debian/nut.README.Debian: reworked with a lot of update and completion. + * debian/nut-cgi.README.Debian: reworked with a lot of update and completion. + + -- Arnaud Quette Fri, 20 Feb 2009 10:09:52 +0100 + +nut (2.4.1-1) unstable; urgency=low + + * New upstream release + * Acknowledge the use of debhelpers (Closes: #506583) + * debian/copyright: authors and licensing (GPL2+ and GPL3+) completion + * debian/control: + - add a Pre-Depends on debconf for nut and nut-cgi, and remove the according + Depends + - add ${misc:Depends} to all Depends + - add libpowerman0-dev to the Build-Depends + - add a new nut-powerman-pdu package + - add a Recommends on bash-completion for nut + - remove Shaul Karl from the Uploaders as per his request + * debian/nut-powerman-pdu.install, debian/nut-powerman-pdu.manpages: added for + the nut-powerman-pdu package + * debian/nut.install: + - also list the bash_completion entry + - list update due to upstream changes + * debian/nut.manpages: list update due to upstream changes + * debian/rules: + - comment the patching rules + - install the nut.bash_completion script + * debian/patches/*: removed the previous patches since fixed upstream + * debian/patches/01_snmp_ups_no_lcrypto.dpatch: add a patch to fix snmp-ups + overlinking with lcrypto (lintian possible-gpl-code-linked-with-openssl) + * debian/po/es.po: added Spanish debconf template translation (Closes: + 512494) + * debian/po/ja.po: added Japanese debconf template translation (Closes: + 512865) + * debian/watch: updated for the new 2.4 tree + * debian/nut.prerm: replace the direct call to the init script by invoke-rc.d + + -- Arnaud Quette Tue, 17 Feb 2009 14:15:24 +0100 + +nut (2.2.2-10) unstable; urgency=low + + * Merge from Ubuntu (Morten Kjeldgaard): + * debian/compat: changed to 6 + * debian/control: + - bump Build-Depends on debhelper to (>= 6.0.7~) since we are now using + dh_lintian. + - add hal to Build-Depends since configure attempts to locate /usr/lib/hal + in order to define callouts path and device information path + * debian/rules: --prefix is back to /usr, --exec-prefix=/ and --libdir=/lib + instead, which has the desired effect of moving the libraries to /lib. + The many shell commands in debian/rules, for moving files from the + install directory to the package directories have all been replaced by + dh_* calls and matching .* files. + * debian/{libupsclient1-dev.install, libupsclient1-dev.manpages, + libupsclient1.install, nut-cgi.install, nut-cgi.manpages, + nut-hal-drivers.install, nut-snmp.install, nut-snmp.manpages, + nut-xml.install, nut-xml.manpages, nut.install, nut.lintian-overrides, + nut.manpages}: added debhelper files. + * debian/nut.dirs: modified debhelper files + * debian/libupsclient1-dev.links: added to provide a link from + /usr/lib/libupsclient.so -> /lib/libupsclient.so.1.0.0 + This is a transitional measure, to salvage packages that have not yet + been updated to the new library location. Can be removed sometime in the + future. + * debian/patches/03-configure.in.dpatch: patch to configure.in adding + AC_CONFIG_MACRO_DIR([m4]) + + -- Arnaud Quette Thu, 27 Nov 2008 21:43:59 +0100 + +nut (2.2.2-9) unstable; urgency=low + + * debian/rules: also move libupsclient.so to /lib, otherwise the link is + broken (Closes: #505101) + * debian/nut-cgi.postinst: test if /etc/nut exists before chmod'ing (Closes: + #502757) + * debian/nut.TODO.Debian: some update and completion + + -- Arnaud Quette Wed, 15 Oct 2008 17:20:29 +0200 + +nut (2.2.2-8) unstable; urgency=high + + * debian/nut.links: restored since it's now handled by insserv (Closes: + #500190) + * debian/changelog: fix a typo error + * debian/rules: move libupsclient.so.1 from /usr/lib to /lib (Closes: + #491591) + * debian/nut-cgi.README.Debian: fix the permissions on /etc/nut (Closes: + #492277) + * debian/control: add Vcs-Browser and Vcs-Svn fields + + -- Arnaud Quette Tue, 30 Sep 2008 21:37:59 +0200 + +nut (2.2.2-7) unstable; urgency=high + + * debian/nut.links: removed to satisfy insserv (Closes: #492734) + * debian/po/it.po: add Italian debconf template translation (Closes: + #495781) + * debian/nut.preinst: force the nut user to be part of the extra group nut + (Closes: #493159) + + -- Arnaud Quette Mon, 15 Sep 2008 17:18:28 +0200 + +nut (2.2.2-6) unstable; urgency=low + + * tag this bug as closed by the 2.2.2 release (Closes: #490048) + * debian/nut.README.Debian: + - fix the serial udev advice (Closes: #490182) + - mention the UPS compatibility list (Closes: #447187) + * debian/po/de.po: update German debconf template translation (Closes: + #490128) + * debian/changelog: fix a typo on 2.2.2-2 release urgency + + -- Arnaud Quette Fri, 11 Jul 2008 11:30:55 +0200 + +nut (2.2.2-5) unstable; urgency=low + + * debian/po/eu.po: add Basque debconf template translation (Closes: + #489580) + * debian/control: + - add a Build-Depends on autoconfi, automake, libtool for the below patch + - bump Depends on udev to 0.124-1 to complete the fix of #489831 + * debian/rules: call autoreconf after patches application + * debian/patches/02_g_timeout_add_seconds_patch.dpatch: fix compilation + issue in the nut-hal-drivers code, when using a Glib older than 2.14 + (Closes: #489742) + * debian/nut.postint: replace the call to udevtrigger by udevadm trigger + (Closes: #489831) + + -- Arnaud Quette Mon, 07 Jul 2008 11:04:52 +0200 + +nut (2.2.2-4) unstabl e; urgency=low + + * debian/rules: fix a Lintian warning + (debian-rules-calls-debhelper-in-odd-order) + * debian/po/fi.po: add Finnish debconf template translation (Closes: + #489123) + * debian/po/ru.po: add Russian debconf template translation (Closes: + #489285) + * debian/po/vi.po: update Vietnamese debconf template translation (Closes: + #489393) + * debian/nut.templates: remove nut/change_system_user since it is not used + anymore (Closes: #486783) + + -- Arnaud Quette Sat, 05 Jul 2008 22:56:35 +0200 + +nut (2.2.2-3) unstable; urgency=low + + * debian/rules: reactivate dpatch support + * debian/control: add dpatch back to Build-Depends + * debian/patches/00list: fix the matching of the NUT HAL .fdi file (Closes: + #471828) + * debian/po/fr.po: update French debconf template translation (Closes: + #486740) + * debian.po/de.po: update the German debconf template translation (Closes: + #487187) + * debian/po/sv.po: add Swedish debconf template translation (Closes: #488217) + * debian.po/cs.po: update the Czech debconf template translation (Closes: + #488355) + * debian/po/pt.po: update the Portuguese debconf template translation (Closes: + #488403) + * debian/po/sv.po: add Galician debconf template translation (Closes: #488380) + * debian/nut.config: fix a typo in comment + + -- Arnaud Quette Fri, 27 Jun 2008 16:18:29 +0200 + +nut (2.2.2-2) unstable; urgency=low + + * debian/rules: fix HAL files installation paths (Closes: #486362) + * debian/control: + - fix conflicts (Closes: #486704, #486705) + - update Standards-Version to 3.8.0 + + -- Arnaud Quette Fri, 20 Jun 2008 21:29:31 +0200 + +nut (2.2.2-1) unstable; urgency=low + + * New upstream release (Closes: #471828, #462468, #334105, #463150) + * acknowledges NMUs (Closes: #469855) + * debian/control: + - add the new nut-xml package and its libneon dependency + - add the new libupsclient1 and libupsclient1-dev packages, with the latter + replacing nut-dev (Closes: #419684) + - remove dpatch dependency + * debian/rules: update according to upstream changes + - replace --with-lib by --with-dev + - update HAL integration + - update for the nut-xml package + - distribute the shared version of libupsclient + - comment dpatch calls + * debian/nut.postinst, debian/nut-hal-drivers.postinst: use udevtrigger to + refresh the devices permissions (Closes: #469601, #475262) + * debian/changelog: fix a typo + * debian/nut.templates: fix the short and long descriptions + * debian/libupsclient1.postinst, debian/libupsclient1.postrm: added to + handle the calls to ldconfig + * debian/nut.init: fix the call to /etc/init.d/reboot by adding the missing + "stop" parameter (Closes: 482022) + * debian/*.template: minor rework of the Debconf templates (Closes: 444151) + + -- Arnaud Quette Wed, 04 Jun 2008 13:35:41 +0200 + +nut (2.2.1-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Skip udev restart logic within chroots, closes: #469855. + + -- Joe Nahmias Sun, 09 Mar 2008 13:12:12 -0400 + +nut (2.2.1-2) unstable; urgency=low + + * debian/po/de.po: update the German po-debconf translation (Closes: + #464466) + * nut-hal-drivers.preinst: created to add to HAL user to the NUT group + (Closes: #460392) + * debian/nut-hal-drivers.postinst: created to complete the above by + restarting udev after the rules file installation + * debian/changelog: Fix some Lintian reports (syntax and spelling errors) + * debian/nut.README.Debian: completed a bit more for #334105 + + -- Arnaud Quette Fri, 8 Feb 2008 13:48:23 +0100 + +nut (2.2.1-1) unstable; urgency=low + + * New upstream release (Closes: #439986) + * acknowledges NMUs (Closes: #447961, #445000) + * debian/watch: update the URL to point the 2.2 tree + * debian/rules: + - force --udev-dir to remove udev from Build-Depends while + keeping the feature (complete #447961 fix) + - limit the above fix to linux systems not to break build on + bsd and hurd these architectures (Closes: #460732) + - fix lintian debian-rules-ignores-make-clean-error and do some more + cleanup + - remove the empty directories /usr/{include,lib} from the nut package + * debian/nut.postinst: call invoke-rc.d instead of the udev init script + (Closes: #442331) + * debian/control: + - remove udev from Build-Depends + - update Standards-Version to 3.7.3 + - remove Homepage from description and add it as a tag + - add libsnmp-dev as an alternate Build-Depends to libsnmp9-dev + * debian/po/nl.po: update the Dutch po-debconf translation (Closes: #447720) + * debian/po/fr.po: update the French po-debconf translation (Closes: #442102) + * debian/patches/*: removed since these have been applied upstream + * debian/patches/00list: emptied but kept for future use + + -- Arnaud Quette Wed, 23 Jan 2008 17:13:13 +0100 + +nut (2.2.0-2.1) unstable; urgency=low + + * Non-maintainer upload with Arnaud's permission. + * debian/nut.postinst: restart udev only if it is running already + (Closes: #447961). + * debian/nut.preinst: ignore db_get errors for nut/remove_debian_conf, + thanks to Alexander Gerasiov for the patch (Closes: #445000). + * Fixed typo in the date of the 2.2.0-2 changelog entry (Augl -> Aug). + + -- Sebastian Harl Tue, 8 Jan 2008 13:50:11 +0100 + +nut (2.2.0-2) unstable; urgency=low + + * debian/control: list udev as Build-Depends to allow the udev rules + inclusion (Closes: #437811) + * debian/nut.default: fix a typo error on UPSMON options comment (Closes: + #439407) + * debian/po/: + - add Brazilian Portuguese debconf templates translation (Closes: + #439793) + - update Portuguese debconf templates translation (Closes: 440369) + - update French debconf templates translation (Closes: 440524) + * debian/Makefile.am: update with the missing files + * debian/patches/03_libupsclient-config.dpatch: patch for the missing FLAGS + (Closes: #439985) + + -- Arnaud Quette Wed, 29 Aug 2007 16:14:11 +0200 + +nut (2.2.0-1) unstable; urgency=low + + * New upstream release (Closes: #432909, #420016, #426033) + * debian/control: + - merge the nut-usb package into nut, and update the various needed + fields (Depends, Provides, Conflicts, Suggests and Description) + - requires at least libhal-dev 0.5.8 + - complete the nut-hal-drivers Description (Homepage) + - update to policy 3.7.2 + - add po-debconf to Build-Depends + * debian/rules: + - general rewrite since the upstream now use automake + - force the evaluation of DEB_HOST_ARCH_OS for dh_gencontrol + - force udev to empty on non Linux system, for dh_gencontrol + - remove the DH_COMPAT export + - update the nut-usb specifics, not needed anymore + - nut-hal-drivers also needs the udev rules + - call debconf-updatepo to clean debconf translations + * debian/compat: creation + * debian/nut-usb.*: remove these files, and put the content in the + matching nut.* files + * debian/nut.preinst: remove the old udev rule file (025_nut...) which + was manually installed, and now addressed upstream and called 52_nut. + * debian/nut.postinst: restart udev to apply the USB rules to the + already plugged devices + * debian/nut-hal-drivers.preinst: created to add the HAL user to + the nut group + * debian/po/nl.po: added Dutch po-debconf translation (Closes: #414756) + * debian/po/pt.po: added Portuguese po-debconf translation (Closes: #415189) + * debian/patches/01_udev_rules_subsystem_usb.dpatch: update the patch + * debian/patches/02_libupsclient.dpatch: patch for the missing FLAGS + * debian/nut.templates: rewrite and simplification + * debian/nut.config: rewrite and simplification + * debian/rules: call dh_installinit with the priority set to 50 to (Closes: + #385694) + * debian/nut.default, debian/nut.init: allow to specify options for upsd and + upsmon (Closes: #420020, #434503) + + -- Arnaud Quette Tue, 17 Jul 2007 09:14:11 +0200 + +nut (2.0.5-3) unstable; urgency=low + + * debian/patches/01_udev_rules_subsystem_usb.dpatch: rework that + patch to be more generic + + -- Arnaud Quette Fri, 02 Feb 2007 15:38:59 +0100 + +nut (2.0.5-2) unstable; urgency=low + + * debian/patches/*: add a patch to fix the udev rule SUBSYSTEM from + usb_device to usb (thanks to Joey Hess) (Closes: #409080) + * debian/control: + - replace the udev substvar by udev + - nut Conflicts with nut-{usb,snmps} <= 2.0.4 and nut-{usb,snmp} + Depends upon 2.0.5 (Closes: #407882) + * debian/rules: dh_gencontrol no more calls -V for udev + + -- Arnaud Quette Thu, 01 Feb 2007 14:50:49 +0100 + +nut (2.0.5-1) unstable; urgency=low + + * New upstream release (Closes: #406045, #380304, #399741) + * debian/rules: + - replaces CHANGES by ChangeLog + - replace the dummycons installation by dummy-ups + - integrate the --with-htmlpath option + * debian/nut-cgi.docs: created to install data/html/README + * debian/nut.init: LSB compliance update + * debian/control: add lsb-base (>= 3.0-6) to Depends for LSB compliance + + -- Arnaud Quette Tue, 16 Jan 2007 10:42:36 +0100 + +nut (2.0.4-3) unstable; urgency=high + + * acknowledges NMUs (Closes: #396704, #389350) + * debian/nut-usb.postinst: remove the symlinking of the udev file since it's + not useful anymore (Closes: #400215) + * native udev rules are now used (Closes: #359802, #380304) + * debian/po/de.po: add German po-debconf template translation (Closes: + #400285) + * debian/nut.config: change the medium priorities to high (Closes: #388945) + * debian/nut.init: improve drivers startup report + + -- Arnaud Quette Wed, 20 Dec 2006 11:07:30 +0100 + +nut (2.0.4-2.3) unstable; urgency=high + + * Non-maintainer upload. + * Some polish on top of the previous NMU. + * Remove the hotplug alternative; we no longer support it, so it's no + longer acceptable in place of udev. Correspondingly, rename the + substvar to ${udev}. (Closes: #396704) + * Drop debian/nut-usbups.rules and use upstream's rules instead. Modify + debian/rules correspondigly, patch from Arnaud Quette. + + -- Steinar H. Gunderson Fri, 17 Nov 2006 01:12:54 +0100 + +nut (2.0.4-2.2) unstable; urgency=high + + * Non-maintainer upload. + * In the udev script, replace the RUN actions by MODE and GROUP actions, as + per suggestion from the maintainer; should fix permission issues. + (Closes: #396704) + + -- Steinar H. Gunderson Thu, 16 Nov 2006 15:38:43 +0100 + +nut (2.0.4-2.1) unstable; urgency=low + + * NMU + * not removing nut user on purge (Closes: #389350) + + -- Florian M. Weps Thu, 12 Oct 2006 11:19:37 +0200 + +nut (2.0.4-2) unstable; urgency=low + + * debian/rules: replace $PWD by CURDIR to satisfy buildd + * debian/nut.default, debian/nut.init: make the bug 358696 workaround + optional as it might be dangerous under some circumstances (closes: + #358696) + + -- Arnaud Quette Tue, 01 Aug 2006 08:50:26 +0200 + +nut (2.0.4-1) unstable; urgency=low + + * New upstream release + - driver do not use /var anymore when called for shutdown/poweroff + (closes: #332846) + - fixes the newhidups crash upon device reconnexion (closes: #354305, + #359769) + * debian/nut.preinst: syntax enhancement to avoid issue when the nut user + already exists (closes: #378970) + * debian/nut-cgi.postinst: fix wrong permissions (closes: #378818) + * debian/po/cs.po: update Czech translation of nut debconf messages (closes: + #366738) + * debian/nut.default, debian/nut.init: "poweroff" workaround to deal with + BIOS default of "On/Off state: Last state" and system halting itself + before the UPS cuts power (closes: #358696) + * debian/nut-usbups.rules: fix the broken udev rules (closes: #359801) + + -- Arnaud Quette Thu, 27 Jul 2006 15:20:46 +0200 + +nut (2.0.3-4) unstable; urgency=low + + * debian/nut-usb.postinst: generate the /etc/udev/rules/ file + * debian/rules: + - install the right udev rule file (not the upstream one) + - install the debian/hotplug file as libhidups, as it's compatible + with hotplug and udev styles + + -- Arnaud Quette Mon, 13 Mar 2006 08:52:25 +0100 + +nut (2.0.3-3) unstable; urgency=low + + * debian/rules: + - fix a wrong symlink for the udev rule files (closes: #354262) + - add a temporary workaround to clean drivers/tripplite_usb + + -- Arnaud Quette Mon, 27 Feb 2006 15:35:32 +0100 + +nut (2.0.3-2) unstable; urgency=low + + * debian/nut.init: fix the creation of the PID directory, as /var is now volative. + This bug has been identified in Ubuntu (Launchpad #6679) + * debian/nut-cgi.postrm: suppress the deletion of the nut user as it's not + needed (closes: #319395) + * debian/nut-cgi.preinst: suppress that file as we do not need to check and create + the nut user and group for nut-cgi + * debian/nut-cgi.postinst: enhanced to ensure the /etc/nut directory and nut-cgi + configuration files are readable by others + * debian/nut-cgi.README.Debian: improve the documentation about configuration + files permissions + + -- Arnaud Quette Fri, 24 Feb 2006 10:05:25 +0100 + +nut (2.0.3-1) unstable; urgency=low + + * New upstream release + - include the improved USB driver (closes: #300115) + - fix mge-utalk regression (closes: #315431) + - fix USB device claiming and logging (closes: #322901) + * debian/nut-cgi.config: complete the typo fixes from 2.0.2-1 and remove exit + calls (closes: #308215) + * debian/nut.config: remove exit calls + * debian/hotplug: add this file to manage hotplug and udev style permissions settings + * debian/nut-usbups.rules: embed a modified version of the upstream file + * debian/control: + - make hotplug | udev Depends conditionnal, from rules + - remove libusb-0.1-4 Depends as it is already listed with shlibs:Depends + * debian/rules: + - generate debian/control Depends for hotplug | udev + - also install udev files (closes: #338738, #332939) + - call the clean rule before distclean + * debian/nut.README.Debian: + - update the Installation §2 to reflect udev changes on serial port permissions. + Users need to manually add the nut group to the dialout group (closes: #325878, + #334105) + - some other minor update + + -- Arnaud Quette Tue, 21 Feb 2006 13:57:35 +0100 + +nut (2.0.2-2) unstable; urgency=low + + * debian/nut-cgi.postinst: load confmodule + * debian/nut-hidups/*: remove this unneeded directory + * debian/control: + - Update build dependency from libsnmp5-dev to libsnmp9-dev (closes: + #326410) + - Changes nut-usb wrong dependency from libusb-dev to libusb-0.1-4 (closes: + #320315) + - add debconf (>= 0.5.00) and adduser to nut/nut-cgi Depends + * debian/copyright: update the FSF address and the Authors + * debian/po/vi.po: add the Vietnamese translation for debconf, from Clytie + Siddall ((closes: #316327) + + -- Arnaud Quette Fri, 07 Oct 2005 23:35:55 +0200 + +nut (2.0.2-1) unstable; urgency=low + + * New upstream release: + - build respect LDFLAGS (closes: #265439) + - fix etapro brokeness (closes: #305730) + - fix shutdown/restart problems with mge-shut (closes: #302190) + - fix mge-utalk support for older units (closes: #315431) + * debian/po/fr.po: update the French debconf templates, thanks to Michel + Grentzinger (closes: #306541) + * debian/rules: + - install hotplug files for the newhidups USB driver + - suppress the snmp-ups.8 manpage workaround + * debian/nut-usb.prerm: created to remove hotplug files + * debian/control: + - add hotplug Depends for nut-usb + - upgrade Debian Policy to 3.6.2 + * debian/patches/*: remove all patch and empty 00list as all has + been fixed upstream + * debian/nut-cgi.config: integrate the typo fixes that was blocking + upgrade from woody to sarge + * debian/nut-cgi.preinst: remove an unneeded blank line + * acknowledge NMU from Craig Small (closes: #302189) + + -- Arnaud Quette Mon, 27 Jun 2005 11:29:52 +0200 + +nut (2.0.1-3) unstable; urgency=low + + * debian/patches/01_cleanSourceFromlibupsclient.dpatch: removed as it + has been fixed upstream in 2.0.1 + * debian/patches/00list: re enabled for the below patch + * debian/patches/01_upsstatsCgiNoHostCrash.dpatch: added while waiting + for the upstream fix (closes: #302902) + * debian/nut-cgi.templates: added nut-cgi/major_template_changes + * debian/nut-cgi.config: use nut-cgi/major_template_changes (closes: + #301184) + * debian/nut-cgi.README.Debian: reworked, and mention upgrade and + installation. + * debian/nut.README.Debian: mention the missing UPGRADING file, and complete + the upsmon.conf lines with the mandatory POWERDOWNFLAG and SHUTDOWNCMD + (closes: #302182) + * debian/nut.templates: add nut/2_0_upstream_changes to deal with the new + changes + * debian/nut.config: use the above nut/2_0_upstream_changes (closes: + #301060) + + -- Arnaud Quette Fri, 15 Apr 2005 13:52:32 +0100 + +nut (2.0.1-2.1) unstable; urgency=low + + * Non-maintainer upload + * NUT nows powersdown Closes: #302189 + + -- Craig Small Thu, 7 Apr 2005 11:47:58 +1000 + +nut (2.0.1-2) unstable; urgency=low + + * debian/control: add missing Build-Depends for dpatch, thanks to Kurt + Roeckx (closes: #298218) + + -- Arnaud Quette Mon, 07 Mar 2005 16:29:32 +0100 + +nut (2.0.1-1) unstable; urgency=low + + * New upstream release (closes: #247671, #283539) + * debian/watch: update URL to match the current 2.0 stable tree + * debian/rules: + - change install-misc target to install-lib following the upstream rule + name change + - error reporting enhancements, thanks to Karl Shaul (inserted a set -e at + the start of every for loop ; from Debian Policy §4.5). + - workaround to include dummycons test driver and its manpage in nut-dev + while waiting for an upstream rule + - workaround to remove snmp-ups manpage from the nut package, to avoid a + file conflict with nut-snmp, while waiting for an upstream rule + - remove the workaround from 1.4.2-2 to suppress libupsclient.a and + newhidups upon make clean + - comment the "conf files workaround" as it's no more needed + * debian/control: + - add nut-dev to nut Suggests + - complete nut-dev to include dummycons testing driver + - add libusb (>= 0.1.8) nut-usb Depends to benefit of the kernel driver + unbind feature (needed for USB models other than MGE UPSs) + - suppress libgd1 from Build-Depends to fix a DebCheck warning, as it + is listed in Section oldlibs + * debian/nut.README.Debian: add a section "(3) /etc/nut/upsd.conf" + and add references to sample config files and UPGRADING information + (closes: #269485) + * debian/nut.TODO.Debian: add this file to track planned and unfinished + tasks + * debian/nut-cgi.README.Debian: improve a bit the text + * debian/nut.init: test powerdown flag (upsmon -K) and use the new + upsdrvctl exit codes (thanks to Karl Shaul) + * debian/po/cs.po: add Czech translation of debconf templates (patch from + Miroslav Kure) (closes: #283225) + * debian/patches: add basic infrastructure for dpatch + + -- Arnaud Quette Fri, 04 Mar 2005 11:40:13 +0100 + +nut (1.4.3-2) unstable; urgency=low + + * debian/control: add nut-dev package with NUT lib and headers (closes: + #263937) + * debian/rules: change install-misc for the above nut-dev. + * debian/control: invert apache and httpd in nut-cgi Recommends to solve a + lintian warning + + -- Arnaud Quette Sun, 08 Aug 2004 16:07:04 +0200 + +nut (1.4.3-1) unstable; urgency=low + + * New upstream release + * debian/control: change Homepage URL to "www" instead of "random" and + remove trailing slash / dot (closes: #254084) + * debian/control: add apache to nut-cgi Recommends to have a non-virtual + package alternative + + -- Arnaud Quette Thu, 29 Jul 2004 22:58:03 +0200 + +nut (1.4.2-3) unstable; urgency=low + + * debian/control: add libusb-dev version in Build-Depends (closes: #248952) + * debian/copyright: update upstream URL and copyright owners (closes: + #242422) + * debian/po/ca.po: add Catalan translation of debconf templates (patch from + Aleix Badia i Bosch) (closes: #248741) + * debian/nut-cgi.README.Debian: added to describe nut-cgi configuration + (thanks to Marius Gedminas) (closes: #249825) + * debian/nut.README.Debian: minor change + + -- Arnaud Quette Fri, 28 May 2004 13:10:01 +0200 + +nut (1.4.2-2) unstable; urgency=low + + * debian/control: add libusb-dev to Build-Depends (closes: #240586) + * debian/rules: workaround to clean libupsclient.a and newhidups (complete + the above) + + -- Arnaud Quette Sun, 28 Mar 2004 18:30:01 +0100 + +nut (1.4.2-1) unstable; urgency=low + + * New upstream release + * Fixes mge-shut settings and shutdown problems (closes: #232402, #234037) + * debian/nut.init: fixes powerdown rule to prevent from forced UPS shutoff + upon normal shutdown, and add a warning when POWERDOWN flags isn't + defined, thanks to Loic Le Loarer (closes: #236092) + * debian/control: update nut-usb Description to reflect the add of newhidups + and energizerups drivers. + * debian/rules: update nut-usb build and install rules to match the new ones + + -- Arnaud Quette Thu, 25 Mar 2004 16:30:01 +0100 + +nut (1.4.1-release-2) unstable; urgency=low + + * recall previously malformed closed bug (closes: #227965, #227964) + * debian/control: Build-Depends to allow libgd*-noxpm (closes: #231153) + * debian/control: update Homepage address + * debian/watch: update target address + + -- Arnaud Quette Thu, 05 Feb 2004 19:19:56 +0100 + +nut (1.4.1-release-1) unstable; urgency=low + + * New upstream release + * debian/po/*: add gettext support for debconf templates (patch from Michel + Grentzinger) (Close: #227965) + * debian/po/fr.po: add French translation of debconf templates (patch from + Michel Grentzinger) (Close: #227964) + + -- Arnaud Quette Sun, 18 Jan 2004 21:19:56 +0100 + +nut (1.4.1-pre3-5) unstable; urgency=low + + * debian/nut.postrm: fix inverted test with -z (fix a purge error) + * debian/nut.postrm: same as above + * debian/nut.postrm: suppress check_and_delete_group() as it is not useful + * debian/nut-cgi.postrm: same as above + * debian/nut.postinst: test if /etc/nut exists before chmod'ing (fix an + install error) + + -- Arnaud Quette Sat, 15 Nov 2003 22:10:23 +0100 + +nut (1.4.1-pre3-4) unstable; urgency=low + + * debian/nut.preinst: wider check for user/group creation (closes: #217980) + * debian/nut.postrm: rework purge rule for user/group deletion (2nd part of + the above fix) + * debian/nut-cgi.postrm: rework purge rule for user/group deletion (2nd part of + the above fix) + * debian/nut-cgi.preinst: wider check for user/group creation (same as + above) + * debian/rules: suppress {nut,nut-cgi}/etc/nut/*.sample that were wrongly + installed (linked to #172217) + * debian/nut.examples: created to complete above fix + * debian/nut-cgi.examples: created to complete above fix + * debian/nut.postrm: suppress /etc/nut/*.sample file (to correct above + problem) + * debian/nut-cgi.postrm: suppress /etc/nut/*.sample file (same as above) + * Maintainer upload (forgotten previously), closes: #200182, #203061 + + -- Arnaud Quette Sat, 15 Nov 2003 10:10:23 +0100 + +nut (1.4.1-pre3-3) unstable; urgency=low + + * clients/Makefile.in: install parseconf.h to fix compilation error with wmnut + * man/Makefile.in: fix a broken upstream rule (hidups manpages installed two + times) that prevent from installing nut-usb package. This will be fixed in + the next upstream + + -- Arnaud Quette Mon, 10 Nov 2003 17:10:23 +0100 + +nut (1.4.1-pre3-2) unstable; urgency=low + + * man/Makefile.in: fix a broken upstream rule (powernet and snmp-ups + manpages installed two times) that prevent from installing nut-snmp package + + -- Arnaud Quette Mon, 10 Nov 2003 12:59:23 +0100 + +nut (1.4.1-pre3-1) unstable; urgency=low + + * New upstream release + * clients/Makefile.in: suppress the one line patch to install parseconf.o + (from 1.4.1-pre2-1). This is now cleanly addressed by the upstream source + by installing libupsclient.a (closes: #216496) + * debian/rules: change dh_shlibdeps's exclude from upsfetch.o to libupsclient.a + * debian/nut.preinst: fix install rule to catch all cases of nut user and group + needed creation. Previously, post purge install case was not (closes: #217980) + * debian/rules: suppress the work-around for nut-usb package following + the upstream correction (from 1.4.1-pre1-2) + * debian/control: Final package take over ; switch Luca Filipozzi as + co maintainer, and Arnaud Quette as new maintainer. + * debian/watch: point the authoritative download server (penguin.harrison) + and stable releases ("nut/release/1.4/" directory ; it won't work for + final 1.4.1, but for 1.4.2) + * debian/nut.postrm: rework purge rule to suppress a warning + + -- Arnaud Quette Sat, 8 Nov 2003 12:15:23 +0100 + +nut (1.4.1-pre2-1) unstable; urgency=low + + * New upstream release + * debian/control: created package nut-usb for finer deps management + * debian/rules: added rules for nut-usb package, and a work-around + for install directories creation while waiting for upstream correction. + * drivers/Makefile.in: suppressed hidups from PROGS, thanks to the above + * debian/control: repeat Homepage for every sub-package + * debian/control: completed nut Suggests + * debian/control: changed Arnaud Quette address to the good Debian one + * debian/rules: suppress the work-around for nut-snmp package following + the upstream correction(from 1.4.1-pre1-1) + * debian/nut-cgi.preinst: always test if nut user exist as nut-cgi + can be installed without nut, so not having nut user created (closes: + Bug#213730) + * debian/nut-cgi.postinst: chown root:nut to address a potential security + issue (see 1.2.1-2) + * clients/Makefile.in: one line patch to install parseconf.o. This solve + a problem with wmnut package (can't build anymore due to unresolved + symbols). This point will be more cleanly address in next upstream + + -- Arnaud Quette Sat, 18 Oct 2003 09:05:01 +0200 + +nut (1.4.1-pre1-2) unstable; urgency=low + + * debian/control: rewrotte descriptions to follow Debian Policy. A + further enhancement will be to use debian/nut.substvars (thanks + to Shaul Karl) (closes: Bug#209569) + * drivers/Makefile.in: added back hidups to PROGS (closes: Bug#208248) + * debian/control: added libgd2-* to Build-Depends to allow more choices + * debian/control: added Shaul Karl as co-maintainer + * debian/control: changed Arnaud Quette address to Debian's one + + -- Arnaud Quette Sun, 14 Sep 2003 12:11:45 +0200 + +nut (1.4.1-pre1-1) unstable; urgency=low + + * New upstream release (closes: Bug#203856) + * recall ignored 1.4.0-2 changes (closes: Bug#204193, Bug#199895) + * debian/nut.preinst: already solved bug in 1.4.0-3 (closes:Bug#206229) + * debian/control: created package nut-snmp (closes: Bug#195645) + * debian/rules: added rules for nut-snmp package, and a work-around + for install directories creation while waiting for upstream correction. + * debian/control: change Build-Depends to "libgd-xpm-dev | libgd-dev" to + allow easy woody backport (thanks to Martin Maney) + * debian/nut.prerm: wait for upsd stop before calling the remove tempo + + -- Arnaud Quette Sat, 23 Aug 2003 13:55:32 +0200 + +nut (1.4.0-3) unstable; urgency=low + + * debian/nut.prerm: fix a post removal warning by adding a tempo + (1 sec) before removing /var/run/nut + * debian/nut.preinst: reworked install rule (thanks Shaul) (closes:Bug#204153) + + -- Arnaud Quette Fri, 8 Aug 2003 23:14:26 +0200 + +nut (1.4.0-2) unstable; urgency=low + + * debian/watch: update URL to point NUT 1.4 (thanks to Shaul Karl) + * debian/nut.dirs: add /var/run/nut (thanks Shaul) (closes: Bug#204193) + * debian/nut-cgi.preinst: created for allowing separate installation + (without nut) (closes: Bug#199895) + * debian/rules: remove the "--with-group=nut" call to configure as it + is obsolete (thanks Shaul) + * debian/control: add Arnaud Quette as co-maintainer + + -- Arnaud Quette Thu, 7 Aug 2003 20:14:26 +0200 + +nut (1.4.0-1) unstable; urgency=low + + * New upstream release (closes: Bug#203061) + * debian/nut.init: change Init-script ordering (start_stop_server) to + address data stale warning (closes: Bug#200182) + + -- Arnaud Quette Fri, 1 Aug 2003 18:42:22 +0200 + +nut (1.2.2-1) unstable; urgency=low + + * New upstream release + * debian/rules: gidNumber of group 'nobody' is 65534 not 65535 + (thanks Shaul) (closes: Bug#180532) + + -- Luca Filipozzi Fri, 18 Apr 2003 20:12:17 -0700 + +nut (1.2.1-2) unstable; urgency=low + + * debian/nut.README.Debian: s/smartapc/apcsmart/ (closes: Bug#177713) + * debian/nut.postinst: chown root:nut instead of chown nut:nut for files + in /etc/nut/* and for the dirs /etc/nut, /var/run/nut, /var/lib/nut; + this addresses a potential security issue as described in the comments + contained in /etc/nut/upsmon.conf (closes: Bug#180059) + * debian/nut.init: sysadmins might modify POWERDOWNFLAG in + /etc/nut/upsmon.conf without realizing that it is hard coded in the + /etc/init.d/nut init script; fix the init script to parse the + configuration file for the value of POWERDOWNFLAG (closes: Bug#179686) + * debian/nut.init: print a message prior to shutdown (closes: Bug#180242) + + -- Luca Filipozzi Sat, 8 Feb 2003 18:12:11 -0800 + +nut (1.2.1-1) unstable; urgency=low + + * New upstream release + * debian/control: nut provides/conflicts ups-monitor (closes: Bug#170655) + * debian/nut.postinst and debian/nut-cgi.postinst: + test -f file before chown/chmod (closes: Bug#170553) + * debian/nut.postinst: fix permissions on /var/lib/nut (closes: Bug#173318) + * debian/nut.preinst: change how the 'nut' user/group are detected and + created (closes: Bug#173321) + * between 1.1.11-1 incorrectly installed conffiles into /etc/nut + with the extension .sample; fortunately, this release of the package + did not migrate to testing and since 1.1.11-2 the .sample extension + has not been used (closes: Bug#172217) + * debian/nut.preinst: change the way the nut user/group are detected + before adduser is called (closes: Bug#170653) + * debian/nut.README.Debian: fixed minor doc error (Closes: Bug#173673) + + -- Luca Filipozzi Wed, 11 Dec 2002 19:39:02 -0800 + +nut (1.2.0-1) unstable; urgency=low + + * New upstream release + * debian/nut-cgi.postinst: fix permissions on /etc/nut/hosts.conf and + /etc/nut/upsset.conf so that they are world readable (Closes: Bug#167332) + * debian/nut.init: added sleep 5 to allow for an orderly restart (thanks + to Shaul Karl for pointing this out) + + -- Luca Filipozzi Tue, 19 Nov 2002 09:44:25 -0800 + +nut (1.1.12-1) unstable; urgency=high + + * New upstream release (urgency high due to SECURITY FIX) + * SECURITY FIX: a file permission problem potentially exposes + non-system usernames/passwords in /etc/nut/upsd.users that can be used + to DoS a machine running nut by contacting the nut daemon and instructing + it to power off the machine; fixed. + * debian/nut.postinst: change permissions of /etc/nut/upsd.users and + other conffiles to 640 (Closes: Bug#165445) + * debian/nut.config: use db_fset to reset the boolean question that prompts + users to accept whether to continue with the installation of this version + of nut should they answer no (Closes: Bug#165376) + * debian/control: make nut-cgi Replace nut so that conflicting files + can be installed (Closes: Bug#165049) + * drivers/Makefile.in: restored original version that doesn't build + hidups, snmp-ups or powernet; hidups doesn't build on m68k; snmp-ups + and powernet require libsnmp5-dev but libsnmp5-dev requires OpenSSL; + unfortunately, upstream's license doesn't have the OpenSSL exclusion + clause... work is proceeding on porting to gnutls + * drivers/Makefile.in + debian/rules: figured out a mechanism to build + hidups on those architectures that have /usr/include/linux/hiddev.h + * debian/control: build-depend on libgd-xpm-dev (really closes Bug#164832) + + -- Luca Filipozzi Sat, 19 Oct 2002 16:47:35 -0700 + +nut (1.1.11-2) unstable; urgency=low + + * changed build dependencies to avoid depending on a pure-virtual package + without providing a default (thanks Junichi Uekawa) (Closes: Bug#164832) + * debian/rules calls $(MAKE) install-misc so that the header and the .o file + are released with the nut package (too small for a nut-dev package?) + + -- Luca Filipozzi Tue, 15 Oct 2002 08:50:18 -0700 + +nut (1.1.11-1) unstable; urgency=low + + * New upstream release + (Closes: Bug#151047, Bug#155943, Bug#153174, Bug#160178, Bug#164024) + * the "Hey Dorothy, you aren't in Kansas anymore" release + * warning: significant changes since nut 0.45.5; specifically: + - upsd listens on a different port (was 3305; now 3493 (IANA-assigned)) + - configuration file formats have changed + - ups driver internals haved changed: 'common main.c' + upsdrvctl + - some ups drivers that were not ported to the new common model have + been dropped by the upstream author (submit a patch to rectify) + - the init script is significantly simpler + - the daemons will NOT restart on upgrade from from 0.45.5 or earlier + - there is an /etc/default/nut file that defines whether the daemons + will be started + - removed nut-doc package... far too small to merit being on its own + + -- Luca Filipozzi Mon, 14 Oct 2002 13:33:58 -0700 + +nut (0.45.5-rel-3) unstable; urgency=low + + * "unlink .sock file before starting up; this was keeping the drivers down + after a system crash where the .sock files remained" -- upstream + (Closes: Bug#149150, Bug#139859) + + -- Luca Filipozzi Fri, 7 Jun 2002 22:34:53 -0700 + +nut (0.45.5-rel-2) unstable; urgency=low + + * debian/control: nut and nut-cgi suggest rather than recommend + the documentation package, nut-doc (Closes: Bug#144763) + * debian/nut-cgi.dirs: change absolute paths to relative (Closes: Bug#144746) + * debian/rules: remove upsdrvctl.8 from package (Closes: Bug#143099) + + -- Luca Filipozzi Sun, 2 Jun 2002 21:39:14 -0700 + +nut (0.45.5-rel-1) unstable; urgency=low + + * New upstream release + * debian/rules: moved model daemons to /lib/nut to reduce chance of + namespace conflicts (Closes: Bug#141209) + * debian/rules: moved sample configuration files to + /usr/share/doc/nut/examples (Closes: Bug#140472) + # debian/postinst: change mode and ownership of files in /etc/nut/ on + configure to allow ready by nut/nut (Closes: Bug#142116) + + -- Luca Filipozzi Sun, 14 Apr 2002 13:37:13 -0700 + +nut (0.45.4-rel-3) unstable; urgency=low + + * added runtime dependency on adduser (Closes: Bug#137887) + + -- Luca Filipozzi Sat, 16 Mar 2002 21:41:53 -0800 + +nut (0.45.4-rel-2) unstable; urgency=low + + * Changed debian/rules to call install-misc which installs the development + files upsfetch.[oh]. There are too few development files to merit a + nut-dev package. + + -- Luca Filipozzi Sun, 24 Feb 2002 15:47:56 -0800 + +nut (0.45.4-rel-1) unstable; urgency=low + + * New upstream release + + -- Luca Filipozzi Sun, 24 Feb 2002 11:56:46 -0800 + +nut (0.45.4-pre5-1) unstable; urgency=low + + * New upstream release (Closes: Bug#131673) + + -- Luca Filipozzi Sun, 17 Feb 2002 17:31:32 -0800 + +nut (0.45.1-release-2) unstable; urgency=low + + * applied POWERDOWNFLAG upstream-patch (Closes: Bug#111979) + * applied apcsmart calibration user-patch (Closes: Bug#111978) + * modified models/main.c so that it does a forceshutdown *before* + attempting to chdir into /var/lib/nut (Closes: Bug#112540) + + -- Luca Filipozzi Tue, 23 Oct 2001 16:22:57 -0700 + +nut (0.45.1-release-1) unstable; urgency=low + + * New upstream release + * Fixed conffile problem with nut-cgi package (Closes: #108687) + + -- Luca Filipozzi Sat, 18 Aug 2001 11:58:57 -0700 + +nut (0.45.1-pre4-1) unstable; urgency=low + + * New upstream release (Closes: #101105) + + -- Luca Filipozzi Sun, 5 Aug 2001 13:59:12 -0700 + +nut (0.44.3-pre6-3) unstable; urgency=low + + * Init script now poweroffs the UPS' correctly. (Closes: #96790) + * Changed section of nut-doc to 'doc' (Closes: #94842) + * Not upgrading to new upstream source (0.45.0) until it is released. + * Not upgrading to upstream source (0.44.3) since (0.45.0) is coming soon. + + -- Luca Filipozzi Sun, 3 Jun 2001 16:05:01 -0700 + +nut (0.44.3-pre6-2) unstable; urgency=low + + * init script follows policy (Closes: #90346) + + -- Luca Filipozzi Mon, 19 Mar 2001 15:21:44 -0800 + +nut (0.44.3-pre6-1) unstable; urgency=low + + * New upstream release + * modified configure.in so that it doesn't produce an error when it tests + for the existance of group "nut" (Closes: #88126) + + -- Luca Filipozzi Sun, 11 Mar 2001 11:48:54 -0800 + +nut (0.44.3-pre4-1) unstable; urgency=low + + * New upstream release + * create pidfile modifications reworked to use upstream's writepid() function + * modified init script to support these changes... note that users MUST + follow the convention for the UPS directives in the sample upsd.conf; + a warning has been placed in said file + + -- Luca Filipozzi Sun, 25 Feb 2001 19:19:29 -0800 + +nut (0.44.2-6) unstable; urgency=low + + * modified prerm and postinst so that the daemon(s) is restarted only in the + postinst rather than stopped in prerm and started later in postinst thereby + stopping the daemon(s) shortest possible time (Closes: #83614) + * modified all the daemon(s)' source code so that they create pidfiles + * modified the init script so that it uses the pidfiles + + -- Luca Filipozzi Sun, 11 Feb 2001 18:23:44 -0800 + +nut (0.44.2-5) unstable; urgency=low + + * removed "function" keyword from init script (Closes: #83569) + * modified the pre and post scripts so that #DEBHELPER# is at the bottom + * modified debian/rules so that nut-doc is created (Closes: #85059) + * added support for MGE UPS (thanks to Ryan Murray) (Closes: #83743) + + -- Luca Filipozzi Sat, 10 Feb 2001 20:09:35 -0800 + +nut (0.44.2-4) unstable; urgency=low + + * control file changed such that arch=any for nut-doc (Closes: #83323) + + -- Luca Filipozzi Tue, 23 Jan 2001 17:49:25 -0800 + +nut (0.44.2-3) unstable; urgency=low + + * Added a build conflict against libgd-gif1-dev because it provides + libgd-dev but does not have PNG support. (Closes: #82607) + * Fixed a path problem in debian/rules that had manpages installing + in /share/man/man8 instead of /usr/share/man/man8. + + -- Luca Filipozzi Wed, 17 Jan 2001 19:11:56 -0800 + +nut (0.44.2-2) unstable; urgency=low + + * Modified README.Debian to address bad doc path (Closes: #82460) + * Slight improvements to README.Debian, as well. + + -- Luca Filipozzi Mon, 15 Jan 2001 21:11:39 -0800 + +nut (0.44.2-1) unstable; urgency=low + + * New upstream release + + -- Luca Filipozzi Tue, 9 Jan 2001 08:33:56 -0800 + +nut (0.44.1-4) unstable; urgency=low + + * fixed path problem with cgi files; they *are* in /usr/lib/cgi-bin/nut now + + -- Luca Filipozzi Wed, 22 Nov 2000 08:47:54 -0800 + +nut (0.44.1-3) unstable; urgency=low + + * the following changes suggested by Patrik Rak (Closes: #77144, #77195) + * added better preinst(install) checks for group membership + * modified upstream upsd.conf to use correct paths in the UPS directives + * modified upstream upsd.conf to have better ACCESS directive examples + * modified upstream upsmon.conf to have better MONITOR directive examples + * modified upstream upsmon.conf to use a different POWERDOWNFLAG location + (location must be on the root filesystem... otherwise powerdownflag is + not found!) + * modified init script to parse upsmon.conf for the POWERDOWNFLAG location + * modified init script's poweroff section so that all args are recognized + * improved the documentation, primarily README.Debian + * installation scripts modified so that the dependency on adduser >= 3.14 + can be removed; this allows for the creation of potato packages + * the nut user is no longer part of the dialout group; users will have to + manually change the permissions on the serial port devices; + a nut group is created at the same time as the nut user; users should use + the nut group for the serial port permissions: chown root.nut /dev/ttyS0 + (suggested by Shaul Karl and Patrik Rak) + * the cgi scripts are moved to /usr/lib/cgi-bin/nut/* + (suggested by Shaul Karl) + * init script changed significantly to address argument passing problems + (reported by Shaul Karl) + + -- Luca Filipozzi Thu, 16 Nov 2000 11:42:42 -0800 + +nut (0.44.1-2) unstable; urgency=low + + * removed else clause on detection of existing "nut" user (Closes: #76721) + "install" creates the user nut; "remove" doesn't remove it, "purge" does; + a re-"install" would find an existing "nut" user and exit on error; fixed + * fixed a possible bashism (Closes: #72711) + + -- Luca Filipozzi Fri, 10 Nov 2000 10:06:05 -0800 + +nut (0.44.1-1) unstable; urgency=low + + * New upstream release + * serious repurcussion to existing users of nut... the configuration files + have changed somewhat... a critical debconf warning informs the user of + this fact + * binaries are to remains in /sbin (Closes: #69525) + * init script no longer relies on /usr being mounted (Closes: #70033) + * + + -- Luca Filipozzi Fri, 10 Nov 2000 10:05:55 -0800 + +nut (0.44.0-4) unstable; urgency=low + + * Moved man pages from section 1 to section 8. (Closes: #68819) + * nut-doc suggest rather than recommends nut and nut-cgi. (Closes: #69400) + + -- Luca Filipozzi Fri, 18 Aug 2000 23:15:18 -0700 + +nut (0.44.0-3) unstable; urgency=low + + * Minor fixes to packaging scripts (Closes: #67649). + * Created new doc package: nut-doc. + + -- Luca Filipozzi Mon, 24 Jul 2000 10:18:19 -0700 + +nut (0.44.0-2) unstable; urgency=low + + * Minor fixes to init script and to list of undocumented binaries. + + -- Luca Filipozzi Sat, 22 Jul 2000 19:11:42 -0700 + +nut (0.44.0-1) unstable; urgency=low + + * New upstream release + + -- Luca Filipozzi Thu, 20 Jul 2000 09:26:04 -0700 + +nut (0.43.2-2) unstable; urgency=low + + * fixes: Bug#67316: nut: default permissions could reveal passwords + Files in /etc/nut are now 600 by default. + * fixes: Bug#67314: nut: uses old FHS directory /var/state + Now uses /var/lib as per FHS guidelines. + * fixes: Bug#66988: nut_0.43.2-1(unstable): Missing build dependencies + Added debhelper to the build dependencies. + + -- Luca Filipozzi Tue, 18 Jul 2000 14:55:03 -0700 + +nut (0.43.2-1) unstable; urgency=low + + * Initial Release. + * Modification to upstream source: configure.in, common/common.c, + and models/upscommon.c changed to support different configuration + options... --with-user and --with-group which accept a username + and a groupname (rather than a uid/gid as before). + * Modification to upstream source: /var/state/nut is used instead + of /var/state/ups in conf/upsd.conf. + + -- Luca Filipozzi Wed, 3 May 2000 20:50:30 -0700 + +Local variables: +mode: debian-changelog +End: diff --git a/scripts/obs/debian.compat b/scripts/obs/debian.compat new file mode 100644 index 0000000000..f599e28b8a --- /dev/null +++ b/scripts/obs/debian.compat @@ -0,0 +1 @@ +10 diff --git a/scripts/obs/debian.control b/scripts/obs/debian.control new file mode 100644 index 0000000000..e14a9b93a3 --- /dev/null +++ b/scripts/obs/debian.control @@ -0,0 +1,374 @@ +Source: nut +Section: admin +Priority: optional +Maintainer: Arnaud Quette +Uploaders: Laurent Bigonville +Build-Depends: debhelper (>= 8.1.3), + cdbs (>= 0.4.122~), + autotools-dev, + dh-autoreconf, + libsystemd-dev, + libgd-dev | libgd2-xpm-dev | libgd2-noxpm-dev, + libjpeg-dev, + libsnmp-dev | libsnmp9-dev, + libssl1.0-dev | libssl-dev, + libusb-1.0-dev | libusb-0.1-dev | libusb-dev (>= 0.1.8), + libneon27-gnutls-dev | libneon27-dev, + libpowerman0-dev (>= 2.3.3), + libwrap0-dev (>= 7.6), + python2 | python3, dh-python | dh-python2 | dh-python3 | dh-pypy, + libfreeipmi-dev (>= 0.8.5) [!hurd-i386], + libipmimonitoring-dev (>= 1.1.5-2) [!hurd-i386], + libmodbus-dev (>= 3.1.6), + libi2c-dev (>= 4.0), + libnss3-dev, libtool, libltdl-dev, + liblua5.1-0-dev, + lua5.1, + pkg-config +#python (>= 2.6.6-3~) | python-is-python2 | python-is-python3, +Build-Depends-Indep: asciidoc (>= 8.6.3), + docbook-xsl, + dblatex (>= 0.2.5), + libxml2-utils +Standards-Version: 3.9.5 +Homepage: http://www.networkupstools.org/ +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/nut.git;a=summary +Vcs-Git: git://anonscm.debian.org/collab-maint/nut.git +X-Python-Version: >= 2.5 +XS-Testsuite: autopkgtest + +Package: nut +Architecture: all +Section: metapackages +Depends: ${misc:Depends}, nut-common (= ${binary:Version}), nut-server (= ${binary:Version}), nut-client (= ${binary:Version}) +Description: network UPS tools - metapackage + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package is a metapackage that installs both nut-server and nut-client, + in most cases it is sufficient for a basic UPS monitoring system. + +Package: nut-common +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6) +Suggests: nut-cgi, nut-snmp, nut-ipmi, nut-modbus, nut-linux-i2c, nut-xml +Replaces: nut (<< 2.7.4-11~) +Breaks: nut (<< 2.6.1-2~) +Description: network UPS tools - core system + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides shared files for NUT's core system. + +Package: nut-server +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6), ${udev}, nut-common (= ${binary:Version}) +Suggests: nut-cgi, nut-snmp, nut-ipmi, nut-modbus, nut-linux-i2c, nut-xml +Conflicts: nut-hal-drivers +Replaces: nut (<< 2.7.4-11~) +Breaks: nut (<< 2.6.1-2~) +Description: network UPS tools - data server, serial and USB drivers + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides NUT's core system, and the serial and USB UPS + drivers. + +Package: nut-client +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6), nut-common (= ${binary:Version}) +Provides: ups-monitor +Conflicts: ups-monitor +Recommends: bash-completion +Suggests: nut-monitor +Replaces: ups-monitor, nut (<< 2.7.4-11~), nut-server (<< 2.7.4-11~) +Breaks: nut (<< 2.6.1-2~), nut-server (<< 2.6.3-1~) +Description: network UPS tools - clients + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides NUT's clients that allows the user to control + and monitor the UPS by connecting to a local or remote NUT server. + +Package: nut-cgi +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, nut-common (= ${binary:Version}) +Recommends: apache2 | httpd-cgi +Suggests: nut +Description: network UPS tools - web interface + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides an HTTP interface for Network UPS Tools which makes + it possible to monitor the core NUT system with a web browser. + Note that the CGI script would connect from web-server context to its local + or remote NUT server. + +Package: nut-snmp +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, nut-server (= ${binary:Version}) +Description: network UPS tools - SNMP driver + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides snmp-ups, the SNMP multi-MIB driver for UPS, which + supports various MIBs including IETF, MGE, and APC. It adds an SNMP + Manager interface to the core NUT system. + +Package: nut-ipmi +Architecture: linux-any kfreebsd-any +Depends: ${shlibs:Depends}, ${misc:Depends}, nut-server (= ${binary:Version}), libfreeipmi (>= 0.8.5) [!hurd-i386], libipmimonitoring (>= 1.1.5-2) [!hurd-i386] +Description: network UPS tools - IPMI driver + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package currently provides nut-ipmipsu, a driver which allows + to monitor IPMI power supply units (PSU) found in servers of + popular brands, such as Dell, HP, IBM. It adds an IPMI interface + to the core NUT system. + +Package: nut-modbus +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, nut-server (= ${binary:Version}), libmodbus5 (>= 3.1.6) +Description: network UPS tools - Modbus drivers + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package currently provides several drivers that can monitor + modbus devices (phoenixcontact_modbus generic_modbus huawei-ups2000). + +Package: nut-linux-i2c +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends}, nut-server (= ${binary:Version}), libi2c0 (>= 4.0) +Description: network UPS tools - Linux I2C drivers + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package currently provides asem and pijuice drivers for I2C bus. + +Package: nut-xml +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, nut-server (= ${binary:Version}) +Description: network UPS tools - XML/HTTP driver + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides netxml-ups, which supports UPS models from + Eaton or MGE that use an XML/HTTP-based Network Management Card or + Proxy. + +Package: nut-powerman-pdu +Architecture: any +Priority: extra +Depends: ${shlibs:Depends}, ${misc:Depends}, nut-server (= ${binary:Version}), powerman (>= 2.3.3) +Description: network UPS tools - PowerMan PDU driver + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides powerman-pdu, which allows NUT clients to communicate + with the PowerMan daemon to support PDUs. + +Package: nut-doc +Architecture: all +Section: doc +Depends: ${misc:Depends} +Suggests: doc-base +Description: network UPS tools - documentation + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package contains FAQ, user, developer and packager documentation. + +Package: libupsclient4 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Description: network UPS tools - client library + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides the shared client library. + +Package: libupsclient-dev +Section: libdevel +Architecture: any +Depends: libupsclient4 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Conflicts: libupsclient1-dev +Replaces: libupsclient1-dev +Description: network UPS tools - development files + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides the development files. + +Package: libnutscan1 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Description: network UPS tools - scanner library + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides the shared client library. + +Package: libnutscan-dev +Section: libdevel +Architecture: any +Depends: libnutscan1 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: network UPS tools - development files + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides the development files. + +Package: libnutclient1 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Description: network UPS tools - new client library + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides the new shared client library. + +Package: libnutclientstub1 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Description: network UPS tools - new client library Stub + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides the new shared client library Stub. + +Package: libnutclient-dev +Section: libdevel +Architecture: any +Depends: libnutclient1 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: network UPS tools - development files + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides the development files for the new client library. + +Package: libnutclientstub-dev +Section: libdevel +Architecture: any +Depends: libnutclientstub1 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: network UPS tools - development files for stub + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides the development files for the new client library stub. + +Package: python-nut +Section: python +Architecture: all +Depends: ${python:Depends}, ${misc:Depends} +Description: network UPS tools - Python bindings for NUT server + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides Python bindings to connect to NUT server. + +Package: nut-monitor +Architecture: all +Depends: ${python:Depends}, + ${misc:Depends}, + python-gobject, + python-gtk2, + python-glade2, + python-nut +Description: network UPS tools - GUI application to monitor UPS status + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides nut-monitor, a GUI application to monitor the + UPS status on a local or remote NUT server. + +Package: libups-nut-perl +Section: perl +Architecture: all +Depends: ${perl:Depends}, ${misc:Depends} +Description: network UPS tools - Perl bindings for NUT server + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides Perl bindings to connect to NUT server. diff --git a/scripts/obs/debian.copyright b/scripts/obs/debian.copyright new file mode 100644 index 0000000000..01fea182b6 --- /dev/null +++ b/scripts/obs/debian.copyright @@ -0,0 +1,69 @@ +This package was debianized by Luca Filipozzi on +Wed Jun 28 19:48:05 PDT 2000 + +It was downloaded from http://www.networkupstools.org/ + +Upstream Authors: + + Russell Kroll + Arnaud Quette + Arjen de Korte + Charles Lepple + Kjell Claesson + David Goncalves + and the NUT Team + +Copyright: + + Copyright (C) 2000-2008 Russell Kroll, Arnaud Quette and the NUT Team + +Licenses: + + Most files are licensed under the GNU General Public License (GPL) version 2, + or (at your option) any later version. + + The files in the scripts/python/ directory are released under GNU General + Public License (GPL) version 3, or (at your option) any later version. + + GPL-2 + ----- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + On Debian systems, the full text of the GNU General Public License v2 + may be found in /usr/share/common-licenses/GPL-2. + + GPL-3 + ----- + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + + On Debian systems, the full text of the GNU General Public License v3 + may be found in /usr/share/common-licenses/GPL-3. + + +The Debian packaging is Copyright (C) 2008, Arnaud Quette +and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff --git a/scripts/obs/debian.description.subst b/scripts/obs/debian.description.subst new file mode 100644 index 0000000000..1ba1c3d148 --- /dev/null +++ b/scripts/obs/debian.description.subst @@ -0,0 +1 @@ +description=nut is a client/server uninterruptible power supply (UPS) monitoring system${Newline}${Space}that permits the sharing of one (or more) UPS between several machines. The${Newline}${Space}'server' monitors the UPS and notifies the 'clients' when the UPS is on${Newline}${Space}battery or has a low battery. diff --git a/scripts/obs/debian.gbp.conf b/scripts/obs/debian.gbp.conf new file mode 100644 index 0000000000..6837223f66 --- /dev/null +++ b/scripts/obs/debian.gbp.conf @@ -0,0 +1,8 @@ +[DEFAULT] +debian-branch = debian +upstream-branch = upstream +pristine-tar = True + +[git-buildpackage] +tarball-dir = ../tarballs/ +export-dir = ../build-area/ diff --git a/scripts/obs/debian.hotplug b/scripts/obs/debian.hotplug new file mode 100644 index 0000000000..36069fe5ee --- /dev/null +++ b/scripts/obs/debian.hotplug @@ -0,0 +1,24 @@ +#!/bin/bash +# taken from libgphoto2 + +GROUP=nut + +# for previous udev versions +if [ "$ACTION" = "add" ] && [ -f "$DEVICE" ] +then + # check if $GROUP really exists + if getent group $GROUP > /dev/null; then + chmod 660 "$DEVICE" + chown root:$GROUP "$DEVICE" + fi +fi + +# for recent udev versions +if [ "$ACTION" = "add" ] && [ -r "$DEVNAME" ] +then + # check if $GROUP really exists + if getent group $GROUP > /dev/null; then + chmod 660 "$DEVNAME" + chown root:$GROUP "$DEVNAME" + fi +fi diff --git a/scripts/obs/debian.libnutclient-dev.install b/scripts/obs/debian.libnutclient-dev.install new file mode 100644 index 0000000000..6f780df0ac --- /dev/null +++ b/scripts/obs/debian.libnutclient-dev.install @@ -0,0 +1,3 @@ +usr/lib/*/libnutclient.so +usr/lib/*/pkgconfig/libnutclient.pc +usr/include/nutclient.h diff --git a/scripts/obs/debian.libnutclient-dev.manpages b/scripts/obs/debian.libnutclient-dev.manpages new file mode 100644 index 0000000000..7ac2971ea8 --- /dev/null +++ b/scripts/obs/debian.libnutclient-dev.manpages @@ -0,0 +1,34 @@ +debian/tmp/usr/share/man/man3/libnutclient.3 +debian/tmp/usr/share/man/man3/libnutclient_commands.3 +debian/tmp/usr/share/man/man3/libnutclient_devices.3 +debian/tmp/usr/share/man/man3/libnutclient_general.3 +debian/tmp/usr/share/man/man3/libnutclient_misc.3 +debian/tmp/usr/share/man/man3/libnutclient_tcp.3 +debian/tmp/usr/share/man/man3/libnutclient_variables.3 +debian/tmp/usr/share/man/man3/nutclient_authenticate.3 +debian/tmp/usr/share/man/man3/nutclient_destroy.3 +debian/tmp/usr/share/man/man3/nutclient_device_forced_shutdown.3 +debian/tmp/usr/share/man/man3/nutclient_device_login.3 +debian/tmp/usr/share/man/man3/nutclient_device_master.3 +debian/tmp/usr/share/man/man3/nutclient_execute_device_command.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_command_description.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_commands.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_description.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_num_logins.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_rw_variables.3 +debian/tmp/usr/share/man/man3/nutclient_get_devices.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_variable_description.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_variables.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_variable_values.3 +debian/tmp/usr/share/man/man3/nutclient_has_device.3 +debian/tmp/usr/share/man/man3/nutclient_has_device_command.3 +debian/tmp/usr/share/man/man3/nutclient_has_device_variable.3 +debian/tmp/usr/share/man/man3/nutclient_logout.3 +debian/tmp/usr/share/man/man3/nutclient_set_device_variable_value.3 +debian/tmp/usr/share/man/man3/nutclient_set_device_variable_values.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_create_client.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_disconnect.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_get_timeout.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_is_connected.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_reconnect.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_set_timeout.3 diff --git a/scripts/obs/debian.libnutclient1.install b/scripts/obs/debian.libnutclient1.install new file mode 100644 index 0000000000..e5a792e829 --- /dev/null +++ b/scripts/obs/debian.libnutclient1.install @@ -0,0 +1 @@ +lib/*/libnutclient.so.* diff --git a/scripts/obs/debian.libnutclient1.lintian-overrides b/scripts/obs/debian.libnutclient1.lintian-overrides new file mode 100644 index 0000000000..19a0063f09 --- /dev/null +++ b/scripts/obs/debian.libnutclient1.lintian-overrides @@ -0,0 +1 @@ +libnutclient1: no-symbols-control-file shlib-missing-in-symbols-control-file diff --git a/scripts/obs/debian.libnutclientstub-dev.install b/scripts/obs/debian.libnutclientstub-dev.install new file mode 100644 index 0000000000..fc4abb12b1 --- /dev/null +++ b/scripts/obs/debian.libnutclientstub-dev.install @@ -0,0 +1,3 @@ +usr/lib/*/libnutclientstub.so +usr/lib/*/pkgconfig/libnutclientstub.pc +usr/include/nutclientmem.h diff --git a/scripts/obs/debian.libnutclientstub1.install b/scripts/obs/debian.libnutclientstub1.install new file mode 100644 index 0000000000..34df3f1b28 --- /dev/null +++ b/scripts/obs/debian.libnutclientstub1.install @@ -0,0 +1 @@ +lib/*/libnutclientstub.so.* diff --git a/scripts/obs/debian.libnutclientstub1.lintian-overrides b/scripts/obs/debian.libnutclientstub1.lintian-overrides new file mode 100644 index 0000000000..2479407fa6 --- /dev/null +++ b/scripts/obs/debian.libnutclientstub1.lintian-overrides @@ -0,0 +1 @@ +libnutclientstub1: no-symbols-control-file shlib-missing-in-symbols-control-file diff --git a/scripts/obs/debian.libnutscan-dev.install b/scripts/obs/debian.libnutscan-dev.install new file mode 100644 index 0000000000..7ec9050380 --- /dev/null +++ b/scripts/obs/debian.libnutscan-dev.install @@ -0,0 +1,6 @@ +usr/lib/*/libnutscan.so +usr/lib/*/pkgconfig/libnutscan.pc +usr/include/nut-scan.h +usr/include/nutscan-ip.h +usr/include/nutscan-device.h +usr/include/nutscan-init.h diff --git a/scripts/obs/debian.libnutscan1.install b/scripts/obs/debian.libnutscan1.install new file mode 100644 index 0000000000..ce7992a799 --- /dev/null +++ b/scripts/obs/debian.libnutscan1.install @@ -0,0 +1,4 @@ +lib/*/libnutscan.so.* +debian/tmp/bin/nut-scanner-reindex-dmfsnmp +usr/share/nut/dmfnutscan +usr/share/nut/dmfnutscan.d diff --git a/scripts/obs/debian.libups-nut-perl.install b/scripts/obs/debian.libups-nut-perl.install new file mode 100644 index 0000000000..355c6fe0a5 --- /dev/null +++ b/scripts/obs/debian.libups-nut-perl.install @@ -0,0 +1 @@ +scripts/perl/Nut.pm /usr/share/perl5/UPS/ diff --git a/scripts/obs/debian.libupsclient-dev.install b/scripts/obs/debian.libupsclient-dev.install new file mode 100644 index 0000000000..e72f788135 --- /dev/null +++ b/scripts/obs/debian.libupsclient-dev.install @@ -0,0 +1,4 @@ +usr/lib/*/libupsclient.so +usr/lib/*/pkgconfig/libupsclient.pc +usr/include/parseconf.h +usr/include/upsclient.h diff --git a/scripts/obs/debian.libupsclient-dev.manpages b/scripts/obs/debian.libupsclient-dev.manpages new file mode 100644 index 0000000000..141a1b1c7a --- /dev/null +++ b/scripts/obs/debian.libupsclient-dev.manpages @@ -0,0 +1,2 @@ +debian/tmp/usr/share/man/man3/nutscan*.3 +debian/tmp/usr/share/man/man3/upscli*.3 diff --git a/scripts/obs/debian.libupsclient4.install b/scripts/obs/debian.libupsclient4.install new file mode 100644 index 0000000000..132d81a96d --- /dev/null +++ b/scripts/obs/debian.libupsclient4.install @@ -0,0 +1 @@ +lib/*/libupsclient.so.* diff --git a/scripts/obs/debian.nut-cgi.README.Debian b/scripts/obs/debian.nut-cgi.README.Debian new file mode 100644 index 0000000000..03277173ca --- /dev/null +++ b/scripts/obs/debian.nut-cgi.README.Debian @@ -0,0 +1,39 @@ +Network UPS Tools - CGI Interface - Quick Start for Debian +---------------------------------------------------------- + +(I) Installation +================= + +1) Sample configuration files are provided in /etc/nut/ +Rename without the ".sample" suffix the files hosts.conf, upsstats.html, +upsstats-single.html and optionaly upsset.conf. +Then edit these to match your configuration. + +2) Ensure these configuration files are readable by others + + chmod 755 /etc/nut + chmod 644 /etc/nut/upsset.conf + chmod 644 /etc/nut/hosts.conf + chmod 644 /etc/nut/upsstats.html + chmod 644 /etc/nut/upsstats-single.html + +3) You will then be able to access NUT CGI through a Web browser. +The URL, which depends on your httpd configuration, is: + + http://localhost/cgi-bin/nut/upsstats.cgi + +4) NUT also provides a set of HTML files to wrap the CGIs. +To use it, create a new virtual host with your preferred webserver, and point the +Document Root to: /usr/share/nut/www/ + + You can also add an alias to an existing site, if it is supported: + Alias /nut/ "/usr/share/nut/www/" + + Also ensure that the files in this directory have the suitable permissions. + +For more information on nut-cgi configuration, have a look at the following +manual pages: +- upsstats.html (5) +- hosts.conf (5) +- upsset.conf (5) + diff --git a/scripts/obs/debian.nut-cgi.docs b/scripts/obs/debian.nut-cgi.docs new file mode 100644 index 0000000000..d9036f689e --- /dev/null +++ b/scripts/obs/debian.nut-cgi.docs @@ -0,0 +1 @@ +data/htmlcgi/README.adoc diff --git a/scripts/obs/debian.nut-cgi.install b/scripts/obs/debian.nut-cgi.install new file mode 100644 index 0000000000..3dc88ccc3d --- /dev/null +++ b/scripts/obs/debian.nut-cgi.install @@ -0,0 +1,6 @@ +debian/tmp/etc/nut/hosts.conf +debian/tmp/etc/nut/upsset.conf +debian/tmp/etc/nut/upsstats.html +debian/tmp/etc/nut/upsstats-single.html +debian/tmp/usr/lib/cgi-bin/ +debian/tmp/usr/share/nut/www diff --git a/scripts/obs/debian.nut-cgi.manpages b/scripts/obs/debian.nut-cgi.manpages new file mode 100644 index 0000000000..36a14498f2 --- /dev/null +++ b/scripts/obs/debian.nut-cgi.manpages @@ -0,0 +1,6 @@ +debian/tmp/usr/share/man/man5/hosts.conf.5 +debian/tmp/usr/share/man/man5/upsset.conf.5 +debian/tmp/usr/share/man/man5/upsstats.html.5 +debian/tmp/usr/share/man/man8/upsimage.cgi.8 +debian/tmp/usr/share/man/man8/upsset.cgi.8 +debian/tmp/usr/share/man/man8/upsstats.cgi.8 diff --git a/scripts/obs/debian.nut-cgi.postinst b/scripts/obs/debian.nut-cgi.postinst new file mode 100644 index 0000000000..66a7cdba4d --- /dev/null +++ b/scripts/obs/debian.nut-cgi.postinst @@ -0,0 +1,39 @@ +#!/bin/sh -e + +# Note: nut-common should be installed first and it delivers +# the user accounts and the sysconfdir (/etc/nut) + +case "$1" in + + configure) + + # Ensure nut-cgi configuration files are readable by others + for file in upsset.conf hosts.conf upsstats.html upsstats-single.html ; do + if [ -f /etc/nut/$file ] ; then + chmod 644 /etc/nut/$file + fi + done + ;; + + abort-upgrade) + # do nothing + ;; + + abort-remove) + # do nothing + ;; + + abort-deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# + +exit 0 diff --git a/scripts/obs/debian.nut-cgi.postrm b/scripts/obs/debian.nut-cgi.postrm new file mode 100644 index 0000000000..91be66ddc6 --- /dev/null +++ b/scripts/obs/debian.nut-cgi.postrm @@ -0,0 +1,47 @@ +#!/bin/sh -e + +case "$1" in + + remove) + # remove sample file if those were previously (wrongly) installed + for file in upsset.conf hosts.conf upsstats.html upsstats-single.html ; do + if [ -f /etc/nut/${file}.sample ] ; then + rm -f /etc/nut/${file}.sample + fi + done + ;; + + purge) + # do nothing + ;; + + upgrade) + # do nothing + ;; + + failed-upgrade) + # do nothing + ;; + + abort-install) + # do nothing + ;; + + abort-upgrade) + # do nothing + ;; + + disappear) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# + +exit 0 diff --git a/scripts/obs/debian.nut-client.init.in b/scripts/obs/debian.nut-client.init.in new file mode 100644 index 0000000000..c582cdaac2 --- /dev/null +++ b/scripts/obs/debian.nut-client.init.in @@ -0,0 +1,180 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: nut-client upsmon ups-monitor +# Required-Start: $local_fs $syslog $network $remote_fs +# Required-Stop: $local_fs $syslog $network $remote_fs +# Should-Start: nut-server +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Network UPS Tools monitor initscript +# Description: This script take care of starting and stopping the +# Network UPS Tools monitoring component (upsmon). +### END INIT INFO + +# Author: Arnaud Quette + +PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin + +NAME=nut-client +DESC="NUT - power device monitor and shutdown controller" +CONFIG=/etc/nut/nut.conf +pid_dir=@runbasedir@/nut +upsmon_pid=${pid_dir}/upsmon.pid +upsmon=/sbin/upsmon +log=">/dev/null 2>/dev/null" + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# set upsmon specific options. use "man upsmon" for more info +# this parameter is now located in nut.conf, and not in /etc/default/nut anymore +# FIXME: retrieved from 'nut' script during update +UPSMON_OPTIONS="" + +# Exit if the package is not installed +[ -x "$upsmon" ] || exit 0 + +# Include NUT nut.conf +[ -r $CONFIG ] && . $CONFIG + +# FIXME: put all common bits, between nut-client and nut-server, +# into a common nut-function + +# Explicitly require the configuration to be done in /etc/nut/nut.conf +if [ "x$MODE" = "xnone" -o -z "$MODE" ] ; then + log_action_msg "$NAME disabled, please adjust the configuration to your needs" + log_action_msg "Then set MODE to a suitable value in $CONFIG to enable it" + # exit success to avoid breaking the install process! + exit 0 +fi + +# Check if (/var)/run/nut exists and has the correct perms +check_var_directory() { + [ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \ + && chown root:nut ${pid_dir} \ + && chmod 770 ${pid_dir} \ + && [ -x /sbin/restorecon ] && /sbin/restorecon ${pid_dir} +} + +# check if the right components are running +check_status() { + case "$MODE" in + standalone|netserver|netclient) + status_of_proc -p $upsmon_pid $upsmon upsmon + ;; + none|*) + ;; + esac +} + +start_stop_client () { + case "$MODE" in + standalone|netserver|netclient) + # FIXME: for standalone|netserver, ensure 'nut-server status' returns ? + case "$1" in + start) + start-stop-daemon -S -q -p $upsmon_pid -x $upsmon \ + -- $UPSMON_OPTIONS >/dev/null 2>&1 && return 0 || return 1 + ;; + stop) + start-stop-daemon -K -o -q -p $upsmon_pid -n upsmon >/dev/null 2>&1 \ + && return 0 || return 1 + ;; + esac + ;; + none|*) + return 1 + ;; + esac +} + +case "$1" in + + start) + log_daemon_msg "Starting $DESC" "$NAME" + check_var_directory + start_stop_client start + log_end_msg $? + ;; + + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + start_stop_client stop + log_end_msg $? + ;; + + reload) + log_daemon_msg "Reloading $DESC" "$NAME" + $upsmon -c reload >/dev/null 2>&1 + log_end_msg $? + ;; + + restart|force-reload) + # FIXME: lack consistency, due to initscript split. + # This only addresses partial reload. + # Full reload requires to: + # - stop nut-client + # - restart (Ie stop+start) nut-server + # - start nut-client + log_daemon_msg "Restarting $DESC" "$NAME" + start_stop_client stop || true + # should then 'start_stop_server stop', Ie /etc/init.d/nut-server stop + #sleep 5 + check_var_directory + # should first 'start_stop_server start', Ie /etc/init.d/nut-server start + start_stop_client start + log_end_msg $? + ;; + + status) + #log_daemon_msg "Checking status of $DESC" + echo "Checking status of $DESC" + check_status + exit $? + ;; + + poweroff) + case "$MODE" in + standalone|netserver) + # Sanity check + flag=`sed -ne 's#^ *POWERDOWNFLAG *\(.*\)$#\1#p' /etc/nut/upsmon.conf` + if [ -z "$flag" ] ; then + log_action_msg "##########################################################" + log_action_msg "## POWERDOWNFLAG is not defined in /etc/nut/upsmon.conf ##" + log_action_msg "## ##" + log_action_msg "## Please read the Manual page upsmon.conf(5) ##" + log_action_msg "##########################################################" + exit 1 + fi + + # Defer to nut-server to actually poweroff the UPS, if needed + # (the need is tested here though!) + if $upsmon -K >/dev/null 2>&1 ; then + log_daemon_msg "UPS poweroff required..." + log_end_msg 0 + if [ -x /etc/init.d/nut-server ] ; then + exec /etc/init.d/nut-server poweroff + else + log_action_msg "Failure: /etc/init.d/nut-server script missing" + fi + else + log_action_msg "Power down flag is not set (UPS poweroff not needed)" + fi + ;; + none|netclient|*) + # nothing to do + log_action_msg "'$MODE' configuration does not require UPS poweroff" + ;; + esac + ;; + + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|reload|restart|force-reload|status|poweroff}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/scripts/obs/debian.nut-client.install b/scripts/obs/debian.nut-client.install new file mode 100644 index 0000000000..b899f84d60 --- /dev/null +++ b/scripts/obs/debian.nut-client.install @@ -0,0 +1,20 @@ +debian/tmp/bin/upslog +debian/tmp/bin/upsc +debian/tmp/bin/upsrw +debian/tmp/bin/upscmd +debian/tmp/sbin/upsmon +debian/tmp/sbin/upssched +debian/tmp/bin/upssched-cmd +debian/tmp/etc/nut/nut.conf +debian/tmp/etc/nut/upsmon.conf +debian/tmp/etc/nut/upssched.conf +debian/tmp/usr/share/augeas/lenses/dist/nuthostsconf.aug +debian/tmp/usr/share/augeas/lenses/dist/nutnutconf.aug +debian/tmp/usr/share/augeas/lenses/dist/nutupsconf.aug +debian/tmp/usr/share/augeas/lenses/dist/nutupsdconf.aug +debian/tmp/usr/share/augeas/lenses/dist/nutupsdusers.aug +debian/tmp/usr/share/augeas/lenses/dist/nutupsmonconf.aug +debian/tmp/usr/share/augeas/lenses/dist/nutupsschedconf.aug +debian/tmp/usr/share/augeas/lenses/dist/nutupssetconf.aug +debian/tmp/usr/share/augeas/lenses/dist/tests/test_nut.aug +debian/tmp/usr/share/bash-completion/completions/nut diff --git a/scripts/obs/debian.nut-client.links b/scripts/obs/debian.nut-client.links new file mode 100644 index 0000000000..2248aa2b45 --- /dev/null +++ b/scripts/obs/debian.nut-client.links @@ -0,0 +1,2 @@ +# Legacy compat +etc/init.d/nut-client etc/init.d/ups-monitor diff --git a/scripts/obs/debian.nut-client.lintian-overrides b/scripts/obs/debian.nut-client.lintian-overrides new file mode 100644 index 0000000000..4830620aef --- /dev/null +++ b/scripts/obs/debian.nut-client.lintian-overrides @@ -0,0 +1,2 @@ +nut-client: script-in-etc-init.d-not-registered-via-update-rc.d +nut-client: systemd-no-service-for-init-script ups-monitor diff --git a/scripts/obs/debian.nut-client.maintscript b/scripts/obs/debian.nut-client.maintscript new file mode 100644 index 0000000000..692b715bc3 --- /dev/null +++ b/scripts/obs/debian.nut-client.maintscript @@ -0,0 +1 @@ +rm_conffile /etc/bash_completion.d/nut 2.7.1-1~ diff --git a/scripts/obs/debian.nut-client.manpages b/scripts/obs/debian.nut-client.manpages new file mode 100644 index 0000000000..115e821706 --- /dev/null +++ b/scripts/obs/debian.nut-client.manpages @@ -0,0 +1,9 @@ +debian/tmp/usr/share/man/man8/upsc.8 +debian/tmp/usr/share/man/man8/upscmd.8 +debian/tmp/usr/share/man/man8/upsmon.8 +debian/tmp/usr/share/man/man8/upsrw.8 +debian/tmp/usr/share/man/man8/upssched.8 +debian/tmp/usr/share/man/man5/nut.conf.5 +debian/tmp/usr/share/man/man5/upsmon.conf.5 +debian/tmp/usr/share/man/man5/upssched.conf.5 +debian/tmp/usr/share/man/man8/upslog.8 diff --git a/scripts/obs/debian.nut-client.postinst b/scripts/obs/debian.nut-client.postinst new file mode 100644 index 0000000000..32273a7d9b --- /dev/null +++ b/scripts/obs/debian.nut-client.postinst @@ -0,0 +1,63 @@ +#!/bin/sh -e + +# Note: nut-common should be installed first and it delivers +# the user accounts and the sysconfdir (/etc/nut) + +case "$1" in + + configure) + + # make sure that nut-client conffiles are secured and have + # the correct ownerships on first install + if [ -z "$2" ] ; then + for file in nut.conf upsmon.conf upssched.conf ; do + if [ -f /etc/nut/$file ] ; then + chown root:nut /etc/nut/$file + chmod 640 /etc/nut/$file + fi + done + fi + + if dpkg --compare-versions "$2" le "2.6.4-2~" && + [ -f /etc/init.d/nut ] ; then + if [ "`md5sum /etc/init.d/nut | cut -d ' ' -f 1`" = 72f1dbc6b92cb4407f26605d05b12681 ]; then + rm -f /etc/init.d/nut + else + mv /etc/init.d/nut /etc/init.d/nut.dpkg-old + fi + update-rc.d nut remove >/dev/null + fi + + # SystemD-specific actions + if [ -x /bin/systemctl ] ; then + /bin/systemctl daemon-reload + /bin/systemctl enable nut-monitor.service + if [ -s /etc/nut/upsmon.conf ] ; then + /bin/systemctl start --no-block nut-monitor.service || true + fi + fi + + ;; + + abort-upgrade) + # do nothing + ;; + + abort-remove) + # do nothing + ;; + + abort-deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +# Skip DEBHELPER because in this case we handle systemd in target OS better by ourselves # + +exit 0 diff --git a/scripts/obs/debian.nut-client.preinst b/scripts/obs/debian.nut-client.preinst new file mode 100644 index 0000000000..fa1bd014ee --- /dev/null +++ b/scripts/obs/debian.nut-client.preinst @@ -0,0 +1,23 @@ +#!/bin/sh + +set -e + +# Revert /etc/nut/nut.conf mangling done by older versions of the postinst +# See #677054 +# changed configfile created by a fresh install in lenny, upgraded to squeeze +if [ "$1" = "install" -o "$1" = "upgrade" ] \ + && dpkg --compare-versions "$2" lt "2.6.4-2" \ + && [ -f /etc/nut/nut.conf ] \ + && [ "`md5sum /etc/nut/nut.conf | cut -d ' ' -f 1`" = 331cca39153f451c2968f4b734c1cf3f ]; then + sed -i '29,$ d' /etc/nut/nut.conf +fi + +# changed configfile created by a fresh install in squeeze +if [ "$1" = "install" -o "$1" = "upgrade" ] \ + && dpkg --compare-versions "$2" lt "2.6.4-2" \ + && [ -f /etc/nut/nut.conf ] \ + && [ "`md5sum /etc/nut/nut.conf | cut -d ' ' -f 1`" = f9b571ae65952e3a761fac2202633478 ]; then + sed -i 's/^MODE=none$/MODE = none/' /etc/nut/nut.conf +fi + +#DEBHELPER# diff --git a/scripts/obs/debian.nut-client.prerm b/scripts/obs/debian.nut-client.prerm new file mode 100644 index 0000000000..0e96a1fef4 --- /dev/null +++ b/scripts/obs/debian.nut-client.prerm @@ -0,0 +1,38 @@ +#!/bin/sh -e + +# the DEBHELPER token is purposely not used +# because we don't want the daemon to be +# stopped during an upgrade + +case "$1" in + + remove) + # SystemD-specific actions + if [ -x /bin/systemctl ] ; then + /bin/systemctl stop nut-client.service + /bin/systemctl disable nut-client.service + fi + ;; + + upgrade) + # do nothing + ;; + + failed-upgrade) + # do nothing + ;; + + deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# + +exit 0 diff --git a/scripts/obs/debian.nut-common.install b/scripts/obs/debian.nut-common.install new file mode 100644 index 0000000000..1297259bd2 --- /dev/null +++ b/scripts/obs/debian.nut-common.install @@ -0,0 +1 @@ +debian/tmp/lib/systemd/system/nut.target diff --git a/scripts/obs/debian.nut-common.postinst.in b/scripts/obs/debian.nut-common.postinst.in new file mode 100644 index 0000000000..74c96a34da --- /dev/null +++ b/scripts/obs/debian.nut-common.postinst.in @@ -0,0 +1,79 @@ +#!/bin/sh -e + +# This package is a common prerequisite for nut-server, nut-client, nut-cgi +# and other NUT packages that deliver running programs. It creates the user +# accounts and delivers some common files (e.g. the sysconfdir /etc/nut and +# systemd nut.target) that are not quite attributable to any one particular +# package. + +case "$1" in + + configure) + + # make sure the nut user exists and has correct memberships + if ! getent group nut >/dev/null; then + addgroup --quiet --system nut + fi + if ! getent passwd nut >/dev/null; then + adduser --quiet --system --ingroup nut --home /var/lib/nut --no-create-home nut + elif ! groups nut | grep -qw nut; then + adduser nut nut + fi +# for Ubuntu, while waiting for a proper debconf +# if ! groups nut | grep -qw dialout; then +# adduser nut dialout +# fi + + # Ensure /etc/nut is readable/crossable for others + # If the (old) config directory exists, retain existing rights + # that the user might have set up for their local system needs + if [ ! -d /etc/nut ] ; then + mkdir -p /etc/nut/ + chown root:nut /etc/nut/ + chmod 755 /etc/nut/ + fi + + # make sure that (/var)/run/nut exists and has the correct ownerships + # (note that on newer systems, after reboot, the /run/nut is created + # by systemd using the tmpfiles configuration snippet) + if [ ! -d @runbasedir@/nut ] ; then + mkdir -p @runbasedir@/nut + fi + if [ -d @runbasedir@/nut ] ; then + chown root:nut @runbasedir@/nut + chmod 770 @runbasedir@/nut + if which restorecon >/dev/null 2>&1; then + restorecon @runbasedir@/nut + fi + fi + + # SystemD-specific actions + if [ -x /bin/systemctl ] ; then + /bin/systemctl daemon-reload + /bin/systemctl enable nut.target + /bin/systemctl start --no-block nut.target || true + fi + ;; + + abort-upgrade) + # do nothing + ;; + + abort-remove) + # do nothing + ;; + + abort-deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +# Skip DEBHELPER because in this case we handle systemd in target OS better by ourselves # + +exit 0 diff --git a/scripts/obs/debian.nut-common.prerm.in b/scripts/obs/debian.nut-common.prerm.in new file mode 100644 index 0000000000..f77183acd3 --- /dev/null +++ b/scripts/obs/debian.nut-common.prerm.in @@ -0,0 +1,42 @@ +#!/bin/sh -e + +# the DEBHELPER token is purposely not used +# because we don't want the daemon to be +# stopped during an upgrade + +case "$1" in + + remove) + # Packaging assumes that this package is removed last + # of all its dependencies, so remove what we created + # SystemD-specific actions + if [ -x /bin/systemctl ] ; then + /bin/systemctl stop nut.target + /bin/systemctl disable nut.target + fi + + [ -d @runbasedir@/nut ] && rm -rf @runbasedir@/nut/ + ;; + + upgrade) + # do nothing + ;; + + failed-upgrade) + # do nothing + ;; + + deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# + +exit 0 diff --git a/scripts/obs/debian.nut-common.tmpfiles.in b/scripts/obs/debian.nut-common.tmpfiles.in new file mode 100644 index 0000000000..09fce33876 --- /dev/null +++ b/scripts/obs/debian.nut-common.tmpfiles.in @@ -0,0 +1 @@ +d @runbasedir@/nut 0770 root nut - - diff --git a/scripts/obs/debian.nut-doc.doc-base.nut-developer-guide b/scripts/obs/debian.nut-doc.doc-base.nut-developer-guide new file mode 100644 index 0000000000..ed3ad0d8b7 --- /dev/null +++ b/scripts/obs/debian.nut-doc.doc-base.nut-developer-guide @@ -0,0 +1,13 @@ +Document: nut-developer-guide +Title: Network UPS Tools Developer Guide +Author: Russell Kroll, Arnaud Quette, Charles Lepple and Peter Selinger +Abstract: This document intend to describe how NUT is designed, + and the way to develop new device drivers and client applications. +Section: Programming + +Format: PDF +Files: /usr/share/doc/nut-doc/pdf/developer-guide.pdf + +Format: HTML +Index: /usr/share/doc/nut-doc/html/developer-guide/index.html +Files: /usr/share/doc/nut-doc/html/developer-guide/*.html diff --git a/scripts/obs/debian.nut-doc.doc-base.nut-faq b/scripts/obs/debian.nut-doc.doc-base.nut-faq new file mode 100644 index 0000000000..098042f7c8 --- /dev/null +++ b/scripts/obs/debian.nut-doc.doc-base.nut-faq @@ -0,0 +1,12 @@ +Document: nut-faq +Title: NUT Frequently asked questions +Author: Arnaud Quette +Abstract: Frequently asked questions for Network UPS Tools (NUT) +Section: Help/FAQ + +Format: PDF +Files: /usr/share/doc/nut-doc/pdf/FAQ.pdf + +Format: HTML +Index: /usr/share/doc/nut-doc/html/FAQ.html +Files: /usr/share/doc/nut-doc/html/FAQ.html diff --git a/scripts/obs/debian.nut-doc.doc-base.nut-packager-guide b/scripts/obs/debian.nut-doc.doc-base.nut-packager-guide new file mode 100644 index 0000000000..61d6b46665 --- /dev/null +++ b/scripts/obs/debian.nut-doc.doc-base.nut-packager-guide @@ -0,0 +1,15 @@ +Document: nut-packager-guide +Title: NUT Packager and Integrators Guide +Author: Arnaud Quette +Abstract: Packaging is a final aim for software. + It eases and completes the software integration into an OS, + and allows users to have an easy software installation and support out of the box. + This document describes best practice for packaging NUT. +Section: Debian + +Format: PDF +Files: /usr/share/doc/nut-doc/pdf/packager-guide.pdf + +Format: HTML +Index: /usr/share/doc/nut-doc/html/packager-guide/index.html +Files: /usr/share/doc/nut-doc/html/packager-guide/*.html diff --git a/scripts/obs/debian.nut-doc.doc-base.nut-user-manual b/scripts/obs/debian.nut-doc.doc-base.nut-user-manual new file mode 100644 index 0000000000..76db720fa1 --- /dev/null +++ b/scripts/obs/debian.nut-doc.doc-base.nut-user-manual @@ -0,0 +1,15 @@ +Document: nut-user-manual +Title: Network UPS Tools User Manual +Author: Russell Kroll, Arnaud Quette and Arjen de Korte +Abstract: This document intend to describe how to install software support + for your Power Devices (UPS, PDU, …), and how to use the NUT project. + It is not intended to explain what are, nor distinguish the different technologies that exist. + For such information, have a look at the General Power Devices Information. +Section: System/Administration + +Format: PDF +Files: /usr/share/doc/nut-doc/pdf/user-manual.pdf + +Format: HTML +Index: /usr/share/doc/nut-doc/html/user-manual/index.html +Files: /usr/share/doc/nut-doc/html/user-manual/*.html diff --git a/scripts/obs/debian.nut-doc.install b/scripts/obs/debian.nut-doc.install new file mode 100644 index 0000000000..e3f78faf8e --- /dev/null +++ b/scripts/obs/debian.nut-doc.install @@ -0,0 +1 @@ +debian/tmp/usr/share/doc/nut-doc/ diff --git a/scripts/obs/debian.nut-ipmi.install b/scripts/obs/debian.nut-ipmi.install new file mode 100644 index 0000000000..2d9854d88d --- /dev/null +++ b/scripts/obs/debian.nut-ipmi.install @@ -0,0 +1,2 @@ +debian/tmp/lib/nut/nut-ipmipsu +debian/tmp/*/udev/rules.d/52-nut-ipmipsu.rules diff --git a/scripts/obs/debian.nut-ipmi.manpages b/scripts/obs/debian.nut-ipmi.manpages new file mode 100644 index 0000000000..5da576ff9c --- /dev/null +++ b/scripts/obs/debian.nut-ipmi.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/nut-ipmipsu.8 diff --git a/scripts/obs/debian.nut-linux-i2c.install b/scripts/obs/debian.nut-linux-i2c.install new file mode 100644 index 0000000000..9122412c6f --- /dev/null +++ b/scripts/obs/debian.nut-linux-i2c.install @@ -0,0 +1,2 @@ +debian/tmp/lib/nut/asem +debian/tmp/lib/nut/pijuice diff --git a/scripts/obs/debian.nut-linux-i2c.manpages b/scripts/obs/debian.nut-linux-i2c.manpages new file mode 100644 index 0000000000..9c85e7bb49 --- /dev/null +++ b/scripts/obs/debian.nut-linux-i2c.manpages @@ -0,0 +1,2 @@ +debian/tmp/usr/share/man/man8/asem.8 +debian/tmp/usr/share/man/man8/pijuice.8 diff --git a/scripts/obs/debian.nut-modbus.install b/scripts/obs/debian.nut-modbus.install new file mode 100644 index 0000000000..957282d838 --- /dev/null +++ b/scripts/obs/debian.nut-modbus.install @@ -0,0 +1,3 @@ +debian/tmp/lib/nut/phoenixcontact_modbus +debian/tmp/lib/nut/generic_modbus +debian/tmp/lib/nut/huawei-ups2000 \ No newline at end of file diff --git a/scripts/obs/debian.nut-modbus.manpages b/scripts/obs/debian.nut-modbus.manpages new file mode 100644 index 0000000000..447aac81dc --- /dev/null +++ b/scripts/obs/debian.nut-modbus.manpages @@ -0,0 +1,3 @@ +debian/tmp/usr/share/man/man8/phoenixcontact_modbus.8 +debian/tmp/usr/share/man/man8/generic_modbus.8 +debian/tmp/usr/share/man/man8/huawei-ups2000.8 diff --git a/scripts/obs/debian.nut-monitor.install b/scripts/obs/debian.nut-monitor.install new file mode 100644 index 0000000000..8c2975fd06 --- /dev/null +++ b/scripts/obs/debian.nut-monitor.install @@ -0,0 +1,7 @@ +scripts/python/app/NUT-Monitor usr/bin/ +scripts/python/app/nut-monitor.desktop usr/share/applications/ +scripts/python/app/ui/gui-*.glade usr/share/nut-monitor/ +scripts/python/app/locale/ usr/share/ +scripts/python/app/icons/48x48/nut-monitor.png usr/share/pixmaps/ +scripts/python/app/pixmaps usr/share/nut-monitor/ +debian/nut-monitor.xpm usr/share/pixmaps/ diff --git a/scripts/obs/debian.nut-monitor.menu b/scripts/obs/debian.nut-monitor.menu new file mode 100644 index 0000000000..2b849cba47 --- /dev/null +++ b/scripts/obs/debian.nut-monitor.menu @@ -0,0 +1,4 @@ +?package(nut-monitor): needs="X11" section="Applications/System/Monitoring"\ + title="NUT Monitor" command="/usr/bin/NUT-Monitor"\ + icon="/usr/share/pixmaps/nut-monitor.xpm"\ + longtitle="Network UPS Tools GUI client" diff --git a/scripts/obs/debian.nut-monitor.xpm b/scripts/obs/debian.nut-monitor.xpm new file mode 100644 index 0000000000..6bfa642f89 --- /dev/null +++ b/scripts/obs/debian.nut-monitor.xpm @@ -0,0 +1,326 @@ +/* XPM */ +static char * nut_monitor_xpm[] = { +"32 32 291 2", +" c None", +". c #C7A509", +"+ c #D0B123", +"@ c #CEAF21", +"# c #CBAB15", +"$ c #C5A305", +"% c #C4A100", +"& c #CAAB1A", +"* c #E0C74E", +"= c #E0C949", +"- c #ECDA6F", +"; c #FCF6C6", +"> c #FDF7B5", +", c #E8D663", +"' c #CEAF0E", +") c #CAA915", +"! c #DFC858", +"~ c #D1B42E", +"{ c #C29E00", +"] c #D6BB34", +"^ c #FBEE92", +"/ c #FFF792", +"( c #FEF07A", +"_ c #F9E857", +": c #F6E558", +"< c #F5E55D", +"[ c #EED500", +"} c #D7B800", +"| c #CCAB00", +"1 c #CAA80A", +"2 c #EFDA59", +"3 c #EFDC69", +"4 c #F0E289", +"5 c #DBC350", +"6 c #C8A714", +"7 c #BE9700", +"8 c #FFFEAA", +"9 c #FCE955", +"0 c #FCED74", +"a c #FCF194", +"b c #FDF4AD", +"c c #F5E565", +"d c #EFD91D", +"e c #E6CA00", +"f c #D2B000", +"g c #D0B226", +"h c #EAD65F", +"i c #EDD852", +"j c #E9D037", +"k c #E6CC2E", +"l c #ECD856", +"m c #CDAF23", +"n c #BD9500", +"o c #FFFFD2", +"p c #FCED72", +"q c #FCEE7A", +"r c #FDF087", +"s c #FDF195", +"t c #FDF4AB", +"u c #FEF8C2", +"v c #FEF9C0", +"w c #FEF5AA", +"x c #FBEE8A", +"y c #F4E269", +"z c #F4E058", +"A c #F0DA49", +"B c #EDD851", +"C c #EBD96F", +"D c #CCAD23", +"E c #BC9400", +"F c #FFFFD9", +"G c #FDF5B0", +"H c #FDFAD9", +"I c #FDF9D4", +"J c #FEF9D8", +"K c #FEFBE3", +"L c #FFFDEA", +"M c #FFFCE4", +"N c #FEFAD4", +"O c #FBF3B8", +"P c #F5E99B", +"Q c #EBDA75", +"R c #E0CA52", +"S c #D8C03D", +"T c #D6BE48", +"U c #CCAC21", +"V c #FFFFD6", +"W c #FDF3A5", +"X c #FDF9D0", +"Y c #FCF4B9", +"Z c #F9F2AB", +"` c #F5E561", +" . c #F1DE3B", +".. c #EFD91C", +"+. c #E8CF1B", +"@. c #E0C61C", +"#. c #DBC01E", +"$. c #D9BD21", +"%. c #D6BA26", +"&. c #D5B729", +"*. c #D7BD43", +"=. c #FFFFD4", +"-. c #FCF3A2", +";. c #FDF9CE", +">. c #FBF4B9", +",. c #FAF2AA", +"'. c #F5E86D", +"). c #F3E14B", +"!. c #F0DC2D", +"~. c #EAD329", +"{. c #E1C927", +"]. c #DCC224", +"^. c #D9BD23", +"/. c #D5B921", +"(. c #D2B522", +"_. c #D3BA3E", +":. c #CBAC22", +"<. c #A68E1A", +"[. c #FFFCD8", +"}. c #FCF2A0", +"|. c #FEF8C9", +"1. c #FCF4B1", +"2. c #FAF1A2", +"3. c #F5E666", +"4. c #F2E045", +"5. c #F0DB28", +"6. c #E8D123", +"7. c #E1C720", +"8. c #DCC01D", +"9. c #D9BC1A", +"0. c #D7B916", +"a. c #D3B41A", +"b. c #C8B140", +"c. c #B6A34A", +"d. c #777B7D", +"e. c #EFF0ED", +"f. c #DCDECF", +"g. c #F0EEDC", +"h. c #F2ECC0", +"i. c #F4EDA6", +"j. c #F2E568", +"k. c #F2DF3E", +"l. c #F4DD12", +"m. c #EBD118", +"n. c #DDC420", +"o. c #D1BA27", +"p. c #C0AD37", +"q. c #A5994E", +"r. c #898464", +"s. c #7F8077", +"t. c #8F9396", +"u. c #72746E", +"v. c #D8DAD4", +"w. c #E7E8E5", +"x. c #E0E2E1", +"y. c #DBDDDE", +"z. c #CACDD3", +"A. c #C2C6CD", +"B. c #B7BBC8", +"C. c #A9AFB8", +"D. c #9CA0A7", +"E. c #8E9396", +"F. c #848888", +"G. c #7E7F7B", +"H. c #76786F", +"I. c #7B7C77", +"J. c #8C8E8A", +"K. c #676965", +"L. c #EFF1EE", +"M. c #D6D9D4", +"N. c #E4E5E3", +"O. c #DFE0DC", +"P. c #D9DCD7", +"Q. c #CCCEC8", +"R. c #C4C7BF", +"S. c #BABDB5", +"T. c #ADAFA7", +"U. c #9FA199", +"V. c #91938B", +"W. c #84877F", +"X. c #7B7D76", +"Y. c #71736E", +"Z. c #787975", +"`. c #858783", +" + c #5F615C", +".+ c #EFF0EE", +"++ c #D5D8D3", +"@+ c #E3E5E1", +"#+ c #DCDDDA", +"$+ c #D6D9D5", +"%+ c #C9CCC7", +"&+ c #C2C5BE", +"*+ c #B8BBB4", +"=+ c #ABAEA6", +"-+ c #9C9F97", +";+ c #8E9089", +">+ c #81847D", +",+ c #787A74", +"'+ c #6E716B", +")+ c #757772", +"!+ c #7E807C", +"~+ c #555752", +"{+ c #D5D7D3", +"]+ c #E0E2DE", +"^+ c #DADBD8", +"/+ c #D4D6D1", +"(+ c #C8CAC5", +"_+ c #C1C4BD", +":+ c #B6B9B3", +"<+ c #A9ACA4", +"[+ c #999C95", +"}+ c #8A8D85", +"|+ c #7F827B", +"1+ c #767771", +"2+ c #6D6F6A", +"3+ c #757773", +"4+ c #777975", +"5+ c #4B4E49", +"6+ c #F0F2EE", +"7+ c #D3D6D1", +"8+ c #DEE0DE", +"9+ c #D8D9D6", +"0+ c #D1D3CF", +"a+ c #C6C8C3", +"b+ c #BFC2BB", +"c+ c #B5B8B1", +"d+ c #A6A9A2", +"e+ c #989B93", +"f+ c #767773", +"g+ c #70726F", +"h+ c #434540", +"i+ c #D2D5D0", +"j+ c #DCDDDB", +"k+ c #D4D6D2", +"l+ c #CED0CB", +"m+ c #C5C7C2", +"n+ c #BEC1BA", +"o+ c #B4B7B0", +"p+ c #A7AAA2", +"q+ c #767874", +"r+ c #6A6C68", +"s+ c #424440", +"t+ c #EFF1ED", +"u+ c #D1D4CF", +"v+ c #DADCD8", +"w+ c #D3D5D0", +"x+ c #CCCFC9", +"y+ c #C4C7C1", +"z+ c #6A6B68", +"A+ c #41433F", +"B+ c #EDEFEC", +"C+ c #D2D5CF", +"D+ c #D9DAD7", +"E+ c #D2D4CF", +"F+ c #CBCEC8", +"G+ c #D7D9D5", +"H+ c #D1D3CE", +"I+ c #CBCDC8", +"J+ c #8A8C85", +"K+ c #7D8079", +"L+ c #696B65", +"M+ c #7F807C", +"N+ c #6A6C69", +"O+ c #81827E", +"P+ c #DEE0DD", +"Q+ c #F1F2EF", +"R+ c #DEE0DC", +"S+ c #CFD2CC", +"T+ c #C3C6C0", +"U+ c #BBBEB7", +"V+ c #ADB0A9", +"W+ c #A2A59D", +"X+ c #979A92", +"Y+ c #8F928A", +"Z+ c #92948F", +"`+ c #9D9E99", +" @ c #A9AAA6", +".@ c #868784", +"+@ c #4B4D49", +"@@ c #5E605B", +"#@ c #959794", +"$@ c #AEAFAC", +"%@ c #B6B8B5", +"&@ c #BABCB8", +"*@ c #BDBEBB", +"=@ c #B4B6B2", +"-@ c #AAABA7", +";@ c #9E9F9B", +">@ c #888986", +",@ c #686A66", +"'@ c #454743", +" ", +" ", +" ", +" ", +" ", +" ", +" . + @ # $ ", +" % & * = - ; > , ' ) ! ~ { ", +" ] ^ / ( _ : < [ } | 1 2 3 4 5 6 ", +" 7 8 9 0 a b c d e f g h i j k l m ", +" n o p q r s t u v w x y z A B C D ", +" E F G H I J K L M N O P Q R S T U ", +" E V W X Y Z ` ...+.@.#.$.%.&.*.U ", +" E =.-.;.>.,.'.).!.~.{.].^./.(._.:. ", +" <.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c. ", +" d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t. ", +" u.e.v.w.x.y.z.A.B.C.D.E.F.G.H.I.J. ", +" K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. ", +" +.+++@+#+$+%+&+*+=+-+;+>+,+'+)+!+ ", +" ~+.+{+]+^+/+(+_+:+<+[+}+|+1+2+3+4+ ", +" 5+6+7+8+9+0+a+b+c+d+e+}+|+1+2+f+g+ ", +" h+6+i+j+k+l+m+n+o+p+e+}+|+1+2+q+r+ ", +" s+t+u+v+w+x+y+n+o+p+e+}+|+1+2+q+z+ ", +" A+B+C+D+E+F+y+n+o+p+e+}+|+1+2+4+z+ ", +" s+6+7+G+H+I+y+n+c+p+e+J+K+u.L+M+N+ ", +" O+P+Q+R+S+T+U+V+W+X+Y+Z+`+ @.@+@ ", +" A+@@#@$@%@&@*@=@-@;@>@,@'@ ", +" ", +" ", +" ", +" ", +" "}; diff --git a/scripts/obs/debian.nut-powerman-pdu.install b/scripts/obs/debian.nut-powerman-pdu.install new file mode 100644 index 0000000000..f0acaa4eaf --- /dev/null +++ b/scripts/obs/debian.nut-powerman-pdu.install @@ -0,0 +1 @@ +debian/tmp/lib/nut/powerman-pdu diff --git a/scripts/obs/debian.nut-powerman-pdu.manpages b/scripts/obs/debian.nut-powerman-pdu.manpages new file mode 100644 index 0000000000..43bbc81a04 --- /dev/null +++ b/scripts/obs/debian.nut-powerman-pdu.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/powerman-pdu.8 diff --git a/scripts/obs/debian.nut-server.dirs b/scripts/obs/debian.nut-server.dirs new file mode 100644 index 0000000000..a80531140f --- /dev/null +++ b/scripts/obs/debian.nut-server.dirs @@ -0,0 +1 @@ +/var/lib/nut diff --git a/scripts/obs/debian.nut-server.init.in b/scripts/obs/debian.nut-server.init.in new file mode 100644 index 0000000000..701b702e90 --- /dev/null +++ b/scripts/obs/debian.nut-server.init.in @@ -0,0 +1,179 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: nut-server upsd +# Required-Start: $local_fs $syslog $network $remote_fs udev +# Required-Stop: $local_fs $syslog $network $remote_fs udev +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Network UPS Tools initscript +# Description: This script take care of starting and stopping the +# Network UPS Tools components. When needed, it also +# handle the UPS hardware shutdown. +### END INIT INFO + +# Author: Arnaud Quette + +PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin + +NAME=nut-server +DESC="NUT - power devices information server and drivers" +CONFIG=/etc/nut/nut.conf +pid_dir=@runbasedir@/nut +upsd_pid=${pid_dir}/upsd.pid +upsd=/sbin/upsd +upsdrvctl=/sbin/upsdrvctl +log=">/dev/null 2>/dev/null" + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +# set upsd specific options. use "man upsd" for more info +# this parameter is now located in nut.conf, and not in /etc/default/nut anymore +# FIXME: retrieved from 'nut' script during update +UPSD_OPTIONS="" + +# Exit if the package is not installed +[ -x "$upsd" ] || exit 0 + +# Include NUT nut.conf +[ -r $CONFIG ] && . $CONFIG + +# Explicitly require the configuration to be done in /etc/nut/nut.conf +# redundant with nut-client +if [ "x$MODE" = "xnone" -o -z "$MODE" ] ; then + log_action_msg "$NAME disabled, please adjust the configuration to your needs" + log_action_msg "Then set MODE to a suitable value in $CONFIG to enable it" + # exit success to avoid breaking the install process! + exit 0 +fi + +# Check if (/var)/run/nut exists and has the correct perms +check_var_directory() { + [ ! -d ${pid_dir} ] && mkdir -p ${pid_dir} \ + && chown root:nut ${pid_dir} \ + && chmod 770 ${pid_dir} \ + && [ -x /sbin/restorecon ] && /sbin/restorecon ${pid_dir} +} + +# check if the right components are running +check_status() { + case "$MODE" in + standalone|netserver) + status_of_proc -p $upsd_pid $upsd upsd + # FIXME: need driver(s) status too! + ;; + none|netclient|*) + # defered to nut-client + #status_of_proc -p $upsmon_pid $upsmon upsmon + ;; + esac +} + +start_stop_server () { + case "$MODE" in + standalone|netserver) + case "$1" in + start) + # First, start driver(s) + ! $upsdrvctl start >/dev/null 2>&1 && \ + log_progress_msg " (driver(s) failed)." || log_progress_msg " driver(s)." + # Then, data server (upsd) + start-stop-daemon -S -p $upsd_pid -x $upsd \ + -- $UPSD_OPTIONS >/dev/null 2>&1 && + log_progress_msg "upsd" || log_progress_msg "(upsd failed)" + ;; + stop) + # FIXME: should stop nut-client first! + # Reverse order for stop + start-stop-daemon -K -o -p $upsd_pid -n upsd && #>/dev/null 2>&1 && + log_progress_msg "upsd" || log_progress_msg "(upsd failed)" + ! /sbin/upsdrvctl stop >/dev/null 2>&1 && \ + log_progress_msg "(driver(s) failed)" || log_progress_msg "driver(s)" + ;; + esac + ;; + none|netclient|*) + # now handled by nut-client + return 1 + ;; + esac +} + +case "$1" in + + start) + log_daemon_msg "Starting $DESC" + check_var_directory + start_stop_server start #&& log_progress_msg "upsd" + #start_stop_client start && log_progress_msg "upsmon" + log_end_msg 0 + ;; + + stop) + log_daemon_msg "Stopping $DESC" + start_stop_server stop #&& log_progress_msg "upsd" + #start_stop_client stop && log_progress_msg "upsmon" + log_end_msg 0 + ;; + + reload) + $upsd -c reload >/dev/null 2>&1 + #$upsmon -c reload >/dev/null 2>&1 + ;; + + restart|force-reload) + log_daemon_msg "Restarting $DESC" + #start_stop_client stop + start_stop_server stop + sleep 5 + check_var_directory + start_stop_server start #&& log_progress_msg "upsd" + #start_stop_client start && log_progress_msg "upsmon" + log_end_msg 0 + ;; + + status) + #log_daemon_msg "Checking status of $DESC" + echo "Checking status of $DESC" + check_status + exit $? + ;; + + poweroff) + wait_delay=`sed -ne 's#^ *POWEROFF_WAIT= *\(.*\)$#\1#p' /etc/nut/nut.conf` + # UPS poweroff action is actually done here. + # But nut-monitor (Ie nut-client) does the check and call nut-server if needed! + # This action MUST NOT be called directly, and thus is not exposed in 'Usage' + case "$MODE" in + standalone|netserver) + log_daemon_msg "Shutting down the UPS ..." + if $upsdrvctl shutdown ; then + # FIXME (needed?): sleep 5 + log_progress_msg "Waiting for UPS to cut the power" + log_end_msg 0 + else + log_progress_msg "Shutdown failed." + log_progress_msg "Waiting for UPS batteries to run down" + log_end_msg 0 + fi + if [ -n "$wait_delay" ] ; then + log_daemon_msg " (will reboot after $wait_delay) ..." + sleep "$wait_delay" + invoke-rc.d reboot stop + fi + ;; + none|netclient|*) + # nothing to do + ;; + esac + ;; + + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|reload|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/scripts/obs/debian.nut-server.install b/scripts/obs/debian.nut-server.install new file mode 100644 index 0000000000..41c92b834b --- /dev/null +++ b/scripts/obs/debian.nut-server.install @@ -0,0 +1,62 @@ +debian/tmp/bin/nut-scanner +debian/tmp/sbin/upsd +debian/tmp/sbin/upsdrvctl +debian/tmp/sbin/upsdrvsvcctl +debian/tmp/usr/share/nut/cmdvartab +debian/tmp/usr/share/nut/driver.list +debian/tmp/*/udev/rules.d/[0-9][0-9]-*.rules +debian/tmp/etc/avahi/services/nut.service +debian/tmp/etc/nut/ups.conf +debian/tmp/etc/nut/upsd.conf +debian/tmp/etc/nut/upsd.users +debian/tmp/lib/nut/nut-driver-enumerator.sh +debian/tmp/lib/nut/genericups +debian/tmp/lib/nut/mge-shut +debian/tmp/lib/nut/rhino +debian/tmp/lib/nut/bestups +debian/tmp/lib/nut/bestfortress +debian/tmp/lib/nut/usbhid-ups +debian/tmp/lib/nut/apcsmart +debian/tmp/lib/nut/apcsmart-old +debian/tmp/lib/nut/belkin +debian/tmp/lib/nut/blazer_ser +debian/tmp/lib/nut/blazer_usb +debian/tmp/lib/nut/clone +debian/tmp/lib/nut/clone-outlet +debian/tmp/lib/nut/ivtscd +debian/tmp/lib/nut/metasys +debian/tmp/lib/nut/etapro +debian/tmp/lib/nut/tripplite_usb +debian/tmp/lib/nut/bcmxcp +debian/tmp/lib/nut/bestuferrups +debian/tmp/lib/nut/gamatronic +debian/tmp/lib/nut/safenet +debian/tmp/lib/nut/isbmex +debian/tmp/lib/nut/masterguard +debian/tmp/lib/nut/belkinunv +debian/tmp/lib/nut/tripplite +debian/tmp/lib/nut/upscode2 +debian/tmp/lib/nut/solis +debian/tmp/lib/nut/oneac +debian/tmp/lib/nut/mge-utalk +debian/tmp/lib/nut/powerpanel +debian/tmp/lib/nut/bestfcom +debian/tmp/lib/nut/liebert +debian/tmp/lib/nut/powercom +debian/tmp/lib/nut/bcmxcp_usb +debian/tmp/lib/nut/victronups +debian/tmp/lib/nut/tripplitesu +debian/tmp/lib/nut/optiups +debian/tmp/lib/nut/everups +debian/tmp/lib/nut/dummy-ups +debian/tmp/lib/nut/richcomm_usb +debian/tmp/lib/nut/liebert-esp2 +debian/tmp/lib/nut/microdowell +debian/tmp/lib/nut/al175 +debian/tmp/lib/nut/apcupsd-ups +debian/tmp/lib/nut/nutdrv_atcl_usb +debian/tmp/lib/nut/nutdrv_qx +debian/tmp/lib/nut/riello_ser +debian/tmp/lib/nut/riello_usb +debian/tmp/lib/nut/microsol-apc +debian/tmp/lib/nut/nutdrv_siemens-sitop diff --git a/scripts/obs/debian.nut-server.manpages b/scripts/obs/debian.nut-server.manpages new file mode 100644 index 0000000000..9f69f2c1d1 --- /dev/null +++ b/scripts/obs/debian.nut-server.manpages @@ -0,0 +1,55 @@ +debian/tmp/usr/share/man/man5/ups.conf.5 +debian/tmp/usr/share/man/man5/upsd.conf.5 +debian/tmp/usr/share/man/man5/upsd.users.5 +debian/tmp/usr/share/man/man8/apcsmart.8 +debian/tmp/usr/share/man/man8/apcsmart-old.8 +debian/tmp/usr/share/man/man8/bcmxcp.8 +debian/tmp/usr/share/man/man8/bcmxcp_usb.8 +debian/tmp/usr/share/man/man8/belkin.8 +debian/tmp/usr/share/man/man8/belkinunv.8 +debian/tmp/usr/share/man/man8/bestfcom.8 +debian/tmp/usr/share/man/man8/bestuferrups.8 +debian/tmp/usr/share/man/man8/bestups.8 +debian/tmp/usr/share/man/man8/bestfortress.8 +debian/tmp/usr/share/man/man8/clone.8 +debian/tmp/usr/share/man/man8/dummy-ups.8 +debian/tmp/usr/share/man/man8/etapro.8 +debian/tmp/usr/share/man/man8/everups.8 +debian/tmp/usr/share/man/man8/gamatronic.8 +debian/tmp/usr/share/man/man8/genericups.8 +debian/tmp/usr/share/man/man8/isbmex.8 +debian/tmp/usr/share/man/man8/ivtscd.8 +debian/tmp/usr/share/man/man8/liebert.8 +debian/tmp/usr/share/man/man8/liebert-esp2.8 +debian/tmp/usr/share/man/man8/masterguard.8 +debian/tmp/usr/share/man/man8/metasys.8 +debian/tmp/usr/share/man/man8/mge-shut.8 +debian/tmp/usr/share/man/man8/mge-utalk.8 +debian/tmp/usr/share/man/man8/microdowell.8 +debian/tmp/usr/share/man/man8/nutupsdrv.8 +debian/tmp/usr/share/man/man8/oneac.8 +debian/tmp/usr/share/man/man8/optiups.8 +debian/tmp/usr/share/man/man8/powercom.8 +debian/tmp/usr/share/man/man8/powerpanel.8 +debian/tmp/usr/share/man/man8/rhino.8 +debian/tmp/usr/share/man/man8/richcomm_usb.8 +debian/tmp/usr/share/man/man8/safenet.8 +debian/tmp/usr/share/man/man8/solis.8 +debian/tmp/usr/share/man/man8/tripplite.8 +debian/tmp/usr/share/man/man8/tripplitesu.8 +debian/tmp/usr/share/man/man8/tripplite_usb.8 +debian/tmp/usr/share/man/man8/upscode2.8 +debian/tmp/usr/share/man/man8/upsd.8 +debian/tmp/usr/share/man/man8/upsdrvctl.8 +debian/tmp/usr/share/man/man8/usbhid-ups.8 +debian/tmp/usr/share/man/man8/victronups.8 +debian/tmp/usr/share/man/man8/al175.8 +debian/tmp/usr/share/man/man8/apcupsd-ups.8 +debian/tmp/usr/share/man/man8/blazer_ser.8 +debian/tmp/usr/share/man/man8/blazer_usb.8 +debian/tmp/usr/share/man/man8/nutdrv_atcl_usb.8 +debian/tmp/usr/share/man/man8/nutdrv_qx.8 +debian/tmp/usr/share/man/man8/riello_ser.8 +debian/tmp/usr/share/man/man8/riello_usb.8 +debian/tmp/usr/share/man/man8/microsol-apc.8 +debian/tmp/usr/share/man/man8/nutdrv_siemens-sitop.8 diff --git a/scripts/obs/debian.nut-server.postinst b/scripts/obs/debian.nut-server.postinst new file mode 100644 index 0000000000..26502724c5 --- /dev/null +++ b/scripts/obs/debian.nut-server.postinst @@ -0,0 +1,93 @@ +#!/bin/sh -e + +# Note: nut-common should be installed first and it delivers +# the user accounts and the sysconfdir (/etc/nut) + +case "$1" in + + configure) + + # make sure that nut-server conffiles are secured and have + # the correct ownerships on first install + if [ -z "$2" ] ; then + for file in ups.conf upsd.conf upsd.users ; do + if [ -f /etc/nut/$file ] ; then + chown root:nut /etc/nut/$file + chmod 640 /etc/nut/$file + fi + done + fi + + # make sure that /var/lib/nut has the correct permissions and ownerships + if [ -d /var/lib/nut ] ; then + chown root:nut /var/lib/nut + chmod 770 /var/lib/nut + fi + + # ask udev to check for new udev rules + [ -x /etc/init.d/udev ] && pidof udevd > /dev/null \ + && udevadm trigger --subsystem-match=usb --action=change + + # 557178 udevadm trigger --subsystem-match=usb + + if dpkg --compare-versions "$2" le "2.6.4-2~" && + [ -f /etc/init.d/nut ] ; then + if [ "`md5sum /etc/init.d/nut | cut -d ' ' -f 1`" = 72f1dbc6b92cb4407f26605d05b12681 ]; then + rm -f /etc/init.d/nut + else + mv /etc/init.d/nut /etc/init.d/nut.dpkg-old + fi + update-rc.d nut remove >/dev/null + fi + + # SystemD-specific actions + if [ -x /bin/systemctl ] ; then + echo "Register NUT drivers (if any)..." + REPORT_RESTART_42=no AUTO_START=no /lib/nut/nut-driver-enumerator.sh --reconfigure + + /bin/systemctl daemon-reload + + # Watch *changes* to /etc/nut/ups.conf and trigger nut-driver-enumerator.service then + /bin/systemctl enable nut-driver-enumerator.path + /bin/systemctl start --no-block nut-driver-enumerator.path || true + + # The nut-driver-enumerator.path reacts to changes of /etc/nut/ups.conf + # but does not execute the service handler (to add or remove nut-driver + # service instances) initially, whether the configuration exists or not. + # Running the script allows to handle that properly. + /bin/systemctl enable nut-driver-enumerator.service + /bin/systemctl start --no-block nut-driver-enumerator.service || true + + /bin/systemctl enable nut-server.service + # upsd accounts must be defined (if existed before) to start the service + if [ -s /etc/nut/upsd.conf ] && [ -s /etc/nut/ups.conf ]; then + /bin/systemctl start --no-block nut-server.service || true + fi + + /bin/systemctl enable nut-driver.target + /bin/systemctl start --no-block nut-driver.target || true + fi + ;; + + abort-upgrade) + # do nothing + ;; + + abort-remove) + # do nothing + ;; + + abort-deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +# Skip DEBHELPER because in this case we handle systemd in target OS better by ourselves # + +exit 0 diff --git a/scripts/obs/debian.nut-server.postrm b/scripts/obs/debian.nut-server.postrm new file mode 100644 index 0000000000..b95b26f6f5 --- /dev/null +++ b/scripts/obs/debian.nut-server.postrm @@ -0,0 +1,50 @@ +#!/bin/sh -e + +case "$1" in + + remove) + # remove sample file if those were previously (wrongly) installed + for file in ups.conf upsd.conf upsmon.conf upsd.users upssched.conf ; do + rm -f /etc/nut/${file}.sample + done + ;; + + purge) + # remove udev rules files + rm -f /etc/udev/rules.d/025_nut-usbups.rules + rm -f /etc/udev/rules.d/52_nut-usbups.rules + rm -f /etc/udev/rules.d/52-nut-usbups.rules + # handle a dpkg bug + [ -d /etc/nut ] && rmdir --ignore-fail-on-non-empty /etc/nut >/dev/null 2>&1 + ;; + + upgrade) + # do nothing + ;; + + failed-upgrade) + # do nothing + ;; + + abort-install) + # do nothing + ;; + + abort-upgrade) + # do nothing + ;; + + disappear) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# + +exit 0 diff --git a/scripts/obs/debian.nut-server.preinst b/scripts/obs/debian.nut-server.preinst new file mode 100644 index 0000000000..f3e949fd35 --- /dev/null +++ b/scripts/obs/debian.nut-server.preinst @@ -0,0 +1,12 @@ +#!/bin/sh -e + +if [ "$1" = upgrade ]; then + # remove the obsolete udev file(s) + [ -f /etc/udev/rules.d/025_nut-usbups.rules ] && rm -f /etc/udev/rules.d/025_nut-usbups.rules + [ -f /etc/udev/rules.d/52_nut-usbups.rules ] && rm -f /etc/udev/rules.d/52_nut-usbups.rules + [ -f /etc/udev/rules.d/52-nut-usbups.rules ] && rm -f /etc/udev/rules.d/52-nut-usbups.rules +fi + +#DEBHELPER# + +exit 0 diff --git a/scripts/obs/debian.nut-server.prerm.in b/scripts/obs/debian.nut-server.prerm.in new file mode 100644 index 0000000000..cb87e3972d --- /dev/null +++ b/scripts/obs/debian.nut-server.prerm.in @@ -0,0 +1,65 @@ +#!/bin/sh -e + +# the DEBHELPER token is purposely not used +# because we don't want the daemon to be +# stopped during an upgrade + +case "$1" in + + remove) + # nut-usb specifics + [ -f /etc/hotplug/usb/libhid.usermap ] && rm -f /etc/hotplug/usb/libhid.usermap + [ -f /etc/hotplug/usb/libhidups ] && rm -f /etc/hotplug/usb/libhidups + + [ -L /usr/doc/nut ] && rm -f /usr/doc/nut + + # do stop the daemons on remove + # SystemD-specific actions + if [ -x /bin/systemctl ] ; then + /bin/systemctl stop nut-driver.target + /bin/systemctl disable nut-driver.target + + /bin/systemctl stop nut-driver-enumerator.path + /bin/systemctl disable nut-driver-enumerator.path + + /bin/systemctl stop nut-driver-enumerator.service + /bin/systemctl disable nut-driver-enumerator.service + + /bin/systemctl stop nut-server.service + /bin/systemctl disable nut-server.service + + if [ -x /lib/nut/nut-driver-enumerator.sh ] ; then + for DRV in `/lib/nut/nut-driver-enumerator.sh --list-services 2>/dev/null` ; do + /bin/systemctl stop "$DRV" + /bin/systemctl disable "$DRV" + done + fi + fi + + invoke-rc.d nut stop && sleep 1 + [ -d @runbasedir@/nut ] && rm -rf @runbasedir@/nut/ + ;; + + upgrade) + [ -L /usr/doc/nut ] && rm -f /usr/doc/nut + # do not stop the daemon on upgrade + ;; + + failed-upgrade) + # do nothing + ;; + + deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# + +exit 0 diff --git a/scripts/obs/debian.nut-snmp.docs b/scripts/obs/debian.nut-snmp.docs new file mode 100644 index 0000000000..9611f52b41 --- /dev/null +++ b/scripts/obs/debian.nut-snmp.docs @@ -0,0 +1 @@ +docs/snmp.txt diff --git a/scripts/obs/debian.nut-snmp.install b/scripts/obs/debian.nut-snmp.install new file mode 100644 index 0000000000..5195c9c507 --- /dev/null +++ b/scripts/obs/debian.nut-snmp.install @@ -0,0 +1,5 @@ +debian/tmp/lib/nut/snmp-ups +debian/tmp/lib/nut/snmp-ups-dmf +debian/tmp/usr/sbin/gen-snmp-subdriver.sh +usr/share/nut/dmfsnmp +usr/share/nut/dmfsnmp.d diff --git a/scripts/obs/debian.nut-snmp.manpages b/scripts/obs/debian.nut-snmp.manpages new file mode 100644 index 0000000000..3c9644ed7c --- /dev/null +++ b/scripts/obs/debian.nut-snmp.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/snmp-ups.8 diff --git a/scripts/obs/debian.nut-xml.install b/scripts/obs/debian.nut-xml.install new file mode 100644 index 0000000000..9c6d56dd6e --- /dev/null +++ b/scripts/obs/debian.nut-xml.install @@ -0,0 +1 @@ +debian/tmp/lib/nut/netxml-ups diff --git a/scripts/obs/debian.nut-xml.manpages b/scripts/obs/debian.nut-xml.manpages new file mode 100644 index 0000000000..91a537eadd --- /dev/null +++ b/scripts/obs/debian.nut-xml.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/netxml-ups.8 diff --git a/scripts/obs/debian.nut.README.Debian b/scripts/obs/debian.nut.README.Debian new file mode 100644 index 0000000000..882e2afd65 --- /dev/null +++ b/scripts/obs/debian.nut.README.Debian @@ -0,0 +1,162 @@ +Network UPS Tools - Quick Start for Debian +------------------------------------------ + +Anyway, here are the quick start instructions for using nut: + +These Quick Start instructions are useful for a UPS connected to a single +machine. For a UPS connected to multiple machines, additional steps must be +taken, as outlined at the end of this file, including the notice regarding +SECURITY CONSIDERATIONS. + +(I) Upgrading +============= + +In case of upgrading, follow instructions given in: +/usr/share/doc/nut/UPGRADING + +Note that service(s) (driver(s), upsd, upsmon) are not restarted upon +upgrade, to avoid service disruption. You have to manually do it. + +(II) Installation +================= + +Configuration files are located in /etc/nut/ +In order to tune NUT configuration according to your needs, follow the below +information, along with the one provided inside these files. + +(1) /etc/nut/nut.conf (see 'man 5 nut.conf' for more information) + Edit /etc/nut/nut.conf and modify the "MODE" variable according to your + configuration. + + You can also fine tune the daemons options through UPSD_OPTIONS and + UPSMON_OPTIONS. + +The steps 2 to 5 are only required if you use a "standalone" or "netserver" +MODE. If you are running in "netclient" MODE, jump directly to section 6. + +(2) /etc/nut/ups.conf (see 'man 5 ups.conf' for more information) + + Edit /etc/nut/ups.conf and add something like: + [myups] + driver = usbhid-ups + port = auto + Use the appropriate driver for your UPS and select the correct port. + To select the driver, take a look at the UPS compatibility list: + /usr/share/nut/driver.list + + If you have more than one UPS, add as many entries as needed. + + If you wish to test manually whether your configuration of ups.conf is + correct, you may invoke upsdrvctl by hand (as root): + /sbin/upsdrvctl start [myups] + /sbin/upsdrvctl stop [myups] + + Ensure that the permissions of ups.conf do not permit the world to + read it. It should already be thus, but the following command + accomplishes this: + chown root:nut /etc/nut/ups.conf + chmod 640 /etc/nut/ups.conf + +(3) device port permissions + The nut user need to be able to access the device port both for reading and + writing. + + For serial devices, there are two possibilities: + + a) You can add the nut user to the dialout group. + The following command accomplishes this: + addgroup nut dialout + + This is not done by default for security reason on Debian, but is applied + on Ubuntu. + + b) Another solution, for system supporting udev, is to create a file, + For example /etc/udev/rules.d/92-nut-serialups.rules. It will + be used after /lib/udev/rules.d/91-permissions.rules, and + contains something like: + + KERNEL=="ttyS1", GROUP="nut" + + where 'ttyS1' has to be replaced by the exact name of your serial port. + + For USB devices, permissions are automatically set by the + /lib/udev/rules.d/52-nut-usbups.rules udev rules file. + +(4) /etc/nut/upsd.conf (see 'man 5 upsd.conf' for more information) + the default /etc/nut/upsd.conf is fine for a "standalone" configuration. + If you are in "netserver" MODE, you will have to modify the LISTEN option + to something suitable. + + Ensure that the permissions of upsd.conf do not permit the world to + read it. It should already be thus, but the following command + accomplishes this: + chown root:nut /etc/nut/upsd.conf + chmod 640 /etc/nut/upsd.conf + +(5) /etc/nut/upsd.users (see 'man 5 upsd.users' for more information) + Edit /etc/nut/upsd.users and add something like the following, + without the comments, in order to define a user: + [monmaster] + password = blah + upsmon master + Please use *different* usernames and passwords than you use on your + system; see the note regarding SECURITY CONSIDERATIONS at the end + of this file. + + Ensure that the permissions of upsd.users do not permit the world to + read it. It should already be thus, but the following command + accomplishes this: + chown root:nut /etc/nut/upsd.users + chmod 640 /etc/nut/upsd.users + +(6) /etc/nut/upsmon.conf (see 'man 5 upsmon.conf' for more information) + Edit /etc/nut/upsmon.conf and add something like the following: + MONITOR myups@localhost 1 monmaster blah master + POWERDOWNFLAG /etc/killpower + SHUTDOWNCMD "/sbin/shutdown -h +0" + + Ensure that the permissions of upsmon.conf do not permit the world to + read it. It should already be thus, but the following commands + accomplishes this: + chown root:nut /etc/nut/upsmon.conf + chmod 640 /etc/nut/upsmon.conf + +(7) /etc/default/nut + This file is not used anymore. + nut.conf provides all the needed features to replace this file. + +(8) start the daemon + If you use a "standalone" or "netserver" MODE, invoke: + - '/etc/init.d/nut-server start' to start upsd and appropriate driver(s), + - '/etc/init.d/nut-client start' to start upsmon. + + If you are running in "netclient" MODE, invoke: + - '/etc/init.d/nut-client start' to start upsmon. + + Check /var/log/syslog to ensure that daemon(s) started up correctly. + + +Additional Notes for Sharing a UPS +---------------------------------- +If you have multiple machines connected to the same UPS, you will need to +(a) modify the access control lists in upsd.conf on the server; +(b) add additional users to upsd.users on the server; and +(c) configure upsmon.conf on the clients. + +Please note that upsmon on a client machine and upsd on a server machine need +to communicate via your network. This means that you need to ensure that all +the networking equipment (hub, switch, router, etc.) between the client and the +server is powered by the UPS. Otherwise, when the power goes down, the network +connection between the client machine will be broken and the client will not +be told to shut down. + +SECURITY CONSIDERATIONS +----------------------- +Finally, please be aware of the following SECURITY CONSIDERATIONS: the TCP +communications between the client daemon, upsmon, and the server daemon, upsd, +send the username and passwords defined in upsd.users and used in upsmon.conf +over the wire UNENCRYPTED. This means that somebody could sniff the username +and password. A version that encrypts the connection using SSL should be +available someday. + +Please see the documentation in /usr/share/doc/nut/docs for more information. diff --git a/scripts/obs/debian.nut.TODO.Debian b/scripts/obs/debian.nut.TODO.Debian new file mode 100644 index 0000000000..b8fe9dd56b --- /dev/null +++ b/scripts/obs/debian.nut.TODO.Debian @@ -0,0 +1,9 @@ +- how to distribute the nut-scanner and its library? Ie, a single package, + or using the nut-{xml,snmp,...} packages. + this requires libusb (0.1), Net SNMP, FreeIPMi, Avahi, libupsclient and Neon! +- consider an SSL/TLS set of packages (ie nut-ssl, ...) + or help the port to NSS +- install the device-recorder.sh script (with libupsclient-dev or a more + generic nut-dev that depends?) +- address the /var/www issue with upstream +- audit and solve the lintian reports... diff --git a/scripts/obs/debian.nut.docs b/scripts/obs/debian.nut.docs new file mode 100644 index 0000000000..e16c35721b --- /dev/null +++ b/scripts/obs/debian.nut.docs @@ -0,0 +1,46 @@ +AUTHORS +MAINTAINERS +README.adoc +NEWS.adoc +UPGRADING.adoc +docs/FAQ.txt +docs/acknowledgements.txt +docs/asciidoc.txt +docs/cables.txt +docs/ci-farm-do-setup.adoc +docs/ci-farm-lxc-setup.txt +docs/config-notes.txt +docs/config-prereqs.txt +docs/configure.txt +docs/contact-closure.txt +docs/daisychain.txt +docs/design.txt +docs/developer-guide.txt +docs/developers.txt +docs/documentation.txt +docs/download.txt +docs/features.txt +docs/hid-subdrivers.txt +docs/history.txt +docs/macros.txt +docs/maintainer-guide.txt +docs/net-protocol.txt +docs/new-clients.txt +docs/new-drivers.txt +docs/nut-names.txt +docs/nut-qa.txt +docs/nut-versioning.adoc +docs/nutdrv_qx-subdrivers.txt +docs/outlets.txt +docs/packager-guide.txt +docs/qa-guide.adoc +docs/release-notes.txt +docs/scheduling.txt +docs/security.txt +docs/sms-brazil-protocol.txt +docs/snmp-subdrivers.txt +docs/snmp.txt +docs/sock-protocol.txt +docs/solaris-usb.txt +docs/support.txt +docs/user-manual.txt diff --git a/scripts/obs/debian.python-nut.install b/scripts/obs/debian.python-nut.install new file mode 100644 index 0000000000..fa24bc5bd3 --- /dev/null +++ b/scripts/obs/debian.python-nut.install @@ -0,0 +1 @@ +scripts/python/module/PyNUT.py usr/share/pyshared/ diff --git a/scripts/obs/debian.rules b/scripts/obs/debian.rules new file mode 100755 index 0000000000..21b43e3613 --- /dev/null +++ b/scripts/obs/debian.rules @@ -0,0 +1,252 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk +-include /usr/share/cdbs/1/class/python-module.mk + +-include /usr/share/cdbs/1/rules/autoreconf.mk + +# CDBS has some issues detecting something other than dh_python2 +# which is absent on Debian 12+ and Ubuntu 25.04 for example. +# This hack is broken for Debian Next in Oct 2025, as CDBS sheds +# a lot of older scripts and the helpers seem to get implemented +# somehow differently. +ifeq (,$(shell command -v dh_python2 || which dh_python2 || dh_python2 --help 2>/dev/null)) +ifneq (,$(shell command -v dh_python3 || which dh_python3 || dh_python3 --help 2>/dev/null)) +ifneq (,$(shell command -v python3 || which python3 || python3 --help 2>/dev/null)) +cdbs_curpythonsystems := python3 +endif +endif +endif + +export DH_OPTIONS + +# This is the debhelper compatibility version to use. +# JIM: 10+ enables parallel builds by default +export DH_COMPAT=10 + +# We cannot call autoreconf -f -i as it updates INSTALL which is used for doc +# generation +DEB_DH_AUTORECONF_ARGS = --as-needed + +DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) + +# echoed fallbacks are for Ubuntu primarily +systemdsystemunitdir := $(shell OUT="`pkg-config --variable=systemdsystemunitdir libsystemd`" && [ -n "$$OUT" ] && { echo "$$OUT" ; exit; } || OUT="`pkg-config --variable=systemdsystemunitdir systemd`" && [ -n "$$OUT" ] && { echo "$$OUT" ; exit; } || echo /lib/systemd/system) +systemdsystemdutildir := $(shell OUT="`pkg-config --variable=systemdutildir libsystemd`" && [ -n "$$OUT" ] && { echo "$$OUT" ; exit; } || OUT="`pkg-config --variable=systemdutildir systemd`" && [ -n "$$OUT" ] && { echo "$$OUT" ; exit; } || echo /lib/systemd) +systemdshutdowndir := $(shell OUT="`pkg-config --variable=systemdshutdowndir libsystemd`" && [ -n "$$OUT" ] && { echo "$$OUT" ; exit; } || OUT="`pkg-config --variable=systemdshutdowndir systemd`" && [ -n "$$OUT" ] && { echo "$$OUT" ; exit; } || echo /lib/systemd/system-shutdown) +systemdtmpfilesdir := $(shell OUT="`pkg-config --variable=systemdtmpfilesdir libsystemd`" && [ -n "$$OUT" ] && { echo "$$OUT" ; exit; } || OUT="`pkg-config --variable=systemdtmpfilesdir systemd`" && [ -n "$$OUT" ] && { echo "$$OUT" ; exit; } || echo /usr/lib/tmpfiles.d) + +# Does this NUT branch have DMF feature code? +NUTPKG_WITH_DMF := $(shell test -d scripts/DMF && echo 1 || echo 0) + +# Newer systems have just /run (and yet newer systemd noisily suggests it) +runbasedir := $(shell test -d /run && echo /run || echo /var/run) + +# FIXME: Find a smarter way to set those from main codebase recipes... +# Something like `git grep 'version-info' '*.am'` ? +SO_MAJOR_LIBUPSCLIENT=7 +SO_MAJOR_LIBNUTCLIENT=2 +SO_MAJOR_LIBNUTCLIENTSTUB=1 +SO_MAJOR_LIBNUTSCAN=4 +SO_MAJOR_LIBNUTCONF=0 + +ifneq (,$(shell ls -1 /usr/share/cdbs/1/rules/utils.mk 2>/dev/null)) +# List any files which are not installed +include /usr/share/cdbs/1/rules/utils.mk +common-binary-post-install-arch:: list-missing +endif + +DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs -Wl,-O1 -Wl,--as-needed +include /usr/share/dpkg/buildflags.mk + +DEB_CONFIGURE_PREFIX := +DEB_CONFIGURE_SYSCONFDIR := /etc/nut +DEB_CONFIGURE_INCLUDEDIR := /usr/include +DEB_CONFIGURE_MANDIR := /usr/share/man +DEB_CONFIGURE_EXTRA_FLAGS := --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ + --with-ssl --with-openssl --with-libltdl=yes \ + --with-cgi=auto --with-powerman=auto \ + --with-serial --with-usb --with-snmp --with-neon --with-ipmi \ + --with-dev --with-dev-libnutconf \ + --disable-static \ + --with-statepath=$(runbasedir)/nut \ + --with-altpidpath=$(runbasedir)/nut \ + --with-drvpath=/lib/nut \ + --with-cgipath=/usr/lib/cgi-bin/nut \ + --with-htmlpath=/usr/share/nut/www \ + --with-pidpath=$(runbasedir)/nut \ + --datadir=/usr/share/nut \ + --with-pkgconfig-dir=/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \ + --with-user=nut --with-group=nut\ + --enable-strip\ + --enable-keep_nut_report_feature --enable-check-NIT + +ifeq (1,$(NUTPKG_WITH_DMF)) +DEB_CONFIGURE_EXTRA_FLAGS += \ + --with-snmp_dmf_lua=yes \ + --with-dmfsnmp-regenerate=no --with-dmfnutscan-regenerate=no --with-dmfsnmp-validate=no --with-dmfnutscan-validate=no +endif + +ifeq (linux,$(DEB_HOST_ARCH_OS)) + DEB_CONFIGURE_EXTRA_FLAGS+=--with-udev-dir=/lib/udev +### DEB_CONFIGURE_EXTRA_FLAGS+=--with-systemdsystemunitdir +### DEB_CONFIGURE_EXTRA_FLAGS+=--with-systemdsystemunitdir=/lib/systemd/system + DEB_CONFIGURE_EXTRA_FLAGS+=--with-systemdsystemunitdir=$(systemdsystemunitdir) + DEB_CONFIGURE_EXTRA_FLAGS+=--with-systemdshutdowndir=$(systemdshutdowndir) + DEB_CONFIGURE_EXTRA_FLAGS+=--with-systemdtmpfilesdir=$(systemdtmpfilesdir) +endif + +# only build documentation if asciidoc is installed +#ifneq ($(shell which asciidoc),) +# DEB_CONFIGURE_EXTRA_FLAGS+=--with-doc=html-chunked,pdf +#else +# DEB_CONFIGURE_EXTRA_FLAGS+=--with-doc=skip +#endif + +# Try to use dist'ed docs if available, fall back to auto in other cases +DEB_CONFIGURE_EXTRA_FLAGS+=--with-doc=man=dist-auto + +configure: configure.ac + ###Part of normal build now### (cd tools; python nut-snmpinfo.py) + sh autogen.sh + echo "PKG_CONFIG_PATH default:" ; pkg-config --variable pc_path pkg-config || true + +ifeq (0,$(NUTPKG_WITH_DMF)) +# hide +patch-recipe-dmf: + for F in debian.*.install debian/*.install ; do [ -s "$$F" ] || continue ; sed 's,^\([^#].*dmf.*\)$$,#\1,' -i "$$F" || exit ; done +else +# expose +patch-recipe-dmf: + for F in debian.*.install debian/*.install ; do [ -s "$$F" ] || continue ; sed 's,^#\(.*dmf.*\)$$,\1,' -i "$$F" || exit ; done +endif + +pre-build:: patch-recipe-dmf debian/compat configure + +# FIXME : The recipe below is a crime scene regarding hardcoded paths that +# are more or less relevant for a particular OS distribution and version, +# and for certain nearby packages that are impacted by this, as was relevant +# at the time this recipe was written. Maybe more proper make macros can be +# used to rectify paths below and allow better manageable per-distro builds. +common-install-arch:: + # prepare debian packaging files + mkdir -p $(CURDIR)/debian + for F in nut-client.init nut-common.postinst nut-common.prerm nut-server.init nut-server.prerm nut-common.tmpfiles ; do \ + echo " SED $$F.in => $$F" ; \ + sed 's,@runbasedir[@],$(runbasedir),g' < "$(CURDIR)/scripts/obs/debian.$$F.in" > $(CURDIR)/debian/"$$F" || exit ; \ + done + + # install the bash completion script + mkdir -p $(CURDIR)/debian/tmp/usr/share/bash-completion/completions/ + cp $(CURDIR)/scripts/misc/nut.bash_completion \ + $(CURDIR)/debian/tmp/usr/share/bash-completion/completions/nut + + # install the avahi service file + mkdir -p $(CURDIR)/debian/tmp/etc/avahi/services + cp $(CURDIR)/scripts/avahi/nut.service \ + $(CURDIR)/debian/tmp/etc/avahi/services + + # install Augeas lenses + mkdir -p $(CURDIR)/debian/tmp/usr/share/augeas/lenses/dist/tests + cp $(CURDIR)/scripts/augeas/*.aug \ + $(CURDIR)/debian/tmp/usr/share/augeas/lenses/dist/ + cp $(CURDIR)/scripts/augeas/tests/test_nut.aug \ + $(CURDIR)/debian/tmp/usr/share/augeas/lenses/dist/tests/ + + # install the default configuration + for f in $(CURDIR)/debian/tmp/etc/nut/*; do \ + nf=`basename $${f} | sed 's/\(.*\).sample/\1/'`; \ + mv $${f} $(CURDIR)/debian/tmp/etc/nut/$${nf}; \ + done + + # Move -dev file to /usr; make sure wanted SONAMES exist (numbers unchanged) + rm -f $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so + test -s $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so.$(SO_MAJOR_LIBUPSCLIENT) && \ + ln -s /lib/$(DEB_HOST_MULTIARCH)/libupsclient.so.$(SO_MAJOR_LIBUPSCLIENT) \ + $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libupsclient.so + rm -f $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libnutclient.so + test -s $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libnutclient.so.$(SO_MAJOR_LIBNUTCLIENT) && \ + ln -s /lib/$(DEB_HOST_MULTIARCH)/libnutclient.so.$(SO_MAJOR_LIBNUTCLIENT) \ + $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libnutclient.so + rm -f $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libnutclientstub.so + test -s $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libnutclientstub.so.$(SO_MAJOR_LIBNUTCLIENTSTUB) && \ + ln -s /lib/$(DEB_HOST_MULTIARCH)/libnutclientstub.so.$(SO_MAJOR_LIBNUTCLIENTSTUB) \ + $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libnutclientstub.so + rm -f $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libnutscan.so + test -s $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libnutscan.so.$(SO_MAJOR_LIBNUTSCAN) && \ + ln -s /lib/$(DEB_HOST_MULTIARCH)/libnutscan.so.$(SO_MAJOR_LIBNUTSCAN) \ + $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libnutscan.so + rm -f $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libnutconf.so + test -s $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/libnutconf.so.$(SO_MAJOR_LIBNUTCONF) && \ + ln -s /lib/$(DEB_HOST_MULTIARCH)/libnutconf.so.$(SO_MAJOR_LIBNUTCONF) \ + $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libnutconf.so + + # Install systemd files only on systems where it's supported + ### Package files for nut-client: + install -m 644 -D $(CURDIR)/debian/tmp/$(systemdsystemunitdir)/nut-monitor.service \ + $(CURDIR)/debian/nut-client/$(systemdsystemunitdir)/nut-monitor.service + ### Package files for nut-server: + install -D $(CURDIR)/debian/tmp/$(systemdshutdowndir)/nutshutdown \ + $(CURDIR)/debian/nut-server/$(systemdshutdowndir)/nutshutdown + install -m 644 -D $(CURDIR)/debian/tmp/$(systemdsystemunitdir)/nut-server.service \ + $(CURDIR)/debian/nut-server/$(systemdsystemunitdir)/nut-server.service + # This should cover nut-driver.target, nut-driver@.service, + # nut-driver-enumerator.path, nut-driver-enumerator.service + install -m 644 -t $(CURDIR)/debian/nut-server/$(systemdsystemunitdir) \ + $(CURDIR)/debian/tmp/$(systemdsystemunitdir)/nut-driver* + + # Add a symlink to mask the LSB initscript for nut-client: + ln -s nut-monitor.service $(CURDIR)/debian/nut-client/$(systemdsystemunitdir)/nut-client.service + ln -s nut-monitor.service $(CURDIR)/debian/nut-client/$(systemdsystemunitdir)/ups-monitor.service + + # Install tmpfiles config file to create /run/nut directory + install -m 644 -D $(CURDIR)/debian/nut-common.tmpfiles \ + $(CURDIR)/debian/nut-common$(systemdtmpfilesdir)/nut-common.conf + + # Install gen-snmp-subdriver.sh for nut-snmp + install -m 755 -D $(CURDIR)/scripts/subdriver/gen-snmp-subdriver.sh \ + $(CURDIR)/debian/tmp/usr/sbin/gen-snmp-subdriver.sh + +extradocs-install: + #install documentation + mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/pdf + mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/html + cp $(CURDIR)/docs/*.pdf $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/pdf + cp $(CURDIR)/docs/FAQ.html $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/html + + for f in $(CURDIR)/docs/*.chunked/; do \ + nf=`basename $${f} | sed 's/\(.*\)\.chunked/\1/'`; \ + cp -a $${f} $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/html/$${nf}/; \ + done + +#common-install-indep:: extradocs-install +common-install-indep:: + # Make sure this exists for packaging to be consistent + mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/nut-doc + +binary-install/nut-monitor:: + if (command -v dh_python2) ; then \ + dh_python2 -pnut-monitor ; \ + else if (command -v dh_python3) ; then \ + dh_python3 -pnut-monitor ; \ + else if (command -v dh_python) ; then \ + dh_python -pnut-monitor ; \ + else echo "$@: no implementation of dh_python was found!" >&2 ; exit 1 ; \ + fi; fi; fi + +DEB_DH_INSTALLINIT_ARGS_nut-server := --init-script=nut-server --restart-after-upgrade +DEB_DH_INSTALLINIT_ARGS_nut-client := --init-script=nut-client --restart-after-upgrade +DEB_DH_SYSTEMD_START_ARGS_nut-server := --restart-after-upgrade +DEB_DH_SYSTEMD_START_ARGS_nut-client := --restart-after-upgrade +DEB_DH_COMPRESS_ARGS_nut-doc := -X.pdf + +ifeq (linux,$(DEB_HOST_ARCH_OS)) +# for Debian + DEB_DH_GENCONTROL_ARGS := -- -Vudev="udev (>= 0.124-1)" +# for Ubuntu +# DEB_DH_GENCONTROL_ARGS := -- -Vudev="udev (>= 136-1)" +endif + +all check dist distcheck install: + dh $@ --parallel diff --git a/scripts/obs/debian.series b/scripts/obs/debian.series new file mode 100644 index 0000000000..a75b428046 --- /dev/null +++ b/scripts/obs/debian.series @@ -0,0 +1,2 @@ +# This source tarball is taken from a dedicated Git branch head, so +# no further patches are to be applied (change the repo if needed). diff --git a/scripts/obs/debian.watch b/scripts/obs/debian.watch new file mode 100644 index 0000000000..606e46065f --- /dev/null +++ b/scripts/obs/debian.watch @@ -0,0 +1,2 @@ +version=3 +http://www.networkupstools.org/download.html .*/nut-(.*)\.tar\.(?:gz|bz2|xz) diff --git a/scripts/obs/nut.changes b/scripts/obs/nut.changes new file mode 100644 index 0000000000..e69de29bb2 diff --git a/scripts/obs/nut.dsc b/scripts/obs/nut.dsc new file mode 100644 index 0000000000..8c910131a3 --- /dev/null +++ b/scripts/obs/nut.dsc @@ -0,0 +1,42 @@ +Format: 1.0 +Source: nut +Binary: nut, nut-server, nut-client, nut-cgi, nut-snmp, nut-ipmi, nut-modbus, nut-linux-i2c, nut-xml, nut-powerman-pdu, nut-doc, libupsclient4, libupsclient-dev, libnutclient1, libnutclient-dev, python-nut, nut-monitor, libups-nut-perl +Architecture: any all +Version: 2.8.4-1 +Maintainer: Arnaud Quette +Uploaders: Laurent Bigonville +Homepage: http://www.networkupstools.org/ +Standards-Version: 3.9.6 +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/nut.git;a=summary +Vcs-Git: git://anonscm.debian.org/collab-maint/nut.git +Testsuite: autopkgtest +Build-Depends: debhelper (>= 8.1.3), cdbs (>= 0.4.122~), autotools-dev, dh-autoreconf, libsystemd-dev, libjpeg-dev, libgd-dev | libgd2-xpm-dev | libgd2-noxpm-dev, libssl1.0-dev | libssl-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), libneon27-gnutls-dev | libneon27-dev, libpowerman0-dev (>= 2.3.3), libwrap0-dev (>= 7.6), python2 | python3, libfreeipmi-dev (>= 0.8.5) [!hurd-i386], libipmimonitoring-dev (>= 1.1.5-2) [!hurd-i386], libnss3-dev, libtool, libltdl-dev, liblua5.1-0-dev, lua5.1, pkg-config, dh-python | dh-python2 | dh-python3 | dh-pypy, libmodbus-dev, libi2c-dev +# , python (>= 2.6.6-3~) | python-is-python2 | python-is-python3 +#+++ python-pycparser +# The pycparser is required to rebuild DMF files, but those pre-built +# copies in the git repo/tarball "should" be in sync with original +# C files, so we don't require regeneration for packaging. Also the +# Jenkins NUT-master job should have verified this. +Build-Depends-Indep: asciidoc (>= 8.6.3), docbook-xsl, dblatex (>= 0.2.5), libxml2-utils +Package-List: + libnutclient-dev deb libdevel optional arch=any + libnutclient1 deb libs optional arch=any + libnutscan-dev deb libdevel optional arch=any + libnutscan1 deb libs optional arch=any + libups-nut-perl deb perl optional arch=all + libupsclient-dev deb libdevel optional arch=any + libupsclient4 deb libs optional arch=any + nut deb metapackages optional arch=all + nut-cgi deb admin optional arch=any + nut-client deb admin optional arch=any + nut-doc deb doc optional arch=all + nut-ipmi deb admin optional arch=linux-any,kfreebsd-any + nut-linux-i2c deb admin optional arch=linux-any + nut-modbus deb admin optional arch=any + nut-monitor deb admin optional arch=all + nut-powerman-pdu deb admin extra arch=any + nut-server deb admin optional arch=any + nut-snmp deb admin optional arch=any + nut-xml deb admin optional arch=any + python-nut deb python optional arch=all +# DEBTRANSFORM-TAR: nut-2.7.4-DMF+daisychain-cb7c7ea8b0d.tar.gz diff --git a/scripts/obs/nut.spec b/scripts/obs/nut.spec new file mode 100644 index 0000000000..9d718e3d11 --- /dev/null +++ b/scripts/obs/nut.spec @@ -0,0 +1,766 @@ +# +# spec file for package nut.spec +# +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016-2018 Eaton EEIC. +# Copyright (c) 2025 by Jim Klimov +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# NOTE: Evaluations in percent-round-parentheses below happen in the +# build area already populated with packages according to "Required:" +# lines. We can test for OS feature availability here if needed (e.g. +# to decide if we deliver a sub-package with certain dependencies), +# but can not decide that we can/must install something and then we +# would have the needed OS capability. + +%define LIBEXECPATH %{_libexecdir}/ups + +# Requires httpd(-devel?) or apache2(-devel?) to be present in this distro: +%define apache_serverroot_data %(%{_sbindir}/apxs2 -q datadir || %{_sbindir}/apxs -q PREFIX || true) +# FIXME: is naming correct for both versions? +%define apache_serverroot_cgi %(%{_sbindir}/apxs2 -q cgidir || %{_sbindir}/apxs -q cgidir || true) + +%if "0%{?apache_serverroot_cgi}" == "0" || 0%(echo '%{apache_serverroot_cgi}' | grep -E '^%{_datadir}' >/dev/null && echo 1 || echo 0) > 0 +# Spec-var is undefined or empty, or matches the pattern triggering +# E: arch-dependent-file-in-usr-share (Badness: 590) +# Dump nut-cgi artifacts under our own locations, so end-users can +# integrate them later. +%define CGIPATH %{LIBEXECPATH}/cgi-bin +%else +%define CGIPATH %{apache_serverroot_cgi}/nut +%endif + +%if "0%{?apache_serverroot_data}" == "0" || 0%(test x'%{apache_serverroot_data}' = x'^%{_datadir}' && echo 1 || echo 0) > 0 +%define HTMLPATH %{_datadir}/nut/htdocs +%else +# Rename web pages location to not conflict with apache2-example-pages +# or user home page: +%define HTMLPATH %{apache_serverroot_data}/nut +%endif + +%define MODELPATH %{LIBEXECPATH}/driver +%define STATEPATH %{_localstatedir}/lib/ups +%define CONFPATH %{_sysconfdir}/ups +# RPM on OpenSUSE goes: +# DOCDIR=/home/abuild/rpmbuild/BUILD/nut-2.8.4.428-build/BUILDROOT/usr/share/doc/packages/nut +%define DOCPATH %{_docdir}/nut + +### FIXME: Detect properly? +# W: suse-filelist-forbidden-udev-userdirs /etc/udev/rules.d/62-nut-usbups.rules is not allowed in SUSE +# This directory is for user files, use /usr/lib/udev/rules.d +%define UDEVRULEPATH %(test -d /usr/lib/udev && echo /usr/lib/udev || echo "%{_sysconfdir}/udev") + +### FIXME: Detect properly? +# W: suse-filelist-forbidden-bashcomp-userdirs /etc/bash_completion.d/nut.bash_completion is not allowed in SUSE +# This directory is for user files, use /usr/share/bash-completion/completions/ +%define BASHCOMPLETIONPATH %(test -d /usr/share/bash-completion/completions && echo /usr/share/bash-completion/completions || echo "%{_sysconfdir}/bash_completion.d") + +### Note: this is /etc/nut in Debian version +%define NUT_USER upsd +%define NUT_GROUP daemon +%define LBRACE ( +%define RBRACE ) +%define QUOTE " +%define BACKSLASH \\ +# Collect all devices listed in ups-nut-device.fdi: +%define USBHIDDRIVERS %(zcat %{SOURCE0} | tr a-z A-Z | fgrep -a -A1 USBHID-UPS | 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 USBNONHIDDRIVERS %(zcat %{SOURCE0} | tr a-z A-Z | fgrep -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' ' ') + +# Collect systemd related paths so we can package files there: +%define systemdsystemunitdir %(pkg-config --variable=systemdsystemunitdir systemd) +%define systemdsystempresetdir %(pkg-config --variable=systemdsystempresetdir systemd || pkg-config --variable=systemdsystempresetdir libsystemd) +%define systemdtmpfilesdir %(pkg-config --variable=tmpfilesdir systemd || pkg-config --variable=tmpfilesdir libsystemd) +%define systemdsystemdutildir %(pkg-config --variable=systemdutildir systemd) +%define systemdshutdowndir %(pkg-config --variable=systemdshutdowndir systemd) + +# % define NUT_SYSTEMD_UNITS_SERVICE_TARGET % (cd scripts/systemd && ls -1 *.{service,target,path,timer}{,.in} | sed 's,.in$,,' | sort | uniq) +%define NUT_SYSTEMD_UNITS_SERVICE_TARGET nut-driver-enumerator.service nut-driver.target nut-driver@.service nut-logger.service nut-monitor.service nut-server.service nut-sleep.service nut-udev-settle.service nut.target nut-driver-enumerator.path +# Most deployments do not want these by default: +%define NUT_SYSTEMD_UNITS_UNCOMMON_NDE nut-driver-enumerator-daemon-activator.path nut-driver-enumerator-daemon-activator.service nut-driver-enumerator-daemon.service + +%define NUT_SYSTEMD_UNITS_PRESET %(cd scripts/systemd && ls -1 *.preset{,.in} | sed 's,.in$,,' | sort | uniq) + +# Does this NUT branch have DMF feature code? +%define NUTPKG_WITH_DMF %( test -d scripts/DMF && echo 1 || echo 0 ) + +# Not all distros have it +# FIXME: No use searching remote repos; can use rpm queries based on whatever +# did get installed according to Requires lines below, to decide whether we +# deliver certain sub-packages though. +%define NUTPKG_WITH_FREEIPMI %( (yum search freeipmi-devel | grep -E '^(lib)?freeipmi-devel\.' && exit ; dnf search freeipmi-devel | grep -E '^(lib)?freeipmi-devel\.' && exit ; zypper search -s freeipmi-devel | grep -E '(lib)?freeipmi-devel' && exit ; urpmq --sources freeipmi-devel && exit ; pkcon search name freeipmi-devel | grep -E '(Available|Installed).*freeipmi-devel' && exit;) >&2 && echo 1 || echo 0) +%define NUTPKG_WITH_POWERMAN %( (yum search powerman-devel | grep -E '^(lib)?powerman-devel\.' && exit ; dnf search powerman-devel | grep -E '^(lib)?powerman-devel\.' && exit ; zypper search -s powerman-devel | grep -E '(lib)?powerman-devel' && exit ; urpmq --sources powerman-devel && exit ; pkcon search name powerman-devel | grep -E '(Available|Installed).*powerman-devel' && exit;) >&2 && echo 1 || echo 0) +%define NUTPKG_WITH_AVAHI %( (yum search avahi-devel | grep -E '^(lib)?avahi-devel\.' && exit ; dnf search avahi-devel | grep -E '^(lib)?avahi-devel\.' && exit ; zypper search -s avahi-devel | grep -E '(lib)?avahi-devel' && exit ; urpmq --sources avahi-devel && exit ; pkcon search name avahi-devel | grep -E '(Available|Installed).*avahi-devel' && exit;) >&2 && echo 1 || echo 0) +%define NUTPKG_WITH_TCPWRAP %( (yum search tcp_wrappers-devel | grep -E '^(lib)?tcp_wrappers-devel\.' && exit ; dnf search tcp_wrappers-devel | grep -E '^(lib)?tcp_wrappers-devel\.' && exit ; zypper search -s tcp_wrappers-devel | grep -E '(lib)?tcp_wrappers-devel' && exit ; urpmq --sources tcp_wrappers-devel && exit ; pkcon search name tcp_wrappers-devel | grep -E '(Available|Installed).*tcp_wrappers-devel' && exit;) >&2 && echo 1 || echo 0) + +# FIXME: Find a smarter way to set those from main codebase recipes... +# Something like `git grep 'version-info' '*.am'` ? +%define SO_MAJOR_LIBUPSCLIENT 7 +%define SO_MAJOR_LIBNUTCLIENT 2 +%define SO_MAJOR_LIBNUTCLIENTSTUB 1 +%define SO_MAJOR_LIBNUTSCAN 4 +%define SO_MAJOR_LIBNUTCONF 0 + +# If not published, nutconf is built with a statically linked library variant +%define NUTPKG_WITH_LIBNUTCONF 0 + +Name: nut +# NOTE: OBS should rewrite this: +Version: 2.8.4 +Release: 1 +Summary: Network UPS Tools Core (Uninterruptible Power Supply Monitoring) +License: GPL-2.0+ +Group: Hardware/UPS +Url: https://www.networkupstools.org/ +Source0: %{name}-%{version}.tar.gz + +Requires: %{_bindir}/bash +Requires: %{_bindir}/sh +Requires: %{_sbindir}/sh +Requires: %{_bindir}/chown +Requires: %{_bindir}/chgrp +Requires: %{_bindir}/chmod +###BuildRequires: % {_sbindir}/chroot +Requires: %{_bindir}/rm +Requires: %{_bindir}/fgrep +Requires: %{_bindir}/grep +Requires: %{_bindir}/pgrep +Requires: %{_bindir}/pkill +Requires: %{_bindir}/readlink +Requires: usbutils +%if 0%{?suse_version} +Requires(post): udev +%endif +#Requires(post): group(% {NUT_GROUP}) +#Requires(post): user(% {NUT_USER}) +Requires(postun): %{_bindir}/sh + +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +Recommends: logrotate + +# To fix end-of-line encoding: +BuildRequires: dos2unix + +# For man page aliases +# https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros#fdupes +BuildRequires: fdupes + +%if 0%{?NUTPKG_WITH_AVAHI} +BuildRequires: avahi-devel +%endif + +%if 0%{?NUTPKG_WITH_FREEIPMI} +BuildRequires: (libfreeipmi-devel or freeipmi-devel) +%endif + +BuildRequires: gcc-c++ +BuildRequires: gd-devel +BuildRequires: libtool +BuildRequires: libtool-ltdl-devel +# libusb-0.1 or libusb-1.0: +BuildRequires: (libusb-devel or libusbx-devel) +#!Prefer: libusbx-devel +BuildRequires: net-snmp-devel +BuildRequires: libxml2-devel +BuildRequires: pkg-config +# Maybe older Pythons are also okay, but were not tested for ages +BuildRequires: (python >= 2.6 or python3 or python2) + +%if 0%{?NUTPKG_WITH_DMF} +# LUA 5.1 or 5.2 is known ok for us, both are modern in current distros (201609xx) +BuildRequires: lua-devel + +# TODO: Make sure how this is named to use in CentOS/RHEL (may be not in core but EPEL repos) +# The pycparser is required to rebuild DMF files, but those pre-built +# copies in the git repo/tarball "should" be in sync with original +# C files, so we don't require regeneration for packaging. Also the +# Jenkins NUT-master job should have verified this. +#BuildRequires: python-pycparser +%endif + +# Variant names in different distros +# For some platforms we may have to fiddle with distro-named macros like +# % if 0 % {?centos_version} +# % if 0 % {?suse_version} +# % if 0 % {?rhel_version}>=7 +# and whatnot + +BuildRequires: (httpd-devel or apache2-devel) +BuildRequires: (dbus-1-glib-devel or dbus-glib-devel) + +%if 0%{?rhel_version}>=8 || ! 0%{?rhel_version} +BuildRequires: (libcppunit-devel or cppunit-devel) +%endif + +# Obsoleted/away in newer distros +%if 0%{?NUTPKG_WITH_TCPWRAP} +BuildRequires: (tcpd-devel or tcp_wrappers-devel) +%endif + +# May be plain "neon" and "libusb" in RHEL7 or older? +# OBS: This may need `osc meta prjconf` to `Prefer:` one +# certain variant in case several hits happen on a builder: +BuildRequires: (libneon-devel or neon-devel or neon) +#!Prefer: (libneon-devel or neon-devel) +BuildRequires: (libopenssl-devel or openssl-devel or openssl) +#!Prefer: (libopenssl-devel or openssl-devel) + +%if 0%{?NUTPKG_WITH_POWERMAN} +BuildRequires: powerman-devel +%endif + +%if 0%{?suse_version} +BuildRequires: systemd-rpm-macros +# Only needed for PDF generation, we do not package that now +#BuildRequires: dblatex +%endif + +BuildRequires: (libxslt-tools or libxslt) +BuildRequires: asciidoc + +%if %{defined opensuse_version} +# 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} +%systemd_requires +%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. + +Detailed information about supported hardware can be found in +%{_docdir}/nut. + +%package drivers-net +Summary: Network UPS Tools - Extra Networking Drivers (for Network Monitoring) +Group: Hardware/UPS +Requires: %{name} = %{version} + +%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. + +Detailed information about supported hardware can be found in +%{_docdir}/nut. + +%package -n libupsclient%{SO_MAJOR_LIBUPSCLIENT} +Summary: Network UPS Tools Library (Uninterruptible Power Supply Monitoring) +Group: System/Libraries + +%description -n libupsclient%{SO_MAJOR_LIBUPSCLIENT} +Shared library for the Network UPS Tools, used by its and third-party C clients. + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +Detailed information about supported hardware can be found in +%{_docdir}/nut. + +%package -n libnutclient%{SO_MAJOR_LIBNUTCLIENT} +Summary: Network UPS Tools Library (Uninterruptible Power Supply Monitoring) +Group: System/Libraries + +%description -n libnutclient%{SO_MAJOR_LIBNUTCLIENT} +Shared library for the Network UPS Tools, used by its and third-party C++ clients. + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +Detailed information about supported hardware can be found in +%{_docdir}/nut. + +%package -n libnutclientstub%{SO_MAJOR_LIBNUTCLIENTSTUB} +Summary: Network UPS Tools Library (Uninterruptible Power Supply Monitoring) +Group: System/Libraries + +%description -n libnutclientstub%{SO_MAJOR_LIBNUTCLIENTSTUB} +Shared stub library for the Network UPS Tools with memory-backed configurations, +primarily used by tests and mocks with its and third-party C++ clients. + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +Detailed information about supported hardware can be found in +%{_docdir}/nut. + +%package -n libnutscan%{SO_MAJOR_LIBNUTSCAN} +Summary: Network UPS Tools Library (Uninterruptible Power Supply Monitoring) +Group: System/Libraries + +%description -n libnutscan%{SO_MAJOR_LIBNUTSCAN} +Shared library for the Network UPS Tools, used by its nut-scanner and nutconf tools, +and possibly third-party C clients, integrations or tools. + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +Detailed information about supported hardware can be found in +%{_docdir}/nut. + +%if 0%{?NUTPKG_WITH_LIBNUTCONF} > 0 +# If not published, nutconf is built with a statically linked library variant +%package -n libnutconf%{SO_MAJOR_LIBNUTCONF} +Summary: Network UPS Tools Library (Uninterruptible Power Supply Monitoring) +Group: System/Libraries + +%description -n libnutconf%{SO_MAJOR_LIBNUTCONF} +Shared library for the Network UPS Tools, used by its nutconf tool, +and possibly third-party C++ clients, integrations or tools. + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +Detailed information about supported hardware can be found in +%{_docdir}/nut. +%endif + +%package cgi +Summary: Network UPS Tools Web Server Support (UPS Status Pages) +Group: Hardware/UPS +Requires: %{name} = %{version} + +%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. + +Detailed information about supported hardware can be found in +%{_docdir}/nut. + +%package monitor +Summary: Network UPS Tools Web Server Support (GUI client) +Group: Hardware/UPS +Requires: %{name} = %{version} +Requires: python-base +BuildRequires: (python >= 2.6 or python3 or python2) +BuildArch: noarch + +%description monitor +Graphical user interface client for the Network UPS Tools, +written in Python. + +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +Detailed information about supported hardware can be found in +%{_docdir}/nut. + +%package devel +Summary: Network UPS Tools (Uninterruptible Power Supply Monitoring) +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version} +Requires: openssl-devel + +%description devel +Network UPS Tools is a collection of programs which provide a common +interface for monitoring and administering UPS hardware. + +Detailed information about supported hardware can be found in +%{_docdir}/nut. + +%prep +%setup -q + +# Note: NOT configure macro, due to override of --sysconfdir and --datadir +# values just for the recipe part but not for whole specfile +%build +# May be pre-populated if building from tarball, or derived from git +# Otherwise let the SPEC version reflect in NUT self-identification +if [ ! -s VERSION_DEFAULT ] && [ ! -e .git ] && [ -n '%{version}' ] ; then + echo NUT_VERSION_DEFAULT='%{version}' > VERSION_DEFAULT +fi + +sh autogen.sh +./configure --disable-static --with-pic \ + --prefix=%{_prefix}\ + --bindir=%{_bindir}\ + --sbindir=%{_sbindir}\ + --libdir=%{_libdir}\ + --libexecdir=%{LIBEXECPATH}\ + --sysconfdir=%{CONFPATH}\ + --datadir=%{_datadir}/nut\ + --docdir=%{DOCPATH}\ + --with-ssl --with-openssl\ + --with-libltdl=yes\ + --with-cgi=auto\ + --with-serial\ + --with-usb\ + --with-snmp\ + --with-neon\ + --with-dev\ + --with-ipmi=auto\ + --with-powerman=auto\ + --with-doc=man=dist-auto\ + --with-htmlpath=%{HTMLPATH}\ + --with-cgipath=%{CGIPATH}\ + --with-statepath=%{STATEPATH}\ + --with-drvpath=%{MODELPATH}\ + --with-user=%{NUT_USER}\ + --with-group=%{NUT_GROUP} \ + --with-udev-dir=%{UDEVRULEPATH} \ + --enable-option-checking=fatal\ + --with-systemdsystemunitdir --with-systemdshutdowndir \ + --with-augeas-lenses-dir=/usr/share/augeas/lenses/dist \ +%if 0%{?NUTPKG_WITH_LIBNUTCONF} > 0 + --with-dev-libnutconf\ +%endif +%if 0%{?NUTPKG_WITH_DMF} + --with-snmp_dmf_lua\ + --with-dmfsnmp-regenerate=no --with-dmfnutscan-regenerate=no --with-dmfsnmp-validate=no --with-dmfnutscan-validate=no\ +%endif + --enable-keep_nut_report_feature\ + --enable-strip\ + --enable-check-NIT + +### via Make now ### (cd tools; python nut-snmpinfo.py) + +make %{?_smp_mflags} +PORT=$(sed -n 's/#define PORT //p' config.log) +if test "$PORT" = 3493 ; then + PORT=nut +fi + +%check +make %{?_smp_mflags} check + +%install +make DESTDIR=%{buildroot} install %{?_smp_mflags} +mkdir -p %{buildroot}%{STATEPATH}/upssched +# SuSE rc +mkdir -p %{buildroot}%{_sbindir} +mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d +# Avoid W: incoherent-logrotate-file /etc/logrotate.d/nutlogd +install -m 644 scripts/logrotate/nutlogd %{buildroot}%{_sysconfdir}/logrotate.d/nut +# As (currently) hard-coded in that file above +mkdir -p %{buildroot}/var/log +rename .sample "" %{buildroot}%{_sysconfdir}/ups/*.sample +find %{buildroot} -type f -name "*.la" -delete -print +mkdir -p %{buildroot}%{BASHCOMPLETIONPATH} +install -m0644 scripts/misc/nut.bash_completion %{buildroot}%{BASHCOMPLETIONPATH}/ +install -m0755 scripts/subdriver/gen-snmp-subdriver.sh %{buildroot}%{_sbindir}/ +# TODO: Detect path from chosen interpreter or NUT build config files? +# Avoid W: non-executable-script /usr/lib/python3.6/site-packages/PyNUT.py 644 /usr/bin/python... +# Not really relevant for the module (not directly runnable, but has the shebang just in case) +chmod +x %{buildroot}/usr/lib*/python*/*-packages/*.py +if [ x"%{systemdtmpfilesdir}" != x ]; then + # Deliver these dirs by packaging: + sed 's,^\(. %{STATEPATH}\(/upssched\)*\( .*\)*\)$,#PACKAGED#\1,' -i %{buildroot}%{systemdtmpfilesdir}/nut-common-tmpfiles.conf +fi +# Use deterministic script interpreters: +find %{buildroot} -type f -name '*.sh' -o -name '*.py' -o -name '*.pl' | \ +while read F ; do + if head -1 "$F" | grep bin/env >/dev/null ; then + F_SHEBANG="`head -1 "$F"`" + + F_SHELL_SHORT="`echo "$F_SHEBANG" | sed -e 's,^.*bin/env *,,' -e 's, .*$,,'`" \ + && [ -n "$F_SHELL_SHORT" ] \ + || { echo "WARNING: Failed to extract an interpreter from shebang '${F_SHEBANG}'" >&2 ; continue ; } + + F_SHELL_PATH="`command -v "$F_SHELL_SHORT"`" \ + && [ -n "$F_SHELL_PATH" ] && [ -x "$F_SHELL_PATH" ] \ + || { echo "WARNING: Failed to find executable path to interpreter '${F_SHELL_SHORT}' from shebang '${F_SHEBANG}'" >&2 ; continue; } + + echo "REWRITING shebang from '$F_SHEBANG' to '#!${F_SHELL_PATH}' in '$F'" >&2 + sed '1 s,^.*$,#!'"${F_SHELL_PATH}," -i "$F" + fi +done +# create symlinks for man pages; skip man1 (not used with pkgconfig +# capable builds), and man7 (one page there): +%fdupes -s %{buildroot}/%{_mandir}/man3 +%fdupes -s %{buildroot}/%{_mandir}/man5 +%fdupes -s %{buildroot}/%{_mandir}/man8 + +%pre +usr/sbin/groupadd -r -g %{NUT_GROUP} 2>/dev/null || : +usr/sbin/useradd -r -g %{NUT_GROUP} -s /bin/false \ + -c "UPS daemon" -d /sbin %{NUT_USER} 2>/dev/null || : +%if "x%{?systemdsystemunitdir}" == "x" +%else +%service_add_pre %{NUT_SYSTEMD_UNITS_SERVICE_TARGET} %{NUT_SYSTEMD_UNITS_UNCOMMON_NDE} +%endif + +%post +# Be sure that all files are owned by a dedicated user. +# Some systems do not have the users or groups during rpmbuild +# pre/port tests, so we neuter faults with a warning echo. +# Some systems struggle with "chown USER:GROUP" so we separate +# them into two commands here: +bin/chown -R %{NUT_USER} %{STATEPATH} || echo "WARNING: Could not secure state path '%{STATEPATH}'" >&2 +bin/chgrp -R %{NUT_GROUP} %{STATEPATH} || echo "WARNING: Could not secure state path '%{STATEPATH}'" >&2 +# Be sure that all files are owned by a dedicated user. +bin/chown %{NUT_USER} %{CONFPATH}/upsd.conf %{CONFPATH}/upsmon.conf %{CONFPATH}/upsd.users || echo "WARNING: Could not secure config files in path '%{CONFPATH}'" >&2 +bin/chgrp root %{CONFPATH}/upsd.conf %{CONFPATH}/upsmon.conf %{CONFPATH}/upsd.users || echo "WARNING: Could not secure config files in path '%{CONFPATH}'" >&2 +bin/chmod 600 %{CONFPATH}/upsd.conf %{CONFPATH}/upsmon.conf %{CONFPATH}/upsd.users || echo "WARNING: Could not secure config files in path '%{CONFPATH}'" >&2 +# And finally trigger udev to set permissions according to newly installed rules files. +if [ -x /sbin/udevadm ] ; then /sbin/udevadm trigger --subsystem-match=usb --property-match=DEVTYPE=usb_device ; fi +%if "x%{?systemdtmpfilesdir}" == "x" +%else +%tmpfiles_create nut-common-tmpfiles.conf +%endif +%if "x%{?systemdsystemunitdir}" == "x" +%else +%service_add_post %{NUT_SYSTEMD_UNITS_SERVICE_TARGET} %{NUT_SYSTEMD_UNITS_UNCOMMON_NDE} +%endif + +%preun +%if "x%{?systemdsystemunitdir}" == "x" +: +%else +%service_del_preun %{NUT_SYSTEMD_UNITS_SERVICE_TARGET} %{NUT_SYSTEMD_UNITS_UNCOMMON_NDE} +%endif + +%postun +%if "x%{?systemdsystemunitdir}" == "x" +: +%else +%service_del_postun %{NUT_SYSTEMD_UNITS_SERVICE_TARGET} %{NUT_SYSTEMD_UNITS_UNCOMMON_NDE} +%endif + +%post -n libupsclient%{SO_MAJOR_LIBUPSCLIENT} -p /sbin/ldconfig + +%postun -n libupsclient%{SO_MAJOR_LIBUPSCLIENT} -p /sbin/ldconfig + +%post -n libnutclient%{SO_MAJOR_LIBNUTCLIENT} -p /sbin/ldconfig + +%postun -n libnutclient%{SO_MAJOR_LIBNUTCLIENT} -p /sbin/ldconfig + +%post -n libnutclientstub%{SO_MAJOR_LIBNUTCLIENTSTUB} -p /sbin/ldconfig + +%postun -n libnutclientstub%{SO_MAJOR_LIBNUTCLIENTSTUB} -p /sbin/ldconfig + +%post -n libnutscan%{SO_MAJOR_LIBNUTSCAN} -p /sbin/ldconfig + +%postun -n libnutscan%{SO_MAJOR_LIBNUTSCAN} -p /sbin/ldconfig + +%if 0%{?NUTPKG_WITH_LIBNUTCONF} > 0 +%post -n libnutconf%{SO_MAJOR_LIBNUTCONF} -p /sbin/ldconfig + +%postun -n libnutconf%{SO_MAJOR_LIBNUTCONF} -p /sbin/ldconfig + +%endif + +%files +%defattr(-,root,root) +%doc AUTHORS COPYING LICENSE-DCO LICENSE-GPL2 LICENSE-GPL3 ChangeLog MAINTAINERS NEWS.adoc README.adoc UPGRADING.adoc docs/*.adoc docs/*.txt docs/cables/*.txt +# List the (system) dirs we impact but do not own for the package +#% dir % {BASHCOMPLETIONPATH} +#% dir % {_sysconfdir}/logrotate.d +#% dir % {_bindir} +#% dir % {_sbindir} +#% dir % {_datadir} +#% dir % {_docdir} +#% dir % {DOCPATH} +# NOTE: Currently this only delivers libupsclient-config.1 +# and only if not building with pkg-config available: +#% dir % {_mandir}/man1 +#% dir % {_mandir}/man3 +#% dir % {_mandir}/man5 +#% dir % {_mandir}/man7 +#% dir % {_mandir}/man8 +#% dir % {_libexecdir} +# FIXME: Detect from logrotate properties (or our scriptlet file)? +#% dir /var/log +%if "x%{?systemdsystemunitdir}" == "x" +%else +%dir %{systemdsystemunitdir} +%endif +%if "x%{?systemdsystempresetdir}" == "x" +%else +%dir %{systemdsystempresetdir} +%endif +%if "x%{?systemdtmpfilesdir}" == "x" +%else +%dir %{systemdtmpfilesdir} +%endif +%if "x%{?systemdshutdowndir}" == "x" +%else +%dir %{systemdshutdowndir} +%endif +# List the file patterns to install from proto area +%{BASHCOMPLETIONPATH}/* +%config(noreplace) %{_sysconfdir}/logrotate.d/* +%{_bindir}/* +%if 0%{?NUTPKG_WITH_DMF} +%exclude %{_bindir}/nut-scanner-reindex-dmfsnmp +%endif +%{_datadir}/nut +%if 0%{?NUTPKG_WITH_DMF} +%exclude %{_datadir}/nut/dmfnutscan +%exclude %{_datadir}/nut/dmfsnmp +%exclude %{_datadir}/nut/dmfnutscan.d +%exclude %{_datadir}/nut/dmfsnmp.d +%endif +%{_mandir}/man5/*.* +%{_mandir}/man7/*.* +%{_mandir}/man8/*.* +%exclude %{_mandir}/man8/netxml-ups*.* +%exclude %{_mandir}/man8/snmp-ups*.* +%dir %{LIBEXECPATH} +%{_sbindir}/* +%dir %{UDEVRULEPATH} +%dir %{UDEVRULEPATH}/rules.d +### FIXME: if under /etc ### % config(noreplace) % {UDEVRULEPATH}/rules.d/*.rules +%{UDEVRULEPATH}/rules.d/*.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 +%exclude %{_sbindir}/gen-snmp-subdriver.sh +%attr(770,%{NUT_USER},%{NUT_GROUP}) %{STATEPATH} +%attr(770,%{NUT_USER},%{NUT_GROUP}) %{STATEPATH}/upssched +%if "x%{?systemdsystemunitdir}" == "x" +%else +%{systemdsystemunitdir}/* +%endif +%if "x%{?systemdsystempresetdir}" == "x" +%else +%{systemdsystempresetdir}/* +%endif +%if "x%{?systemdtmpfilesdir}" == "x" +%else +%{systemdtmpfilesdir}/* +%endif +%if "x%{?systemdshutdowndir}" == "x" +%else +%{systemdshutdowndir}/nutshutdown +%endif +%{_datadir}/augeas/lenses/dist/nuthostsconf.aug +%{_datadir}/augeas/lenses/dist/nutnutconf.aug +%{_datadir}/augeas/lenses/dist/nutupsconf.aug +%{_datadir}/augeas/lenses/dist/nutupsdconf.aug +%{_datadir}/augeas/lenses/dist/nutupsdusers.aug +%{_datadir}/augeas/lenses/dist/nutupsmonconf.aug +%{_datadir}/augeas/lenses/dist/nutupsschedconf.aug +%{_datadir}/augeas/lenses/dist/nutupssetconf.aug +%{_datadir}/augeas/lenses/dist/tests/test_nut.aug +%dir %{_datadir}/augeas +%dir %{_datadir}/augeas/lenses +%dir %{_datadir}/augeas/lenses/dist +%dir %{_datadir}/augeas/lenses/dist/tests +%{LIBEXECPATH}/nut-driver-enumerator.sh +# Exclude whatever other packages bring, some rpmbuild versions seem to dump +# everything into the base package and then complain about duplicates/conflicts: +### libupsclient7 etc +%exclude %{_libdir}/*.so.* +### nut-cgi +%exclude %{CGIPATH} +%exclude %{HTMLPATH} +%exclude %{CONFPATH}/*.html +### nut-monitor +# TODO: Actually package NUT-Monitor app and scripts where available +# TODO: Detect path from chosen interpreter or NUT build config files? +%exclude /usr/lib*/python*/*-packages/* +### nut-devel +%exclude %{_includedir}/*.h +%exclude %{_libdir}/*.so +%exclude %{_libdir}/pkgconfig/*.pc +%exclude %{_mandir}/man3/*.* +%exclude %{LIBEXECPATH}/sockdebug + + +%files drivers-net +%defattr(-,root,root) +%{MODELPATH}/snmp-ups +%{MODELPATH}/netxml-ups +%{_mandir}/man8/netxml-ups*.* +%{_mandir}/man8/snmp-ups*.* +%{_sbindir}/gen-snmp-subdriver.sh +%if 0%{?NUTPKG_WITH_DMF} +%{_bindir}/nut-scanner-reindex-dmfsnmp +%dir %{_datadir}/nut/dmfnutscan +%dir %{_datadir}/nut/dmfsnmp +%{_datadir}/nut/dmfnutscan/*.dmf +%{_datadir}/nut/dmfsnmp/*.dmf +%{_datadir}/nut/dmfnutscan/*.xsd +%{_datadir}/nut/dmfsnmp/*.xsd +%dir %{_datadir}/nut/dmfnutscan.d +%dir %{_datadir}/nut/dmfsnmp.d +%{_datadir}/nut/dmfnutscan.d/*.dmf +%{_datadir}/nut/dmfsnmp.d/*.dmf +%endif + +%files -n libupsclient%{SO_MAJOR_LIBUPSCLIENT} +%defattr(-,root,root) +%{_libdir}/libupsclient.so.* + +%files -n libnutclient%{SO_MAJOR_LIBNUTCLIENT} +%defattr(-,root,root) +%{_libdir}/libnutclient.so.* + +%files -n libnutclientstub%{SO_MAJOR_LIBNUTCLIENTSTUB} +%defattr(-,root,root) +%{_libdir}/libnutclientstub.so.* + +%files -n libnutscan%{SO_MAJOR_LIBNUTSCAN} +%defattr(-,root,root) +%{_libdir}/libnutscan.so.* + +%if 0%{?NUTPKG_WITH_LIBNUTCONF} > 0 +%files -n libnutconf%{SO_MAJOR_LIBNUTCONF} +%defattr(-,root,root) +%{_libdir}/libnutconf.so.* +%endif + +%files cgi +%defattr(-,root,root) +%dir %{CGIPATH} +%dir %{HTMLPATH} +%{CGIPATH}/* +%{HTMLPATH}/* +%config(noreplace) %{CONFPATH}/upsstats-single.html +%config(noreplace) %{CONFPATH}/upsstats.html + +%files monitor +%defattr(-,root,root) +# TODO: Actually package NUT-Monitor app and scripts where available +# TODO: Detect path from chosen interpreter or NUT build config files? +# Maybe specify python version and location using RPM macros, see e.g. +# https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/installing_and_using_dynamic_programming_languages/assembly_packaging-python-3-rpms_installing-and-using-dynamic-programming-languages +# Note we MAY be dual-packaging for several python versions and locations. +/usr/lib*/python*/*-packages/* + +%files devel +%defattr(-,root,root) +%{_includedir}/*.h +%{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc +# FIXME: Alias man page files... use symlinks or what? +# [ 139s] nut-devel.x86_64: W: files-duplicate /usr/share/man/man3/nutclient_execute_device_command.3.gz /usr/share/man/man3/nutclient_get_device_command_description.3.gz:/usr/share/man/man3/nutclient_get_device_commands.3.gz:/usr/share/man/man3/nutclient_has_device_command.3.gz +# [ 139s] nut-devel.x86_64: W: files-duplicate /usr/share/man/man3/nutclient_get_device_num_logins.3.gz /usr/share/man/man3/nutclient_authenticate.3.gz:/usr/share/man/man3/nutclient_device_forced_shutdown.3.gz:/usr/share/man/man3/nutclient_device_login.3.gz:/usr/share/man/man3/nutclient_device_master.3.gz:/usr/share/man/man3/nutclient_logout.3.gz +# [ 139s] nut-devel.x86_64: W: files-duplicate /usr/share/man/man3/nutclient_get_devices.3.gz /usr/share/man/man3/nutclient_get_device_description.3.gz:/usr/share/man/man3/nutclient_has_device.3.gz +# [ 139s] nut-devel.x86_64: W: files-duplicate /usr/share/man/man3/nutclient_set_device_variable_value.3.gz /usr/share/man/man3/nutclient_get_device_rw_variables.3.gz:/usr/share/man/man3/nutclient_get_device_variable_description.3.gz:/usr/share/man/man3/nutclient_get_device_variable_values.3.gz:/usr/share/man/man3/nutclient_get_device_variables.3.gz:/usr/share/man/man3/nutclient_has_device_variable.3.gz:/usr/share/man/man3/nutclient_set_device_variable_values.3.gz +# [ 139s] nut-devel.x86_64: W: files-duplicate /usr/share/man/man3/nutclient_tcp_get_timeout.3.gz /usr/share/man/man3/nutclient_tcp_create_client.3.gz:/usr/share/man/man3/nutclient_tcp_disconnect.3.gz:/usr/share/man/man3/nutclient_tcp_is_connected.3.gz:/usr/share/man/man3/nutclient_tcp_reconnect.3.gz:/usr/share/man/man3/nutclient_tcp_set_timeout.3.gz +%{_mandir}/man3/*.* +%{LIBEXECPATH}/sockdebug + +%changelog diff --git a/scripts/obs/pkgsrc.obs b/scripts/obs/pkgsrc.obs new file mode 100644 index 0000000000..c332d140f8 --- /dev/null +++ b/scripts/obs/pkgsrc.obs @@ -0,0 +1,2 @@ +default +USE_GITCOMMIT_VERSION=yes