Overriding binary package with local build

Matthew Seaman matthew at freebsd.org
Mon Mar 9 10:22:39 UTC 2015


On 03/09/15 09:43, heasley wrote:
> If one builds a package from ports in order to use different options, for
> example building with postgres support instead of mysql, or builds a
> specific version, but otherwise utilizes binary packages, how is this
> indicated to 'pkg upgrade'?
> 
> For example.  On this system I've built gld with postgres instead of mysql
> and postfix with another option.  The mysql dependency is coming from the
> binary gld with the default options.  And, in theory postfix has different
> options, but also needs an update.
> 
> So, is it possible to tell pkg(8) about the different options/local built,
> but still complain when a version update is necessary?
> 
> # pkg upgrade
> Updating FreeBSD repository catalogue...
> FreeBSD repository is up-to-date.
> All repositories are up-to-date.
> 	...
> 
> New packages to be INSTALLED:
>         mysql56-client: 5.6.23
> 
> Installed packages to be UPGRADED:
>         postgresql94-server: 9.4.0 -> 9.4.1
>         postgresql94-client: 9.4.0 -> 9.4.1_1
>         postfix: 2.11.3_4,1 -> 2.11.4,1
> 
> Installed packages to be REINSTALLED:
>         gld-1.8_2 (options changed)

The best way I've found of doing this is to set up a local poudriere
instance to build the packages you want to customize, plus anything
that depends directly on them.  You can then set your local pkgrepo as
higher priority than the main FreeBSD repo in
/usr/local/etc/pkg/repos/foo.conf.  You might also want
'CONSERVATIVE_UPGRADE=yes' in /usr/local/etc/pkg.conf

A poudriere setup for building just a few packages doesn't need a whole
lot of system resources.  You'll need to tune poudriere.conf so it
doesn't try and max out usage of everything -- maybe limit it to a
single builder.  You can serve the packages it builds either by HTTP, or
if everything is all on the same machine, you can just use a
file:///.... URL in your repo conf.

	Cheers,

	Matthew



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20150309/2f70d8b0/attachment.sig>


More information about the freebsd-ports mailing list