wwwinst Installation Tools

The UW Technology WWW Development environment provides several sets of development and evaluation directories, and one set of production directories. The wwwinst Installation Tools (wwwuinst and wwwdinst) migrate files from development/evaluation into production.

wwwuinst is available for use from bank.u, shiva.cac, and red.cac. wwwdinst is only available from shiva.cac and red.cac.

Note: If you are developing on a host which is not in the cac.washington.edu domain (i.e. bank.u), you will not be able to directly access the production directories. You must use wwwuinst to do the installations.

Why use the wwwinst tools?

There are a couple alternatives to using the wwwinst tools:

Copying files by hand has the danger of either forgetting to copy some necessary files, or forgetting to remove files that should no longer exist in the production area.

Developing in the production directories raises the possibility of having files become visible to the target audience before changes are completed or before they have been fully evaluated.

The wwwinst tools automate the process by allowing you to make an exact copy of your development files and directory structure into the production area.

What tools are part of wwwinst?

The wwwinst Installation Tools consists of two different programs. You would use the one which corresponds to your development area. These programs are:

wwwuinst
Install from the wwwudev/ directory into www/.
wwwdinst
Install from the wwwdev/ directory into www/.

How are the wwwinst tools used?

The simplest way to use the wwwinst tools is to specify the top-level directory you wish to copy from development to production. As an example, assume that you are developing in the directory wwwudev/world/sample and you are satisfied with how everything is laid out. To install a copy of this directory into the production area, use:

wwwuinst world/sample

A list of all files which are installed, updated, or removed is displayed. These changes will appear on www.washington.edu (with the URL of http://www.washington.edu/sample/) the next day. If you wish to force changes to appear immediately, you would instead use the command:

wwwuinst -push world/sample

I installed my files, but why do they not show up on www.washington.edu?

If you do not use the -push flag (from the previous question), your files will not show up until the next day.

Do I have to install the whole directory every time?

The wwwinst tools allow you to install individual files, also. For example, if you only changed the file wwwudev/world/sample/index.html, you can copy just that file with:

wwwuinst world/sample/index.html

What if I only wish to see what file would be updated?

The wwwinst tools provide a -show switch which will show you what files would be installed, but doesn't actually do the install. For example:

wwwuinst -show world/sample

What if I only want to change files which are newer than in production?

You would use the -newer flag, which only will install a file if the production copy is older than what you're copying from. A sample command:

wwwuinst -newer world/sample

In most cases this flag is not necessary. It's purpose is for the times that you have files that were changed in production but not in development. Another method of preventing these files from being overwritten is to use a .wwwinstrc file (see below).

What are the restrictions for using the wwwinst tools?

The restrictions for using the wwwinst tools are:

Your webguide can help you with any of these restrictions. If you do not have a webguide, then you should contact www-mgmt.

How can I prevent a file or directory from being installed?

The .wwwinstrc file prevents files or directories from actually being installed to production. This can also be used when multiple groups to share the same directory. The .wwwinstrc file must be put into the wwwdev or wwwudev directory in which the skip commands should take effect..

Each line in the .wwwinstrc contains a command which wwwinst uses in the directory that contains the .wwwinstrc file. For example, if your file has the command:

skip test*

then any file or directory beginning with the word test, such as test.html or testdir (including all of the contents of testdir) would not be installed (or removed, if they exist only in production).

Files in subdirectories will not match, so for the example above, the file subdir/test.html would be installed, not skipped. If you wish to skip that file, you need to create another .wwwinstrc file in the directory subdir which has a skip command.

How do I delete an obsolete file?

Once you have removed an old file from /usr/local/wwwudev you can remove it from production using the -delete flag.

For example, if you just removed an old file:

% rm /usr/local/wwwudev/world/sample/oldfile.html

you can remove that file from production using the following command:

% wwwuinst -delete world/sample/oldfile.html
Password for user xxx:
Removing world/sample/oldfile.html

The -delete flag can also be used to remove obsolete directories:

% wwwuinst -delete world/sample/olddirectory

You must not put a slash after the directory (such as world/sample/olddirectory/).

The file or directory must not exist in /usr/local/wwwudev directories before running wwwuinst -delete.

You must wait overnight for the deleted files to be removed from the production systems.

How do I delete many obsolete files at once?

If you have many files and/or directories you wish to remove at one time, rather than use the -delete flag on many individual files, it may be simplest to just use the wwwuinst command on a complete directory. Beware that this will also update any modified files, as well as install new files. You will not need to wait overnight for files to be deleted from the production systems if you use this method.

How do I automatically execute commands before installing a file?

If a directory contains a file named .wwwinstmk, the UNIX program make is run on that file before installation is done. The file must be in a format which can be used by the GNU make program.

Why did I get this error message?

cp: /usr/local/www/world/directory/path/filename.INSTNEW: No such file or directory
If you try to install a file when the parent directory does not exist, you will get this error message. The workaround is to install the directory which contains the file:

% wwwuinst -push world/directory/path

Warning: couldn't fix protections for world/directory/path/filename
This is just a warning which in most cases can be safely ignored. The wwwinst commands will try to make sure all files in the wwwudev (and wwwdev) areas have group write and world read, and will try to fix these protections. When you are trying to do wwwuinst on a file which is not owned by you, but has protections which need to be corrected, you will see this warning message.
/usr/local/wwwudev/world/directory/path/filename exists, can't remove from /usr/local/www
Nothing to delete
If you wish to remove a fileusing the -delete flag, you need to make sure the file does not exist in the /usr/local/wwwudev directory before running the command. This prevents the file from being reinstalled the next time the wwwuinst command is run on the whole directory.
File filename is RCS controlled and locked, skipping
If you have a file which is controled by RCS, you can only use wwwuinst if the file is both checked out and unlocked. If you see this message but didn't know your file was under RCS control (or aren't sure how to work with it) you should contact your webguide for assistance.
make: Nothing to be done for `all'.
If a directory has a .wwwinstmk file, the UNIX program make is run using that file. This message means that everything is already up-to-date.