HowTo use svn-buildpackage with pbuilder. Benefits:


svn-buildpackage uses specific default layout. Let's setup default environment for updating an example application : trac-bitten.

somedir/          - working directory to keep all stuff in one place
+- tarballs/      - svn-buildpackage looks for downloaded original sources in this dir
+- trac-bitten/   - checkout with package files

Creating layout with necessary files:

mkdir somedir;cd somedir
mkdir tarballs
svn co svn:// trac-bitten
cd trac-bitten

Creating isolated pbuilder environment

sudo pbuilder create

Download original source files

Fetching original sources files with ?uscan using information from debian/watch file.

uscan --destdir ../tarballs --verbose --force-download


svn-buildpackage --svn-builder "pdebuild --use-pdebuild-internal"

pbuilder has a helper named pdebuild to reduce repetitious typing. It has a strange default behavior - it doesn't run all package building commands inside isolated environment (chroot). For example, clean rule is invoked outside chroot. This is described here. To force all commands to occur inside chroot, --use-pdebuild-internal option is required.

If you modified debian package files, you will --svn-ignore-new key to proceed:

svn-buildpackage --svn-ignore-new --svn-builder "pdebuild --use-pdebuild-internal"


The best way is to use piuparts command that tests install, upgrade and removal inside chroot.

piuparts -p trac-bitten_0.6b3-1_all.deb -d lenny

'-p' key instructs to use pbuilder environment


If you're going to upload package somewhere, you need to sign it.

cd ../build-area/
debsign trac-bitten_0.6b3-1_i386.changes


If you're reading this text then you probably want to upload your package to

dput mentors  trac-bitten_0.6b3-1_i386.changes