Ubuntu – how to do a pbuilder-dist build with dependencies in a ppa

packagingpbuilder-distppa

I'm trying to build a package for my ppa that uses packages from two other ppas. I want to do a test build using pbuilder-dist. I have done this before and I know that I need a combination of:

  • OTHERMIRROR in ~/.pbuilderrc
  • --override-config, but I'm not sure when to add it to the pbuilder-dist call
  • pbuilder-dist raring update and pbuilder-dist raring build <pkg>.dsc
  • maybe other things?

Can someone give a detailed description? I have tried different combinations, but nothing seems to work.

The two ppas I need are ppa:gnome3-team/gnome3 and ppa:tkluck/gnome3. Thanks!

Best Answer

I'm using pbuilder with an enhanced config and not pbuilder-dist but the steps should be basically the same:

  1. Add your extra sources to the OTHERMIRROR variable in your ~/.pbuilderrc:

    OTHERMIRROR="deb http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu raring main|deb http://ppa.launchpad.net/tkluck/gnome3/ubuntu raring main"
    
  2. Chroot into your pbuilder environment to add the repository keys (or alternatively create a local keyring with those two keys and add it to APTKEYSTRINGS variable or add your local /etc/apt/trusted.gpg keyring):

    pbuilder-dist raring login --save-after-login
    apt-key adv --keyserver pgp.mit.edu --recv-keys 3B1510FD 568F2AD3
    exit
    

    (Of course you can extend your sources.list directly and skip step 1 and 3 but an pbuilder-dist update will reset the sources.list.)

  3. Update your pbuilder environment (with plain pbuilder you have to add --override-config):

    pbuilder-dist raring update --release-only
    

    Note: Since raring a development release has the proposed sources enabled as default. This is done by passing the proposed sources to pbuilder's --othermirror command line option - which overwrites the config file value. So you have to use the --release-only switch.

  4. Build your package:

    pbuilder-dist raring build YOURPACKAGE.dsc
    
Related Question