# $Id$ PyKota - Print Quota for CUPS (c) 2003 Jerome Alet 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. ============================================================ PyKota NEWS : - 1.13 : - The whole module code was passed through PyChecker and several small code inconsistencies were fixed, as well as a bug in the groups code. - 1.13alpha1 : - Bug fix wrt LDAP. - 1.12 : - More complete test added in edpykota. - 1.12alpha2 : - The previous bug fix was incomplete. This is corrected. - 1.12alpha1 : - Small bug fix. - 1.11 : - Now includes the pykotme command line tool, to produce printing quotes for users. - 1.10 : - Bug fixed wrt quota reports when print limiting is by account balance. - 1.09 : - Translations finalized. - Manpages updated. - Installation documentation improved wrt LDAP support. - 1.09beta2 : - The CGI script for quota reports works again, and is much more powerful. - 1.09beta : - edpykota finalized - 1.09alpha2 : - LDAP schema modified a bit. Please upgrade. - LDAP backend works ! - repykota and warnpykota allow the root user to pass users or groups names on the command line. Users and groups names may contain wildcards. - repykota and warnpykota only reports or warns the current user when launched by non-root users. - Minor bug fixes. - 1.09alpha1 : - More work on LDAP storage backend. Many options were added to /etc/pykota.conf to give some hints to the LDAP storage backend. - Severe database access optimizations were done by rewriting most of the Quota Storage backends drivers. - 1.08 : - Major bug fix wrt LPRng support for remote jobs. - Major bug fix wrt increase/decrease account balances. - 1.08alpha8 : - Code refactoring. - A single user/password pair is used to connect to the database backend. The storageuser configuration field, and its associated passwords storageuserpw, are not used anymore. - You can now set PyKota in debug mode, see sample configuration file for details. WARNING : only Quota Storage backend queries are logged in debug mode, for now. - 1.08alpha7 : - Very latest LDAP schema. - Code enhancement wrt easy pluggability of PyKota attributes and object classes into an existing LDAP directory. - 1.08alpha6 : - Minor bug corrections - More work on LDAP : new schema - 1.08alpha5 : - More good work on LDAP storage. repykota now works reasonably well with the sample LDAP directory. - 1.08alpha4 : - LDAP schema included. THIS IS JUST FOR PEOPLE TO DISCUSS ABOUT THIS. LDAP SUPPORT DOESN'T WORK YET, AND THE SCHEMA MAY CHANGE IN THE FUTURE. PLEASE TELL US WHAT YOU THINK ABOUT THIS SCHEMA ON THE MAILING LIST. - 1.08alpha3 : - External accounting methods were partly rewritten : - No more "broken pipe" should happen. - They now take care of the number of copies This may be unneeded though, if the postscript file already does this, because this would overcharge users (number of copies counted two times). NEEDS MORE TESTING. - The sample configuration file now contains an external accounting method example which should work with all DSC compliant Postscript files. - Some small bugs were fixed. - 1.08alpha2 : - Now works with net-snmp v5.0 and above. It already worked, but the sample configuration file didn't contain appropriate values... - 1.07 : Release of the Shame ! - The external accounting methods driver was left out of the CVS tree. Nobody could use it since it wasn't included ! - 1.06 : - Severe bug fixed : if you had a printer in power saving state which couldn't answer immediately, a bug was triggered. It was caused by a bad copy/paste which forgot to import a Python module at run time. - 1.05 : - External accounters are finally available ! This means that you can plug any page accounting method you like by setting the appropriate 'accounter' field in /etc/pykota.conf See the sample conf/pykota.conf.sample to learn how to do. NB : Both 'external' and 'stupid' accounting methods account a job size just before *this* job is sent to the printer. The original 'querying' method accounts a job size just before *the next* job is sent to the printer. - 1.05alpha3 : - A 'stupid' and unreliable accounting method was implemented to serve as an example on how to do this sort of things. This method only counts the 'showpage' statements in the input data. See sample configuration file for details. Pluggable accounting methods work, but I advise you TO NOT USE THIS ONE WHICH IS JUST AN EXAMPLE. It is not reliable enough to be used. Use the 'querying' accounting method instead. - 1.05alpha2 : - Pluggable accounting methods. - Better error handling. - 1.05alpha1 : - SECURITY file added to help improve PyKota's security. - Extracting the printer's internal page counter is now tried several times, waiting several seconds between two tries. This lets the time to warm up for some printers which don't answer when they are sleeping (my Apple LaserWriter 16/600 PS is in this case, maybe others too) - Small display bug fixed in repykota - 1.04 : - Default print policy for users/groups unknown from the print quota system is now DENY instead of ALLOW, since ALLOW can generate inaccurate results (incorrect job sizes charged to the wrong persons) - LPRng support works ! - A bug was introduced some time ago wrt printers' default policy for unknown users. It is now corrected. - repykota now displays prices per job and per page for each printer, if they are defined. - Minor display bug fixed in repykota. - Problem when running repykota with an empty database was fixed. - 1.03 : - Upgrade script included for earlier versions. Please look inside the initscripts subdirectory. THE DATABASE SCHEMA HAS CHANGED, PLEASE UPGRADE. - repykota now reports account balances too. - PyKota now has a nice logo, see the logos subdirectory. - Manual pages were finally updated. - Group quotas seem to work now ! - The new database schema allows to keep an history of all jobs as well as charge users per page and/or per job, and track users' account balance. - edpykota now accepts much more command line options to use the new functionnalities. See edpykota --help for details. - The installation script now allows to install the sample configuration file during first installation. - More group quota code works, but still not finished. - The CGI script displays a link to PyKota's website. - The job history is now kept, this will allow per-period reports in the future. - After having modified the quota for an user with edpykota, a quota check is done to eventually warn the user/admin about a quota which is too low to print. - A workaround is provided for HP Printers : their internal page counter is only saved to NVRAM in a 10 increment, so if you switch them off and then on, the reported page counter may be lower than the real number of pages printed. See http://web.mit.edu/source/third/lprng/doc/LPRng-HOWTO-15.html We unconditionnally set the last job's page count to abs(int((10 - abs(lastcounter(snmp) - lastcounter(storage)) / 2)) in this case. For a more accurate accounting, never switch your HP printers off. - A fix is provided for printers which only have a volatile page counter (reset to 0 every time you switch the printer on) This should allow PyKota to work reasonably fine with HP Laserjet 4L/5L/6L, not perfect, but better than nothing. See http://web.mit.edu/source/third/lprng/doc/LPRng-HOWTO-15.html For a more accurate accounting, never switch your HP printers off. This is untested, please report any problem. - A bug was fixed when edpykota --add was used with users who already had a quota on the specified printer. - A small display bug in repykota was introduced in preliminary 1.03 versions, and fixed later on. - Some minor bugs which happened in rare situations were fixed. - Support for AppleTalk printers was added, see sample configuration file for details. - Users and group printing can now be controlled (limited) either by print quota or by account balance. - 1.02 : - The installation script now checks for software availability and in case a software is missing asks the user if he wants to continue with the installation or abort it. - The configuration file pykota.conf is now expected to be found in /etc instead of in /etc/cups The installation script prompts the user to see if he wants to move an old configuration file to the new location if needed. - Improved documentation. - You can now set the tcp/ip port on which the Quota Storage Server is listening, see sample configuration file for details. - Better general error handling. - Upgrade script for pre 1.01 PostgreSQL database schema is now included as well. - 1.01 : - The configuration file now accepts an option to choose the recipient(s) of the email messages : - DevNull means no one will receive them. - User means only the user will receive them. - Admin means only the admin will receive them. - Both means the User and the Admin will receive them. - The configuration file now uses hard-coded default values when an option is not set. See sample configuration file for details. - Manual pages are included since 1.00, but I forgot to add this information to this file. - Redistribution terms for the official package have softened and are now fully GPL compatible : unrestricted modification is now allowed even for the version number. - 1.00 : - edpykota now accepts a --noquota option. This disable quota checking while still doing page accounting. This is really useful for people who don't want to limit their users but want to know how much pages they print. - Some untested scripts were added to retrieve the life time page counter of non-SNMP printers. - Every directory now has a specific README file. - 0.99 : - Under some circumstances while the user wasn't allowed to print, he didn't receive any email message. It is now fixed. - When an user wasn't allowed to print, the quota for the previous user wasn't updated. This is now fixed. - 0.98 : - Correctly handle the case where the printer is switched off. - Small bug wrt syslog fixed. - 0.97 : - edpykota accepts wildcards on its command line for users/groups too if the --add option is not set, e.g. : $ edpykota --printer lp --softlimit 50 --hardlimit 100 "jer*" - If no user name is passed at all, then a default wildcard of "*" which means apply the command on ALL users for this printer is used. - Small bug fixes. - 0.96 : - Options requester, policy, admin, adminmail and gracedelay can now be set either globally or per printer. The printer option has priority if both are defined. - More powerful configuration parser. - If all options are defined globally, there's no need to define a section for each printer in the configuration file anymore. Just define a [global] section and it's ok. - 0.95 : - External requesters for printers finally added. - Full internationalization (english and french are supported) - More complete quota usage report - CGI script to access to the quota usage report - Several bugs fixed. - 0.9 : - First public version