Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Node:Tips for Patch Producers, Next:, Up:Making Patches

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 time stamps 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.

See Avoiding Common Mistakes, for how to avoid common mistakes when generating a patch.


 
 
  Published under the terms of the GNU General Public License Design by Interspire