How do I create a patch?

Jeff Waugh jeff.waugh at canonical.com
Tue Sep 28 01:26:54 UTC 2004


On Tue, 2004-09-28 at 13:03 +1200, Jim Cheetham wrote:
> I've found a package with a small problem, that can be fixed with a 
> change to one line in one of the config files ...
> 
> I'd like to create "a patch" to offer back to Ubuntu ... but I don't 
> know how to create one.
> 
> I know it involves using 'diff' :-) and I guess I should be changing the 
> source package, or perhaps both ... I've downloaded them both, and I've 
> made a copy with my change in ... but how do I create the patch correctly?

So if you have the package source directory, and you've copied it to a
new directory, you can do this:

  diff -ur original-dir modified-dir > package.diff

- Jeff

-- 
Ooh, ooh, ooh!             http://www.ubuntulinux.org/           Ubuntu!




More information about the ubuntu-users mailing list