Wednesday, November 05, 2008

Metro 1.1 Custom Builds

Hey, I’ve just updated the Metro wiki with info on how to use Metro to perform Custom Builds. Armed with this info, you will be able to create your own customized versions of Gentoo. You can use everything from a customized Portage tree, to customized global and local USE variables and keywords, and custom package lists.

Dive in and let me know how Metro custom builds work for you! Post your feedback in the blog comments below.

Note: If you already have Metro installed, just run “git pull” in the /root/git/metro directory to automatically download all the latest Metro updates.

UPDATE: I've also updated the QuickStart Guide so you can see how I use fcron and build.sh to automate my daily builds. Armed with this info, you will be able to duplicate my daily build routine on your local workstation!

ANOTHER UPDATE: If you are using the Funtoo Portage tree, you will now find a dev-util/metro-1.1.ebuild that you can emerge to install Metro :)

8 comments:

Jupiter said...

Awesome work. With 'main.spec' added i have now been able to complete a Custom build with my personal CFLAGS, LDFLAGS, USE variables, keywords, and custom package lists. Am now trying to take it a step further and add X and KDE to my stage3. When trying to use the command 'metro target/version: 2008.11.05 target: gentoo/emerge target/subarch: ~amd64' i get this error 'metro: "Variable target/shortname not found (stack: ['path/mirror/target', 'target/name'] )"'. I have looked and looked and am unable to figure out where to adjust this.

Jupiter

Daniel Robbins said...

Jupiter, glad to hear that you've had some excellent results! The problem you experienced with target: gentoo/emerge is probably a bug and my fault. The gentoo/emerge target is new and has not been tested nearly as much as the full stage builds, which happen 2x/day over here.

Expect it to be fixed soon.

Daniel Robbins said...

I've removed the gentoo/emerge target info from the Wiki docs for now and will re-add it when that target has been fixed.

Anonymous said...

I love this... gentoo-funtoo-git-metro is the future (and present from now on).
Thank you a lot Daniel, your work is greatly appreciated.

Anonymous said...

Daniel, do you plan on adding distcc or icecream support to Metro in the future?

Daniel Robbins said...

Anonymous, well, I do not use distcc or icecream but support can be added. It is actually quite easy to add and it is something you could do without even touching the python code. Look at targets/gentoo/stage/steps.spec (the "setup" block) and you'll see how ccache is enabled.

Note that the only ccache-specific Python code is a little glue code that will see if the "ccache" option is enabled. If so, and it finds /root/.ccache on the root filesystem, then it will bind mount it to /var/tmp/ccache in the chroot. *Everything else* is done in the recipe and easy to modify.

So assuming that distcc and icecream don't need a bind mount, support for them can be added by simply upgrading the recipe. So that means you can do it by just modifying the "setup" block in the steps.spec file, and then just send me patches ;)

jaytho said...

Daniel,

Very cool stuff-thanks for keeping the gentoo folk grounded,-they seem so sensitive- watching things unravel is similar to watching our economy unravel.

I can't tell without digging into the code, but would Metro be of use packaging distros for alien architectures, say, a suite of tools and dependencies for embedded applications or architectures? Or is it hardwired to the specifics of mainstream architectures and gentoo?

Thanks again.

Daniel Robbins said...

Metro can be used for Gentoo and non-Gentoo builds, and it can use Portage and non-Portage package managers. There's no reason why it can't interface with RPM or or be adapted to other build processes. The one thing it does require is that it can do all its work in a chroot or subdirectory. So for an RPM-based distro, you would need to create a chrootable version of the distro similar to a Gentoo stage3 to work from.