Best way to generate a patch file

Dan Mahoney (Gushi) freebsd at gushi.org
Sun Nov 25 20:28:28 UTC 2018


All,

I'm requesting takeover of a couple of FreeBSD ports (cvs and dma, 
although dma is now in base, I imagine the port will be used to track 
upstream changes before they make it into base).

What has been requested thusfar is a diff to update maintainer.  Seems 
simple enough, right, effectively a one-line patch/diff?

So, how do I go about it?  I could certainly cd to /usr/ports/mail/dma, 
copy Makefile to Makefile.orig, and run a manual diff Makefile.orig 
Makefile > /tmp/patch, while in that directory.  That would apply only for 
the single file, obviously.

Or I could clone the entire port, and make a unified diff.  Yes, more 
complicated and perhaps unnecessary for a one-line-in-one-file patch, but 
maybe some tooling expects that (I couldn't find a good rule of thumb 
here).

Finally, in googling around, I found a makefile target that's called "make 
makepatch" -- which isn't documented in 'man ports', and which I *think* 
is not used for tracking patches that will live the lifetime of a port, 
but there's no section in the porters handbook that covers this.

That is to say, the entire "patching" section in the porter's handbook 
covers "lifecycle" (./files) patches, and not "bugreport" patches:

https://www.freebsd.org/doc/en/books/porters-handbook/slow-patch.html

-Dan

-- 

--------Dan Mahoney--------
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
FB:  fb.com/DanielMahoneyIV
LI:   linkedin.com/in/gushi
Site:  http://www.gushi.org
---------------------------



More information about the freebsd-ports mailing list