home *** CD-ROM | disk | FTP | other *** search
- [ Note for non Warwick readers: poppy and orchid are the local machines on
- which gosip is installed. The dubbin directory is the DATA_FILE_DIRECTORY
- which started life as 'dubbin and broken glass', but then changed to simply
- dubbin. ap. ]
-
-
- Things still to do include:
-
- 1. Check the process is not suspended indefinitely. (Fork() and alarm.)
- 2. Informing users after going down should be improved, or removed.
- 3. Move history code into history module.
- 4. Add option to skip printing of info.text. (add info.text item first :-)
- 5. Add option to lu to print out details for a given user.
- 6. Maybe keep all history information in one history file?
-
-
- [ The above list is really more for my personal benefit, but I leave it here
- for you all to enjoy. Perhaps some enterprising programmer can implement
- some of the things on the list, or some analyst add to them. ap. ]
-
-
- History of changes by version number
- ====================================
-
- 29 or possibly 30 introduced a better handling of the '-r' option.
-
- 31 or thereabouts saw gosip split into several modules. It was around this
- time that the facility to act as a primitive 'lu' was added.
-
- 32 or maybe 33 corrected a bug in the automatic deletion of backup files that
- emacs users might leave around. This version also saw the catfile()
- option altered, so that it didn't fork 'cat' but opened the file and
- printed it itself.
-
- 33 Introduced bug fixes for shutdown messages that were too long. Previously
- if the message exceeded 80 chars, gosip would segmentation fault.
-
- 34 General recompilation after the makefile was hacked around a bit. No
- functional difference from 33 (I think). Installed unintentionally.
-
- 35 introduced proper handling of non-writable text files. If text.gosip is
- readable but not writable (someone would have to go and chmod it
- deliberately), gosip will now first attempt to chmod it to 666, and,
- failing that, copy text.gosip into a temporary file and rename it to
- text.gosip, and then chmod it to 666.
-
- 36 features a lot of changes, mainly internal. Lu is hard linked to gosip,
- however it is not yet fully functional. The history file has changed to
- an internal format. The extra line feed coming with last edit information
- has gone.
-
- 37 has improvements to lu. Lu can take an unlimited number of args, and will
- print out history details for each gosip file passed as an arg. The -n
- flag is recognised, but ignored.
-
- 38 has some improvements to the history mechanism. The size of text.gosip is
- now stored even if access was read-only. History.gosip will have the
- correct permissions if it is created by gosip. Previously if created by a
- read-only operation, it wouldn't have.
-
- 39 has a new version of lu invoked without options. It now produced roughly
- the same output as the old 'lu -a' did.
-
- 40 improved the information held in history.gosip. Gosip now keeps a copy of
- text.gosip as you edit, and then checks whether you have actually changed
- the file or not. This information is recorded in the history file.
-
- 41 has an improved layout for lu invoked without options. It now resembles
- the original 'lu -a' much more.
-
- 42 has a check on the size of text.gosip. If it is significantly less than
- at the start of the edit session, gosip asks the user whether he's sure
- that's what he wants, and offers to restore the backup.
-
- 43 has better checking of the command line for lu. It is first scanned for
- any invalid flags, in which case a usage message is given. Previous
- behaviour was to complain about invalid flags as it came to them.
-
- 44 removes a bug: if a file shrinks a lot, and the user confirms he wants to
- keep it, gosip would record the history information as "no change". This
- has now been corrected.
-
- 45 has a minor improvement in that if you just press return in answer to the
- question about whether you want to keep the shorter file, gosip would hang
- until a second return was pressed. Also, if you chose to restore the old
- version, text.gosip would end up with permission 0400.
-
- 46 saw improvements to lu. It now skips files like "text.gosip~" when
- printing its summary information.
-
- 47 has the usercode field in the history struct changed to 12 bytes in
- length, to avoid alignment problems between orchid and poppy.
-
- 48 has a few minor redundancies removed. It also has lu improved such that
- it no longer leaves an unwritable history.gosip file around if one didn't
- exist.
-
- 49 has an improved message about reductions in the size of the file. It now
- tells you the new size when asking you whether to keep it.
-
- 50 The summary provided by lu is now sorted alphabetically by gosip file.
-
- 51 has quite a few minor changes. Lu summary mode now checks properly for
- there being too many gosip files. The 'going down' message has a tab
- replaced by blanks for extra readability, and waiting times before killing
- the editor have been altered slightly.
-
- 52 has one minor change (hardly worth a new version number really). Lu
- summary information now right aligns the size of the files, causing the
- names that follow to be aligned.
-
- 53 contains additions to the lock mechanism, using (as previously) flock() on
- the local machine but a lock file for the remote machine. All lock code
- as been moved to the function lock().
-
- 54 has a small bug removed. If a lock file already exists when someone tries
- to use gosip, it would exit with an error message about not being able to
- create the lock file.
-
- 55 has -n option working on lu.
-
- 56 Whenever gosip is asked to check whether it is invoked, it will delete any
- local lock file that may exist, if flock() says that gosip's not being
- used locally. This helps to minimise damage when lock files are left
- around by means I don't fully understand - it never happens to me.
-
- 57 The usage 'lu -n <int>' as been replaced by 'lu -<int>'. This also
- removes the bug whereby 'lu -n gosip' is not caught as an error.
-
- 58 introduces 'lu -<int>' which works as 'lu -<int> `allgoss`'.
-
- 59 introduces 'lu -n: gosip' which lists entries from the history file that
- are less than n minutes old.
-
- 60 now has 'lu -hour:min gosip' working. Still no checking for invalid
- command line arguments.
-
- 61 has proper checking for invalid args to lu.
-
- 62 removes the gratuitous blank line at the beginning of 'lu gosip' output.
-
- 63 takes default gosip options from the environment variable GOSIP.
-
- 64 improves signal handling, trapping SIGTERM and SIGQUIT and calling a tidy
- up routine.
-
- 65 prompts for a name when editing, if environment variable NAME is not
- defined.
-
- 66 improves handling of the above facility. fgets() is used to read the
- name, which handles delete correctly, and more info is provided.
-
- 67 has alterations to the above (minor), a couple of wording changes and use
- of environment variable EDITOR if VISUAL is undefined.
-
- 68 introduces environment variable GOSNAME. If undefined, NAME is used as
- your name instead.
-
- 69 has the lu usage message corrected. I know it's a pretty minor
- alteration, but I want to try installing a new version, now that I've
- moved the binaries to one of my directories.
-
- 70 Gosip prints a list of gosip files when invoked with the name 'allgoss'.
- A few other minor changes have also occurred.
-
- 71 has a few internal changes - structure in lu now has a union to ensure the
- correct type, depending on whether a time or line number constraint is
- required. Previously the same field was used, which worked ok since
- time_t == int on this system. Main external changes are that
- update_history() now removes from history.gosip entries more than RECENT
- seconds old, and you can now do 'gosip -p<printer>' to specify a printer.
-
- 72 removes a small inefficiency from the allgoss section, which meant that
- allgoss() was accidentally called twice.
-
- 73 increases RECENT a little. Introduces a new module, history.[ch], to
- which a couple of functions from lu are moved.
-
- 74 The recent religious discussion in events, which meant events was invoked
- much more frequently than is normal, has revealed deficiencies in the
- lock() function. It has now been rewritten to just use a simple lock
- file. Since SIGHUP, SIGTERM, SIGQUIT are now trapped, instances of the
- lock file being left around when it shouldn't be, should be rare.
-
- 75 Includes the name of the gosip file in the advisory message when SIGHUP,
- etc., are caught. The message is now sent to stderr rather than stdout.
-
- 76 reintroduces flock() to the lock() function. However, this time the
- lock_file is always checked first, and flock() is only used if lock_file
- is more than 12 seconds old.
-
- 77 introduces an extra space in the bytes field of lu summary. This keeps
- the names aligned, now that xian (Christian) file has exceeded 100K.
-
- 78 includes the user's name/alias in the history file information. A
- function gosname() has been added, similar to usercode(), that returns
- this information. It is also given by history() in lu.
-
- 79 has the function monitor_usage() included. It keeps a record of how gosip
- is invoked and by whom. I want to see exactly how many people know about
- which options.
-
- 80 If gosip is invoked by SUPER_USER, he is prompted for the removal of any
- files in DATA_FILE_DIRECTORY which do not begin with either "lock.",
- "history.", "last." or "text." and which are older than the oldest lock
- file and at least half an hour old.
-
- 81 ups the value of RECENT a little. Also has a newline added between the
- prompts for whether to delete old files, and old files now need to be at
- least four hours old.
-
- 82 has the bit that checks if you want to keep a smaller gosip file altered.
- Since Steve was complaining that he typed 'lu' ahead and so lost his
- changes, I've fixed it so that only responses beginning with 'yes' or 'no'
- are accepted.
-
- 83 ensures that history file pruning leaves at least MIN_LINES entries in the
- history file.
-
- 84 checks for non-printable characters in the user's name. If the name came
- from an environment variable, the user is prompted to enter a name. If he
- entered an invalid name, his name is set to "<UNKNOWN>". An invalid
- option is no longer treated as '-l'.
-
- 85 due to popular demand, the anomaly removed in 84 is partially restored, in
- as much as a single letter is treated as '-l'.
-
- 86 features changes to usercode(). The code is obtained from the password
- file entry for getuid(), rather than using getlogin(). This means the
- correct person is returned if the user has used su(1).
-
- 87 Changed the fopen(..., "w+") to "a+" when updating history information.
- This means that the history file is created if it doesn't exist.
-
- 88 removes a slight bug, in that '-sdfa' would be treated as '-l' rather than
- as an illegal usage.
-
- 89 improves the removal of drivel files routine. Now also files with a legit
- prefix ("text." or "last.") are killed if the rest of their name contains
- non-alphabetic characters (eg. text.gosip~). Also, history and lock files
- are moved into a non-readable sub-directory of DATA_FILE_DIRECTORY, to
- stop people editing/removing them.
-
- 90 corrects the bug which failed to check the return value of lock() for the
- possibility of failure in creating the lock file.
-
- 91 corrects clean_directory(), in that files beginning "history." and "lock."
- are no longer valid, now that they are stored in the sub directory.
- Monitor_usage() includes the hostname.
-
- 92 Lots of internal changes. I went through the source to check for errors
- before posting it, and found lots. In some places, return values weren't
- checked properly for errors, in others harmless errors caused exit()s, and
- in some places, inefficient code was left over from the beginning, when I
- was still relatively inexperienced with C.
-
- 93 Installs removal of drivel files. Now files that do not match the emacs
- regexp "^\(text\.\|last\.\)[a-zA-Z]+$" are automatically removed by anyone
- who uses gosip for editing (that is, not by gosip -v or -l, etc.). I have
- temporarily arranged to have to have a log kept of all files so deleted.
-
- 94 Altered usercode() to strcpy() the code it gets from getpwuid(). Since I
- call getpwuid() again to get the code of the owner of a drivel file so I
- can log it (see version 93), usercode()'s value was previously
- overwritten.
-
- 95 Places a limit on the length of a gosip file. The recent creation of the
- 'politics' gosip file messed up lu output a little, and very long names
- would completely destroy it.
-
- 96 Removes the bits that keep a records of usage (monitor_usage()) and of
- deleted files. Alters clean_directory() such that "Makefil" is a valid
- prefix. This pacifies Mike, who keeps trying to put a Makefile in
- DATA_FILE_DIRECTORY. MAX_FILES is upped to 14, as we now have 13 gosip
- files.
-
- 97 Alters the locking mechanism to use lockf(). Last_file is now just opened
- for writing, not deleted, since all files in dubbin now have to be owned
- by someone on poppy because orchid users don't have a poppy quota.
-
- 98 Copies the text file into /tmp, and edits the copy. This single change is
- so simple and yet so powerful. It now allows the dubbin directory to be
- unwritable, and at a stroke removes a the need for all the tedious
- checking for text.gosip unwritable, for drivel files in the dubbin
- directory, etc; and allows the restructuring mentioned in version 100.
- Further, chdir() is not called - all filenames are given with a full
- pathname.
-
- 99 Moves last_file into the .data directory.
-
- 100 Alters the structure of the dubbin directory. Dubbin is unreadable,
- allowing last, lock and history files to be stored there, while a
- subdirectory of dubbin is readable, in which the text files are stored.
- This means the the directory can be searched, to allow allgoss to work,
- yet the text files cannot be edited directly.
-
- 101 Introduces the option 'z' to print out the gosip file directly - no pager
- is invoked, nor is last usage information printed. Also, page() is
- altered in that it does not fork() a pager if stdout is not connected to a
- terminal.
-
- 102 I've discovered that lockf() has a bug: testing for a lock does not work
- on orchid if the lock was applied on poppy. Therefore I've changed lock()
- so that it applies a lock in order to check, and then removes it. Also,
- if gosip is smaller, both initial and final sizes are given in the
- confirmation message.
-
- 103 Alters the error message produced by catfile() so that it doesn't give
- away the name of the hidden directory in which text.gosip is stored.
-
- 104 I found that I'd written the current name of the secret subdirectory of
- DATA_FILE_DIRECTORY directly into the code for allgoss(). I've now
- defined SECRET_DIR and use that instead.
-