pbuilder creates isolated environment where you can install development packages without polluting your system
svn-buildpackage automates many things in PAPT workflow
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://svn.debian.org/svn/python-apps/packages/trac-bitten/trunk trac-bitten cd trac-bitten
Creating isolated pbuilder environment
sudo pbuilder create
Download original source files
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"
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 mentors.debian.org
dput mentors trac-bitten_0.6b3-1_i386.changes