Random collection of pbuilder tricks

How to include local packages in the build

This is needed when you have to build and upload both a library, then a package depending on it:

  1. Create a directory for your dependencies (say /path/to/the/dir/deps)
  2. Add this to the configuration of pbuilder:

    OTHERMIRRORSITE="deb file:///path/to/the/dir/deps ./"
    BINDMOUNTS="/path/to/the/dir/deps"
    HOOKDIR="/path/to/hook/dir"
  3. create your base.tgz or update with --override-config so pbuilder picks up the sources.list changes
  4. put a file like D05deps to your $HOOKDIR, make it executable and put this in there:

    (cd /path/to/the/dir/deps; apt-ftparchive packages . > Packages)
    apt-get update
  5. build the library
  6. copy the resulting debs into /path/to/the/dir/deps
  7. build the application

Next time you start with step 5 :-).