Like any other piece of software (and information generally), 
leapsunpack comes with NO WARRANTY.

This program is designed to augment D. J. Bernstein's libtai package,
available at http://cr.yp.to/libtai/libtai-0.60.tar.gz

=======
Compile
=======

The leapsunpack program can be compiled by running make from the
command line.
 $ make

=================
Check correctness
=================

Test the correctness of leapsunpack against D. J. Bernstein's provided
leapsecs.txt table, available at http://cr.yp.to/libtai/leapsecs.txt

1. Strip the known correct leapsecs.txt file of blank lines and
comments:
 $ sed '/^$/d;/^#/d' leapsecs.txt > leaps.original

2. Now run leapsunpack and compare the two:
 $ dnstxt leap.yp.to | leapsunpack | cmp - leaps.original

The dnstxt program is part of the djbdns-1.05 package, available at
http://cr.yp.to/djbdns/djbdns-1.05.tar.gz

If you do not have djbdns-1.05, you may also use dig or nslookup.
 $ dig leap.yp.to txt
   or
 $ nslookup -q=txt leap.yp.to

Be aware that both dig and nslookup return additional lines of
formatting other than the TXT record that leapsunpack parses. If you
use either dig or nslookup, you will need to manually extract the
leapsecond table.  It is the numerical string beginning with
"822222". Put this string into a file, and run it through leapsunpack:
 $ leapsunpack < file

Alternatively, leapsunpack version 0.04 and up can query leap.yp.to by
itself using the "-a" flag. This will automatically generate the
leapsecond table on any system that can make DNS queries. leapsunpack
will only contact leap.yp.to. If you wish to obtain the compressed
leapsecond table from another location, you cannot use the "-a" flag.
 $ leapsunpack -a 

=====
Usage
=====

To create or update /etc/leapsecs.dat, perform the following:
 $ dnstxt leap.yp.to | leapsunpack | leapsecs > /etc/leapsecs.dat
   or have it contact leap.yp.to directly
 $ leapsunpack -a | leapsecs > /etc/leapsecs.dat

Alternatively, leapsunpack version 0.05 and up contains a very slightly 
modified version of D. J. Bernstein's leapsecs program in addition to a
simple shell script that will automatically create or update 
/etc/leapsecs.dat for you. If necessary, specify a different location 
or name for the leapseconds table. The default is /etc/leapsecs.dat.
 $ leapsinstall
   or
 $ leapsinstall /path/to/myleapsecs.dat

That's it! To report success:
       % ( echo 'First M. Last'; cat `cat SYSDEPS` ) \
         | mail toby-qst@su.bze.ro
Replace First M. Last with your name.
