Merge remote-tracking branch 'origin/debian-jessie' into debian
This commit is contained in:
commit
cf7db8a9f1
14 changed files with 214 additions and 8 deletions
13
debian/NEWS
vendored
13
debian/NEWS
vendored
|
@ -1,3 +1,16 @@
|
|||
nut (2.7.2-2) unstable; urgency=medium
|
||||
|
||||
Since version 1.2 NUT-Monitor uses safer directory permissions when
|
||||
creating ~/.nut-monitor.
|
||||
|
||||
NUT-Monitor will now detect a pre-1.2 settings directory on startup
|
||||
and update its permissions.
|
||||
|
||||
Please note that passwords stored in NUT-Monitor prior to this change
|
||||
may have been exposed, and it is recommended that they be reset.
|
||||
|
||||
-- Michael Fincham <michael.fincham@catalyst.net.nz> Fri, 13 Feb 2015 11:57:12 +1300
|
||||
|
||||
nut (2.6.5-1) experimental; urgency=low
|
||||
|
||||
mge-shut driver has been replaced by a new implementation (newmge-shut).
|
||||
|
|
43
debian/changelog
vendored
43
debian/changelog
vendored
|
@ -2,11 +2,6 @@ nut (2.7.3-1) UNRELEASED; urgency=low
|
|||
|
||||
* New upstream release
|
||||
* debian/patches/series: remove 0007-killpower-path.patch
|
||||
|
||||
-- Arnaud Quette <aquette@debian.org> Thu, 30 Apr 2015 15:56:50 +0200
|
||||
|
||||
nut (2.7.2-2) UNRELEASED; urgency=low
|
||||
|
||||
* debian/control: add new packages libnutclient0 and libnutclient-dev
|
||||
* debian/rules: adapted for the new packages
|
||||
* debian/libnutclient0.install, debian/libnutclient0.symbols,
|
||||
|
@ -15,6 +10,44 @@ nut (2.7.2-2) UNRELEASED; urgency=low
|
|||
|
||||
-- Arnaud Quette <aquette@debian.org> Mon, 20 Oct 2014 20:41:47 +0200
|
||||
|
||||
nut (2.7.2-4) unstable; urgency=medium
|
||||
|
||||
* Really fix package initial installation when PID1 is systemd (Closes:
|
||||
#747863)
|
||||
|
||||
-- Laurent Bigonville <bigon@debian.org> Fri, 20 Mar 2015 23:12:53 +0100
|
||||
|
||||
nut (2.7.2-3) unstable; urgency=medium
|
||||
|
||||
* debian/NEWS: Fix NEWS file syntax
|
||||
|
||||
-- Laurent Bigonville <bigon@debian.org> Tue, 17 Feb 2015 23:13:02 +0100
|
||||
|
||||
nut (2.7.2-2) unstable; urgency=medium
|
||||
|
||||
[ Laurent Bigonville ]
|
||||
* debian/gbp.conf: Switch to debian-jessie branch
|
||||
* debian/rules: Revert the changes made in the previous NMU, I don't think
|
||||
that dropping the .service file that late in the release cycle is a good
|
||||
idea and anyway this was causing left-over files on upgrade.
|
||||
* Add wrappers that check the MODE in /etc/nut/nut.conf to avoid starting
|
||||
the daemons if nut is not configured (Closes: #747863).
|
||||
|
||||
[ Michael Fincham ]
|
||||
* Add patch that detects and corrects unsafe permissions on ~/.nut-monitor
|
||||
left over from old installations during NUT-Monitor startup.
|
||||
(Closes: #777706)
|
||||
|
||||
-- Laurent Bigonville <bigon@debian.org> Tue, 17 Feb 2015 09:54:11 +0100
|
||||
|
||||
nut (2.7.2-1.1) unstable; urgency=medium
|
||||
|
||||
* Non-maintainer upload.
|
||||
* Port Ubuntu change to drop upstream systemd unit files to allow
|
||||
sysvinit files for Jessie. (Closes: #747863)
|
||||
|
||||
-- Neil Williams <codehelp@debian.org> Sat, 17 Jan 2015 10:29:11 +0000
|
||||
|
||||
nut (2.7.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
|
2
debian/gbp.conf
vendored
2
debian/gbp.conf
vendored
|
@ -1,5 +1,5 @@
|
|||
[DEFAULT]
|
||||
debian-branch = debian
|
||||
debian-branch = debian-jessie
|
||||
upstream-branch = upstream
|
||||
pristine-tar = True
|
||||
|
||||
|
|
19
debian/local/upsd
vendored
Executable file
19
debian/local/upsd
vendored
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Include NUT nut.conf
|
||||
[ -r /etc/nut/nut.conf ] && . /etc/nut/nut.conf
|
||||
|
||||
case "$MODE" in
|
||||
standalone|netserver)
|
||||
exec /lib/nut/upsd "$@"
|
||||
;;
|
||||
none|netclient)
|
||||
echo "upsd disabled, please adjust the configuration to your needs"
|
||||
echo "Then set MODE to a suitable value in /etc/nut/nut.conf to enable it"
|
||||
# exit success to avoid breaking the install process!
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
19
debian/local/upsmon
vendored
Executable file
19
debian/local/upsmon
vendored
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Include NUT nut.conf
|
||||
[ -r /etc/nut/nut.conf ] && . /etc/nut/nut.conf
|
||||
|
||||
case "$MODE" in
|
||||
standalone|netserver|netclient)
|
||||
exec /lib/nut/upsmon "$@"
|
||||
;;
|
||||
none)
|
||||
echo "upsmon disabled, please adjust the configuration to your needs"
|
||||
echo "Then set MODE to a suitable value in /etc/nut/nut.conf to enable it"
|
||||
# exit success to avoid breaking the install process!
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
1
debian/nut-client.install
vendored
1
debian/nut-client.install
vendored
|
@ -3,6 +3,7 @@ debian/tmp/bin/upsc
|
|||
debian/tmp/bin/upsrw
|
||||
debian/tmp/bin/upscmd
|
||||
debian/tmp/sbin/upsmon
|
||||
debian/tmp/lib/nut/upsmon
|
||||
debian/tmp/sbin/upssched
|
||||
debian/tmp/bin/upssched-cmd
|
||||
debian/tmp/etc/nut/nut.conf
|
||||
|
|
11
debian/nut-client.postinst
vendored
11
debian/nut-client.postinst
vendored
|
@ -1,5 +1,16 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
handle_start_failure () {
|
||||
# The nut client part (upsmon) must run in all cases except when MODE in
|
||||
# /etc/nut/nut.conf is set to "none" or not set at all.
|
||||
[ -r /etc/nut/nut.conf ] && . /etc/nut/nut.conf
|
||||
if [ -d /run/systemd/system ] && [ "$MODE" = "none" -o -z "$MODE" ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
||||
configure)
|
||||
|
|
13
debian/nut-client.prerm
vendored
Normal file
13
debian/nut-client.prerm
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
handle_start_failure () {
|
||||
# The MODE defined in /etc/nut/nut.conf shouldn't affect the exit code when the
|
||||
# daemon is stopped. If it fails to stop, the maintainer script should fail
|
||||
# too.
|
||||
return 1
|
||||
}
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
1
debian/nut-server.install
vendored
1
debian/nut-server.install
vendored
|
@ -1,4 +1,5 @@
|
|||
debian/tmp/sbin/upsd
|
||||
debian/tmp/lib/nut/upsd
|
||||
debian/tmp/sbin/upsdrvctl
|
||||
debian/tmp/usr/share/nut/cmdvartab
|
||||
debian/tmp/usr/share/nut/driver.list
|
||||
|
|
13
debian/nut-server.postinst
vendored
13
debian/nut-server.postinst
vendored
|
@ -1,5 +1,18 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
handle_start_failure () {
|
||||
# The nut server part (upsd) must run in all cases except when MODE in
|
||||
# /etc/nut/nut.conf is set to "none", not set at all or if the machine is a
|
||||
# client.
|
||||
[ -r /etc/nut/nut.conf ] && . /etc/nut/nut.conf
|
||||
if [ -d /run/systemd/system ] \
|
||||
&& [ "$MODE" = "none" -o "$MODE" = "netclient" -o -z "$MODE" ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
||||
configure)
|
||||
|
|
7
debian/nut-server.prerm
vendored
7
debian/nut-server.prerm
vendored
|
@ -4,6 +4,13 @@
|
|||
# because we don't want the daemon to be
|
||||
# stopped during an upgrade
|
||||
|
||||
handle_start_failure () {
|
||||
# The MODE defined in /etc/nut/nut.conf shouldn't affect the exit code when the
|
||||
# daemon is stopped. If it fails to stop, the maintainer script should fail
|
||||
# too.
|
||||
return 1
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
||||
remove)
|
||||
|
|
69
debian/patches/0009-fix-favorites-permissions.patch
vendored
Normal file
69
debian/patches/0009-fix-favorites-permissions.patch
vendored
Normal file
|
@ -0,0 +1,69 @@
|
|||
If a ~/.nut-monitor directory is found with insecure permissions, change them to 0700.
|
||||
--- a/scripts/python/app/NUT-Monitor
|
||||
+++ b/scripts/python/app/NUT-Monitor
|
||||
@@ -29,6 +29,7 @@
|
||||
import sys
|
||||
import base64
|
||||
import os, os.path
|
||||
+import stat
|
||||
import platform
|
||||
import time
|
||||
import threading
|
||||
@@ -44,21 +45,23 @@
|
||||
|
||||
class interface :
|
||||
|
||||
- __widgets = {}
|
||||
- __callbacks = {}
|
||||
- __favorites = {}
|
||||
- __favorites_file = None
|
||||
- __favorites_path = ""
|
||||
- __fav_menu_items = list()
|
||||
- __window_visible = True
|
||||
- __glade_file = None
|
||||
- __connected = False
|
||||
- __ups_handler = None
|
||||
- __ups_commands = None
|
||||
- __ups_vars = None
|
||||
- __ups_rw_vars = None
|
||||
- __gui_thread = None
|
||||
- __current_ups = None
|
||||
+ DESIRED_FAVORITES_DIRECTORY_MODE = 0700
|
||||
+
|
||||
+ __widgets = {}
|
||||
+ __callbacks = {}
|
||||
+ __favorites = {}
|
||||
+ __favorites_file = None
|
||||
+ __favorites_path = ""
|
||||
+ __fav_menu_items = list()
|
||||
+ __window_visible = True
|
||||
+ __glade_file = None
|
||||
+ __connected = False
|
||||
+ __ups_handler = None
|
||||
+ __ups_commands = None
|
||||
+ __ups_vars = None
|
||||
+ __ups_rw_vars = None
|
||||
+ __gui_thread = None
|
||||
+ __current_ups = None
|
||||
|
||||
def __init__( self ) :
|
||||
|
||||
@@ -528,6 +531,9 @@
|
||||
return
|
||||
|
||||
try :
|
||||
+ if ( not stat.S_IMODE( os.stat( self.__favorites_path ).st_mode ) == self.DESIRED_FAVORITES_DIRECTORY_MODE ) : # unsafe pre-1.2 directory found
|
||||
+ os.chmod( self.__favorites_path, self.DESIRED_FAVORITES_DIRECTORY_MODE )
|
||||
+
|
||||
conf = ConfigParser.ConfigParser()
|
||||
conf.read( self.__favorites_file )
|
||||
for current in conf.sections() :
|
||||
@@ -573,7 +579,7 @@
|
||||
# If path does not exists, try to create it
|
||||
if ( not os.path.exists( self.__favorites_file ) ) :
|
||||
try :
|
||||
- os.makedirs( self.__favorites_path, mode=0700 )
|
||||
+ os.makedirs( self.__favorites_path, mode=self.DESIRED_FAVORITES_DIRECTORY_MODE )
|
||||
except :
|
||||
self.gui_status_message( _("Error while creating configuration folder (%s)") % sys.exc_info()[1] )
|
||||
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
|
@ -3,3 +3,4 @@
|
|||
0004-fix-systemd-service.patch
|
||||
0006-ups-conf-maxretry.patch
|
||||
0008-drop-w3c-icons.patch
|
||||
0009-fix-favorites-permissions.patch
|
||||
|
|
10
debian/rules
vendored
10
debian/rules
vendored
|
@ -82,6 +82,12 @@ common-install-arch::
|
|||
ln -s /lib/$(DEB_HOST_MULTIARCH)/libnutclient.so.0 \
|
||||
$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libnutclient.so
|
||||
|
||||
# Move daemons and install wrappers
|
||||
mv $(CURDIR)/debian/tmp/sbin/upsmon $(CURDIR)/debian/tmp/lib/nut/upsmon
|
||||
mv $(CURDIR)/debian/tmp/sbin/upsd $(CURDIR)/debian/tmp/lib/nut/upsd
|
||||
install -m 0755 debian/local/upsmon $(CURDIR)/debian/tmp/sbin/upsmon
|
||||
install -m 0755 debian/local/upsd $(CURDIR)/debian/tmp/sbin/upsd
|
||||
|
||||
# Install systemd files only on systems where it's supported
|
||||
ifeq (linux,$(DEB_HOST_ARCH_OS))
|
||||
install -m 644 -D $(CURDIR)/debian/tmp/lib/$(DEB_HOST_MULTIARCH)/systemd/system/nut-monitor.service \
|
||||
|
@ -118,8 +124,8 @@ common-install-indep::
|
|||
binary-install/nut-monitor::
|
||||
dh_python2 -pnut-monitor
|
||||
|
||||
DEB_DH_INSTALLINIT_ARGS_nut-server := --init-script=nut-server --restart-after-upgrade
|
||||
DEB_DH_INSTALLINIT_ARGS_nut-client := --init-script=nut-client --restart-after-upgrade
|
||||
DEB_DH_INSTALLINIT_ARGS_nut-server := --init-script=nut-server --restart-after-upgrade --error-handler=handle_start_failure
|
||||
DEB_DH_INSTALLINIT_ARGS_nut-client := --init-script=nut-client --restart-after-upgrade --error-handler=handle_start_failure
|
||||
DEB_DH_SYSTEMD_START_ARGS_nut-server := --restart-after-upgrade
|
||||
DEB_DH_SYSTEMD_START_ARGS_nut-client := --restart-after-upgrade
|
||||
DEB_DH_COMPRESS_ARGS_nut-doc := -X.pdf
|
||||
|
|
Loading…
Reference in a new issue