the djb way

clockspeed


installation


Link: http://cr.yp.to/clockspeed.html
Version: clockspeed-0.62 (1998.10.13, "alpha")
Download: clockspeed-0.62.tar.gz
MD5 (clockspeed-0.62.tar.gz) = 425614174fcfe2ad42d22d3d02e2d567
Build type: djb classic (make setup check)
errno patch: clockspeed-0.62.errno.patch

We use the clockspeed package to set the stage for most of the installations we will perform along the djb way.

If the djb way means anything, it means building from source. The general outline for installing any djb package is very simple:

  1. download
  2. unpack
  3. patch (if necessary)
  4. build/install

By download we mean obtaining the source distribution of the software package, one way or another, but usually over the Internet via ftp or http directly from the author's server.

A source package comes as a single bundled and compressed archive, consisting of many individual source code and documentation files. By unpack we mean using the file and archive utilities necessary to uncompress and copy the archive onto your own system.

Sometimes it is necessary to modify the source distribution, in order to correct an incompatibility with a particular platform, or to add certain features not provided in the original package. A source modification is called a patch, and is applied to the unpacked archive by way of the patch utility.

Once the source distribution has been obtained, unpacked, and--if necessary--patched, it is ready for the final step in installation. By build/install we mean the procedure that results in the software being configured, compiled, tested, and installed on your own computer. Most often on the djb way, this is as simple as one or two make commands on the command line.

In fact, the whole procedure is highly automated, and usually takes just a few minutes from start to finish, even over a slow internet connection.

The procedure described here will make use of these directories:

/usr/local/djb/dist
local repository for downloaded source packages
/usr/local/djb/patches
local repository for downloaded patch files
/usr/local/djb/build
where the packages will be unpacked and compiled

Prepare them so:

# mkdir -p /usr/local/djb/dist
# mkdir /usr/local/djb/patches
# mkdir /usr/local/djb/build

Now we are ready for clockspeed. First, grab the source code, using your preferred download utility (ftp is shown here):

# cd /usr/local/djb/dist
# ftp ftp://cr.yp.to/clockspeed/clockspeed-0.62.tar.gz

It is always advisable to verify the integrity of the package:

# md5 clockspeed-0.62.tar.gz
MD5 (clockspeed-0.62.tar.gz) = 425614174fcfe2ad42d22d3d02e2d567

If the checksum doesn't agree, the package may have been altered or corrupted. Delete the archive and download the package again from a trusted source.

If your system is a contemporary GNU/Linux distribution, you will also need to obtain the errno patch for clockspeed (see the appendix errno patches for more information):

# cd ../patches
# ftp ftp://moni.csi.hu/pub/glibc-2.3.1/clockspeed-0.62.errno.patch

Now proceed to unpack the source package into the build directory:

# cd ../build
# tar -xzvf ../dist/clockspeed-0.62.tar.gz

You will find a new directory in /usr/local/djb/dist named clockspeed-0.62. Change into this directory:

# cd clockspeed-0.62 

If you need to apply the patch, this is the time to do it:

# patch -p1 < ../../patches/clockspeed-0.62.errno.patch

For the final step, the package is built and installed as follows:

# make
# make setup check

Typically a bunch of compiler output and warnings will flash by on your screen. Don't worry, this is normal. When it's all done, that's it! The package has been compiled and installed on your system.

Note that djb software is mostly self-contained and the compilation is self-configuring. The build system usually figures out how to adapt the package to your specific hardware and operating system automatically.

As a simple courtesy you can let Bernstein know how everything worked out, substituting your own name in the following:

# (echo 'Sandra Bullock'; cat `cat SYSDEPS`) | mail djb-qst@cr.yp.to 

The procedure described here is what we will call djb classic (make setup check). This build procedure is also described in the building djb appendix.

The clockspeed package is now ready to use. The next section describes how to mark time with clockspeed.

[Note: platform-specific instructions for configuring the system for proper handling of leap seconds is discussed in here.]


Copyright © 2002, 2003, 2004, Wayne Marshall.
All rights reserved.

Last edit 2004.04.05, wcm.