13th January 2003
-----------------

Added a --set option to pqm, so you can force a user's quota to be a
specific value. It correctly maintains the finance log and the misc stats
database.

Updated printbill_configure to support "pagecount" billing.

Added debconf support for the financial transaction log.

Moved lprng-specific stuff to printbill.lprng, made printbilld
spooler-independent. Next stop: CUPS support.

11th January 2003
-----------------

Important bug fix to lazybill and accountonly billing options.
Infinitisation also works properly now.

30th December 2002
------------------

Fixed smbclient support. This should now work beautifully... what you need
to do is add the following line to /etc/samba/smb.conf (or wherever your
Unix puts it:

print command = /usr/bin/lpr -P%p %s @@@%m

The %m is the hostname. This gets fed to printbill, and is used to send the
popup message to the right host. I guess it never worked properly before...
but apparently that means no-one uses Windows, so that's a good thing :)

Converted some "chop()" to "chomp()".

29th December 2002
------------------

Cleaned up printbill_configure somewhat... now it should work with the new
configuration file format. Made PTDB_File.pm tolerant of whitespace around
the key:value colon (i.e. it can read old config files).

Updated man page for printbillrc(5).

Debian postinst now creates "stats graph" directory in /var/www, if it
doesn't exist...

17th November 2002
------------------

printbill_pcfg.pm ripped up and redone. Now the printer-specific override
information is broken up into separate files.

16th November 2002
------------------

Debian "debconf" scripts re-done, now all systemwide parameters are
debconfed. Preparation for splitting of printbillrc into a separate file
from the "extra printers" configuration file.

17th October 2002
-----------------

Dead code removal from printbilld. We had a "mail_user()" which was no
longer used (but there is another function "inform_user()" which essentially
does the same thing.). inform_user() now works happily when the user doesn't
have a local account.

14th October 2002
-----------------

Further changes to complete addition of "pagecount" support. Now printquote
& printbilld should be happy, even if prices have not been defined for black
ink/toner. pqm and printbill_configure still need some work, but actual
printing should work OK.

Added an optional field to user databases, called 'infinitism' which gives
users the god-like ability to print as much as they want. pqm has two new
options: --infinitise <user> and --deinfinitise <user>. Web interface needs
a new control to enable/disable infinitism.

Fixed a bug in the web interface - incorrect column titles in 'SHORT' form
type.

9th October 2002
----------------

Use of proper operator in deciding whether to increment or decrement in the
web interface. Telling it to add ".80" dollars won't deduct 80 cents from
the user's account now ;-)

8th October 2002
----------------

Against my better judgement, I added a "colourspace" option "pagecount".
This just blindly, stupidly, counts pages by grepping postscript code. This
may be acceptable in an 'only-care-about-pagecount' environment. This kind
of defeats the purpose of printbill... but anyway, it is the most-requested
feature, so it's in. It should be mildly secure/reliable in Windows-only
environments, but in mixed or Unix environments it is very easy to fool
(since you have much more control over what gets sent to the printer under
Unix.). How is left as an exercise to the reader.

* note - there are many ways to encode N-up page count in postscript files.
The supported method is but one of them. More will be added in the future,
but since PS is a programming language, there is always another way :)

3rd September 2002
------------------

Fixed a trivial bug in the web admin script - it wouldn't show stats graphs,
because it was still testing whether do_stats was TRUE. Now it checks the
existence or otherwise of stats_path.

4.0.6 has been working really well... almost problem-free.

17th August 2002
----------------

printbill.pm now returns the error as the zeroth element of its array.
Should make tracking down bugs much easier.

do_stats removed. Now stats_path is optional - get rid of it if you don't
want stats collected.

New optional config parameter - save_bad_path. If a job causes printbill to
fail (gs has troubles or whatever), the offending job is saved in this
directory with filename printer_user_datafilename (not the original
filename). This should aid in tracking down problems in the system.

4.0.6-alpha1 ready for testing.

31st July 2002
--------------

Fixed a minor pqm bug which prevented adding of users from the web
insterface from working.

27th July 2002
--------------

Added a configuration option "financelog" which is used to record time/date
of all credits/debits made via pqm.

21st July 2002
--------------

