bh@42: README for TreePackager bh@42: ======================= bh@42: 2007-03-19, Bernhard Herzog bh@42: bh@42: bh@42: TreePackager is a tool to automatically build debian packages from SVN. bh@42: bh@42: bh@42: Prerequisites bh@42: ------------- bh@42: bh@42: You need the following software to run TreePackager. In the list below, bh@42: parentheses contain the name of the corresponding package in Debian Etch bh@42: if its not the same as the software. The version required is usually bh@42: the one from debian etch. bh@42: bh@42: Python 2.4 (python2.4-minimal) bh@42: Debian devscripts (devscripts) bh@42: subversion bh@42: pbuilder bh@42: sudo bh@42: bzip2 bh@42: bh@42: For the web front-end you also need the following software: bh@42: bh@42: Genshi (python-genshi) bh@42: CherryPy (python-cherrypy) bh@42: bh@42: Some of the packagers require additional software. The KDEPIM bh@42: enterprise branch packagers require the following additional software: bh@42: bh@42: autoconf2.13 bh@42: automake1.9 bh@42: bh@42: bh@42: Installation bh@42: ------------ bh@42: bh@42: You can run the tree packager itself directly from the source tree. bh@42: However, you need to configure it first and setup pbuilder. bh@42: bh@42: bh@42: Configuration bh@42: ------------- bh@42: bh@42: To understand the configuration, first a few notes about the bh@42: architecture of TreePackager. The TreePackager consist of one program bh@42: that periodically updates svn working directories and if something has bh@42: changed, builds a new debian package from the working directory. The bh@42: program should run as a normal user. The sample configuration assumes bh@42: that it's the user "builder" with a home directory "/home/builder". The bh@42: default configuration manages a directory tree under bh@42: "/home/builder/enterprise". bh@42: bh@42: The binary packages are built with pbuilder. Because pbuilder uses a bh@42: chroot environment to build the packages, it must be run as root. The bh@42: tree packager therefore needs a way to run pbuilder as root even though bh@42: itself runs as a non-root user. By default the tree packager uses sudo, bh@42: so you have to setup sudo to allow the tree packager user to invoke bh@42: pbuilder without a password. This can be accomplished with the bh@42: following line in /etc/sudoers (using the default user name): bh@42: bh@42: builder ALL = NOPASSWD: /usr/sbin/pbuilder bh@42: bh@42: bh@42: Configure TreePackager bh@42: ~~~~~~~~~~~~~~~~~~~~~~ bh@42: bh@42: The file demo.cfg contains example configuration that contains most of bh@42: what is needed to package KDEPIM and kde-i18n from the KDEPIM enterprise bh@42: branch. Copy this file to treepkg.cfg and adapt it to your needs. The bh@42: comments in the file should provide enough hints to get you started. bh@42: bh@42: bh@42: Configure pbuilder bh@42: ~~~~~~~~~~~~~~~~~~ bh@42: bh@42: Currently the tree packager assumes that pbuilder has already been set up bh@42: and that the default configuration is suitable for the purposes the tree bh@42: packager instance. Normally, the default way of setting up sudo should bh@42: be OK. There is one important interaction with sudo that you need to be bh@42: aware of, though: when the user builder starts pbuilder via sudo, bh@42: pbuilder uses ~builder/.pbuilderrc as its standard configuration file. bh@42: bh@42: bh@42: Configure the web front-end bh@42: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ bh@42: bh@42: The default configuration should be OK in most cases. If you want you bh@42: can customize it in cherrypy.cfg. Start the web front-end with bh@42: bh@42: ./starttreepkgweb.py bh@42: bh@42: starttreepkgweb has some options to specify which configuration files to use.