Archive for April 22nd, 2007

Set up a perfect rPath Linux development platform for making your own custom-flavor Linux

Sunday, April 22nd, 2007

The combination of rPath Builder and VMWare Player is a perfect tool for quick web development and distribution, and a quick way to play with Linux right on your desktop.

When trying to build the Ultimate WordPress MU (MultiUser) Appliance, I started to learn rBuilder Online, which I found is not as newbie-friendly as it should be. Thus I wrote this post to record my learning and hopefully it will be shorten your learning time.

The purpose of this tutorial is to get you started in setting up a rBuilder Online project. and use a local rPath Virtual Machine to checkout, test, build and commit your own packages to rBuilder Online. In the end, you will be able to create a virtual machine disk image online, containing your customized Linux.

If you just want to use pre-built packages and organize them into a customized Linux, you can simply use the web interface in rBuilder Online. But if you need to build your own package, please follow the guide here.

To start, you will need at least VMWare Player or VMWare Server (Fusion if you are using Intel Macs) installed on your machine. Make sure you have at least 512MB of physical memory, because the Linux Virtual Machine needs some of your physical memory.Once you have set up your Virtualization environment, download the rPath Linux VMWare Player image. Go to the rPath Linux project website, find a release (currently 1.0.5) and download the VMWare Player image.

While you are downloading the file, get yourself a free account on rPath Builder Online and create a new project. However, please note that the projects hosted on rBuilder Online would be open-source, which means if you want to keep your code secret, you will need to set up your own rBuilder environment. I don’t know how to do yet, but be sure to check out the wiki, though.

All ready! I guess you already got the downloaded zip file for rPath Linux. Unzip it to a folder and use VMWare Player/Server to open the .vmx file. Boot up the Virtual Machine. You will be soon welcomed by a graphical interface from rPath Linux.

Use username: root and empty password to log in.

Open up a text terminal (upper-left corner: Application -> System Tools -> Terminal)

type in the following commands to update the software and install the rmake building tool:

conary updateall
conary update rmake --resolve
service rmake on

Now, the system is almost ready for building packages. But we need to make some new packages. I am not going to the details here because you can follow the easy tutorial in the wiki. Note, you cannot cook new packages using root user, so you will need to create yourself a new user in the system.

After finding the right recipe for your application and cooking it for a test, you are about ready to build it into a trove.

Take a quick look at the workflow for rMake. For a simple package, you can just do this:

rmake build wpmu.recipe

Finally, commit your build into the rBuilder Online repository. Replace the number 1 with any job number you see when you use rmake to build your recipe.

rmake commit 1

Now, you can simply go to rBuilder Online and use the web interface to add your package to a group and cook it.

After cooking the group, you can make a build based on it, and download the disk image with your own customizations! Have fun!