Generating Diffs

So you've done some wonders to the OOo source and want to share them with the world. It seems that patch on OS X is rather particular and doesn't behave well when presented with funky line endings or other formatting issues so prevalant in the Mac world (ah, the joy of \r versus \n). People seem to have had problems with the straight cvs diff I performed for my initial patch submission, so I returned to the drawing board. After several attempts, here's what I've been doing to generate diffs on OS X and thus far it seems to be successful. Assume you're generating diffs for a module mod:

  1. setenv CVSROOT
  2. cvs login
  3. cd /path/to/mod
  4. cvs diff -u > ~/some.patch
  5. gzip ~/some.patch

Then distribute some.patch.gz. To apply this patch, I believe the following series of steps would be necessary after downloading the patch to your user directory (or other tilde location of preference):

  1. gunzip ~/some.patch.gz
  2. cd /local/path/to/mod
  3. patch -p0 < ~/some.patch

These series of steps seem to apply. Anyhow, if you have suggestions on how patches should be generated, please feel free to send informaiton to the porting development mailing list. If it's not what I do, I'll change. With luck, I'll update these instrucitons too.