smart-notifier-0.28/0000755000175000017500000000000010511167737013472 5ustar jintyjintysmart-notifier-0.28/GPL0000644000175000017500000004311010352755322014032 0ustar jintyjinty GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. smart-notifier-0.28/doc/0000755000175000017500000000000010511167737014237 5ustar jintyjintysmart-notifier-0.28/doc/smart-notifier.10000644000175000017500000000321710414323461017255 0ustar jintyjinty.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH SMARTNOTIFIER 1 "Dec 25, 2005" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME smart-notifier \- dbus service and graphical disk health notifier .SH SYNOPSIS .B smart-notifier .I "[options]" .br .SH DESCRIPTION This manual page documents briefly the .B smart-notifier. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBsmart-notifier\fP is a dbus service/client pair. If run without options, it starts a dbus service and listens formessages send by the client (normally started from a script in /etc/smartd/run.d). This messages are then displayed on the screen of the user running the service. This program is designed to be added to the session of the user. .SH OPTIONS .TP .B \-\-notify Run as a dbus client. Message text is read from stdin. .SH AUTHOR smart-notifier was written by Brian Sutherland . .PP This manual page was written by Brian Sutherland , for the Debian project (but may be used by others). smart-notifier-0.28/src/0000755000175000017500000000000010511167737014261 5ustar jintyjintysmart-notifier-0.28/src/smart_notifier/0000755000175000017500000000000010511167737017306 5ustar jintyjintysmart-notifier-0.28/src/smart_notifier/smart-notifier.glade0000644000175000017500000002507010352755322023247 0ustar jintyjinty 600 480 all-events-mask | button-motion-mask | button-press-mask | button-release-mask | button1-motion-mask | button2-motion-mask | button3-motion-mask | enter-notify-mask | exposure-mask | focus-change-mask | key-press-mask | key-release-mask | leave-notify-mask | pointer-motion-hint-mask | pointer-motion-mask | property-change-mask | proximity-in-mask | proximity-out-mask | scroll-mask | structure-mask | substructure-mask | visibility-notify-mask False Hard Disk Health Warning 6 all-events-mask | button-motion-mask | button-press-mask | button-release-mask | button1-motion-mask | button2-motion-mask | button3-motion-mask | enter-notify-mask | exposure-mask | focus-change-mask | key-press-mask | key-release-mask | leave-notify-mask | pointer-motion-hint-mask | pointer-motion-mask | property-change-mask | proximity-in-mask | proximity-out-mask | scroll-mask | structure-mask | substructure-mask | visibility-notify-mask all-events-mask | button-motion-mask | button-press-mask | button-release-mask | button1-motion-mask | button2-motion-mask | button3-motion-mask | enter-notify-mask | exposure-mask | focus-change-mask | key-press-mask | key-release-mask | leave-notify-mask | pointer-motion-hint-mask | pointer-motion-mask | property-change-mask | proximity-in-mask | proximity-out-mask | scroll-mask | structure-mask | substructure-mask | visibility-notify-mask all-events-mask | button-motion-mask | button-press-mask | button-release-mask | button1-motion-mask | button2-motion-mask | button3-motion-mask | enter-notify-mask | exposure-mask | focus-change-mask | key-press-mask | key-release-mask | leave-notify-mask | pointer-motion-hint-mask | pointer-motion-mask | property-change-mask | proximity-in-mask | proximity-out-mask | scroll-mask | structure-mask | substructure-mask | visibility-notify-mask gtk-dialog-warning False False all-events-mask | button-motion-mask | button-press-mask | button-release-mask | button1-motion-mask | button2-motion-mask | button3-motion-mask | enter-notify-mask | exposure-mask | focus-change-mask | key-press-mask | key-release-mask | leave-notify-mask | pointer-motion-hint-mask | pointer-motion-mask | property-change-mask | proximity-in-mask | proximity-out-mask | scroll-mask | structure-mask | substructure-mask | visibility-notify-mask <big><b>Hard Disk Health Warning</b></big> True all-events-mask | button-motion-mask | button-press-mask | button-release-mask | button1-motion-mask | button2-motion-mask | button3-motion-mask | enter-notify-mask | exposure-mask | focus-change-mask | key-press-mask | key-release-mask | leave-notify-mask | pointer-motion-hint-mask | pointer-motion-mask | property-change-mask | proximity-in-mask | proximity-out-mask | scroll-mask | structure-mask | substructure-mask | visibility-notify-mask 6 False True 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. all-events-mask | button-motion-mask | button-press-mask | button-release-mask | button1-motion-mask | button2-motion-mask | button3-motion-mask | enter-notify-mask | exposure-mask | focus-change-mask | key-press-mask | key-release-mask | leave-notify-mask | pointer-motion-hint-mask | pointer-motion-mask | property-change-mask | proximity-in-mask | proximity-out-mask | scroll-mask | structure-mask | substructure-mask | visibility-notify-mask center 1 False 1 False False False Original smartd message: all-events-mask | button-motion-mask | button-press-mask | button-release-mask | button1-motion-mask | button2-motion-mask | button3-motion-mask | enter-notify-mask | exposure-mask | focus-change-mask | key-press-mask | key-release-mask | leave-notify-mask | pointer-motion-hint-mask | pointer-motion-mask | property-change-mask | proximity-in-mask | proximity-out-mask | scroll-mask | structure-mask | substructure-mask | visibility-notify-mask True 300 True all-events-mask | button-motion-mask | button-press-mask | button-release-mask | button1-motion-mask | button2-motion-mask | button3-motion-mask | enter-notify-mask | exposure-mask | focus-change-mask | key-press-mask | key-release-mask | leave-notify-mask | pointer-motion-hint-mask | pointer-motion-mask | property-change-mask | proximity-in-mask | proximity-out-mask | scroll-mask | structure-mask | substructure-mask | visibility-notify-mask all-events-mask | button-motion-mask | button-press-mask | button-release-mask | button1-motion-mask | button2-motion-mask | button3-motion-mask | enter-notify-mask | exposure-mask | focus-change-mask | key-press-mask | key-release-mask | leave-notify-mask | pointer-motion-hint-mask | pointer-motion-mask | property-change-mask | proximity-in-mask | proximity-out-mask | scroll-mask | structure-mask | substructure-mask | visibility-notify-mask True 6 1 smart-notifier-0.28/src/smart_notifier/version.txt0000644000175000017500000000000410511167737021526 0ustar jintyjinty0.28smart-notifier-0.28/src/smart_notifier/gui.py0000644000175000017500000000374010414321347020437 0ustar jintyjinty# #This file is part of smart-notifier, a graphical disk health notifier # #Copyright (C) 2005, 2006 Brian Sutherland # #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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # 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') def warn_user(msg): #Make the window ui = gtk.glade.XML(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.set_buffer(textbuffer) # Fix the icon size XXX -- this is temporary intil gazpacho works icon = ui.get_widget('image1') icon.set_from_stock(gtk.STOCK_DIALOG_WARNING, gtk.ICON_SIZE_DIALOG) # Showit window = ui.get_widget('window1') window.show_all() 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 path=smart_notifier.UD_SERVICE) gtk.main() smart-notifier-0.28/src/smart_notifier/__init__.py0000644000175000017500000000273510414321347021415 0ustar jintyjinty# #This file is part of smart-notifier, a graphical disk health notifier # #Copyright (C) 2005, 2006 Brian Sutherland # #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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # 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 # Globals BUS = dbus.SystemBus() SERVICE = "/smart_notifier/DbusService" SERVICE_NAME = SERVICE.replace('/', '.')[1:] UD_SERVICE = SERVICE + "/WarnUser" UD_INTERFACE = SERVICE_NAME + ".WarnUser" def notify(msg): bus_name = dbus.service.BusName(SERVICE_NAME, bus=BUS) object = WarnUser(bus_name, UD_SERVICE) object.warn_user(msg) class WarnUser(dbus.service.Object): @dbus.service.signal(UD_INTERFACE) def warn_user(self, msg): pass smart-notifier-0.28/Makefile0000644000175000017500000000154610464070244015131 0ustar jintyjinty# Get the upstream version number from the debian changelog ;) VERSION=$(shell dpkg-parsechangelog | grep '^Version: ' | sed 's/^Version: \(.*\)-[^-]*$$/\1/') FULLVERSION=$(shell dpkg-parsechangelog | grep '^Version: ' | sed 's/^Version: //') all: # nothing clean: rm -rf buildpkg rm -rf build rm -rf src/smart_notifier.egg-info find -name '*.pyc' -exec rm {} \; clean-deb: fakeroot debian/rules clean deb: clean-deb svn up [ `svn st | grep -c ""` == 0 ] # Check if directory is clean mkdir buildpkg svn export . buildpkg/smart-notifier-$(VERSION) echo -n $(VERSION) > buildpkg/smart-notifier-$(VERSION)/src/smart_notifier/version.txt cd buildpkg && tar -czf smart-notifier_$(VERSION).orig.tar.gz \ smart-notifier-$(VERSION) cd buildpkg/smart-notifier-$(VERSION) && sidpdebuild cd buildpkg && lintian -i smart-notifier_$(FULLVERSION)_i386.changes smart-notifier-0.28/scripts/0000755000175000017500000000000010511167737015161 5ustar jintyjintysmart-notifier-0.28/scripts/60smart-notifier0000644000175000017500000000014110352755322020205 0ustar jintyjinty#!/bin/bash [ -x /usr/bin/smart-notifier ] || exit 0 cat ${1} | /usr/bin/smart-notifier --notify smart-notifier-0.28/scripts/smart-notifier0000644000175000017500000000103110464072353020036 0ustar jintyjinty#!/usr/bin/python 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) if '--notify' in sys.argv: import smart_notifier smart_notifier.notify(sys.stdin.read()) else: import smart_notifier.gui smart_notifier.gui.service() smart-notifier-0.28/debian/0000755000175000017500000000000010511167737014714 5ustar jintyjintysmart-notifier-0.28/debian/TODO0000644000175000017500000000051710352755322015403 0ustar jintyjintyThis 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 smart-notifier-0.28/debian/dirs0000644000175000017500000000002110352755322015565 0ustar jintyjintyusr/bin usr/sbin smart-notifier-0.28/debian/control0000644000175000017500000000165110511152771016312 0ustar jintyjintySource: smart-notifier Section: utils Priority: optional Maintainer: Brian Sutherland Build-Depends: debhelper (>= 5.0.37.3) Build-Depends-Indep: python-all-dev (>= 2.3.5-11), python-central (>= 0.4.10), python-setuptools (>= 0.6b3-1) Standards-Version: 3.7.2 XS-Python-Version: 2.4 Package: smart-notifier Architecture: all Depends: ${python:Depends}, dbus, python2.4-dbus, smartmontools (>= 5.33+5.34cvs20050802-2), python2.4-gtk2, python2.4-glade2 XB-Python-Version: ${python:Versions} 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. smart-notifier-0.28/debian/rules0000755000175000017500000000421210464070244015764 0ustar jintyjinty#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 PYVERS=$(shell pyversions -vr debian/control) PYMOD=smart_notifier PACKAGE=smart-notifier DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog \ | grep ^Version: | cut -d ' ' -f 2 | cut -d '-' -f 1) build: $(PYVERS:%=build-python%) touch $@ build-python%: dh_testdir python$* setup.py build touch $@ clean: dh_testdir dh_testroot rm -f build-python?.? $(MAKE) -f debian/rules $(PYVERS:%=clean-python%) $(MAKE) clean dh_clean clean-python%: python$* setup.py clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) -f debian/rules $(PYVERS:%=install-python%) # install configuration install -D -m 755 scripts/60smart-notifier \ debian/smart-notifier/etc/smartmontools/run.d/60smart-notifier install -D -m 644 config/smart-notifier.conf \ debian/smart-notifier/etc/dbus-1/system.d/smart-notifier.conf install -D -m 644 config/smart-notifier.desktop \ debian/smart-notifier/etc/xdg/autostart/smart-notifier.desktop install-python%: python$* setup.py install --no-compile --single-version-externally-managed --root=debian/$(PACKAGE) install -d debian/$(PACKAGE)/usr/share/smart-notifier/lib/python$* # Remove python and module version from .egg-info and move it to the privat modules mv debian/$(PACKAGE)/usr/lib/python$*/site-packages/$(PYMOD)-$(DEB_UPSTREAM_VERSION)-py$*.egg-info \ debian/$(PACKAGE)/usr/share/smart-notifier/lib/python$*/$(PYMOD).egg-info # Move the python module to a private location mv debian/$(PACKAGE)/usr/lib/python$*/site-packages/$(PYMOD) \ debian/$(PACKAGE)/usr/share/smart-notifier/lib/python$*/$(PYMOD) # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installexamples dh_installman dh_link dh_strip dh_compress dh_fixperms dh_pycentral dh_python dh_installdeb dh_gencontrol dh_md5sums dh_builddeb # Build architecture-dependent files here. binary-arch: #Nothing to do here!!! binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure smart-notifier-0.28/debian/changelog0000644000175000017500000000714010511156157016562 0ustar jintyjintysmart-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 smart-notifier-0.28/debian/compat0000644000175000017500000000000210352755322016106 0ustar jintyjinty4 smart-notifier-0.28/debian/README.Debian0000644000175000017500000000311010414323461016736 0ustar jintyjintySmart 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) smart-notifier-0.28/debian/smart-notifier.postinst0000644000175000017500000000112610464072053021455 0ustar jintyjinty#!/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 restart || true else /etc/init.d/dbus restart || 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 smart-notifier-0.28/debian/smart-notifier.manpages0000644000175000017500000000002510352755322021365 0ustar jintyjintydoc/smart-notifier.1 smart-notifier-0.28/debian/copyright0000644000175000017500000000075610353526711016652 0ustar jintyjintyThis package was debianized by Brian Sutherland on Tue, 29 Mar 2005 15:47:38 +0200. It was written by the Brian Sutherland , the source code is available from http://lentejasverdes.ath.cx/svn/smart-notifier/. Copyright: Upstream Author: Brian Sutherland License: This software may be distributed under the terms of the GNU General Public License Version 2 or later. The full text of which can be found in the file /usr/share/common-licenses/GPL smart-notifier-0.28/config/0000755000175000017500000000000010511167737014737 5ustar jintyjintysmart-notifier-0.28/config/smart-notifier.conf0000644000175000017500000000132610414245513020542 0ustar jintyjinty smart-notifier-0.28/config/smart-notifier.desktop0000644000175000017500000000027510414315143021265 0ustar jintyjinty[Desktop Entry] Encoding=UTF-8 Name=Smart Notifier Comment=Hard drive health status notifier TryExec=/usr/bin/smart-notifier Exec=smart-notifier Terminal=False Type=Application Categories= smart-notifier-0.28/setup.py0000644000175000017500000000221410464075553015204 0ustar jintyjintyimport os from setuptools import setup, find_packages def get_version(): dir = os.path.dirname(__file__) fn = os.path.join(dir, 'src', 'smart_notifier', 'version.txt') f = open(fn, 'r') result = f.read() f.close() print result return result # Setup SchoolTool setup( name="smart_notifier", description="graphical hard disk health status notifier", long_description=""" 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. """, version=get_version(), url='http://lentejasverdes.ath.cx/svn/smart-notifier/', license="GPL", maintainer="Brian Sutherland", maintainer_email="jinty@web.de", platforms=["any"], package_dir={'': 'src'}, package_data={'': ['*.glade', '*.txt']}, scripts=['scripts/smart-notifier'], packages=find_packages('src'), zip_safe=False, )