From 31a319d73100c50a6d77825a27730997042c7060 Mon Sep 17 00:00:00 2001 From: Arnaud Quette Date: Wed, 24 Feb 2010 22:58:53 +0100 Subject: [PATCH] Imported Debian patch 2.4.3-1 --- debian/Makefile.am | 8 + debian/Makefile.in | 381 +++++++++ debian/changelog | 1307 +++++++++++++++++++++++++++++ debian/compat | 1 + debian/control | 130 +++ debian/copyright | 69 ++ debian/description.subst | 1 + debian/hotplug | 24 + debian/libupsclient1-dev.dirs | 1 + debian/libupsclient1-dev.install | 5 + debian/libupsclient1-dev.links | 1 + debian/libupsclient1-dev.manpages | 1 + debian/libupsclient1.install | 1 + debian/libupsclient1.postinst | 29 + debian/libupsclient1.postrm | 41 + debian/nut-cgi.README.Debian | 39 + debian/nut-cgi.docs | 1 + debian/nut-cgi.install | 6 + debian/nut-cgi.manpages | 6 + debian/nut-cgi.postinst | 55 ++ debian/nut-cgi.postrm | 46 + debian/nut-hal-drivers.docs | 1 + debian/nut-hal-drivers.install | 3 + debian/nut-hal-drivers.postinst | 24 + debian/nut-hal-drivers.preinst | 18 + debian/nut-powerman-pdu.install | 1 + debian/nut-powerman-pdu.manpages | 1 + debian/nut-snmp.install | 1 + debian/nut-snmp.lintian-overrides | 6 + debian/nut-snmp.manpages | 1 + debian/nut-xml.install | 1 + debian/nut-xml.manpages | 1 + debian/nut.README.Debian | 155 ++++ debian/nut.TODO.Debian | 11 + debian/nut.dirs | 4 + debian/nut.docs | 5 + debian/nut.init | 204 +++++ debian/nut.install | 56 ++ debian/nut.link | 2 + debian/nut.lintian-overrides | 2 + debian/nut.manpages | 51 ++ debian/nut.postinst | 136 +++ debian/nut.postrm | 53 ++ debian/nut.preinst | 26 + debian/nut.prerm | 42 + debian/rules | 138 +++ debian/watch | 2 + 47 files changed, 3098 insertions(+) create mode 100644 debian/Makefile.am create mode 100644 debian/Makefile.in create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/description.subst create mode 100644 debian/hotplug create mode 100644 debian/libupsclient1-dev.dirs create mode 100644 debian/libupsclient1-dev.install create mode 100644 debian/libupsclient1-dev.links create mode 100644 debian/libupsclient1-dev.manpages create mode 100644 debian/libupsclient1.install create mode 100644 debian/libupsclient1.postinst create mode 100644 debian/libupsclient1.postrm create mode 100644 debian/nut-cgi.README.Debian create mode 100644 debian/nut-cgi.docs create mode 100644 debian/nut-cgi.install create mode 100644 debian/nut-cgi.manpages create mode 100644 debian/nut-cgi.postinst create mode 100644 debian/nut-cgi.postrm create mode 100644 debian/nut-hal-drivers.docs create mode 100644 debian/nut-hal-drivers.install create mode 100644 debian/nut-hal-drivers.postinst create mode 100644 debian/nut-hal-drivers.preinst create mode 100644 debian/nut-powerman-pdu.install create mode 100644 debian/nut-powerman-pdu.manpages create mode 100644 debian/nut-snmp.install create mode 100644 debian/nut-snmp.lintian-overrides create mode 100644 debian/nut-snmp.manpages create mode 100644 debian/nut-xml.install create mode 100644 debian/nut-xml.manpages create mode 100644 debian/nut.README.Debian create mode 100644 debian/nut.TODO.Debian create mode 100644 debian/nut.dirs create mode 100644 debian/nut.docs create mode 100644 debian/nut.init create mode 100644 debian/nut.install create mode 100644 debian/nut.link create mode 100644 debian/nut.lintian-overrides create mode 100644 debian/nut.manpages create mode 100644 debian/nut.postinst create mode 100644 debian/nut.postrm create mode 100644 debian/nut.preinst create mode 100644 debian/nut.prerm create mode 100755 debian/rules create mode 100644 debian/watch diff --git a/debian/Makefile.am b/debian/Makefile.am new file mode 100644 index 0000000..031e44b --- /dev/null +++ b/debian/Makefile.am @@ -0,0 +1,8 @@ +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.init nut.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/debian/Makefile.in b/debian/Makefile.in new file mode 100644 index 0000000..aca9924 --- /dev/null +++ b/debian/Makefile.in @@ -0,0 +1,381 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = packaging/debian +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \ + $(top_srcdir)/m4/nut_arg_with.m4 \ + $(top_srcdir)/m4/nut_check_hiddev.m4 \ + $(top_srcdir)/m4/nut_check_ipv6.m4 \ + $(top_srcdir)/m4/nut_check_libgd.m4 \ + $(top_srcdir)/m4/nut_check_libhal.m4 \ + $(top_srcdir)/m4/nut_check_libneon.m4 \ + $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ + $(top_srcdir)/m4/nut_check_libssl.m4 \ + $(top_srcdir)/m4/nut_check_libusb.m4 \ + $(top_srcdir)/m4/nut_report_feature.m4 \ + $(top_srcdir)/m4/nut_type_socklen_t.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFPATH = @CONFPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ +DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ +DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GREP = @GREP@ +HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@ +HAL_FDI_PATH = @HAL_FDI_PATH@ +HAL_USER = @HAL_USER@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBGD_CFLAGS = @LIBGD_CFLAGS@ +LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ +LIBHAL_CFLAGS = @LIBHAL_CFLAGS@ +LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@ +LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ +LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@ +LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ +LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ +LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@ +LIBTOOL = @LIBTOOL@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@ +LINUX_HIDDEV = @LINUX_HIDDEV@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NETLIBS = @NETLIBS@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +RUN_AS_GROUP = @RUN_AS_GROUP@ +RUN_AS_USER = @RUN_AS_USER@ +SED = @SED@ +SERLIBS = @SERLIBS@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STATEPATH = @STATEPATH@ +STRIP = @STRIP@ +SUN_LIBUSB = @SUN_LIBUSB@ +VERSION = @VERSION@ +WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cgiexecdir = @cgiexecdir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +driverexecdir = @driverexecdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +hotplugdir = @hotplugdir@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +udevdir = @udevdir@ +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.init nut.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 + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packaging/debian/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu packaging/debian/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..914c006 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,1307 @@ +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/debian/compat b/debian/compat new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +6 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..2af1da2 --- /dev/null +++ b/debian/control @@ -0,0 +1,130 @@ +Source: nut +Section: admin +Priority: optional +Maintainer: Arnaud Quette +Build-Depends: debhelper (>= 7), autoconf, automake, libtool, libgd2-xpm-dev | libgd2-noxpm-dev, libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), libhal-dev (>= 0.5.8), hal, libdbus-1-dev, libdbus-glib-1-dev, libglib2.0-dev, libneon27-gnutls-dev | libneon26-gnutls-dev | libneon-dev | libneon27-dev | libneon26-dev, libpowerman0-dev (>= 2.3.3), libwrap0-dev (>= 7.6) +Standards-Version: 3.8.4 +Homepage: http://www.networkupstools.org +Vcs-Browser: http://svn.debian.org/wsvn/nut +Vcs-Svn: svn://svn.debian.org/nut/trunk + +Package: nut +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base (>= 3.0-6), ${udev} +Recommends: bash-completion +Suggests: nut-cgi, nut-snmp, nut-dev, nut-xml +Provides: ups-monitor, nut-doc, nut-usb +Conflicts: ups-monitor, nut-doc, nut-hal-drivers, nut-usb (<< 2.1.0-3), nut-dev (<< 2.2.2) +Replaces: nut-doc +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 NUT's core system, and the serial and USB UPS + drivers. In most cases it is sufficient for a basic UPS monitoring + system. + +Package: nut-cgi +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser +Recommends: apache | httpd +Suggests: nut +Replaces: nut (<< 1.1.11) +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. + +Package: nut-snmp +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, nut (>= 1.4.1-pre1) +Conflicts: nut (<= 1.4.0) +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-hal-drivers +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ${udev} +Conflicts: nut +Provides: hal-ups-support +Breaks: udev (<< 124-1) +Description: network UPS tools - HAL 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 add-ons for the hardware abstraction layer (HAL) that + allow desktop environments to monitor locally-connected UPS equipment. The + HAL drivers cannot be used at the same time as the normal NUT upsd. + +Package: nut-xml +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, nut (>= 2.2.2) +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 +Depends: ${shlibs:Depends}, ${misc:Depends}, nut (>= 2.4.0), 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: libupsclient1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +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: libupsclient1-dev +Section: libdevel +Architecture: any +Depends: libupsclient1 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Provides: nut-dev +Conflicts: nut-dev (<< 2.2.2) +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. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..418b4ae --- /dev/null +++ b/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 (C) 2008, Arnaud Quette and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff --git a/debian/description.subst b/debian/description.subst new file mode 100644 index 0000000..1ba1c3d --- /dev/null +++ b/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/debian/hotplug b/debian/hotplug new file mode 100644 index 0000000..36069fe --- /dev/null +++ b/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/debian/libupsclient1-dev.dirs b/debian/libupsclient1-dev.dirs new file mode 100644 index 0000000..502167f --- /dev/null +++ b/debian/libupsclient1-dev.dirs @@ -0,0 +1 @@ +/lib diff --git a/debian/libupsclient1-dev.install b/debian/libupsclient1-dev.install new file mode 100644 index 0000000..2eabfc9 --- /dev/null +++ b/debian/libupsclient1-dev.install @@ -0,0 +1,5 @@ +debian/tmp/lib/libupsclient.so +debian/tmp/lib/libupsclient.a +debian/tmp/lib/libupsclient.la +debian/tmp/usr/lib/pkgconfig/ +debian/tmp/usr/include diff --git a/debian/libupsclient1-dev.links b/debian/libupsclient1-dev.links new file mode 100644 index 0000000..107c217 --- /dev/null +++ b/debian/libupsclient1-dev.links @@ -0,0 +1 @@ +/lib/libupsclient.so.1.0.0 /usr/lib/libupsclient.so diff --git a/debian/libupsclient1-dev.manpages b/debian/libupsclient1-dev.manpages new file mode 100644 index 0000000..242943a --- /dev/null +++ b/debian/libupsclient1-dev.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man3/*.3 diff --git a/debian/libupsclient1.install b/debian/libupsclient1.install new file mode 100644 index 0000000..7ba3ff0 --- /dev/null +++ b/debian/libupsclient1.install @@ -0,0 +1 @@ +debian/tmp/lib/libupsclient.so.* diff --git a/debian/libupsclient1.postinst b/debian/libupsclient1.postinst new file mode 100644 index 0000000..b86f95b --- /dev/null +++ b/debian/libupsclient1.postinst @@ -0,0 +1,29 @@ +#!/bin/sh -e + +case "$1" in + + configure) + ldconfig + ;; + + abort-upgrade) + # do nothing + ;; + + abort-remove) + # do nothing + ;; + + abort-deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# + diff --git a/debian/libupsclient1.postrm b/debian/libupsclient1.postrm new file mode 100644 index 0000000..53a6b2d --- /dev/null +++ b/debian/libupsclient1.postrm @@ -0,0 +1,41 @@ +#!/bin/sh -e + +case "$1" in + + remove) + ldconfig + ;; + + 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# + diff --git a/debian/nut-cgi.README.Debian b/debian/nut-cgi.README.Debian new file mode 100644 index 0000000..0327717 --- /dev/null +++ b/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/debian/nut-cgi.docs b/debian/nut-cgi.docs new file mode 100644 index 0000000..80796c9 --- /dev/null +++ b/debian/nut-cgi.docs @@ -0,0 +1 @@ +data/html/README diff --git a/debian/nut-cgi.install b/debian/nut-cgi.install new file mode 100644 index 0000000..3dc88cc --- /dev/null +++ b/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/debian/nut-cgi.manpages b/debian/nut-cgi.manpages new file mode 100644 index 0000000..36a1449 --- /dev/null +++ b/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/debian/nut-cgi.postinst b/debian/nut-cgi.postinst new file mode 100644 index 0000000..e082532 --- /dev/null +++ b/debian/nut-cgi.postinst @@ -0,0 +1,55 @@ +#!/bin/sh -e + +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 [ -d /etc/nut/ ] ; then + chmod 755 /etc/nut + fi + + # 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/debian/nut-cgi.postrm b/debian/nut-cgi.postrm new file mode 100644 index 0000000..bdfecf0 --- /dev/null +++ b/debian/nut-cgi.postrm @@ -0,0 +1,46 @@ +#!/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# + diff --git a/debian/nut-hal-drivers.docs b/debian/nut-hal-drivers.docs new file mode 100644 index 0000000..78279fb --- /dev/null +++ b/debian/nut-hal-drivers.docs @@ -0,0 +1 @@ +docs/nut-hal.txt diff --git a/debian/nut-hal-drivers.install b/debian/nut-hal-drivers.install new file mode 100644 index 0000000..1ef47a2 --- /dev/null +++ b/debian/nut-hal-drivers.install @@ -0,0 +1,3 @@ +debian/tmp/lib/hal/ /usr/lib/ +debian/tmp/usr/share/hal +debian/tmp/*/udev/ diff --git a/debian/nut-hal-drivers.postinst b/debian/nut-hal-drivers.postinst new file mode 100644 index 0000000..414d5f3 --- /dev/null +++ b/debian/nut-hal-drivers.postinst @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +case "$1" in + + configure) + # ask udev to check for new udev rules + [ -x /etc/init.d/udev ] && pidof udevd > /dev/null \ + && udevadm trigger --action=change + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# diff --git a/debian/nut-hal-drivers.preinst b/debian/nut-hal-drivers.preinst new file mode 100644 index 0000000..2de4425 --- /dev/null +++ b/debian/nut-hal-drivers.preinst @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +if [ "$1" = install ] || [ "$1" = upgrade ]; then + # Remove previous rules if unchanged, otherwise move to new filename. + if [ -e "/etc/udev/rules.d/52_nut-usbups.rules" ]; then + if [ "`md5sum \"/etc/udev/rules.d/52_nut-usbups.rules\" | sed -e \"s/ .*//\"`" = \ + "`dpkg-query -W -f='${Conffiles}' nut-hal-drivers | sed -n -e \"\\\\' /etc/udev/rules.d/52_nut-usbups.rules's/.* //p\"`" ] + then + rm -f "/etc/udev/rules.d/52_nut-usbups.rules" + else + mv "/etc/udev/rules.d/52_nut-usbups.rules" "/etc/udev/rules.d/52-nut-usbups.rules" + fi + fi +fi + +#DEBHELPER# diff --git a/debian/nut-powerman-pdu.install b/debian/nut-powerman-pdu.install new file mode 100644 index 0000000..f0acaa4 --- /dev/null +++ b/debian/nut-powerman-pdu.install @@ -0,0 +1 @@ +debian/tmp/lib/nut/powerman-pdu diff --git a/debian/nut-powerman-pdu.manpages b/debian/nut-powerman-pdu.manpages new file mode 100644 index 0000000..43bbc81 --- /dev/null +++ b/debian/nut-powerman-pdu.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/powerman-pdu.8 diff --git a/debian/nut-snmp.install b/debian/nut-snmp.install new file mode 100644 index 0000000..02dee18 --- /dev/null +++ b/debian/nut-snmp.install @@ -0,0 +1 @@ +debian/tmp/lib/nut/snmp-ups diff --git a/debian/nut-snmp.lintian-overrides b/debian/nut-snmp.lintian-overrides new file mode 100644 index 0000000..24e3f05 --- /dev/null +++ b/debian/nut-snmp.lintian-overrides @@ -0,0 +1,6 @@ +# due to libnetsnmp.la overlinking on dependency_libs +# dpkg-shlibdeps: warning: dependency on libcrypto.so.0.9.8 could be avoided if +# "debian/nut-snmp/lib/nut/snmp-ups" were not uselessly linked against it (they +# use none of its symbols).. +# This will be cleanly solved upstream... +nut-snmp: possible-gpl-code-linked-with-openssl diff --git a/debian/nut-snmp.manpages b/debian/nut-snmp.manpages new file mode 100644 index 0000000..3c9644e --- /dev/null +++ b/debian/nut-snmp.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/snmp-ups.8 diff --git a/debian/nut-xml.install b/debian/nut-xml.install new file mode 100644 index 0000000..9c6d56d --- /dev/null +++ b/debian/nut-xml.install @@ -0,0 +1 @@ +debian/tmp/lib/nut/netxml-ups diff --git a/debian/nut-xml.manpages b/debian/nut-xml.manpages new file mode 100644 index 0000000..91a537e --- /dev/null +++ b/debian/nut-xml.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/netxml-ups.8 diff --git a/debian/nut.README.Debian b/debian/nut.README.Debian new file mode 100644 index 0000000..7ca7e60 --- /dev/null +++ b/debian/nut.README.Debian @@ -0,0 +1,155 @@ +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/52_nut-serialups.rules), placed + after 020_permissions.rules and to add 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 + 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 + Invoke '/etc/init.d/nut start' to start the daemon(s). Check + /var/log/syslog to ensure that upsd, appropriate drivers, and upsmon + 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/debian/nut.TODO.Debian b/debian/nut.TODO.Debian new file mode 100644 index 0000000..3a35bbc --- /dev/null +++ b/debian/nut.TODO.Debian @@ -0,0 +1,11 @@ +- address the /var/www issue with upstream +- rewrite and enhance the init script (log output, LSB, ...) +- audit and solve the lintian reports... +- factorise install rules (possibly use CDBS) +- consider an SSL/TLS set of packages (ie nut-ssl, ...) + or help the port to NSS +- apply when available the NUT Packaging Standard (NPS) + ie create a nut-client package +- install the device-recorder.sh script (with nut-client or nut-dev?) +- consider joining the powermgt effort: + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=55123 diff --git a/debian/nut.dirs b/debian/nut.dirs new file mode 100644 index 0000000..0082856 --- /dev/null +++ b/debian/nut.dirs @@ -0,0 +1,4 @@ +/etc/nut +/bin +/sbin +/var/lib/nut diff --git a/debian/nut.docs b/debian/nut.docs new file mode 100644 index 0000000..90f2328 --- /dev/null +++ b/debian/nut.docs @@ -0,0 +1,5 @@ +AUTHORS +MAINTAINERS +README +UPGRADING +docs diff --git a/debian/nut.init b/debian/nut.init new file mode 100644 index 0000000..50706ed --- /dev/null +++ b/debian/nut.init @@ -0,0 +1,204 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: nut +# Required-Start: $local_fs $syslog $network $remote_fs +# Required-Stop: $local_fs $syslog $network $remote_fs +# 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 +DESC="Network UPS Tools" +DEFAULT=/etc/default/nut +CONFIG=/etc/nut/nut.conf + +. /lib/lsb/init-functions + +# set upsd specific options. use "man upsd" for more info +UPSD_OPTIONS="" + +# set upsmon specific options. use "man upsmon" for more info +UPSMON_OPTIONS="" + +# Include defaults if available (transition period) +if [ -f $DEFAULT ] ; then + . $DEFAULT +fi + +# Include NUT nut.conf +if [ -f $CONFIG ] ; then + . $CONFIG +fi + +# 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 + +pid_dir=/var/run/nut +upsmon_pid=${pid_dir}/upsmon.pid +upsd_pid=${pid_dir}/upsd.pid +upsd=/sbin/upsd +upsdrvctl=/sbin/upsdrvctl +upsmon=/sbin/upsmon +log=">/dev/null 2>/dev/null" + +# 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} +} + +# check if the right components are running +check_status() { + case "$MODE" in + standalone|netserver) + status_of_proc -p $upsd_pid $upsd upsd + status_of_proc -p $upsmon_pid $upsmon upsmon + ;; + netclient) + status_of_proc -p $upsmon_pid $upsmon upsmon + ;; + none|*) + ;; + esac +} + +start_stop_server () { + case "$MODE" in + standalone|netserver) + case "$1" in + start) + ! $upsdrvctl start >/dev/null 2>&1 && \ + log_progress_msg "(driver(s) failed)" || log_progress_msg "driver(s)" + start-stop-daemon -S -q -p $upsd_pid -x $upsd \ + -- $UPSD_OPTIONS >/dev/null 2>&1 + ;; + stop) + start-stop-daemon -K -o -q -p $upsd_pid -n upsd >/dev/null 2>&1 + ! /sbin/upsdrvctl stop >/dev/null 2>&1 && \ + log_progress_msg "(driver(s) failed)" || log_progress_msg "driver(s)" + ;; + esac + ;; + none|netclient|*) + return 1 + ;; + esac +} + +start_stop_client () { + case "$MODE" in + standalone|netserver|netclient) + case "$1" in + start) + start-stop-daemon -S -q -p $upsmon_pid -x $upsmon \ + -- $UPSMON_OPTIONS >/dev/null 2>&1 + ;; + stop) + start-stop-daemon -K -o -q -p $upsmon_pid -n upsmon >/dev/null 2>&1 + ;; + esac + ;; + none|*) + 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) + flag=`sed -ne 's#^ *POWERDOWNFLAG *\(.*\)$#\1#p' /etc/nut/upsmon.conf` + wait_delay=`sed -ne 's#^ *POWEROFF_WAIT= *\(.*\)$#\1#p' /etc/nut/nut.conf` + if [ -f "$flag" ] ; then + if $upsmon -K >/dev/null 2>&1 ; then + log_daemon_msg "Shutting down the UPS ..." + sleep 1 + if $upsdrvctl shutdown ; then + 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 [ "$wait_delay" ] ; then + log_daemon_msg " (will reboot after $wait_delay) ..." + sleep "$wait_delay" + invoke-rc.d reboot stop + fi + else + log_daemon_msg "Power down flag is not set (UPS shutdown not needed)" + fi + else + if [ -z "$flag" ] ; then + log_daemon_msg "##########################################################" + log_progress_msg "## POWERDOWNFLAG is not defined in /etc/nut/upsmon.conf ##" + log_progress_msg "## ##" + log_progress_msg "## Please read the Manual page upsmon.conf(5) ##" + log_progress_msg "##########################################################" + log_end_msg 0 + fi + fi + ;; + + *) + 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/debian/nut.install b/debian/nut.install new file mode 100644 index 0000000..ad72c3c --- /dev/null +++ b/debian/nut.install @@ -0,0 +1,56 @@ +debian/tmp/bin/upslog +debian/tmp/bin/upsc +debian/tmp/bin/upsrw +debian/tmp/bin/upscmd +debian/tmp/sbin/ +debian/tmp/usr/share/nut/cmdvartab +debian/tmp/usr/share/nut/driver.list +debian/tmp/*/udev/ +debian/tmp/etc/nut/nut.conf +debian/tmp/etc/nut/ups.conf +debian/tmp/etc/nut/upsd.conf +debian/tmp/etc/nut/upsd.users +debian/tmp/etc/nut/upsmon.conf +debian/tmp/etc/nut/upssched.conf +debian/tmp/etc/bash_completion.d/nut +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/belkin +debian/tmp/lib/nut/blazer_ser +debian/tmp/lib/nut/blazer_usb +debian/tmp/lib/nut/clone +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/newmge-shut +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/megatec_usb +debian/tmp/lib/nut/upsdrvctl /sbin +debian/tmp/lib/nut/megatec +debian/tmp/lib/nut/everups +debian/tmp/lib/nut/dummy-ups diff --git a/debian/nut.link b/debian/nut.link new file mode 100644 index 0000000..8453f4f --- /dev/null +++ b/debian/nut.link @@ -0,0 +1,2 @@ +etc/init.d/nut etc/init.d/ups-monitor + diff --git a/debian/nut.lintian-overrides b/debian/nut.lintian-overrides new file mode 100644 index 0000000..432491d --- /dev/null +++ b/debian/nut.lintian-overrides @@ -0,0 +1,2 @@ +nut: script-in-etc-init.d-not-registered-via-update-rc.d + diff --git a/debian/nut.manpages b/debian/nut.manpages new file mode 100644 index 0000000..a377aa9 --- /dev/null +++ b/debian/nut.manpages @@ -0,0 +1,51 @@ +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/man5/upsmon.conf.5 +debian/tmp/usr/share/man/man5/upssched.conf.5 +debian/tmp/usr/share/man/man8/apcsmart.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/blazer.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/liebert.8 +debian/tmp/usr/share/man/man8/masterguard.8 +debian/tmp/usr/share/man/man8/megatec.8 +debian/tmp/usr/share/man/man8/megatec_usb.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/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/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/upsc.8 +debian/tmp/usr/share/man/man8/upscmd.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/upslog.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/man8/usbhid-ups.8 +debian/tmp/usr/share/man/man8/victronups.8 diff --git a/debian/nut.postinst b/debian/nut.postinst new file mode 100644 index 0000000..55d88cb --- /dev/null +++ b/debian/nut.postinst @@ -0,0 +1,136 @@ +#!/bin/sh -e + +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 + + # make sure that conffiles are secured and have the correct ownerships + if [ -d /etc/nut/ ] ; then + chown root:nut /etc/nut/ + fi + for file in nut.conf ups.conf upsd.conf upsmon.conf upsd.users upssched.conf ; do + if [ -f /etc/nut/$file ] ; then + chown root:nut /etc/nut/$file + chmod 640 /etc/nut/$file + fi + done + + # make sure that /var/run/nut exists and has the correct ownerships + if [ ! -d /var/run/nut ] ; then + mkdir -p /var/run/nut + fi + if [ -d /var/run/nut ] ; then + chown root:nut /var/run/nut + chmod 770 /var/run/nut + 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 --action=change + + # 557178 udevadm trigger --subsystem-match=usb + + # migrate /etc/default/nut to /etc/nut/nut.conf (part #2) + if dpkg --compare-versions "$2" lt-nl "2.4.1-2" ; then + # source the temporary /etc/default/nut.bak file + if [ -f /etc/default/nut.bak ] ; then + . /etc/default/nut.bak + + # FIXME: use a template (and debconf to output?) + echo "migrating /etc/default/nut to /etc/nut/nut.conf" + + # pre process the config + case "$START_UPSD" in + y|Y|yes|YES|Yes) + START_UPSD=yes + ;; + *) + START_UPSD=no + ;; + esac + case "$START_UPSMON" in + y|Y|yes|YES|Yes) + START_UPSMON=yes + ;; + *) + START_UPSMON=no + ;; + esac + + # now process the result + if [ "x$START_UPSD" = "xyes" ] ; then + if [ "x$START_UPSMON" = "xyes" ] ; then + # can also be netserver + NUT_MODE=standalone + #else not processed since it should be an error! + fi + else + if [ "x$START_UPSMON" = "xyes" ] ; then + NUT_MODE=netclient + else + NUT_MODE=none + fi + fi + + # output back the MODE to nut.conf + sed "s/^MODE\(.*\)/MODE=$NUT_MODE/" /etc/nut/nut.conf > /etc/nut/nut.conf.new + + # append the content of default, removing START_* / start... + grep -iv 'START' /etc/default/nut.bak >> /etc/nut/nut.conf.new + # move back to nut.conf + mv /etc/nut/nut.conf.new /etc/nut/nut.conf + # and to init.d/nut + #if [ -f /etc/init.d/nut ] ; then + # sed "s/^UPSD_OPTIONS\(.*\)/UPSD_OPTIONS=\"$UPSD_OPTIONS\"/" /etc/init.d/nut > /etc/init.d/nut.new + # sed "s/^UPSMON_OPTIONS\(.*\)/UPSMON_OPTIONS=\"$UPSMON_OPTIONS\"/" /etc/init.d/nut.new > /etc/init.d/nut + #fi + rm -f /etc/default/nut.bak /etc/default/nut + fi + else + # re process nut.conf MODE so that it can be sourced + NUT_MODE=`grep -e '^ *MODE' /etc/nut/nut.conf | tr -d " "` + sed "s/^ *MODE.*/$NUT_MODE/" /etc/nut/nut.conf > /etc/nut/nut.conf.new + mv /etc/nut/nut.conf.new /etc/nut/nut.conf + fi + ;; + + abort-upgrade) + # do nothing + ;; + + abort-remove) + # do nothing + ;; + + abort-deconfigure) + # do nothing + ;; + + *) + echo "$0: incorrect arguments: $*" >&2 + exit 1 + ;; + +esac + +#DEBHELPER# diff --git a/debian/nut.postrm b/debian/nut.postrm new file mode 100644 index 0000000..385c39f --- /dev/null +++ b/debian/nut.postrm @@ -0,0 +1,53 @@ +#!/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 + # remove the nut user + if getent passwd nut >/dev/null; then + deluser --quiet nut + fi + # 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# + diff --git a/debian/nut.preinst b/debian/nut.preinst new file mode 100644 index 0000000..9999abe --- /dev/null +++ b/debian/nut.preinst @@ -0,0 +1,26 @@ +#!/bin/sh -e + +if [ "$1" = upgrade ]; then + # remove the obsolete udev file + [ -f /etc/udev/rules.d/025_nut-usbups.rules ] && rm -f /etc/udev/rules.d/025_nut-usbups.rules + + # Remove previous rules if unchanged, otherwise move to new filename. + if [ -e "/etc/udev/rules.d/52_nut-usbups.rules" ]; then + if [ "`md5sum \"/etc/udev/rules.d/52_nut-usbups.rules\" | sed -e \"s/ .*//\"`" = \ + "`dpkg-query -W -f='${Conffiles}' nut | sed -n -e \"\\\\' /etc/udev/rules.d/52_nut-usbups.rules's/.* //p\"`" ] + then + rm -f "/etc/udev/rules.d/52_nut-usbups.rules" + else + mv "/etc/udev/rules.d/52_nut-usbups.rules" "/etc/udev/rules.d/52-nut-usbups.rules" + fi + fi + + # migrate /etc/default/nut to /etc/nut/nut.conf (part #1) + # we need to do this before default gets trashed + if [ -f /etc/default/nut ] ; then + # backup /etc/default/nut + cp /etc/default/nut /etc/default/nut.bak + fi +fi + +#DEBHELPER# diff --git a/debian/nut.prerm b/debian/nut.prerm new file mode 100644 index 0000000..2c9c2e1 --- /dev/null +++ b/debian/nut.prerm @@ -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) + # 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 daemon on remove + invoke-rc.d nut stop && sleep 1 + [ -d /var/run/nut ] && rm -f /var/run/nut/*.pid + ;; + + 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/debian/rules b/debian/rules new file mode 100755 index 0000000..f7373d6 --- /dev/null +++ b/debian/rules @@ -0,0 +1,138 @@ +#!/usr/bin/make -f + +#export DH_VERBOSE=1 +export DH_OPTIONS= + +DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) +CFLAGS+=$(if $(findstring debug,$(DEB_BUILD_OPTIONS)),-g) +CFLAGS+=$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),-O0,-O2) +CONFIGUREFLAGS+=$(if $(findstring nostrip,$(DEB_BUILD_OPTIONS)),,--enable-strip) +CONFIGUREFLAGS+=--build=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +CONFIGUREFLAGS+=--host=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +CONFIGUREFLAGS+=$(if $(wildcard /usr/include/linux/hiddev.h),--with-linux-hiddev=/usr/include/linux/hiddev.h,--without-linux-hiddev) +ifeq (linux,$(DEB_HOST_ARCH_OS)) + CONFIGUREFLAGS+=--with-udev-dir=/lib/udev +endif + +configure: patch configure-stamp +configure-stamp: + dh_testdir + CFLAGS='$(CFLAGS)' ./configure $(CONFIGUREFLAGS) \ + --prefix=/usr \ + --exec-prefix=/ \ + --sysconfdir=/etc/nut \ + --mandir=/usr/share/man \ + --libdir=/lib \ + --includedir=/usr/include \ + --without-ssl \ + --with-hal \ + --with-cgi \ + --with-dev \ + --enable-static \ + --with-statepath=/var/run/nut \ + --with-altpidpath=/var/run/nut \ + --with-drvpath=/lib/nut \ + --with-cgipath=/usr/lib/cgi-bin/nut \ + --with-htmlpath=/usr/share/nut/www \ + --with-pidpath=/var/run/nut \ + --datadir=/usr/share/nut \ + --with-pkgconfig-dir=/usr/lib/pkgconfig \ + --with-user=nut --with-group=nut + touch $@ + +build: configure +build: build-stamp +build-stamp: + dh_testdir + $(MAKE) + touch $@ + +clean: clean-patched unpatch +clean-patched: + dh_testdir + dh_testroot + rm -f configure-stamp build-stamp install-stamp + [ ! -f Makefile ] || $(MAKE) distclean + dh_clean +# debconf-updatepo +# -test -r /usr/share/misc/config.sub && \ +# cp -f /usr/share/misc/config.sub config.sub +# -test -r /usr/share/misc/config.guess && \ +# cp -f /usr/share/misc/config.guess config.guess + +patch: patch-stamp +patch-stamp: +# dpatch apply-all +# touch $@ + # run autoreconf for dpatch +# autoreconf + +unpatch: +# dpatch deapply-all +# rm -rf patch-stamp debian/patched + +uninstall: + dh_testdir + dh_testroot + rm -f install-stamp + dh_prep + +install: build +install: install-stamp +install-stamp: DH_OPTIONS= +install-stamp: + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + $(MAKE) install \ + DESTDIR=$(CURDIR)/debian/tmp RUNUID=65534 RUNGID=65534 + + # install the bash completion script + mkdir -p $(CURDIR)/debian/tmp/etc/bash_completion.d + cp $(CURDIR)/scripts/misc/nut.bash_completion \ + $(CURDIR)/debian/tmp/etc/bash_completion.d/nut + + # 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 + + dh_installchangelogs ChangeLog + dh_installinit -- start 50 2 3 4 5 . stop 50 0 1 6 . + dh_install + dh_installman + dh_installdocs -XMakefile + dh_link + touch $@ + +binary-indep: DH_OPTIONS=-i +binary-indep: install + +binary-arch: DH_OPTIONS=-a +binary-arch: install + dh_testdir + dh_testroot +# dh_installdebconf + dh_strip + dh_compress + dh_fixperms + dh_makeshlibs + dh_lintian -pnut + dh_installdeb + dh_shlibdeps +# dh_shlibdeps -Xlibupsclient.a +ifeq (linux,$(DEB_HOST_ARCH_OS)) + dh_gencontrol -- -Vudev="udev (>= 0.124-1)" +# for Ubuntu +# dh_gencontrol -- -Vudev="udev (>= 136-1)" +else + dh_gencontrol -- -Vudev="" +endif + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary configure install uninstall patch unpatch diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..68b0632 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://www.networkupstools.org/source/2.4/nut-(.*)\.tar\.gz debian uupdate