diffutils: Tips for Patch Producers

 
 11.1 Tips for Patch Producers
 =============================
 
 To create a patch that changes an older version of a package into a
 newer version, first make a copy of the older and newer versions in
 adjacent subdirectories.  It is common to do that by unpacking 'tar'
 archives of the two versions.
 
    To generate the patch, use the command 'diff -Naur OLD NEW' where OLD
 and NEW identify the old and new directories.  The names OLD and NEW
 should not contain any slashes.  The '-N' option lets the patch create
 and remove files; '-a' lets the patch update non-text files; '-u'
 generates useful timestamps and enough context; and '-r' lets the patch
 update subdirectories.  Here is an example command, using Bourne shell
 syntax:
 
      diff -Naur gcc-3.0.3 gcc-3.0.4
 
    Tell your recipients how to apply the patches.  This should include
 which working directory to use, and which 'patch' options to use; the
 option '-p1' is recommended.  Test your procedure by pretending to be a
 recipient and applying your patches to a copy of the original files.
 
    ⇒Avoiding Common Mistakes, for how to avoid common mistakes
 when generating a patch.