Since lpd_user now no longer means 'the userid of the lpd process' we change
the name to printbilld_user - the UID we want printbilld to run under. You
can now specify the group (printbilld_group) as well as the username under
which printbilld runs in the configuration file. This was required to make
the web interface behave itself properly. If the group is not explicitly
specified, it defaults to the primary group of printbilld_user.

For backwards compatibility, lpd_user is still correctly interpreted - but
is depreicated.

init_from_passwd added to 'make install' and fixed so it works on FreeBSD.

9th July 2002
-------------

Fix for printbill_printer so it works properly on FreeBSD. For some reason
this wasn't caught before. I'll call this 4.0.4-2, it's a very minor
architecture-specific fix.

5th July 2002
-------------

Weird. Apparently my 'fix', which works fine on my system, doesn't work for
other people. So now it does a regexp check for 'error' in the stdout/stderr
spewed forth by gs. This is 4.0.4.

1st July 2002
-------------

Sometimes gs prints out spurious crap, which printbill mistakenly thinks
indicates an error. Now we ignore this and only care about the return value
of gs to test for success or failure.

29th June 2002
--------------

Printbill now works properly on FreeBSD. This required a surprisingly large
number of irritatingly minor modifications. However, it should be much more
portable now, and will probably work fine on NetBSD and OpenBSD (maybe even
Darwin). Hopefully it still works properly under Linux too :)

On the plus side it did chase out a few buglets in the configuration
program, which should now work better where your configuration is different
to mine.

The -T (taint) option has been removed from printbill's various bits; this
seems to cause problems for some people, with different versions of perl
regarding different parts of the code as potentially 'tainted'. This may be
re-enabled at some point...

26th June 2002
--------------

Various modifications to allow clean compilation and installation on
FreeBSD. Basically this involves some changes to Makefiles (quite trivial
and should be portable to Linux), fixing a few minor bugs in the various .c
files under src, and creating a suitable BSD init script.

25th June 2002
--------------

Officially released 4.0.2.

21st June 2002
--------------

More warnings eliminated. filter: ... fixed (was totally broken before).
Now filter: NONE can be used to specify no anything-to-postscript converter.

12th April 2002
---------------

Several minor warnings eliminated (caused by use of remote configuration
file).

4.0.1 release.

5th April 2002
--------------

Re-worked the 'multiple-pages' detection. Now this is done by
percentblack/colour/_cmy, which is faster since it avoids running gs a
second time. Also properly fixed printquote this time.

29th March 2002
---------------

More improvements to the admin CGI script... all interesting changes are now
attributed to an administrator (in the return e-mail message).

Fix to printquote, where it was using $params{'price_per_percent_cyan'} etc.
even for mono printers (and hence usually causing perl to complain).

26th March 2002
---------------

Changed the admin CGI script so the e-mail it sends puts the name of the
administrator in there after any change to the account.

23rd March 2002
---------------

Fixed a bug preventing printbill from working on some systems (RedHat?) due
to some valid lines in the control file possibly starting with "l" rather
than "f". Thanks to Turbo J. for that fix...

4.0.1 ready for release.

6th March 2002
--------------

Fixed a weird bug which caused the Debian postinst to hang. Also eliminated
some misleading error messages from the logs. Printbilld works in the IEEE
lab so it looks like it is getting close to releasable.

5th March 2002
--------------

Bug fixed in printbilld which prevented printing from standard input (due to
the filenames which appear in the control file containing '(' and ')' :-)

4th March 2002
--------------

Testing. Debian package looks good, installs, everything seems to work. Init
script tweaked to improve warning messages. More documentation improvements.
More syslog from printbill script. Replacement of $? != 0 with $? >> 8 != 0
(which gives the true return value). Web interface stats page tidied up.
pqm --updateprinters fixed to work with new program names.

1st March 2002
--------------

Wrote the manpages for printbill_cmy(1), printbill(1) and printbilld(1).
Updated the other man pages. Fixed bug which caused the default printer
parameters to always be used, fixed another bug which caused quotes to quote
for (possibly) the wrong printer. Wrote init scripts for Debian and RedHat.

28th February 2002
------------------

