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!


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

    (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
  • Thanks for your answer! It doesn't seem to work for me, however. Any changes I make during a pbuilder-dist raring login session are discarded. According to the documentation in pbuilder, that's normal behaviour.
    – Timo Kluck
    Mar 12 '13 at 9:31
  • Also, even without importing the keys, I would expect the update step to complain for missing keys for some sources. It doesn't, so it seems to completely ignore the OTHERMIRROR variable.
    – Timo Kluck
    Mar 12 '13 at 9:32
  • Sorry, forgot the important --save-after-login. Now it will work with a plain ~/.pbuilderrc (I have checked it myself).
    – Lasall
    Mar 12 '13 at 12:49
  • This works for me if, inside the login --save-after-login session, I add the deb line to /etc/apt/sources.list and call apt-get update. It seems to fail with just pbuilder-dist raring update, and I'm not sure if I can call it again or that it will just overwrite what I had just accomplished. Maybe you can explain and update your answer?
    – Timo Kluck
    Mar 12 '13 at 12:59
  • I'm not sure why it doesn't work. Is there any other content in your ~/.pbuilderrc or did you misspelled this file? I will update the answer that an update will reset the sources.list.
    – Lasall
    Mar 12 '13 at 13:30

You can also create a Dsomething file stating the repository you want to add. If you have HOOKDIR="${HOME}/.pbuilder-hooks/" in your ~/.pbuilderrc, then a file called $HOME/.pbuilder-hooks/D10addppa could exist with the following content:


echo "deb deb http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu raring main" >> /etc/apt/sources.list
echo "deb http://ppa.launchpad.net/tkluck/gnome3/ubuntu raring main"  >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B1510FD 568F2AD3
apt-get update

This method also keeps the PPA changes temporal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.