debian/0000755000000000000000000000000011702345547007176 5ustar debian/patches/0000755000000000000000000000000011702345547010625 5ustar debian/patches/0009-Make-notification-window-resizable.patch0000644000000000000000000000463711702345547021072 0ustar From: Chow Loong Jin Date: Mon, 9 Jan 2012 00:52:43 +0800 Subject: Make notification window resizable Also drop default width/height, as it is too big, and allow expander to resize the toplevel window when collapsing. Closes: #374719 --- src/smart_notifier/smart-notifier.xml | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/src/smart_notifier/smart-notifier.xml b/src/smart_notifier/smart-notifier.xml index 5df2a92..552918d 100644 --- a/src/smart_notifier/smart-notifier.xml +++ b/src/smart_notifier/smart-notifier.xml @@ -26,9 +26,6 @@ False GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK Hard Disk Health Warning - False - 600 - 480 False @@ -100,6 +97,7 @@ True GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK + True 300 -- debian/patches/0007-Switch-to-GtkBuilder.patch0000644000000000000000000003145011702345547016150 0ustar From: Chow Loong Jin Date: Sun, 8 Jan 2012 22:24:05 +0800 Subject: Switch to GtkBuilder --- setup.py | 2 +- src/smart_notifier/gui.py | 14 ++-- src/smart_notifier/smart-notifier.xml | 127 +++++++++++++++++++++++++++++++++ 3 files changed, 135 insertions(+), 8 deletions(-) create mode 100644 src/smart_notifier/smart-notifier.xml diff --git a/setup.py b/setup.py index 15e24b3..44bf102 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ guaranteed. At best this package is an extra layer of protection. maintainer_email="jinty@web.de", platforms=["any"], package_dir={'': 'src'}, - package_data={'': ['*.glade', '*.txt']}, + package_data={'': ['*.xml', '*.txt']}, scripts=['scripts/smart-notifier'], packages=find_packages('src'), zip_safe=False, diff --git a/src/smart_notifier/gui.py b/src/smart_notifier/gui.py index b273839..cc7a8a6 100644 --- a/src/smart_notifier/gui.py +++ b/src/smart_notifier/gui.py @@ -21,26 +21,26 @@ import os import smart_notifier import gtk # bletch, gtk import can fail if we do not have a GUI -import gtk.glade here = os.path.dirname(__file__) -# Paths to glade files -warning_window = os.path.join(here, 'smart-notifier.glade') + +warning_window = os.path.join(here, 'smart-notifier.xml') def warn_user(msg): #Make the window - ui = gtk.glade.XML(warning_window) + ui = gtk.Builder() + ui.add_from_file(warning_window) #self.ui.signal_connect('end', gtk.main_quit) #Customize message textbuffer = gtk.TextBuffer() textbuffer.set_text(msg) - textbox = ui.get_widget('textview1') + textbox = ui.get_object('textview1') textbox.set_buffer(textbuffer) # Fix the icon size XXX -- this is temporary intil gazpacho works - icon = ui.get_widget('image1') + icon = ui.get_object('image1') icon.set_from_stock(gtk.STOCK_DIALOG_WARNING, gtk.ICON_SIZE_DIALOG) # Showit - window = ui.get_widget('window1') + window = ui.get_object('window1') window.show_all() def service(): diff --git a/src/smart_notifier/smart-notifier.xml b/src/smart_notifier/smart-notifier.xml new file mode 100644 index 0000000..5df2a92 --- /dev/null +++ b/src/smart_notifier/smart-notifier.xml @@ -0,0 +1,127 @@ + + + + + + False + GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK + Hard Disk Health Warning + False + 600 + 480 + + + False + GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK + 6 + + + False + GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK + + + False + GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK + gtk-dialog-warning + + + False + False + 0 + + + + + False + GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK + + + False + GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK + <big><b>Hard Disk Health Warning</b></big> + True + + + False + True + 6 + 0 + + + + + False + GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK + The hard disk health status has changed. This could mean that hard drive failure is imminent. It is always a good idea to have up to date backups. + center + True + + + False + True + 1 + + + + + True + False + 1 + + + + + False + False + 0 + + + + + True + GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK + + + 300 + True + GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK + + + True + GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK | GDK_BUTTON2_MOTION_MASK | GDK_BUTTON3_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_SUBSTRUCTURE_MASK | GDK_SCROLL_MASK + + + + + + + True + True + 6 + 1 + + + + + + -- debian/patches/0004-Don-t-capitalize-false-in-.desktop-file.patch0000644000000000000000000000116511702345547021474 0ustar From: Barry deFreese Date: Thu, 5 Jan 2012 05:49:36 +0800 Subject: Don't capitalize false in .desktop file Closes: #512684, #550993 --- config/smart-notifier.desktop | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/config/smart-notifier.desktop b/config/smart-notifier.desktop index 85aa41d..eef5290 100644 --- a/config/smart-notifier.desktop +++ b/config/smart-notifier.desktop @@ -4,6 +4,6 @@ Name=Smart Notifier Comment=Hard drive health status notifier TryExec=/usr/bin/smart-notifier Exec=smart-notifier -Terminal=False +Terminal=false Type=Application Categories= -- debian/patches/0006-Use-positional-parameters-in-add_signal_receiver.patch0000644000000000000000000000237011702345547023662 0ustar From: Chow Loong Jin Date: Sun, 8 Jan 2012 22:10:58 +0800 Subject: Use positional parameters in add_signal_receiver() named_service was deprecated, and judging by the warning from dbus, calling the function using named parameters is not supported. Closes: #545265 --- src/smart_notifier/gui.py | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/smart_notifier/gui.py b/src/smart_notifier/gui.py index 3eac80f..b273839 100644 --- a/src/smart_notifier/gui.py +++ b/src/smart_notifier/gui.py @@ -45,8 +45,8 @@ def warn_user(msg): def service(): smart_notifier.BUS.add_signal_receiver(warn_user, - signal_name='warn_user', - dbus_interface=smart_notifier.UD_INTERFACE, - named_service=smart_notifier.SERVICE_NAME, - path=smart_notifier.UD_SERVICE) + 'warn_user', + smart_notifier.UD_INTERFACE, + smart_notifier.SERVICE_NAME, + smart_notifier.UD_SERVICE) gtk.main() -- debian/patches/0003-Use-one-smart_notify-directory.patch0000644000000000000000000000166511702345547020267 0ustar From: Simon McVittie Date: Thu, 5 Jan 2012 05:45:22 +0800 Subject: Use one smart_notify directory Instead of installing one copy of smart_notify for every python version, only install one copy for all --- scripts/smart-notifier | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/scripts/smart-notifier b/scripts/smart-notifier index ec7c1ed..987e46f 100644 --- a/scripts/smart-notifier +++ b/scripts/smart-notifier @@ -2,12 +2,9 @@ import sys -# which python version are we using, the hash-bang abouve might be munged by setuptools -version = '%s.%s' % (sys.version_info[0], sys.version_info[1]) - # get a path to our private module, and make sure it overrides # all other paths (This is probably Debian specific) -sys.path.insert(0, '/usr/share/smart-notifier/lib/python%s' % version) +sys.path.insert(0, '/usr/share/smart-notifier') if '--notify' in sys.argv: import smart_notifier -- debian/patches/0001-Audit-the-D-Bus-security-policy-file.patch0000644000000000000000000000245611702345547021046 0ustar From: Simon McVittie Date: Thu, 5 Jan 2012 05:41:36 +0800 Subject: Audit the D-Bus security policy file Audit the D-Bus security policy file for compatibility with D-Bus versions where CVE-2008-4311 has been fixed, and remove rules that appear to have been cargo-culted from some other package and are likely to cause unintended consequences for other packages (see freedesktop.org #18961). --- config/smart-notifier.conf | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/config/smart-notifier.conf b/config/smart-notifier.conf index 922da54..4185373 100644 --- a/config/smart-notifier.conf +++ b/config/smart-notifier.conf @@ -6,16 +6,9 @@ - + - - - - - - -- debian/patches/0005-Remove-useless-cat-in-60smart-notifier.patch0000644000000000000000000000105311702345547021425 0ustar From: Barry deFreese Date: Thu, 5 Jan 2012 05:50:46 +0800 Subject: Remove useless cat in 60smart-notifier Closes: #511504 --- scripts/60smart-notifier | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/60smart-notifier b/scripts/60smart-notifier index 378ded5..39222ad 100644 --- a/scripts/60smart-notifier +++ b/scripts/60smart-notifier @@ -1,3 +1,3 @@ #!/bin/bash [ -x /usr/bin/smart-notifier ] || exit 0 -cat ${1} | /usr/bin/smart-notifier --notify +/usr/bin/smart-notifier --notify < "$1" -- debian/patches/0010-Update-deprecated-import-dbus.glib.patch0000644000000000000000000000171511702345547020727 0ustar From: Chow Loong Jin Date: Mon, 9 Jan 2012 00:09:05 +0800 Subject: Update deprecated 'import dbus.glib' 'import dbus.glib' is deprecated as the API is extremely unintuitive. As recommended by the documentation by the deprecated dbus.glib module, replace this by a call to DBusGMainLoop(set_as_default=True) --- src/smart_notifier/__init__.py | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/smart_notifier/__init__.py b/src/smart_notifier/__init__.py index 6a09b6c..78e8877 100644 --- a/src/smart_notifier/__init__.py +++ b/src/smart_notifier/__init__.py @@ -20,9 +20,10 @@ import dbus import dbus.service -import dbus.glib # This **HIGHLY** unintuitive piece of code is to - # monkey patch some stuff and make other stuff work. - # Fun with capital F + +from dbus.mainloop.glib import DBusGMainLoop +DBusGMainLoop(set_as_default=True) + # Globals BUS = dbus.SystemBus() -- debian/patches/series0000644000000000000000000000072611702345547012047 0ustar 0001-Audit-the-D-Bus-security-policy-file.patch 0002-Only-display-SMART-messages-from-root.patch 0003-Use-one-smart_notify-directory.patch 0004-Don-t-capitalize-false-in-.desktop-file.patch 0005-Remove-useless-cat-in-60smart-notifier.patch 0006-Use-positional-parameters-in-add_signal_receiver.patch 0007-Switch-to-GtkBuilder.patch 0008-Port-to-gtk3-Use-gi.repository.Gtk.patch 0009-Make-notification-window-resizable.patch 0010-Update-deprecated-import-dbus.glib.patch debian/patches/0008-Port-to-gtk3-Use-gi.repository.Gtk.patch0000644000000000000000000000325211702345547020540 0ustar From: Chow Loong Jin Date: Sun, 8 Jan 2012 22:33:33 +0800 Subject: Port to gtk3 (Use gi.repository.Gtk) --- src/smart_notifier/gui.py | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/smart_notifier/gui.py b/src/smart_notifier/gui.py index cc7a8a6..096981d 100644 --- a/src/smart_notifier/gui.py +++ b/src/smart_notifier/gui.py @@ -20,7 +20,7 @@ import os import smart_notifier -import gtk # bletch, gtk import can fail if we do not have a GUI +from gi.repository import Gtk here = os.path.dirname(__file__) @@ -28,17 +28,17 @@ warning_window = os.path.join(here, 'smart-notifier.xml') def warn_user(msg): #Make the window - ui = gtk.Builder() + ui = Gtk.Builder() ui.add_from_file(warning_window) - #self.ui.signal_connect('end', gtk.main_quit) + #self.ui.signal_connect('end', Gtk.main_quit) #Customize message - textbuffer = gtk.TextBuffer() + textbuffer = Gtk.TextBuffer() textbuffer.set_text(msg) textbox = ui.get_object('textview1') textbox.set_buffer(textbuffer) # Fix the icon size XXX -- this is temporary intil gazpacho works icon = ui.get_object('image1') - icon.set_from_stock(gtk.STOCK_DIALOG_WARNING, gtk.ICON_SIZE_DIALOG) + icon.set_from_stock(Gtk.STOCK_DIALOG_WARNING, Gtk.IconSize.DIALOG) # Showit window = ui.get_object('window1') window.show_all() @@ -49,4 +49,4 @@ def service(): smart_notifier.UD_INTERFACE, smart_notifier.SERVICE_NAME, smart_notifier.UD_SERVICE) - gtk.main() + Gtk.main() -- debian/patches/0002-Only-display-SMART-messages-from-root.patch0000644000000000000000000000212111702345547021220 0ustar From: Simon McVittie Date: Thu, 5 Jan 2012 05:42:53 +0800 Subject: Only display SMART messages from root Only display the SMART message if it came from the part of smart_notifier that only root can run, rather than allowing arbitrary local users to spoof arbitrary messages from smartd. (Closes: #510709) --- src/smart_notifier/gui.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/smart_notifier/gui.py b/src/smart_notifier/gui.py index d165af1..3eac80f 100644 --- a/src/smart_notifier/gui.py +++ b/src/smart_notifier/gui.py @@ -47,6 +47,6 @@ def service(): smart_notifier.BUS.add_signal_receiver(warn_user, signal_name='warn_user', dbus_interface=smart_notifier.UD_INTERFACE, - #named_service=smart_notifier.UD_SERVICE, - thiss fails + named_service=smart_notifier.SERVICE_NAME, path=smart_notifier.UD_SERVICE) gtk.main() -- debian/smart-notifier.links0000644000000000000000000000010211702345547013174 0ustar /usr/share/smart-notifier/smart-notifier /usr/bin/smart-notifier debian/compat0000644000000000000000000000000211702345547010374 0ustar 8 debian/smart-notifier.manpages0000644000000000000000000000002511702345547013653 0ustar doc/smart-notifier.1 debian/README.Debian0000644000000000000000000000311011702345547011232 0ustar Smart Notifier -------------- Smart notifier only exists to communicate messages from the smartmontools package to a user using the graphical desktop. This is probably most useful on systems where the user does not receive mail from the system. When smartd sends a message, that message should present itself as a graphical window warning the user of the message. The GUI is designed primarily for the non-technical user as the technical user will probably be receiving system mail. Installation ------------ 1. Install the package. 2. Make sure that the smartd daemon is running (you may have to edit /etc/default/smartmontools) 3. Make sure that the smartd config file contains a with the argument: -M exec /usr/share/smartmontools/smartd-runner 4. Make sure that the per user session daemon is running, with desktops following the freedesktop standard this should be as simple logging out and back in. If that doesn't work, then it depends depends on what desktop you are using, but including this line in .xsession might just work: smart-notifier& 5. Optionally test if it is working, this can be done by adding a '-M test' option to the smartd config. This causes smartd to send a warning every time it is restarted. Finally, re-starting should cause the warning message to be displayed on the screen. Limitations ----------- * If the per-user-session-daemon is not running, smart-notifier does nothing. This can happen if the daemon is not started at the beginning of a session or no user is logged in. * only a gtk version available (patches accepted) debian/smart-notifier.postinst0000644000000000000000000000114011702345547013742 0ustar #!/bin/sh set -e case "$1" in configure|reconfigure) if [ -x "/etc/init.d/dbus" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d dbus force-reload || true else /etc/init.d/dbus force-reload || true fi fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/control0000644000000000000000000000203411702345547010600 0ustar Source: smart-notifier Section: utils Priority: optional Maintainer: Chow Loong Jin Build-Depends: debhelper (>= 8), python-all (>= 2.6.6-3~), python-setuptools (>= 0.6b3) Standards-Version: 3.9.2 X-Python-Version: >= 2.4 Vcs-Git: git://git.debian.org/git/collab-maint/smart-notifier.git Vcs-Browser: http://git.debian.org/?p=collab-maint/smart-notifier.git Package: smart-notifier Architecture: all Depends: ${python:Depends}, ${misc:Depends}, dbus, python-dbus, smartmontools (>= 5.33+5.34cvs20050802-2), gir1.2-gtk-3.0 Description: graphical hard disk health status notifier A graphical notifier for smartmontools which attempts to show messages from the smartd disk monitoring daemon to the user. Currently only for gtk. . WARNING: This package is not a replacement for regular backups. It will _try_ to warn the user when smartd sends a disk health warning. But success is not guaranteed. At best this package is an extra layer of protection. debian/TODO0000644000000000000000000000051711702345547007671 0ustar This package is definitely not finished. Some of the things that still should be done (patches accepted) are: * kde version. * integration into default gnome/kde sessions * some kind of mechanism to store and display messages emitted from smartd when the user is logged out. - beware of filling up the disk debian/changelog0000644000000000000000000001612211702345547011052 0ustar smart-notifier (0.28-5) unstable; urgency=low * [11fbd55] Add patch to use positional parameters for dbus (Closes: #545265) * [f6c4130] Port to gtk3 and GtkBuilder * [80d9ede] Add patch to make notification window resizable (Closes: #374719) * [910da00] Add patch to update deprecated dbus-glib things -- Chow Loong Jin Mon, 09 Jan 2012 00:58:59 +0800 smart-notifier (0.28-4) unstable; urgency=low * [0694cb5] Set myself as Maintainer * [a989894] Tidy up debian/control (alignment) * [03fac13] dh(1)-ize package * [108b884] Bump Standards-Version from 3.8.3 to 3.9.2 * [8bd8310] DEP5-ize copyright file * [1c5f083] Force dh_auto_* to use python_distutils * [33e1a82] Add Vcs-* fields * [05c4d74] Switch to 3.0 (quilt) * [af29a38] Revert out-of-debian/ changes in diff.gz * [34327c0] Reapply changes in separate patches -- Chow Loong Jin Thu, 05 Jan 2012 05:56:33 +0800 smart-notifier (0.28-3.1) unstable; urgency=low * Non-maintainer upload. * Use dbus force-reload instead of restart on install/upgrade to avoid restarting X (Closes: # 639556). -- Osamu Aoki Sat, 15 Oct 2011 12:21:42 +0900 smart-notifier (0.28-3) unstable; urgency=low * QA upload. * Convert to dh_python2 (closes: #617064). -- Colin Watson Thu, 23 Jun 2011 14:41:35 +0100 smart-notifier (0.28-2) unstable; urgency=low * QA upload. + Set maintainer to Debian QA Group . * Acknowledge NMUs. (Closes: #511502). * Fix moving of egg-info file in rules. (Closes: #552914). * Don't capitalize false in .desktop file. (Closes: #512684, #550993). * Remove useless cat in 60smart-notifier. (Closes: #511504). * Don't build-dep on -1 revision. * Add appropriate copyright holder to debian/copyright. * Version path to GPL (GPL-2) in debian/copyright. * Remove empty /usr/sbin dir. * Add debian/pycompat and set to 2. * Bump debian/compat to 5 to match debhelper build-dep. * Bump Standards Version to 3.8.3. -- Barry deFreese Fri, 30 Oct 2009 14:47:08 -0400 smart-notifier (0.28-1.3) unstable; urgency=low * Non-maintainer upload. * Build-Depend on python (>= 2.5.4) for python.mk. -- Kumar Appaiah Mon, 19 Oct 2009 17:40:39 -0500 smart-notifier (0.28-1.2) unstable; urgency=low * Non-maintainer upload. * Fix "manipulates site-packages/ directly, failing with Python 2.6" Applied and uploaded Kumar's patch, thanks Dude! (Closes: #547856)i -- Bastian Venthur Sat, 17 Oct 2009 15:10:33 +0200 smart-notifier (0.28-1.1) unstable; urgency=medium * Non-maintainer upload while dealing with D-Bus' CVE-2008-4311. * Audit the D-Bus security policy file for compatibility with D-Bus versions where CVE-2008-4311 has been fixed, and remove rules that appear to have been cargo-culted from some other package and are likely to cause unintended consequences for other packages (see freedesktop.org #18961). * Only display the SMART message if it came from the part of smart_notifier that only root can run, rather than allowing arbitrary local users to spoof arbitrary messages from smartd. (Closes: #510709) * Use the default Python version, and install version-independent modules once, rather than once per supported Python version. Not RC, but I couldn't bring myself to upload it without fixing this. (Closes: #507490) -- Simon McVittie Sun, 11 Jan 2009 17:21:30 +0000 smart-notifier (0.28-1) unstable; urgency=low * Bump build depends on debhelper and rebuild (Closes: #383099). -- Brian Sutherland Thu, 5 Oct 2006 11:50:05 +0200 smart-notifier (0.27-1) unstable; urgency=low * Update to new python policy (Closes: #380953), I am forced to depend on python2.4-xxx packages as there is no python-dbus package. * Use setuptools as the build/installation system. * Update to standards version 3.7.2. * Move debhelper from Build-Depends-Indep to Build-Depends. * Do not exit from postinst if re-starting dbus fails, merely carry on regardless. * Depend directly on dbus as we require it and python2.4-dbus does not depend on it. -- Brian Sutherland Tue, 1 Aug 2006 14:07:18 +0200 smart-notifier (0.26-1) unstable; urgency=low * Slight documentation improvements. -- Brian Sutherland Tue, 4 Apr 2006 00:53:21 +0200 smart-notifier (0.25-1) unstable; urgency=low * Implement wishlist bug (closes: #360585), suggestions by Sam Morris: - Drop a smart-notifier.desktop file in /etc/xdg/autostart to start the per session user daemon on desktops implementing the freedesktop standard. - Implement the notifier using signals rather than remove calls so that all users running the daemon GUI's will recieve the warning. * Split out the GUI/daemon code into a smart_notifier.gui module. -- Brian Sutherland Mon, 3 Apr 2006 17:38:26 +0200 smart-notifier (0.24-1) unstable; urgency=low * Change to python2.4 (closes: #347687). - re-write to use python 2.4 dbus bindings. * Restart dbus daemon in postinst (closes: #348378). * Re-build package making sure to run lintian afterwards - duh!! (closes: #353358). -- Brian Sutherland Thu, 12 Jan 2006 14:18:48 +0100 smart-notifier (0.23-1) unstable; urgency=low * New upstream version: minor changes. * Build depend on python, rather than python2.3. * Pass -V to dh_python, so we don't end up with a dependency on python. (closes: #345617) -- Brian Sutherland Mon, 2 Jan 2006 15:09:46 +0100 smart-notifier (0.22-1) unstable; urgency=low * New upstream version. * Added a README.Debian. * Updated copyright information. -- Brian Sutherland Sat, 24 Dec 2005 18:25:29 +0100 smart-notifier (0.21-3) unstable; urgency=low * Updated standards version to 3.6.2 * Install the smartmontools script to /etc/smartmontools rather than /etc/smartd, as this was what was implemted in smartmontools. * Added version to dependency on smartmontools. * Removed crufty replaces/conflicts on old diskhealthnotifier package. * dbus python bindings are only avaliable for python 2.3, so use and depend on that. -- Brian Sutherland Fri, 23 Dec 2005 12:14:20 +0100 smart-notifier (0.21-2) unstable; urgency=low * Added debian/TODO -- Brian Sutherland Mon, 4 Apr 2005 12:07:35 +0200 smart-notifier (0.21-1) unstable; urgency=low * change name to smart-notifier * replaces/conflicts on diskhealthnotifier -- Brian Sutherland Sun, 3 Apr 2005 20:00:09 +0200 diskhealthnotifier (0.2-1) unstable; urgency=low * New upstream release: * Change the /etc/smartd/run.d script to a bash script and add --notify option to smart-notifier executable. (Suggestion from Guido Guenther) -- Brian Sutherland Wed, 30 Mar 2005 19:17:02 +0200 diskhealthnotifier (0.1-1) unstable; urgency=low * Initial Release. -- Brian Sutherland Tue, 29 Mar 2005 15:47:38 +0200 debian/copyright0000644000000000000000000000233011702345547011127 0ustar Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174 Upstream-Name: smart-notifier Upstream-Contact: Brian Sutherland Source: http://lentejasverdes.ath.cx/svn/smart-notifier/ Files: * Copyright: 2005-2006, Brian Sutherland License: GPL-2+ Files: debian/* Copyright: 2005-2006, Brian Sutherland 2012, Chow Loong Jin License: GPL-2+ License: 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 this license can be found in /usr/share/common-licenses/GPL-2. debian/rules0000755000000000000000000000073611702345547010264 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ --with=python2 override_dh_auto_%: $(@:override_%=%) -Spython_distutils override_dh_auto_install: dh_auto_install -Spython_distutils -- \ --install-lib=/usr/share/smart-notifier \ --install-scripts=/usr/share/smart-notifier \ --single-version-externally-managed override_dh_install: dh_install chmod 0755 debian/smart-notifier/etc/smartmontools/run.d/60smart-notifier debian/source/0000755000000000000000000000000011702345547010476 5ustar debian/source/format0000644000000000000000000000001411702345547011704 0ustar 3.0 (quilt) debian/smart-notifier.install0000644000000000000000000000024311702345547013530 0ustar scripts/60smart-notifier /etc/smartmontools/run.d config/smart-notifier.conf /etc/dbus-1/system.d/ config/smart-notifier.desktop /etc/xdg/autostart/ debian/dirs0000644000000000000000000000001011702345547010051 0ustar usr/bin