Happy birthday to me. Fixed up the Makefiles, modified pqm and
printbill_configure to do the right thing with the new system. Cleaned up
debug messages in printbill and printbilld.

27th February 2002
------------------

New printbilld works for all cases (bill, lazybill, account and quote). It
also (optionally) daemonises itself.

26th February 2002
------------------

Hmmm... extremely serious problem discovered with regards to printbill
filters being run from lprng. It seems that fork() and friends don't quite
behave in the way they should... seems to be impossible to daemonise the
billing process, even with a setsid(). Weird, becuase this definitely used
to work. Anyway, due to that and a few other concerns, a major re-design is
underway. Now we will have a very simple print filter called "printbill",
which takes various options including "--type [bill|lazybill|account|quote]"
and (if --type bill was specified) "--printbill_secondary". These are then
sent to a Unix-domain socket, the other end of which should be attached to a
printbilld process. This manages billing for different scenarios. It's now
half-finished, and what is there currently works quite well.

24th February 2002
------------------

Various fixes to modules, filters and utilities. Verified that CMY
colourspace works. printbill_scheduler, _accountonly and _lazybill all are
verified as working. pqm seems to do its thing, as does printquote and
pqcheck. Next task is to check printbill_quote* and the web interface.

20th February 2002
------------------

Only remaining potential tmpfs vulnerabilities should be when the config/db
files are stored on a remote web server (and I don't think these
vulnerabilities are all that serious - at worst a malicious (and very
careful) user could pretend that a print job will be a different price to
what it should be (or cause the user's printquote job to fail altogether).
Jobs will still be billed correctly at the server.

Tmpfs is now $params{'db_home'}/tmp, except for printquote and buy, who use
a tempdir under /tmp.

CGI scripts update to add support for grapher ('stats' button in the printer
pages). The grapher now has a --web option to spew forth nicely formatted
HTML tables.

Basically everything is ready for 3.2.0, all features have been added - it
only remains to be tested. I want to backport to Debian-potato this time,
plus I plan to release installable RPMs.

19th February 2002
------------------

More RPM improvements.

Removing potential tmpfs vulnerabilities.

18th February 2002
------------------

Modified pqm and all print filters to handle "cmy" colourspace. RPMs also
build properly now.

16th February 2002
------------------

Fixed up CGI scripts to not display the total amount a user has paid - which
is just remaining quota + total spent.

Added grapher script to plot various statistical distributions plus hourly
load averaged over the past week, month, year and forever. It also dumps
statistical information to standard output.

Modified printbill.pm, printbill_pcfg.pm and printbill_configure to handle
"cmy" colourspace.

14th February 2002
------------------

Removed the "spent" field from user databases, while adding a "cyan",
"magenta", "yellow" and "black" field. Now we have a record of how much of
each a given user has consumed. This change is backwards compatible.

Backwards-incompatible change made to stats file. IF YOU UPGRADE YOU MUST
TRUNCATE YOUR STATS FILE!! Now the first field is the timestamp, which is
useful if you want to (e.g.) plot some measure of printer or server busyness
with respect to time (e.g. plot a graph of hourly/daily printing load).

Fixed a bug which caused "total paid" to potentially be set to zero if you
run pqm --decuser <user> --amount <qty> where <qty> is more than the user's
current quota (stupid cut & paste job gone wrong once more).

Added "percent_cmy.c" as a first step to adding CMY printing support.

12th February 2002
------------------

Forked new version to 3.2.0. Bugfixes only will be added to 3.1.x.

Converted printbill_quote to use process limit scheme (as per
printbill_scheduler etc.).

10th February 2002
------------------

Removed obsolete_utils directory. The programs in it were broken anyway, and
no-one ever complained. If anybody actually needs them let me know and I'll
re-write them :)

Testing completed - everything seems to work. I've sent printbill off to a
few test users, if it works out I will release in a few days.

9th February 2002
-----------------

Release delayed to deal with some more irritating/fairly major bugs.

Fixed printbill_accountonly so that it actually works now. It was truncating
print jobs where it should have been copying them / hard-linking them. Looks
like a bad cut & paste job...

Added a printbill_lazybill filter which just checks whether users have
positive quota before printing and calculating the bill afterwards. This is
appropriate for high-volume semi-trusted print environments (but not where
psychopaths are likely to print twenty thousand black pages on their last
day). Fascist administrators can charge double for users whose quota goes
negative, or insist upon a refundable deposit prior to being allowed to
print.

Fixed pqm so that it creates entries in $params{'db_home'}/users correctly
(right uid/gid).

Correct corrections to tests for empty lists.

7th February 2002
-----------------

printbill_accountonly changed to fork and return immediately, regardless of
the number of concurrent processes. The child process will sleep until a
slot becomes available.

Corrections to tests for empty lists, better isreal () regexp, corrections
to makefile advice.

printbill_configure now allows you to create printbill_accountonly queues as
well.

Version bumped to 3.1.3 - probably will release in a day or two.

6th February 2002
-----------------

Fixes to printbill_pcfg.pl to make web/ftp-server-stored database/config
file stuff work properly.

18th January 2002
-----------------

Apparently Perl 5.6.0 has a bug in the way it handles syslog() when using
Unix sockets rather than inet sockets. Basically the three-argument form of
syslog doesn't work - it complains about the usage of _PATH_LOG() in the
Sys::Syslog module. Worked around that by replacing 3-arg syslog invocations
with 2-arg forms. This affects Slackware and RedHat systems.

Fixed pqm --init... it was using getgrnam instead of getpwnam :)

