TuX as LLG logo
Software
DMX4Linux
Driver Suite for Linux
csv2iif.pl suite
convert PayPal transactions to IIF, OFX, QIF
Hardware
DMX30 Interface
128Ch SPP
DMX43 Interface
2out 2in EPP
LED Hardware
for Linux and Windows
EPROM Sampler
for 8 bits of sound
Misc
CatWeasel
Linux drivers for MK3/4 PCI
pg_trompe
PostgreSQL replication
trycatch
C exception/signal handling lib
Patches
to various software
Tools
and small scripts
Docs
misc documents
Links
to lighting stuff

CVS Repository MD5 File Checks

Automatically validate your CVS repository from file system corruptions

Every couple of years I experience a file system corruption and if it comes from a (slowly) failing hardware the ongoing corruption can happen for a long time before it is finally noticed. Even if you have some backups available, they might contain already corrupted files, so a file compare against your backup doesn't assure you, that all your important files were not altered. After I had gone through this situation once again in early 2009 I decided to write a small program to automatically create and validate MD5 check sum files for my CVS repository. You can get and use this software here for free (as in beer and freedom, zlib/libpng licensed).

The program will create a MD5 check sum file for each file in your repository, once the file is modified through CVS (by committing or tagging the file). If you checkout or update the file and the program finds a corresponding MD5 check sum, the check sum is compared first and if it does not match the CVS action is aborted and you will see an error message, telling you to contact your CVS admin.
You can add the program to your CVS repository today and it will start creating and checking those MD5 check sums for increased trust in your CVS repository sanity.

The program will work fine along other CVS hooks, such as commit email notification with cvslog.

Installation

You need CVS 1.12.x or newer to use this program. I've tested this program with CVS running in pserver mode, but it should work just fine with direct or SSH access.

  1. Checkout the CVSROOT directory and copy md5 into it.
  2. In the md5 program edit the ADR variable and enter your name and email address.
  3. Add the md5 program to the directory with cvs add md5
  4. Set UseNewInfoFmtStrings=yes in CVSROOT/config.
  5. Add the following line as the first directive in CVSROOT/loginfo: ALL sh $CVSROOT/CVSROOT/md5 %c %r %p %s
  6. Add the following line to CVSROOT/commitinfo: ALL sh $CVSROOT/CVSROOT/md5 checkmd5 %r %p %s
  7. Add the following line to CVSROOT/posttag: ALL sh $CVSROOT/CVSROOT/md5 %c %r %p %s
  8. Add the following line to CVSROOT/checkoutlist: md5 Unable to check out md5sum script

Download

Version/DateURLChanges
2009-12-30md5fix backup file creation for import
2009-12-29md5improved debug output
2009-07-07md5initial release

TODO

  • Use other check sum algorithms like SHA-1

See Also

My helper scripts for CVS usage: cvsadd and vc.

Contact

For questions and suggestion contact Dirk Jagdmann <doj@cubic.org>.


Search:
http://llg.cubic.org © 2001-2017 by Dirk Jagdmann