# How do you manage local/customizing patches for ports



## shuxuef (Jun 6, 2014)

Sometimes I make my own patches for some particular ports, puting those inside the corresponding files folders together with the "official" patches. But I recently found that if I run `portsnap fetch update`, then all my local /customizing patches inside files will be removed. This could be annoying if one has a lot of cusomizing patches. Presumably there is some "canonical way" of mananing  or integrating customizing patches that I don't know? 

Right now I don't have many ports that needed customization, so I just keep my own patches in a directory outside of the port-tree, using RCS for a simple version control. Most of the patches I made are just for changing the behavior of the software into the way I like, not because I'd found bugs or anything.

So, is there a canonical/better way? You may share your way of doing it if you'd like.

Thanks!


----------



## SirDice (Jun 6, 2014)

If you're in the habit of making changes to the ports tree you want to switch to svn to get the updates. The portsnap(8) tool is nice but doesn't know how to cope with local changes. With svn you can decide what to keep and what to replace.


----------



## wblock@ (Jun 6, 2014)

Yes, with a Subversion checkout of ports you can modify port files directly and Subversion will merge downloaded changes with yours, if possible.

If your changes would be useful to others, consider submitting them to be included with the port.  Then you won't have to keep track of them at all.


----------



## shuxuef (Jun 7, 2014)

Ah, I see! I should have thought of Subversion as well. That's the way to go then!

Thank you very much, SirDice and wblock!


----------