Full testing on RedHat shows printbill to work perfectly on RedHat 7.0 now.
This looks ready for a 3.1.2 release.

16th January 2002
-----------------

Fixed stupid brain fart which caused printbill not to work when non-ps stuff
was printed due to the filter being applied at the wrong place... thanks to
Charles Bisceglia for the heads-up on that.

12th January 2002
-----------------

Further refinement and testing of the configuration script. It looks very
good now.

Added tests in printbill_pcfg.pm to verify that there is no vital
information missing from /etc/printbill/printbillrc. Warnings are printed
unless it is safe to make a trivial correction...

11th January 2002
-----------------

Configuration script successfully writes a valid printbillrc and printcap
file. It has evolved into a script which basically reads any existing
printbillrc, fills in any missing entries, prompts the user as to whether to
accept the default or change the value, determines various parameters by
examining the system (location of various binaries etc.). and writes out a
printbillrc.new file. It also parses /etc/printcap, any printers defined
therein can be modified to work with printbill, and a printcap.new file is
written accordingly. Any printers thus configured which do not use the
default settings also have their parameters appended to the printbillrc.new
file.

10th January 2002
-----------------

Configuration script now reads defaults, where defaults are not defined, it
defines them.

7th January 2002
----------------

printbill.pm and printbill_pcfg.pm are now proper perl modules.

Perl modules now get installed in $(PMOD_HOME)/Printbill.

Finally doing some testing with RedHat. Discovered that nice is not always
in /usr/bin. New cfg file paramater "nice".

Started writing interactive post-installation configuration script. Should
be able to write etc/printbill/printbillrc from here... Ultimately it will:

 * Read the current settings, if any, in /etc/printbill/printbillrc
 * If any options have not been set, or some command-line option is
   specified, allow the user to set the parameters
 * Supply sensible defaults where possible, or where a non-interactive
   command-line option is given
 * If required, set up $params{'db_home'}
 * If required, add entries to /etc/printcap
 * Restart the printer service if /etc/printcap was changed

3.1.2 getting ready for release.

31st December 2001
------------------

pqm --display --web and webpqadmin.pl changed to make it less brain-damaged
and about a thousand times faster.

Unlocking routines didn't (always). They do now.

3.1.1 released.

27th November 2001
------------------

Minor fixes to pqm (added a few defined() where necessary).

11th November 2001
------------------

Added smbclient support in printbill_quote. Some cleaning up of the code so
it gracefully handles the (hopefully fairly common :) case of a Winpopup
service not actually running on some machines.

10th November 2001
------------------

Tidied up cleanup process to eliminate a potential warning (under certain
circumstances it tried to delete a lock file twice). Added a feature thanks
to an excellent suggestion from [check who this was] which allows Windows
users to get a Winpopup message instead of an e-mail. Currently this has
only been implemented in printbill_scheduler. The response method may also
be specified on a per-printer basis - so if (e.g.) you have a Windows
printer and a Unix printer, you can use mail for Unix and smbclient (or
both) for Windows. This needs further refinement and testing, and
possible integration into printbill_quote.

