poudriere with custom packages

Shane Ambler FreeBSD at ShaneWare.Biz
Fri Jul 17 06:04:39 UTC 2015


On 16/07/2015 13:19, Aristedes Maniatis wrote:
> I have a custom built package which I'm building outside the FreeBSD
> ports system (using pkg-create commands). How can I add that package
> to a poudriere managed repository so that it appears in the package
> index and can be easily installed like any other package?
>
> Thanks for any help
>
> Cheers Ari

Create a port for it and include it in the list of ports you tell
poudriere to build. Poudriere will compile any port that exists in the
ports tree it uses whether it is an official port or not.

As long as the name you use for the port is unique, steps like portsnap
or svn update should not remove it. I would still keep a copy elsewhere.

Then you add the folder that poudriere stores pkgs in to be included in
the available repos list.

I use a couple of poudriere commands to build my ports. I have one
using a make.conf that sets various options that I want to use. In
another setup I use a make.conf that also sets python version to 3.4
which builds various modules to use with py34.

For example -
poudriere bulk -j 10stableamd64cc -p myports -z mypkg math/py-numpy
poudriere bulk -j 10stableamd64cc -p myports -z mypkgpy34 math/py-numpy

The first will use etc/poudriere.d/mypkg-make.conf
while the second will use etc/poudriere.d/mypkgpy34-make.conf
to be copied into etc/make.conf during the ports build.

In /usr/local/etc/pkg/repos/homerepo.conf I have
HomeRepoPoudrierePy34: {
   url: 
"file:///usr/local/poudriere/data/packages/10stableamd64cc-myports-mypkgpy34",
   mirror_type: none,
   pubkey: "/usr/local/etc/ssl/certs/pkg.cert",
   enabled: yes
}
HomeRepoPoudriere: {
   url: 
"file:///usr/local/poudriere/data/packages/10stableamd64cc-myports-mypkg",
   mirror_type: none,
   pubkey: "/usr/local/etc/ssl/certs/pkg.cert",
   enabled: yes
}

When I run pkg install it gets an updated list from each repo and
chooses which to install. For ports that are in both repos but with a
different pkg name (as in python prefix) I get both installed, I think
that installing both might only happen first when using the -f flag.
Once both are installed it gets updates from each repo to match.

I recall hearing a plan to add a weight to repos to choose which is
used first. I have found so far that the last repo entry (they are all
listed in one config file) is used over others if the same port is in
multiple repos.

While I have disabled the normal freebsd repo it should be included if
enabled, allowing your own repo to be the source for ports to install
that only exist in your poudriere builds and others to come from the
official repo.

-- 
FreeBSD - the place to B...Software Developing

Shane Ambler



More information about the freebsd-ports mailing list