message routing home : internet : mail : toaster : FAQ : submitting patches How do I configure my firewall

How do I submit patches?

Please make all code contributions in diff -u (unified) or diff -c (contextual) format. When you submit code, make sure to specify exactly what file you are patching and what version you are working with. Example:

lib/Mail/Toaster/Setup.pm v4.39 (Mail::Toaster 4.07)

  • --- Setup.pm.orig Fri Apr 29 14:05:27 2005
  • +++ Setup.pm Fri Apr 29 14:17:59 2005
  • @@ -420,7 +420,11 @@
  • print "\nYou may be prompted to select authentication types. If so, select only vpopmail.\n";
  • sleep 5;
  • print "\n";
  • - $freebsd->port_install("courier-authlib", "mail", undef, undef, undef, 1 );
  • + if ( -d "/usr/ports/security/courier-authlib" ) { # they moved the port!
  • + $freebsd->port_install("courier-authlib", "security", undef, undef, undef, 1 );
  • + } else {
  • + $freebsd->port_install("courier-authlib", "mail", undef, undef, undef, 1 );
  • + };
  • }

This change is required because FreeBSD port maintainer or courier-authlib moved the port from ports/mail to ports/security.

Please attach the patch file to the email so that your email client doesn't word wrap the lines. You can generate a patch and email it to yourself from the comand line like this:

  • cp Setup.pm Setup.pm.orig
  • vi Setup.pm (make changes)
  • perl Setup.pm (make sure it runs)
  • diff -u Setup.pm.orig Setup.pm > Setup.pm.diff
  • mail me@example.com < Setup.pm.diff

If you submit patches in this format, with a little bit of explanation as to why it's necessary, you can expect the patch to be applied very soon and show up in the next release (after testing).


Last modified on 6/4/05.