Building Binary Packages in FreeBSD

It’s amazing how difficult it can be to find certain things on Google. It’s been a while since I’ve used FreeBSD, so I couldn’t precisely remember which way was the correct way of building binary packages. Some of the more “official” documentation seems to suggest creating a jail and building the packages from there. While the jailed approach is a good one, it isn’t exactly what I was looking for since the FreeBSD system I have running in a VM roughly mirrors my requirements for one that I’m intending to install on my desktop. As it turns out, I had forgotten about pkg_create; more importantly, I didn’t know that since FreeBSD 6.0, pkg_create allows for generating all dependencies for a given package (the last version of FreeBSD I used was 5.2).

Anyway, I’ll cut this short. I found this very handy link for creating binary packages in FreeBSD: http://www.math.colostate.edu/~reinholz/freebsd/pkg_create.html.

Edit May 25th, 2010: The link above now returns a 404 Not Found error, and I’ve long since forgotten what its contents were. However, archive.org still has a copy of this site from 2007. I’m not sure when it was taken down, and it’s possible that the version (above) doesn’t contain some newer, more interesting information. While I don’t remember precisely what excited me about the original link, I think it had something to do with the fact that pkg_create supports grabbing all of the dependencies in a single, fell swoop. While searching around to see if I could remember why I found this so exciting, I discovered that it’s possible to create a package of all installed ports on the system. You can find some tips here on how to do exactly that (scroll down to the second post).

***

Leave a comment

Valid tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>