Local Patch Hierarchy

Douglas K. Rand rand at meridian-enviro.com
Sun Mar 26 01:26:05 UTC 2006


There are times when before installing a port we have to apply local
patches before building the port. These patches can be local for a
number of reasons, including refusal by the maintainer (perhaps on
very sound reasons) to accept the patches along to uniqueness
(a.k.a. brain-deadness or cluelessness) of the site installing the
port. 

One solution that I've been thinking about is a knob for bsd.port.mk
that would identify the top of a hierarchy looking like /usr/ports
would hold local patches for those ports requiring them.  For example:

  LOCAL_PATCH_BASE= /usr/sitename/port-patches

And under port-patches would be, for example, a mail/imap-uw/patches
directory would contain patches to the University of Washington's IMAP
server that need to be applied, probably after, the patches done by
the port are applied. By default that knob would be undefined and
would not cause any change to existing functionality. And if defined,
it would not complain about a missing category/port directory.

First off, I was wondering if there is a method that I just missed
that will already accomplish this, or something near this. And if not,
does anybody think it is a good idea.

I'll admit that the number of ports that we use that require these
patches are fairly small because usually either the primary author
accepts if not the patch, the idea; or the port maintainer will accept
a patch along with a port-specific /etc/make.conf knob that enables
the patches required.  But we do at times need to remember to patch a
particular package by hand before each installation/upgrade. And, as
you can imagine, our remember rate is not 1.0.



More information about the freebsd-ports mailing list