Fixed an error in the support of multiple colour printers (this apparently
has been broken for some time), namely that there would be undefined prices.

6th November 2001
-----------------

Small change to perl code in printbill_scheduler to make it work under
Solaris. Thanks to Daniel Ouimet for the fix.

31st October 2001
-----------------

webpqadmin and webpqcheck.pl significantly updated and simplified. Now
webpqcheck features a reload button, and the `server-side cookies' have been
tidied up a bit for webpqadmin (webpqcheck didn't need them anyway so
support was removed). Assorted minor bugs fixed. Now all scripts use
"strict", which forced me to be a bit more careful with my globals.

30th October 2001
-----------------

Several more minor fixes to CGI scripts (just corrections to error messages
/warnings). Looking good for final release of 3.1.

29th October 2001
-----------------

Fixes for bugs found during bughunt session with Phil Ciufo fully
incorporated. Slightly more verbose information from pqm when no printers
exist in $params{'db_home'}/printers.

26th October 2001
-----------------

Applied a few fixes to make it work properly under Slackware - a few more
hard-coded paths (ps2ps, lpr and gs) were removed and replaced with
configuration options. Config should specify the man path - Slackware uses
/usr/man/ or /usr/local/man/, whereas debian uses /usr/share/man/ - so the
man or share/man can be specified explicitly now.

Two syntax errors (bit of cut & paste gone wrong) in printbill_printer
removed.

24th October 2001
-----------------

Building Debian package - now it passes the lintian test, and is reasonably
close to complying with debian-policy. More tidying up of pqm. pqm --init
now blows everything away (but by default it gives you an informative
prompt). This is useful in the install scripts.

web_user option added to the config file (used in pqm now). On Debian it's
www-data.

23rd October 2001
-----------------

Correct various bugs in navigation in the CGI scripts - after making a
change, the OK button takes you back to a sane place. Also clarified the
fact that "changing" a users quota means adding to it (possibly adding a
negative).

CGI scripts checked for return values.

More work will need to be done on pqm, which as I look at it seems pretty
ugly. We need to check everywhere that when we tie a PTDB_File, that it has
been successful (pqm does this a bit dodgily). We can do it better, need to
check pqm.

22nd October 2001
-----------------

Completed the return-value-checking for all perl scripts except for the CGI
scripts.

21st October 2001
-----------------

Finished integrating the fix for the N - 1 free copies bug. This is now in
and has been tested with printquote.

printquote, pqm, printbill_scheduler, printbill_printer printbill_billme and
buy should all basically adhere to debian-policy w.r.t. system calls.
printbill_billme still needs some fixes ported over from
printbill_scheduler. Further work needs to be done.

20th October 2001
-----------------

Discovered that Windows users can print N copies for the price of one, since
Windows does things a little differently when printing N copies. Windows
sets the number of copies (e.g. for collated output) in the postscript file
itself, whereas Unix lpr -Kcopies will just literally send the job "copies"
times to the printer (not overly clever). Of course, Unix tools like dvips
can do the same as Windows (or like StarOffice generate completely bogus
postscript code that some laser printers can't even understand).

The solution is a 2-parter. The problem has been complicated by the fact
that different Windows drivers seem to address the problem with different
solutions (different postscript code).

It seems that gs can handle the code, but the png drivers basically just
append the same image N times to the output file (of which
percent{black,colour} only see the first copy). This also takes forever if
you have large PS files. Therefore, we not only get the wrong results, it
takes us just as long as if there were N copies sent to the printer.
Generally a bad thing.

These problems can be solved by firstly pre-processing the postscript file
with GhostScript's pswrite device - which has the added benefit of usually
shrinking the PS file somewhat. This standardises the N copies code to
something which is easy to grep for. A little perl code can now both find
out how many copies of each page have been printed (yes this can be
specified on a per-page basis if you're clever enough to fiddle directly
with the postscript code) and generate a new postscript file which has each
page set to be printed once. The new file can be billed using the normal
process, then the individual page subtotals can be multiplied by the number
of copies for each page. The old file actually gets sent to the secondary
print queue! It's horribly complex, but it's not too much slower than the
old blind method. The beauty of using ps2ps is that it makes it harder for
h4x0rz to insert dodgy postscript to get free print jobs. I do not claim
that this makes it impossible, however :)

At this stage the code has been written but not yet integrated. Very
trusting Unix-only sites may choose to not use ps2ps - but do this at your
own risk - for slightly faster proceessing. My tests have shown the slowdown
is no more than 15% on a typical print job, for a significant improvement in
functionality.

Additional work has been done on cleaning up printbill so that it
more-or-less complies with debian-policy. I mainly want to ensure that every
call to open(), opendir(), readdir(), close(), closedir(), openlog(),
syslog() etc. get tested for success. debian-policy says all print() calls
should test for success as well - I am not convinced that this is necessary.
Consequently, this one will be applied where appropriate (many Debian
scripts violate this policy anyway). Also changed locking to be easier to
manage (keep a hash of all currently active locks, since there are so many
now). printbill_scheduler, the most complex case, is now mostly correct.
Others will follow.

Billme has been renamed to printbill_billme in line with the 3.x naming
convention. It will need an man page at some point...

16th October 2001
-----------------

Changed the isreal function to one that a) works and b) is simpler. Now it
just uses a spiffy regexp like any good perl program.

10th October 2001
-----------------

Added configuration option for currency symbol. By default it is "$" but you
can change this to anything you desire.

Changed pqm to use --amount instead of --dollars. --dollars is still
supported as a backwards-compatibility option, though it will eventually
disappear, since not everyone uses dollars.

Changed CGI script to use REMOTE_ADDR instead of REMOTE_HOST since this
appears to screw up at various times.

Noticed out-of-datedness in various docs. Fixed.

17th September 2001
-------------------

Added configuration option for printbill_quote's niceness - you should
probably make this farily high (say 20) if you plan to use printbill_quote
on the same machine as printbill_scheduler. Also transferred the improved
count-management and file-locking stuff from printbill_scheduler to
printbill_accountonly.

Fixed two bugs in the web admin scripts - the function "isreal()" was
missing (don't know how this one slipped through!) and an obsolete reference
to prog_dir was changed to prog_path.

Changed a 3-argument version of open() to use the 2-argument form in
printbill_scheduler and friends - there was no real need for the 3-arg form
and it seems to not work on RedHat.

16th September 2001
-------------------

Stats collection is a bit better - no stats are collected for zero-page
print jobs (as appear from time to time when broken postscript gets sent to
the filter). Note that even rejected jobs are added to the statistics list.

Added configuration file option "dpi" so people can conveniently trade off
accuracy for CPU load.

pqm tidied up. Some potential warnings (due to problems in the databases)
fixed. Some options have changed to more logical names (clearpages,
clearblack and clearcolour have been changed to resetpages etc.). Web
scripts updated to reflect changes in pqm.

Added another amusing hack - a "billme" filter which allows users to debit
themselves via a special print queue. We use this so that our students (whom
we trust to some extent :-) can help themselves to self-serve drinks and
food in our student lab and pay with print quota if they don't have cash.
There's also a "buy" script which goes with it. If you (for instance) "buy
pie", then it debits the right amount from your print quota (if you can
afford it). Prices are stored in $db_home/wares.db. Note some data is
hard-wired in (name of the printer for instance) because I want these
utilities to be orthogonal to printbill proper. Think of it as an example of
some of the useful things which can be done with the printbill
infrastructure.

15th September 2001
-------------------

Changed process-counting code in printbill_scheduler so it is a bit more
intelligent - check to see if a process has apparently claimed a slot but
has died without cleaning up afterwards.

printbill.pm is a bit tidier - only one line for gs.

9th September 2001
------------------

Added support for (read-only) downloadable database files. Now remote
machines can suck down any database stored on a web or ftp server. This lets
trusted machines (so defined by your webserver's firewall rules and/or
.htaccess files - security being your problem not mine) run pqcheck (and
possibly other things in future).

Improved file locking. Now we check if the process which locked the file is
still alive - if it has spontaneously combusted leaving stale lockfiles
around, we can remove the lockfile and happily continue.

16th July 2001
--------------

Finished tidying up the install script. It's horrible but less horrible now.

14th July 2001
--------------

Moving towards 3.1 release.

Added support for a downloadable config file. If /etc/printbill/printbillrc
just contains a URL (anything starting with http:// or ftp://) it will use
/usr/bin/wget to suck down the configuration file from that site. Obviously
this is a bit slower than using a local file.

Changed error-reporting e-mail to be a bit more informative (including job
number for a start!).

Started changing installation script to use GNU install.

13th July 2001
--------------

Minor documentation fixes. pqm option --print changed to display.
Installation script fixed slightly.

16th April 2001
---------------

Web interface tested. Numerous minor bugs fixed. pqm --used fixed.
Installation script modified to not add users to groups if they are already
members.

Signal handler added to printbill_scheduler, since this script performs file
locking. SIGTERM makes it tidy itself up nicely - so if a machine is being
shut down in the middle of a job it can happen without leaving stale locks.

All things being equal, it looks like a release candidate, so I will release
it (version 3.0) tomorrow.

7th April 2001
--------------

Filenames send to the secondary print queue now look like "user-number"
(e.g. "daniel-4").

19th March 2001
---------------

Fixed numerous assorted bugs, none overly serious. printbill_* no longer
produce any warnings. pqm seems to work. It all looks more and more like a
release is imminent. Even the documentation has been updated. We're in 2.90
Beta stage at present. Deep feature freeze, bug-fixes only. Tentative
release date set to 5th April.

18th March 2001
---------------

Added printbill_accountonly, a filter similar to the scheduling filter but
which allows you to print straight away. It only records toner/ink and page
consumption on a per-user and per-printer basis. It can also be used to
collect stats. It is recommended that if you want to use this filter, make
the maximum number of concurrent processes fairly high so that users don't
have to wait for their job (they can print immediately but the accounting
may take a while). 2.85 Alpha 2.

17th March 2001
---------------

Changed secondary printer specification method, now uses a command-line
argument instead of a line in the printbillrc file. This is slightly more
consistent with the way printbill_quote works.

Added 2-level niceness control - jobs below bill_nicethreshold run at
small_bill_niceness, above run at large_bill_niceness. This allows some
degree of priority control for huge jobs.

16th March 2001
---------------

All scripts etc. updated to use the new more modular structure. Docs
partially updated.

13th March 2001
---------------

Tentative 3.0-alpha version of printbill_scheduler and printbill3_printer.
It worked once, that's all I'm saying. At this stage I'm prepared to call it
2.8 - there'll be several more incarnations before it's all finished (2.85
Alpha2, 2.9 Beta, 2.95 RC, 3.0).

10th March 2001
---------------

2.0 was never released. I decided to say "screw it we'll do scalability
properly this time". So now we have the two-queue system. Next version will
be version 3.0, and will deal with the head-of-line problem. Version 3.1
will support simple round-robin distributed processing. Version 3.2 will
support more fine-grained job splitting. Maybe.

4th December 2000
-----------------

Developed plain-text database object. This may be connected to an
associative array via the tie () function. Now the information in all
databases is stored as colon-delimited plain text. Various fixes made to
do_install.sh to support new features.

Also, we are now using crypt correctly so web passwords are properly
secured. A proper salt-generator has been written, which can be used with
the web interface when we add password-changing support.

More locking fixes.

2nd December 2000
-----------------

More bug fixes, also prevent printbill from calculating the cost of jobs
for users with no quota. Locking in this case was slightly broken, and is
fixed now.

1st December 2000
-----------------

Fixed fubar in printquote (i.e. it didn't work - it got left behind as other
parts of the package were developed) and in pqm (--inc user decremented
instead of incremented - blame a bad cut & paste job).

27th November 2000
------------------

OK, I admit it. File locking was meant to be broken. Fortunately, by driving
me insane, it has forced me to implement a more fine-grained locking system
for printbill. Now we have (advisory) locks for individual users and
printers as well as misc and admin (and anything else you want). This means
that user A may print on printer X at the same time as user B prints on
printer Y. A good thing all round, in fact. Hopefully it's all perfect and
no stale locks will be left to fafferise your system... 100% guaranteed
trust me I'm an Engineer.

PQM has been fixed to use the new locking scheme - it is now (finally!)
broken up into smaller functions. It's a lot less ugly, though still not
terribly pretty.

26th November 2000
------------------

Fixed file locking really truly this time. No more flock, just a plain old
advisory lockfile in /tmp. It's not ideal, and probably doesn't scale
terribly well, but it should at least be safe. We create a lock when called
with -Zjobstart. It remains until the job has been printed and printbill
has been called a second time, this time with -Zjobend. When the databases
have been updated, the lock is released and we sleep for a bit. This gives
other print queues, which may be waiting on the lock, a chance to complete.
The upside is that you should not be able to print for free in multi-printer
environments. The downside is that jobs, regardless of their queue, are
processed in a strictly serial manner - you gain nothing from having SMP. I
can't see a simple way to avoid this, short of having each user's quota in a
separate file and then creating an advisory lock for that rather than
locking the whole printbill system. Maybe this will happen in a future
version - for now it sounds too messy. Lots of printers being used
concurrently will still only allow one job to be printed at a time at
present.

pqm has been modified to use this convention, with some parts working even
if the database is locked. It should be easier to functionalise pqm now. The
--web option to pqm causes it to keep trying (every retry_interval seconds)
until it locks the file - so the web user hopefully won't have to wait too
long before the page appears. Furthermore, since read-only operations aren't
locked, most web operations (check printer status, view user info etc.) will
not block when someone is printing - only things like inc/dec etc. Anyway
that looks like it works now.

22nd November 2000
------------------

Fixes to do_install.sh. Should be possible to install database files
somewhere else now - and expect it to work.

20th November 2000
------------------

Revamped web interface. Now it is easier to go "back" or to "cancel" (i.e.
it is a lot more consistent). Also fixed some bugs and made it install
cleanly again. I just love perl.

18th November 2000
-------------------

Man pages updated.

printquote improved, now supports printer specification (i.e. those listed
in /etc/printbill/printbillrc) and multiple files on the command line.

Install script improved - asks more questions now, slightly more intelligent
about adding users and groups.

Fixes to pqm to make it work better with the web interface.

Scripts to dump and restore databases to/from text files have been added.
These will work on version 1.0 database files too.

17th November 2000
------------------

Colour printing support is in and works. Separate billing schemes for
different printers has been added. You can check the toner/ink status for
individual printers.

The web interface has a new "short" form (just set admin_form_type: SHORT in
/etc/printbill/printbillrc) which is more suitable for environments
with enormous numbers of users. The full list of users is still available.
The web interface now also lets you check and reset the status of the
printers (toner/page count).

An install script has been written (easier than doing it within the Makefile
itself). This prompts users for various options (defaults suit a Debian
system).

Example printcap file constructed and added.

12th November 2000
------------------

Overhauled the web interface - now it uses its own account database. It has
been tested, and appears to work. Database for storing money money actually
spent has been added. Continued improvements to pqm.

Added file locking to pqm and web interface. Changed printbill to use
symbolic names for flock () arguments.

11th November 2000
------------------

Added additional databases, recording toner and paper consumption for each
user as well as the total money actually spent by the user thus far. The web
interface has been updated to use the new pqm and pqcheck utilities (no more
special tools required). Speaking of which, pqm and pqcheck have had further
work to assist the web management interface.

Added a program (printbill_quote) suitable for use with a dummy printer -
it just calculates the cost and mails you the price together with your
current print quota.

6th November 2000
-----------------

Added lockfile support to prevent the (hypothetical) free-printing attack,
thus making the system usable in multi-printer environments.

2nd November 2000
-----------------

Major update, moving towards 2.0.0 release. We now support optional
anything-to-PostScript conversion filter, a web interface and the admin
program has been tidied up and made a bit safer (checks that a user really
exists before crediting/debiting). Documentation fixes.

Two bugs fixed: -dSAFER added to the gs invocation to prevent badness
happening through malicious PostScript code, and fixed a typo in the logging
code which gave very uninformative information :-)
