Proposal: mechanism for local patches

Wesley Shields wxs at FreeBSD.org
Mon Dec 1 19:20:14 PST 2008


On Mon, Dec 01, 2008 at 09:31:35PM +0000, G. Paul Ziemba wrote:
> Hi Folks,
> 
> I sometimes have local patches that I need to apply to ports. For
> various reasons, these patches are not available in the ports tree
> (e.g., bug fixes could be still propagating, or I'm trying out a
> bug fix locally before submitting it, or the local patches might be
> inappropriate or unwanted for the general FreeBSD populace, etc.)
> 
> My current practice is to maintain my own tree of patch files and
> then reference them via EXTRA_PATCHES in /etc/make.conf. Mostly
> the patches get applied automatically when I upgrade my ports, and
> when the patches fail I learn about it immediately - no additional
> recordkeeping is required.
> 
> However, I am looking for a better way. It's probably an unnatural
> use of EXTRA_PATCHES. Some ports define EXTRA_PATCHES themselves and
> override what I have defined in /etc/make.conf, so I have to resort
> to modifying the ports tree in place and keep yet another list of
> items to pay attention to when upgrading my ports.
> 
> In hopes of stimulating some discussion, I propose a new variable,
> LOCAL_PATCHES (or maybe SITE_PATCHES), that would behave just like
> EXTRA_PATCHES, except that it would be designated specifically for
> site-local patches. It would be implemented in the do-patch target
> in bsd.port.mk at the end, after patches from PATCHDIR are applied,
> and patch Makefiles would, by convention, leave it unmolested.
> 
> Have I overlooked some better approach to integrating site-local
> fixes?

I'm not aware of anything of this nature which exists.  I think it's a
good idea and would be happy to review anything you are willing to
submit back to FreeBSD.

-- WXS


More information about the freebsd-ports mailing list