How to make and submit source code patches for Openwall software

If you have modified our software and would like to submit or otherwise distribute a patch for others to use, please use the following command on a Unix-like system (or on Cygwin if you use Windows) to generate the patch file:


For example, revision 12 of the jumbo patch for John the Ripper 1.7.2 was generated with:

TZ=UTC diff -urpN john-1.7.2.orig john-1.7.2 > john-1.7.2-all-12.diff
gzip -9 john-1.7.2-all-12.diff

Or, to have it on one single line:

TZ=UTC diff -urpN john-1.7.2.orig john-1.7.2 | gzip -c9 > john-1.7.2-all-12.diff.gz

For a new patch, or a patch to a new version of the software, use revision 1. This will help us track any updates to the patch that we or you might make later.

If you intend to send a patch by e-mail, or especially to post it to one of our mailing lists (e.g., john-users), please leave it uncompressed (as long as the patch is smaller than, say, 50 KB) and attach it to the message, with text/plain, text/x-patch, or text/x-diff as the MIME Content-Type. This makes the patch visible in web-based archives of the mailing lists, as well as makes it easier to quote and comment on it in any follow-ups.

Patches for John the Ripper may also be uploaded to the proper wiki page, and then you may post the wiki URL to john-users. Whatever way you choose to share your code with the community, please make sure you're licensing your code properly.

When re-generating patches to apply additional changes, the existing patches should be applied with patch -Z, for example like this:

patch -p1 -Z < ../NAME-VERSION-WHAT-REVISION.diff

The use of timestamps in UTC lets us better preserve them over patch file updates and reduces the amount of changes between revisions, which makes it easier to review any changes.

Please remember to format your code properly:

indent -kr -i8 -nlp -nbbo -ncs -l79 -lc79

Read more about Owl conventions

how-to-make-patches.txt · Last modified: 2012/08/26 11:28 by aleksey
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate to DokuWiki Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki Powered by OpenVZ Powered by Openwall GNU/*/Linux Bookmark and Share