Jun 102014
 

I have a custom patch for Nagios. I use poudriere for building my FreeBSD ports.

How can I combine the two?

I asked that question on the FreeBSD Ports Mailing list.

The answer came via IRC, from bsd-x. He introduced me to the concept of EXTRA_PATCHES (documented here).

I added these entries to /usr/local/etc/poudriere.d/webserver-make.conf:

.if ${.CURDIR:M*/net-mgmt/nagios}
EXTRA_PATCHES+= /distfiles/local-patches/webserver/nagios.patch
.endif

Knowing that my distfiles directory used by poudriere is this one:

$ grep DIST /usr/local/etc/poudriere.conf
DISTFILES_CACHE=/usr/ports/distfiles

I placed the patch file at /usr/ports/distfiles/local-patches/webserver/nagios.patch

When slocum runs, this directory (/usr/ports/distfiles/ is mounted at </distfiles/, and that is how the entry in the configuration file above points to the patch.

When the port is built, I see this in the logs:

...
#### /usr/local/etc/poudriere.d/webserver-make.conf ####
.if ${.CURDIR:M*/net-mgmt/nagios}
EXTRA_PATCHES+= /distfiles/local-patches/webserver/nagios.patch
.endif
...
===>  Patching for nagios-3.5.1_5
===>  Applying extra patch /distfiles/local-patches/webserver/nagios.patch
===>  Applying FreeBSD patches for nagios-3.5.1_5
...

The port is patched. The fixes come through. Done.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

  One Response to “FreeBSD custom port patches when using poudriere”

  1. This worked for me last night when I upgraded my webserver.

 Leave a Reply

(required)

(required)


× 7 = fourteen

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>