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@50: It's best to give the tree packager its own pbuilder configuration and bh@50: directories. The default configuration uses a "pbuilder" subdirectory bh@50: in /home/builder/enterprise. If you have created the treepkg.cfg file bh@50: with at least one packager and the correct root_cmd and pbuilderrc bh@50: options (the defaults for both should be OK if you use sudo as described bh@50: above), you can create the directories, the pbuilder configuration and bh@50: the chroot environment with the script initpbuilder.py like this: bh@50: bh@50: ./initpbuilder.py --mirrorsite= bh@50: bh@50: You can specify some more mirrors with the --othermirror option. For bh@50: more information run "./initpbuilder.py --help" and consult the pbuilder bh@50: documentation. 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.