Sunday, December 26, 2010

Setting up Mach build environment

So, clearly taking me a bit longer to get this going than I thought it would.  So here's the first tidbit I can give pretty quickly: I'm working on setting up a build environment using mach (stands for Make A CHroot).  This is a nifty tool to work in a clean build environment, and can be found here.  Basically, it will pull the packages you need to be able to get a clean build for whatever software you're working with.  If you are missing a dependancy, it will pull it automagically, if it can be found in the repos.  It also allows you to be able to build software for any version that is supported (ls /etc/mach/dists.d/ to get an idea).

Anyway, I'm just going through setting this up again, on a Centos 5 system that I'm planning on using for builds, and wanted to make a few notes, since the documentation still makes you dig a bit:

Steps followed so far:

1. set up yum for epel repo
2. run: yum install mach
3. add build user(s) to the mach group (ie: usermod -G mach <username>)
4. run: mach -r <root> setup build
5. go check irc or something (approx 5 mins)

remember that the root name needs to have an extension after the architechture, since that is what it is looking for in the /etc/mach/dists.d/ config files (separate file for each major os version).  For instance, the base centos 5 root that I just created wouldn't work as "centos-5-i386", it had to be "centos-5-i386-os".

Also, something else that should be mentioned is that it doesn't look like this package currently is able to perform builds for ubuntu/debian packages, but it does support apt-get, so maybe a config file could be created?

No comments:

Post a Comment