Version 13 (modified by solj, 12 years ago) (diff)


Building Debian Packages

Bcfg2 Packaging

  • Install packages necessary for building bcfg2
    apt-get build-dep bcfg2 bcfg2-server

or, if the available repositories do not have any version of bcfg2, try something like:

apt-get install cdbs docbook-xsl libxslt1.1 python-dev python2.4-dev sgml-base xml-core xsltproc fakeroot

  • Untar the sources - or for bleeding edge, svn co
  • cd into the debian/ subdirectory
  • Optional: if you want to have a special name for your own package, edit the first line of changelog: change eg. "(" to "("
  • run ./ <python version>
    This will setup the package to install python properly.
    <python version> is either:
    • 2.3 (for debian sarge),
    • 2.4 (for breezy, dapper, and nexenta <= alpha 6)
    • pycentral (for etch, feisty and edgy, gutsy, hardy).

  • cd ..
  • run "fakeroot dpkg-buildpackage -uc -us"
  • enjoy your freshly built packages

Python SSL Backport Packaging

As of Bcfg2 1.0, Bcfg2 has switched to the in-tree ssl module included with python 2.6. A backport exists for 2.3, 2.4, and 2.5. With this, M2Crypto is not needed, and tlslite is no longer included with bcfg2 sources. The ssl module can be found here. See Authentication? for details.

To build a package of the ssl backport for .deb based distributions that don't ship with python 2.6, you can follow these instructions, which use stdeb. Alternatively if you happen to have .deb packaging skills, it would be great to get policy-complaint .debs into the major deb-based distributions.

sudo aptitude install python-all-dev fakeroot python-setuptools
sudo easy_install stdeb
tar xvfz ssl-1.14.tar.gz
cd ssl-1.14
cd deb_dist/ssl-1.14
dpkg-buildpackage -rfakeroot -uc -us
sudo dpkg -i ../python-ssl_1.14-1_amd64.deb

For complete bcfg2 goodness, you'll also want to package stdeb using stdeb:

sudo aptitude install apt-file
tar xvfz stdeb-0.3.tar.gz
cd stdeb-0.3
cd deb_dist/stdeb-0.3
dpkg-buildpackage -rfakeroot -uc -us
sudo dpkg -i ../python-stdeb_0.3-1_all.deb