Hacker News new | ask | show | jobs
by aduitsis 3742 days ago
Pkgng and poudriere can very neatly be used in conjunction. You can use pkg to fetch and install all your binary packages from FreeBSD in the same way that apt-get is used in Debian. Most people will do just that.

But, if you'd like to have some ports built by yourself with special options, you can setup a poudriere builder and tell it to periodically make the ports you're interested in. The ports are compiled and packaged into pkgng packages. The final result is an additional private repo which you can totally use along with the official FreeBSD one.

2 comments

Last time I checked, poudriere and other similar tools didn't have the option to ONLY build ports for which you have customized options, i.e. fetch their non-customized dependencies from pkg repos >_< That was possible on Arch Linux with yaourt… back when I used Arch as my primary OS, and that was when the Eee PC 900 was still relatively new.
Yes, that is correct. But this isn't a characteristic of Poudriere, but of FreeBSD ports in general. If you try to build a port and it has dependencies, it will build them as well. Doing pkg search -f yourpackage will fetch the build options that were used when building the remote package if I remember correctly. So one could theoretically ascertain what are the local Poudriere and the remote repo build options.

And yes, I agree, it would be more efficient to just download the packages if the default options are unchanged. But in practice I hardly notice, because for most packages the dependencies are not too deep.

Besides, doing all the dependencies yourself adds a level of consistency. If your package depends on libwhatever.so.6 and there is a major/minor version change in that library, that might introduce a subtle but important API change, I guess you would rather prefer building libwhatever yourself to make sure that everything will work out ok.

You can specify poudriere which packages to build, it does not have to be all of them. This is in addition to the custom make.conf and options files. The resulting repository catalog will contain only the packages you specified, plus all their build- and runtime dependencies.

What it can not do is infer the list of ports from the custom make and port configurations.

I've heard time and again that you should either build everything from ports of install pkg binaries? I believe it's because of different use flags (in Gentoo lingo), so maybe you mean that one would build everything privately in a consistent poudriere repo with personal settings and only ever install packages from there. Is that right?
Uh… no? Unless you really customize all the options I guess. There's no reason to rebuild the exact same package you'll get from the repo.

E.g. I install all firefox's dependencies from pkg, then I build firefox from ports with the GTK3 option. Same with packages that use openssl (I use libressl). Never had any problems with that.

You can mix and match. The only problem comes if you have flags in a dependency that don't match the flags in the package pkg wants to install. A bit bothersome, but it allows you the best of both worlds.
As floatboth said, there's really no reason to build every minor package by hand. Only those that you want to change the config or their dependencies.