MDLog:/sysadmin

The Journal Of A Linux Sysadmin

Bcfg2 0.9.6 Debian Package for Etch

| Comments

The Bcfg2 version available in debian etch is quite old (v0.8.6), while the one in lenny is newer v0.9.5.7, it still isn’t the latest stable version 0.9.6 that was released in November last year. Since this version fixes many bugs it is the version that is recommended to use in production at this time (unfortunately it breaks the reporting system, that will not be fixed until the release 1.0 planed for the next months). This post will show how we can rebuild a debian package for the latest stable bcfg2 release so we can easily deploy it on several machines.

Bcfg2 is a debian friendly project, meaning they provide inside the source package all what is needed to build a debian package very easy. We will use for this a debian etch system, but this should work on any debian based system.

1. Download

First we need to download the source package:

1
2
3
wget ftp://ftp.mcs.anl.gov/pub/bcfg/bcfg2-0.9.6.tar.gz
tar -zxvf bcfg2-0.9.6.tar.gz
cd bcfg2-0.9.6

2. Install dependencies

Next we need to install the dependencies necessary to build the package. Depending on the state of your system this might look different from the output bellow. You will need to have basic debian building tools; in case you don’t have them already install them now:

1
apt-get install devscripts build-essential fakeroot cdbs pbuilder

Since the package is prepared for multiple distributions types and versions of python, we will have to select that we want to use it for debian etch pycentral:

1
2
cd debian
./buildsys-select.sh pycentral

(the available choices are 2.3, 2.4 and pycentral)

Now we can move on and install the rest of the dependencies (python-dev, etc.):

1
2
cd ..
/usr/lib/pbuilder/pbuilder-satisfydepends

3. Build and deploy the package

Finally we can now rebuild the package:

1
2
3
4
5
**debuild -us -uc**
cd ..
ls *.deb
_bcfg2-server_0.9.6-0.1_all.deb
bcfg2_0.9.6-0.1_all.deb_

Probably you will want to put the resulted packages in a local debian repository to perform the upgrade easily on several systems, maybe even using bcfg2 itself ;-) .

Comments