The below steps are to set up a local Debian auto-building system similar to that of
Launchpad PPA. Within the steps, it is supposed that a local Debian repository has been already configured as
written before.
1 Install `rebuildd', `pbuilder', and `devscripts' packages.
2 Edit /etc/default/rebuildd configuration as follows:
START_REBUILDD=1
DISTS="lenny"
3 Run `sudo rebuildd-init-build-system' and `sudo rebuildd init' to initialize the `pbuilder' chroot environent and `rebuildd' database, respectively.
4 Add the local repository to /etc/apt/sources.list on the host machine (`deb-src
http://localhost/debian codedot main').
5 Create /var/www/debian/bin/{addjobs,getsrc,putres} scripts with mode 755 as follows:
( Self-written scripts )6 Edit /etc/rebuildd/rebuilddrc configuration as follows:
source_cmd = /var/www/debian/bin/getsrc ${d} ${p} ${v}
post_build_cmd = /var/www/debian/bin/putres ${d} ${p} ${v} ${a}
build_cmd = pbuilder build --debbuildopts -b --basetgz /var/cache/pbuilder/${d}-${a}.tgz ${p}_${v}.dsc
7 Append /var/www/debian/conf/distributions with two lines:
Log: logfile
--changes /var/www/debian/bin/addjobs
8 Create /var/lib/pbuilder/hooks/D50update script with mode 755 as follows:
#!/bin/sh
/usr/bin/apt-get update
9 Run the command `pbuilder --update --basetgz /var/cache/pbuilder/lenny-*.tgz --override-config --othermirror "deb
http://localhost/debian codedot main|deb-src
http://localhost/debian codedot main"'.
10 Start `rebuildd' service: `sudo /etc/init.d/rebuildd start'.
After the above steps have been done, new source packages uploaded into the local repository (e.g. using `dput local *.change' command) will be automatically built by the system, and resulting binary packages if succeeded will be uploaded into the repository as well.