Using pkgng, but building some ports with custom options

Steve O'Hara-Smith steve at
Wed Jan 8 05:36:22 UTC 2014

On Mon, 6 Jan 2014 14:49:26 +0100
John Rogers <microsparc64 at> wrote:

> Hello.
> I'm looking into switching to using pkgng once FreeBSD 10 is released.
> I must say that I'm very impressed so far after playing around with
> it, but I have run into a question that I have been unable to find the
> answer to. Is it possible to use pkg install from for
> most packages, use portmaster locally for some packages when I want to
> use custom build options and have it all work well together?
> A typical scenario that I want to avoid is that I have a custom built
> installation of port A. Then one day the package is updated to a new
> version on, which overwrites my local install when I
> run pkg upgrade.

	Yes this is possible - I use poudriere to maintain a local
repository of a handful of packages with custom build options and/or
patches while getting the rest from the servers. My poudriere
setup publishes the packages through a thttpd server running on localweb.

	I set it up like this:

FreeBSD: {
  url: "pkg+${ABI}/latest",
  mirror_type: "srv",
  enabled: YES

local: {
  URL: http://localweb/packages
  enabled: YES

	The final part is to use

pkg annotate $pkg repository local

	For every package where the local version must be used, this
ensures that I will never pick up those packages from any other repository,

Steve O'Hara-Smith <steve at>

More information about the freebsd-questions mailing list