Patching source code
====================

Patch file name convention:

    SHADOW patch files are named in the following manner:
	
	shadow-V1-V2.diff.gz
    
    where V1 and V2 are the 2 releases this patch bridges. eg., the
    following patches a SHADOW 2.1.1 source to 2.2.0:

	shadow-2.1.1-2.2.0.diff.gz
    
    If you retrieve shadow-2.1.1-2.2.0.diff.gz, you must obviously also
    have an unmodified SHADOW 2.1.1 distribution, since that is the whole
    purpose of the patch.

Requirements:
    - GNU "unzip" program and reasonably recent version of the "patch" 
      program available from any respectable GNU/FSF ftp site (eg., 
      prep.ai.mit.edu in /pub/gnu).  We use patch v2.0.x.

      I also have precompiled "gunzip" and "patch" for various machines
      in ../unsupported. Feel free to download those if you need to.
    
    - the "diff" or the patch file. Typically ends with .diff or
      .diff.gz (compressed with GNU gzip) extension.
    
    - source code for the older release that you're trying to patch.

How to patch:
    
    - cd to the source directory and apply the patch
	% cd /usr/local/src/shadow-2.1.1
	% gunzip -c /tmp/ss-960912.diff.gz | \
	     patch -p1 -s --remove-empty-files

      If your patch program doesn't support --remove-empty-files, simply
      leave it out. The problem is that this might leave 0 sized (empty)
      files which might cause problems. You should execute the following
      if your patch does not support --remove-empty-files:

	% find . \( -type f -a -size 0 \) -print | xargs /bin/rm
      
      which will delete all the empty files.

    - now remove the '*.orig' files patch leaves around:

	% find . -name '*.orig' -print | xargs /bin/rm
    
    - rename your source directory to v2.2.0. Not necessary, but nice
      to know what release you have from the directory name.

	% cd ..
	% mv shadow-2.1.1 shadow-2.2.0
	% ln -s shadow-2.2.0 shadow
    
    - re-run configure and rebuild SHADOW according to the INSTALL file.

===========================================================================
